Commit e9fcd348 authored by John Wick's avatar John Wick Committed by GitHub

revert intentionally plural in datas

parent 7e875cf8
...@@ -106,7 +106,7 @@ Where: ...@@ -106,7 +106,7 @@ Where:
- `block_tx_counts`: for each block, a `uvarint` of `len(block.transactions)`. - `block_tx_counts`: for each block, a `uvarint` of `len(block.transactions)`.
- `txs`: L2 transactions which is reorganized and encoded as below. - `txs`: L2 transactions which is reorganized and encoded as below.
- `txs = contract_creation_bits ++ y_parity_bits ++ - `txs = contract_creation_bits ++ y_parity_bits ++
tx_sigs ++ tx_tos ++ tx_data ++ tx_nonces ++ tx_gases ++ protected_bits` tx_sigs ++ tx_tos ++ tx_datas ++ tx_nonces ++ tx_gases ++ protected_bits`
- `contract_creation_bits`: standard bitlist of `sum(block_tx_counts)` bits: - `contract_creation_bits`: standard bitlist of `sum(block_tx_counts)` bits:
1 bit per L2 transactions, indicating if transaction is a contract creation transaction. 1 bit per L2 transactions, indicating if transaction is a contract creation transaction.
- `y_parity_bits`: standard bitlist of `sum(block_tx_counts)` bits: - `y_parity_bits`: standard bitlist of `sum(block_tx_counts)` bits:
...@@ -115,7 +115,7 @@ Where: ...@@ -115,7 +115,7 @@ Where:
- `r` is encoded as big-endian `uint256` - `r` is encoded as big-endian `uint256`
- `s` is encoded as big-endian `uint256` - `s` is encoded as big-endian `uint256`
- `tx_tos`: concatenated list of `to` field. `to` field in contract creation transaction will be `nil` and ignored. - `tx_tos`: concatenated list of `to` field. `to` field in contract creation transaction will be `nil` and ignored.
- `tx_data`: concatenated list of variable length rlp encoded data, - `tx_datas`: concatenated list of variable length rlp encoded data,
matching the encoding of the fields as in the [EIP-2718] format of the `TransactionType`. matching the encoding of the fields as in the [EIP-2718] format of the `TransactionType`.
- `legacy`: `rlp_encode(value, gasPrice, data)` - `legacy`: `rlp_encode(value, gasPrice, data)`
- `1`: ([EIP-2930]): `0x01 ++ rlp_encode(value, gasPrice, data, accessList)` - `1`: ([EIP-2930]): `0x01 ++ rlp_encode(value, gasPrice, data, accessList)`
...@@ -186,7 +186,7 @@ The following fields stores truncated data: ...@@ -186,7 +186,7 @@ The following fields stores truncated data:
### `tx_data_headers` removal from initial specs ### `tx_data_headers` removal from initial specs
We do not need to store length per each `tx_data` elements even if those are variable length, We do not need to store length per each `tx_datas` elements even if those are variable length,
because the elements itself is RLP encoded, containing their length in RLP prefix. because the elements itself is RLP encoded, containing their length in RLP prefix.
### `Chain ID` removal from initial specs ### `Chain ID` removal from initial specs
...@@ -225,7 +225,7 @@ Deposit transactions are excluded in batches and are never written at L1 so excl ...@@ -225,7 +225,7 @@ Deposit transactions are excluded in batches and are never written at L1 so excl
There are (7 choose 2) * 5! = 2520 permutations of ordering fields of `txs`. There are (7 choose 2) * 5! = 2520 permutations of ordering fields of `txs`.
It is not 7! because `contract_creation_bits` must be first decoded in order to decode `tx_tos`. It is not 7! because `contract_creation_bits` must be first decoded in order to decode `tx_tos`.
We experimented to find out the best layout for compression. We experimented to find out the best layout for compression.
It turned out placing random data together(`TxSigs`, `TxTos`, `TxData`), It turned out placing random data together(`TxSigs`, `TxTos`, `TxDatas`),
then placing leftovers helped gzip to gain more size reduction. then placing leftovers helped gzip to gain more size reduction.
### `fee_recipients` Encoding Scheme ### `fee_recipients` Encoding Scheme
...@@ -347,7 +347,7 @@ Span-batch rules, in validation order: ...@@ -347,7 +347,7 @@ Span-batch rules, in validation order:
- `len(block_input.transactions) > 0`: -> `drop`: - `len(block_input.transactions) > 0`: -> `drop`:
when exceeding the sequencer time drift, never allow the sequencer to include transactions. when exceeding the sequencer time drift, never allow the sequencer to include transactions.
- And for all transactions: - And for all transactions:
- `drop` if the `batch.tx_data` list contains a transaction - `drop` if the `batch.tx_datas` list contains a transaction
that is invalid or derived by other means exclusively: that is invalid or derived by other means exclusively:
- any transaction that is empty (zero length `tx_data`) - any transaction that is empty (zero length `tx_data`)
- any [deposited transactions][g-deposit-tx-type] (identified by the transaction type prefix byte in `tx_data`) - any [deposited transactions][g-deposit-tx-type] (identified by the transaction type prefix byte in `tx_data`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment