-
Notifications
You must be signed in to change notification settings - Fork 794
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
Refactor mock builder #6735
Refactor mock builder #6735
Conversation
80f1d42
to
91c1cf9
Compare
c185184
to
8c93b11
Compare
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.
Excellent work
So you know I have axum implemented for this api here, we can add this later though
https://github.com/sigp/ethereum_apis/blob/main/builder-server/src/server.rs
edit: nevermind you're already using it 😂
5e22c79
to
1f7b4a3
Compare
This reverts commit 1f7b4a3.
b58ecaa
to
428dff4
Compare
428dff4
to
36960d0
Compare
The bug Sean was referring to is that in scenarios where validators are signalling a gas limit increase/decrease with the validator regisration message, the mock builder is not equipped to increase/decrease the gas limit of the payloads it builds. After spending some time trying to allow for this feature, I have come to the conclusion that its very hard to do and probably not worth the effort. The mock builder is meant to work as a backend in controlled testing scenarios of the builder flow. Its pretty easy to configure kurtosis to set the gas limit for the builder EL to be the same as all the CLs in the test environment so its easier to fix it in the testing config. |
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at c33307d |
Issue Addressed
N/A
Proposed Changes
Adds electra support to the builder flow.
Refactor the mock builder to extract all builder functions into separate functions.
Also adds a
prepare_execution_layer
method that prepares the execution layer for payload creation for each slot.The motivation is to provide a backend for a simple builder service that follows the builder api and produces execution payloads from the local mempool of the connected EL. This allows us to have a faster turnaround for testing changes to the builder api in kurtosis testnets and new fork devnets.
See https://github.com/pawanjay176/rustic-builder/
Additional info
The default parameters to the
MockBuilder::new_for_testing
produces a MockBuilder with same functionality as before, so the tests in lighthouse should work as before