Add attestations test with payload_present in op pool#9531
Open
chong-he wants to merge 11 commits into
Open
Conversation
| } | ||
|
|
||
| // Insert one more distinct PayloadAttestationMessage at a different slot | ||
| let new_slot = Slot::new(0); |
Member
There was a problem hiding this comment.
Perhaps this sort of test that checks we don't include payload attestations from old slots, should be a small separate test from the one testing the cap.
| "Attestation after head slot should have index=0 when payload_present=false" | ||
| ); | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
Next steps should be:
- Make an
OperationPool - Insert all of the attestations created (from head slot, from the skipped slot, with and without payload_present)
- Check that
op_pool.get_attestationsorders the more profitable attestations with the correctpayload_presentfield first.
I think this implies there are a few variations of this test:
- The payload is considered available (in
state.execution_payload_availability), so we should packindex == 1attestations first (because they earn the head reward). - The payload is considered unavailable (in
state.execution_payload_availability), so we should packindex == 0attestations first (because they earn the head reward). - Same as case (1) but hitting the limit on the number of attestations can be included, so we check that
index == 1attestations do get included, and that we prefer to excludeindex == 0attestations. - Same as case (2) but checking that
index == 0get included andindex == 1get excluded once the capacity is reached.
Member
There was a problem hiding this comment.
We probably need this issue resolved at the spec level first 😅
payload_present in op pool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a test in operation pool about the index for the cases with and without payload_present.
Written with Claude Code and did a self review
Currently blocked waiting for ethereum/consensus-specs#5399 fix