-
Notifications
You must be signed in to change notification settings - Fork 975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Synchronously check all transactions
to have non-zero length
#3885
Open
etan-status
wants to merge
7
commits into
ethereum:dev
Choose a base branch
from
etan-status:bf-emptytxspec
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Aug 14, 2024
-
Synchronously check all
transactions
to have non-zero lengthAs part of `newPayload` block hash verification, the `transactionsRoot` is computed by the EL. Because Merkle-Patricia Tries cannot contain `[]` entries, MPT implementations typically treat setting a key to `[]` as deleting the entry for the key. This means that if a CL receives a block with `transactions` containing one or more zero-length transactions, that such transactions will effectively be skipped when computing the `transactionsRoot`. Note that `transactions` are opaque to the CL and zero-length transactions are not filtered out before `newPayload`. ```python # https://eips.ethereum.org/EIPS/eip-2718 def compute_trie_root_from_indexed_data(data): """ Computes the root hash of `patriciaTrie(rlp(Index) => Data)` for a data array. """ t = HexaryTrie(db={}) for i, obj in enumerate(data): k = encode(i, big_endian_int) t.set(k, obj) # Implicitly skipped if `obj == b''` (invalid RLP) return t.root_hash ``` In any case, the `blockHash` validation may still succeed, resulting in a potential `SYNCING/ACCEPTED` result to `newPayload` by spec. Note, however, that there is an effective hash collision if a payload is modified by appending one or more zero-length transactions to the end of `transactions` list: In the trivial case, a block with zero transactions has the same `transactionsRoot` (and `blockHash`) as one of a block with one `[]` transaction (as that one is skipped). This means that the same `blockHash` can refer to a valid block (without extra `[]` transactions added), but also can refer to an invalid block. Because `forkchoiceUpdated` refers to blocks by `blockHash`, outcome may be nondeterministic and implementation dependent. If `forkchoiceUpdated` deems the `blockHash` to refer to a `VALID` object (obtained from a src that does not have the extra `[]` transactions, e.g., devp2p), then this could result in honest attestations to a CL beacon block with invalid `[]` transactions in its `ExecutionPayload`, risking finalizing it. The problem can be avoided by returning `INVALID` in `newPayload` if there are any zero-length `transactions` entries, preventing optimistic import of such blocks by the CL.
Configuration menu - View commit details
-
Copy full SHA for e1eaa7f - Browse repository at this point
Copy the full SHA e1eaa7fView commit details
Commits on Sep 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c746890 - Browse repository at this point
Copy the full SHA c746890View commit details
Commits on Oct 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1e96d23 - Browse repository at this point
Copy the full SHA 1e96d23View commit details
Commits on Oct 21, 2024
-
Update specs/deneb/beacon-chain.md
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for a6095bf - Browse repository at this point
Copy the full SHA a6095bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for f58b5ba - Browse repository at this point
Copy the full SHA f58b5baView commit details -
Configuration menu - View commit details
-
Copy full SHA for 44d5a1b - Browse repository at this point
Copy the full SHA 44d5a1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f964b0 - Browse repository at this point
Copy the full SHA 0f964b0View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.