-
Notifications
You must be signed in to change notification settings - Fork 996
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
Executable EIP-4844 specs (PR #2901 squashed and rebased) #2937
Executable EIP-4844 specs (PR #2901 squashed and rebased) #2937
Conversation
- Move more code into polynomial-commitments.md - Implement aggregated sidecar verification logic from PR ethereum#2915 - Rename `kzgs` to `kzg_commitments` Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
- Move constants around - Implement missing functions to make the spec executable Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
- Implement all the required glue code to make things executable - Implement a dummy KZG trusted setup Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the rebase! LGTM! 🎉
I also reviewed git diff pr2937..eip4844-exe
.
We can close #2901 now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! a few minor nits
specs/eip4844/beacon-chain.md
Outdated
all_versioned_hashes = [] | ||
for tx in transactions: | ||
if tx[0] == BLOB_TX_TYPE: | ||
all_versioned_hashes.extend(tx_peek_blob_versioned_hashes(tx)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extend
is a bit python. I had to look it up! so most non-pythonista readers of speak might need to
specs/eip4844/p2p-interface.md
Outdated
@@ -117,12 +106,14 @@ Alias `sidecar = signed_blobs_sidecar.message`. | |||
- _[REJECT]_ the `sidecar.blobs` are all well formatted, i.e. the `BLSFieldElement` in valid range (`x < BLS_MODULUS`). | |||
- _[REJECT]_ The KZG proof is a correctly encoded compressed BLS G1 Point -- i.e. `bls.KeyValidate(blobs_sidecar.kzg_aggregated_proof) | |||
- _[REJECT]_ the beacon proposer signature, `signed_blobs_sidecar.signature`, is valid -- i.e. | |||
```python | |||
|
|||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
```python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a silly workaround for not including this code snippet to pyspec. 😅
Alternatively, we can use "```py". Still not perfect though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this code snippet into listed multi-steps: ec980da
|
||
After retrieving the execution payload from the execution engine as specified in Bellatrix, | ||
the blobs are retrieved and processed: | ||
|
||
```python | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this code snippet expected to be run by the validator?
I would make "are retrieved and processed" more as a direction rather than just a passive statement that it happens. "execute the following" or something
return [VersionedHash(opaque_tx[x:x+32]) for x in range(blob_versioned_hashes_offset, len(opaque_tx), 32)] | ||
blob_versioned_hashes_offset = ( | ||
message_offset | ||
+ uint32.decode_bytes(opaque_tx[(message_offset + 156):(message_offset + 160)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this math previously incorrect? (that it previously didn't add in message_offset
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, it was incorrect.
90edfb9
to
8776c05
Compare
…ig_fork_epoch_overrides` `config_fork_epoch_overrides`: since Capella and EIP4844 are in parallel, need to check if the field exists Update `compute_fork_version`
8776c05
to
ec980da
Compare
Updated
|
Here is a squashed and rebased version of PR #2901 which makes EIP-4844 executable.
Squashing was non-trivial because of the various
Merge branch 'dev' into eip4844-exe
commits that were included in #2901, but I think this is a correct attempt.@hwwhww I would appreciate a review here. The
git diff
between this branch and the branch from PR #2901 should be all the changes indev
that happened inbetween and were orthogonal to #2901.