-
Notifications
You must be signed in to change notification settings - Fork 118
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
Create ssz type: SubmitBlockRequestV2Optimistic #518
Conversation
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more. @@ Coverage Diff @@
## main #518 +/- ##
==========================================
+ Coverage 32.15% 33.24% +1.08%
==========================================
Files 24 24
Lines 4876 5078 +202
==========================================
+ Hits 1568 1688 +120
- Misses 3116 3171 +55
- Partials 192 219 +27
Flags with carried forward coverage won't be shown. Click here to find out more.
|
*/ | ||
type SubmitBlockRequestV2Optimistic struct { | ||
Message *apiv1.BidTrace | ||
ExecutionPayloadHeader *consensuscapella.ExecutionPayloadHeader |
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.
what's the upgrade path for deneb?
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.
the deneb blocks will have the kzg commitments. The ExecutionPayload and the ExecutionPayloadHeader each have two new fields, blob_gas_used
and excess_blob_gas
for sure will need to include these types because they are part of what the validator signs over.
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.
are you making a versioned struct for future upgrades?
📝 Summary
Creating the type and SSZ encoding needed for the v2 optimistic builder submissions.
This type implements the standard SSZ interface
We also define a custom decode that only parses the header part of the bid
UnmarshalSSZHeaderOnly
.This follows up on the series: #479, #491, #494, #498, #513, #514, which aim at reducing the diff and productionizing #466.
⛱ Motivation and Context
SubmitBlockRequestV2Optimistic is the v2 request from the builder to submit a block. The message must be SSZ encoded. The first three fields are at most 944 bytes, which fit into a single 1500 MTU ethernet packet. The
UnmarshalSSZHeaderOnly
function just parses the first three fields, which is sufficient data to set the bid of the builder. TheTransactions
andWithdrawals
fields are required to construct the full SignedBeaconBlock and are parsed asynchronously.📚 References
https://notes.ethereum.org/@mikeneuder/optimistic-v2
https://github.com/michaelneuder/optimistic-relay-documentation/blob/main/towards-epbs.md#optimistic-relay-v2-header-only-parsing
✅ I have run these commands
make lint
make test-race
go mod tidy
CONTRIBUTING.md