Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
e9fcd348
Unverified
Commit
e9fcd348
authored
Dec 12, 2023
by
John Wick
Committed by
GitHub
Dec 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert intentionally plural in datas
parent
7e875cf8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
span-batches.md
specs/span-batches.md
+5
-5
No files found.
specs/span-batches.md
View file @
e9fcd348
...
@@ -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_data
s
++ 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_data
s
`
: 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_data
s
`
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`
,
`TxData
s
`
),
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_data
s
`
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`
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment