Skip to content
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

Use validator guide compute_on_chain_aggregate in testing #3680

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

hwwhww
Copy link
Contributor

@hwwhww hwwhww commented Apr 17, 2024

Thank @mkalinin for pointing it out! Validator guide impl is much more neat!

Comment on lines +69 to +74
return Attestation(
aggregation_bits=aggregation_bits,
data=data,
committee_bits=committee_bits,
signature=signature,
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, I don't understand why this fixed the CI error...

without this fix, the result aggregate.data.target.epoch is 0 when it should be 2 in some tests.

/cc @protolambda, in case you can share some remerkleable wisdom. 🧙‍♂️

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure either, but I'll just assume there is some subtlety in how remerkleable initializes things

@mkalinin
Copy link
Collaborator

Is there any place in the tests where we would need to work with network aggregates? If not then we could add on chain aggregation step (call to compute_on_chain_aggregate) into get_valid_attestations_at_slot when post electra and get rid of a separate post-electra method

@hwwhww
Copy link
Contributor Author

hwwhww commented Apr 17, 2024

@mkalinin

The phase0 validator guide primarily provides a high-level description of the aggregate, but the get_valid_attestation function is expected to return an aggregate for a specific committee_index and slot. Thus, including an in-spec helper is nice to have but not a priority.

I opened an issue to track it: #3683

@hwwhww hwwhww mentioned this pull request Apr 17, 2024
6 tasks
@mkalinin
Copy link
Collaborator

LGTM! 👍

Copy link
Member

@ralexstokes ralexstokes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm as well!

@ralexstokes ralexstokes merged commit b02be79 into dev Apr 17, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants