This document guides you to verify if Span Batches are activated well; it’s the sole major update in Delta.
Please refer to Delta Node Upgrade Guide for the node upgrade.
The following verification steps assume the operator put --batch-type=1
in op-batcher & passed the Delta hard fork time.
We should check if the op-batcher successfully enabled Span Batches.
op-batcher posts the following logs when it creates a channel in Span Batches. Please check if your op-batcher is posting the following logs—batch_type
should be equals to 1.
t=2023-12-05T08:52:50+0000 lvl=info msg="Created channel" (...) batch_type=1
t=2023-12-05T08:53:06+0000 lvl=info msg="Channel is fully submitted" (...) min_inclusion_block=5 max_inclusion_block=5
Please start the verification script as follows:
$ cd op-chain-ops/cmd/check-derivation # Optimism monorepo
$ go run main.go check-consolidation --l2-chain-id=<YOUR_CHAIN_ID> --l2-rpc-url=<YOUR_RPC> --private-key=<SENDER_PRIVATE_KEY>
It’s a success if the script ended with the following message: Succeeded
.
Please run the following commends to decode & check out the Span Batches posted in L1:
$ cd op-node/cmd/batch_decoder
# fetches channel frames that includes Span Batches
# please check start & end blocks from op-batcher logs.
# check `min_inclusion_block` & `max_inclusion_block` in the **"Channel is fully submitted"** message.
$ go run main.go fetch --start=<BATCH_START_L1_BLOCK> --end=<BATCH_END_L1_BLOCK> --inbox=<BATCH_INBOX_ADDR> --out=./artifacts/devnet/transactions_cache --sender=<BATCH_TX_SENDER> --l1=<L1_RPC>
# decode frames into Span Batches, and save them into JSON files
$ go run main.go reassemble --inbox=<BATCH_INBOX_ADDR> --in=./artifacts/devnet/transactions_cache --out=./artifacts/devnet/channel_cache --l2-chain-id=<CHAIN_ID> --l2-genesis-timestamp=<FILL_ME>
# check span batches with your own eyes!
$ vim ./artifacts/devnet/channel_cache/***.json**
Please check if the JSON files have BatchTypes
as 1
—Span Batches.