-
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
Add support for Electra #613
base: main
Are you sure you want to change the base?
Conversation
@@ -425,6 +453,8 @@ which is sufficient data to set the bid of the builder. The `Transactions` | |||
and `Withdrawals` fields are required to construct the full SignedBeaconBlock | |||
and are parsed asynchronously. | |||
|
|||
TODO(JWT): Does this need to be updated? It hasn't been updated 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.
can be separate upgrade added deneb support here #618
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.
Yes, good idea. Thank you for making that PR. I will remove this comment.
I'm working on testing this with kurtosis this week. There are some minor issues. Most importantly, I forgot that we needed to add Electra support to flashbots/builder so simulation works. Will mark as a draft for now. |
@@ -878,6 +879,9 @@ func TestCheckSubmissionPayloadAttrs(t *testing.T) { | |||
for _, tc := range cases { | |||
t.Run(tc.description, func(t *testing.T) { | |||
_, _, backend := startTestBackend(t) | |||
backend.relay.capellaEpoch = 1 |
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.
maybe setting this should be part of startTestBackend
// deneb specific logging | ||
if payload.Deneb != nil { | ||
if payload.Version >= spec.DataVersionDeneb { | ||
blobs, err := payload.Blobs() |
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 purpose of the GetBlockSubmissionInfo
struct is so we don't need to extract each field individually and handle the error once. you should be able to access these fields directly e.g. submission.Blobs
return ErrHeaderHTRMismatch | ||
} | ||
|
||
if len(bb.Electra.Message.Body.BlobKZGCommitments) != len(payload.Electra.BlobsBundle.Commitments) { |
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.
potential to extract to a separate function with BlobKZGCommitments
as input
services/api/service.go
Outdated
withdrawalsRoot phase0.Root | ||
parentBeaconRoot *phase0.Root | ||
payloadAttributes beaconclient.PayloadAttributes | ||
depositReceiptsRoot phase0.Root |
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.
has https://github.com/attestantio/go-eth2-client/blob/master/api/v1/payloadattributesevent.go been updated for latest payload attributes?
If so it can replace the types https://github.com/flashbots/mev-boost-relay/blob/main/beaconclient/prod_beacon_instance.go#L63-L83 which need updating to accept the new payload attributes. You'll also need to update processPayloadAttributes
in service.go
with the new payload attributes
👍 feel free to fork the builder to build images for kurtosis. Let me know if you need me to rebase the builder from the latest geth electra branch |
Yes please. That would be very useful! This is latest geth electra branch: |
This reverts commit 873bbc4.
📝 Summary
This PR makes the necessary changes for Electra.
TODO:
BidTraceV2WithBlobFields
with request counts.⛱ Motivation and Context
📚 References
Other Electra branches of dependencies:
✅ I have run these commands
make lint
make test-race
go mod tidy
CONTRIBUTING.md