-
Notifications
You must be signed in to change notification settings - Fork 1k
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 random execution_payload_header
to Bellatrix state in tests
#4047
base: dev
Are you sure you want to change the base?
Add random execution_payload_header
to Bellatrix state in tests
#4047
Conversation
Hey Katya. I've pulled some updates to the Makefile into your branch. Please run |
97a7e5e
to
e9c9a0a
Compare
@@ -330,6 +366,7 @@ def build_empty_execution_payload(spec, state, randao_mix=None): | |||
|
|||
|
|||
def build_randomized_execution_payload(spec, state, rng): | |||
from eth2spec.test.helpers.random import exit_random_validators |
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.
@jtraglia I have a circular import error when I put the import at the beginning. Is there a way to avoid it 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.
Hey @KatyaRyazantseva. We shouldn't actually need this import. exit_random_validators
mutates the input state and I don't believe we should do that. We can simply rely on get_expected_withdrawals
for withdrawals. Given a random state for Capella+, there should (in theory) be some exited validators, which would cause there to be withdrawals.
Also, when building the randomized execution payload header, we can/should re-use the fields from the random execution payload we just built. Then all we need to do is fill in transactions_root
and withdrawals_root
which is relatively easy. I've pushed a commit for this.
One more thing, I haven't thoroughly checked these randomized payload to ensure they make sense. But this should be enough to unblock you.
This PR adds random
execution_payload_header
to random Bellatrix state in tests