Add executable gossip validation functions for gloas - #5294
Conversation
| raise GossipReject("dependent root is not before the proposer lookahead epoch") | ||
|
|
||
| # [IGNORE] The dependent root is a possible dependent block for the lookahead epoch | ||
| if not is_valid_dependent_root(store, preferences.dependent_root, lookahead_epoch): |
There was a problem hiding this comment.
is the store correctly "ticked" to current_time_ms, otherwise this could cause issues, since the state was always dialed forward to the current slot, also shouldn't the store just be the source of truth for time?
There was a problem hiding this comment.
I'm not entirely sure. Let's follow up on this later.
|
|
||
| # [REJECT] The signature is valid with respect to the validator's public key | ||
| validator = lookahead_state.validators[preferences.validator_index] | ||
| domain = get_domain(lookahead_state, DOMAIN_PROPOSER_PREFERENCES, proposal_epoch) |
There was a problem hiding this comment.
the lookahead_state is only dialed to lookahead_epoch_start_slot which should be sufficient for the check above, but how we get the domain seems wrong at the fork boundary, we probably wanna do something like compute_fork_version(proposal_epoch), in lodestar we use preferences.proposal_slot for this, epoch works the same though
wemeetagain
left a comment
There was a problem hiding this comment.
After discussing with nflaig, imo this is a great improvement.
- properly specifying and selecting a state from the store
- properly selecting time via the store
|
Hi everyone. This PR has gotten really large; ~120 comments and 90 commits. I acknowledge that this is not perfect. Notably we need to deal with state ambiguity and improve the test cases. I'm going to merge this PR now so we can iterate with smaller PRs. Big thanks to all that helped with this 🙏 |
This PR adds executable gossip message validation specs for Gloas.
Here are the reference tests for all Gloas gossip tests: