@@ -123,8 +123,48 @@ This section describes the codec of three data structures in the Rollup contract
123123The latest update to the codec was introduced in the [ Bernoulli upgrade] ( /technology/overview/scroll-upgrades#bernoulli-upgrade ) .
124124
125125<Tabs sharedStore = " upgrades" client :visible >
126+ <Fragment slot = " tab.darwin" >darwin</Fragment >
126127<Fragment slot = " tab.bernoulli" >bernoulli</Fragment >
127128<Fragment slot = " tab.archimedes" >archimedes</Fragment >
129+ <Fragment slot = " panel.darwin" >
130+ <slot name = " darwin" />
131+ #### ` BatchHeader ` Codec
132+
133+ | Field | Bytes | Type | Offset | Description |
134+ | ------------------------ | ------- | ----------- | ------ | --------------------------------------------------------------- |
135+ | ` version ` | 1 | ` uint8 ` | 0 | The batch header version |
136+ | ` batchIndex ` | 8 | ` uint64 ` | 1 | The index of the batch |
137+ | ` l1MessagePopped ` | 8 | ` uint64 ` | 9 | The number of L1 messages popped in the batch |
138+ | ` totalL1MessagePopped ` | 8 | ` uint64 ` | 17 | The number of total L1 messages popped after the batch |
139+ | ` dataHash ` | 32 | ` bytes32 ` | 25 | The data hash of the batch |
140+ | ` blobVersionedHash ` | 32 | ` bytes32 ` | 57 | The versioned hash of the blob with this batch’s data |
141+ | ` parentBatchHash ` | 32 | ` bytes32 ` | 89 | The parent batch hash |
142+ | ` lastBlockTimestamp ` | 8 | ` uint64 ` | 121 | The timestamp of the last block in this batch |
143+ | ` blobDataProof ` | 64 | ` bytes32[2] ` | 129 | The KZG challenge point evaluation proof |
144+
145+ #### ` Chunk ` Codec
146+
147+ | Field | Bytes | Type | Offset | Description |
148+ | ---------------- | ------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
149+ | ` numBlocks ` | 1 | ` uint8 ` | 0 | The number of blocks in the chunk |
150+ | ` block[0] ` | 60 | ` BlockContext ` | 1 | The block information of the 1st block |
151+ | ... | ... | ... | ... | ... |
152+ | ` block[i] ` | 60 | ` BlockContext ` | ` 60*i+1 ` | The block information of ` i+1 ` -th block |
153+ | ... | ... | ... | ... | ... |
154+ | ` block[n-1] ` | 60 | ` BlockContext ` | ` 60*n-59 ` | The block information of the last block |
155+
156+ #### ` BlockContext ` Codec
157+
158+ | Field | Bytes | Type | Offset | Description |
159+ | ----------------- | ----- | --------- | ------ | ----------------------------------------------------------------------------------- |
160+ | ` blockNumber ` | 8 | ` uint64 ` | 0 | The block number |
161+ | ` timestamp ` | 8 | ` uint64 ` | 8 | The block time |
162+ | ` baseFee ` | 32 | ` uint256 ` | 16 | The base fee of this block. Currently, it is always 0, because we disable EIP-1559. |
163+ | ` gasLimit ` | 8 | ` uint64 ` | 48 | The gas limit of this block |
164+ | ` numTransactions ` | 2 | ` uint16 ` | 56 | The number of transactions in this block, including both L1 & L2 txs |
165+ | ` numL1Messages ` | 2 | ` uint16 ` | 58 | The number of L1 messages in this block
166+
167+ </Fragment >
128168 <Fragment slot = " panel.bernoulli" >
129169 <slot name = " bernoulli" />
130170
0 commit comments