Skip to content

Commit

Permalink
remove Tabs, just use multiple sections for now
Browse files Browse the repository at this point in the history
  • Loading branch information
isabellewei committed Apr 12, 2024
1 parent ce16427 commit 529e7fe
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/content/docs/en/technology/chain/rollup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,8 @@ At this stage, the state root of the latest finalized batch can be used trustles

This section describes the codec of three data structures in the Rollup contract: `BatchHeader`, `Chunk`, and `BlockContext`.

<NetworkTabs>
<Fragment slot="Mainnet">
### `BatchHeader` Codec
### Scroll Mainnet
#### `BatchHeader` Codec

| Field | Bytes | Type | Offset | Description |
| ------------------------ | ------- | ----------- | ------ | --------------------------------------------------------------- |
Expand All @@ -135,7 +134,7 @@ This section describes the codec of three data structures in the Rollup contract
| `parentBatchHash` | 32 | `bytes32` | 57 | The parent batch hash |
| `skippedL1MessageBitmap` | dynamic | `uint256[]` | 89 | A bitmap to indicate which L1 messages are skipped in the batch |

### `Chunk` Codec
#### `Chunk` Codec

| Field | Bytes | Type | Offset | Description |
| ---------------- | ------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand All @@ -147,7 +146,7 @@ This section describes the codec of three data structures in the Rollup contract
| `block[n-1]` | 60 | `BlockContext` | `60*n-59` | The block information of the last block
| `l2Transactions` | dynamic | `bytes` | `60*n+1` | The concatenated RLP encoding of L2 transactions with signatures. The byte length (`uint32`) of RLP encoding is inserted before each transaction. | |

### `BlockContext` Codec
#### `BlockContext` Codec

| Field | Bytes | Type | Offset | Description |
| ----------------- | ----- | --------- | ------ | ----------------------------------------------------------------------------------- |
Expand All @@ -157,9 +156,10 @@ This section describes the codec of three data structures in the Rollup contract
| `gasLimit` | 8 | `uint64` | 48 | The gas limit of this block |
| `numTransactions` | 2 | `uint16` | 56 | The number of transactions in this block, including both L1 & L2 txs |
| `numL1Messages` | 2 | `uint16` | 58 | The number of L1 messages in this block
</Fragment>
<Fragment slot="Sepolia">
### `BatchHeader` Codec

### Scroll Sepolia

#### `BatchHeader` Codec

| Field | Bytes | Type | Offset | Description |
| ------------------------ | ------- | ----------- | ------ | --------------------------------------------------------------- |
Expand All @@ -172,7 +172,7 @@ This section describes the codec of three data structures in the Rollup contract
| `parentBatchHash` | 32 | `bytes32` | 89 | The parent batch hash |
| `skippedL1MessageBitmap` | dynamic | `uint256[]` | 121 | A bitmap to indicate which L1 messages are skipped in the batch |

### `Chunk` Codec
#### `Chunk` Codec

| Field | Bytes | Type | Offset | Description |
| ---------------- | ------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand All @@ -183,7 +183,7 @@ This section describes the codec of three data structures in the Rollup contract
| ... | ... | ... | ... | ... |
| `block[n-1]` | 60 | `BlockContext` | `60*n-59` | The block information of the last block |

### `BlockContext` Codec
#### `BlockContext` Codec

| Field | Bytes | Type | Offset | Description |
| ----------------- | ----- | --------- | ------ | ----------------------------------------------------------------------------------- |
Expand All @@ -193,6 +193,5 @@ This section describes the codec of three data structures in the Rollup contract
| `gasLimit` | 8 | `uint64` | 48 | The gas limit of this block |
| `numTransactions` | 2 | `uint16` | 56 | The number of transactions in this block, including both L1 & L2 txs |
| `numL1Messages` | 2 | `uint16` | 58 | The number of L1 messages in this block
</Fragment>
</NetworkTabs>


0 comments on commit 529e7fe

Please sign in to comment.