-
Notifications
You must be signed in to change notification settings - Fork 224
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 #651
Conversation
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.
LGTM, are tests for this going to be a follow up PR?
Yes, I'm planning to add tests later. Please hold off on merging this for a little bit. We're working on getting the whole Electra builder stack working in Kurtosis this week. Thank you for reviewing though π I'm fairly confident in these mev-boost changes, but mev-boost-relay will need some more work. |
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.
types are out of date by now
Waiting for attestantio/go-eth2-client#163 |
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.
lgtm!
|
||
require ( | ||
github.com/ethereum/go-ethereum v1.14.7 | ||
github.com/flashbots/go-boost-utils v1.8.1 | ||
github.com/ethereum/go-ethereum v1.14.9 |
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.
minor: I'd suggest bumping to 1.14.13 while we're updating.
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.
Generally LGTM, two thinks that needs changing, otherwise I think the test would be moot. Also shouldn't this be caught at some point? Or is mev-boost not checking the header at all
@@ -125,6 +126,41 @@ func blindedBlockContentsToPayloadDeneb(signedBlindedBlockContents *eth2ApiV1Den | |||
} | |||
} | |||
|
|||
func blindedBlockContentsToPayloadElectra(signedBlindedBlockContents *eth2ApiV1Electra.SignedBlindedBeaconBlock) *builderApiDeneb.ExecutionPayloadAndBlobsBundle { |
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.
shouldn't this return *builderApiElectra
instead of builderApiDeneb
?
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.
Nah because there is no new ExecutionPayloadAndBlobsBundle
in Electra.
"transactions_root": "0xb1fcd304d8ba402be6e76346395ea7641fbb4c83663b697a0e88ab115d859d3f", | ||
"withdrawals_root": "0x792930bbd5baac43bcc798ee49aa8185ef76bb3b44ba62b91d86ae569e4bb535", | ||
"blob_gas_used": "0", | ||
"excess_blob_gas": "0" |
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.
Isn't this missing ParentBeaconRoot
and RequestHash
?
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.
Hmm I don't think so. I believe you're thinking of NewPayloadRequest
.
func (m *BoostService) processElectraPayload(w http.ResponseWriter, req *http.Request, log *logrus.Entry, blindedBlock *eth2ApiV1Electra.SignedBlindedBeaconBlock) { | ||
// Get the currentSlotUID for this slot | ||
currentSlotUID := "" | ||
m.slotUIDLock.Lock() |
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 think we can get away with an RLock here
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.
Or make SlotUID an atomic
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 will do this in a follow-up
π Summary
This PR adds support for Electra payloads.
β± Motivation and Context
β I have run these commands
make lint
make test-race
go mod tidy