-
Notifications
You must be signed in to change notification settings - Fork 886
Removed code for GET validator/blinded_blocks
and also adjusted/removed tests
#7515
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
base: unstable
Are you sure you want to change the base?
Removed code for GET validator/blinded_blocks
and also adjusted/removed tests
#7515
Conversation
0d463bd
to
7cfbced
Compare
validator/blinded_blocks
and also adjusted/removed tests
7cfbced
to
b0b57b5
Compare
@michaelsproul @eserilev PTAL at this |
53dc327
to
3936be5
Compare
@michaelsproul can you take a look at the changes and the implementation now please? |
let (payload_type, metadata) = self | ||
.client | ||
.get_validator_blinded_blocks::<E>(slot, &randao_reveal, None) | ||
.get_validator_blocks_v3::<E>(slot, &randao_reveal, None, None) | ||
.await | ||
.unwrap() | ||
.into_data() | ||
.body() | ||
.execution_payload() | ||
.unwrap() | ||
.into(); | ||
.unwrap(); | ||
Self::check_block_v3_metadata(&metadata, &payload_type); | ||
|
||
let payload: FullPayload<E> = match payload_type.data { | ||
ProduceBlockV3Response::Full(payload) => { | ||
payload.block().body().execution_payload().unwrap().into() | ||
} | ||
ProduceBlockV3Response::Blinded(_) => panic!("Expecting a full payload"), | ||
}; |
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.
comment for clarity: we want to check that we fallback local EE, so this is equivalent to the previous test format. Some of the other test changes below do something similar. looks good!
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.
LGTM!
Any update on this? @michaelsproul |
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.
Looks good on the whole, thanks for sticking with this!
Just a few tweaks and then I think we can merge.
Sorry for the slow review, I've been busy trying to get tree-states across the line and also getting some stuff reading for the next PeerDAS devnet
self.chain.slot_clock.set_slot(slot.as_u64() + 1); | ||
} | ||
ProduceBlockV3Response::Full(block_contents) => { | ||
assert!(!metadata.execution_payload_blinded); |
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.
This test is meant to be checking blinded production, so I think it should error in the Full
case
assert_eq!(blinded_block.slot(), slot); | ||
} | ||
ProduceBlockV3Response::Full(full_block) => { | ||
assert_eq!(full_block.block().slot(), slot); |
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.
This should also be unreachable, I think we should panic if we get a Full
block.
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.
When I add a panic to this and the other line as well, some pre_merge tests seem to panic as they are receiving full blocks
failures:
---- tests::blinded_block_production_blinded_payload_premerge stdout ----
thread 'tests::blinded_block_production_blinded_payload_premerge' panicked at beacon_node/http_api/tests/tests.rs:3537:21:
Expecting a blinded block
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- tests::blinded_block_production_full_payload_premerge stdout ----
thread 'tests::blinded_block_production_full_payload_premerge' panicked at beacon_node/http_api/tests/tests.rs:3537:21:
Expecting a blinded block
---- tests::blinded_block_production_no_verify_randao_blinded_payload_premerge stdout ----
thread 'tests::blinded_block_production_no_verify_randao_blinded_payload_premerge' panicked at beacon_node/http_api/tests/tests.rs:3638:21:
Expecting a blinded block
---- tests::blinded_block_production_no_verify_randao_full_payload_premerge stdout ----
thread 'tests::blinded_block_production_no_verify_randao_full_payload_premerge' panicked at beacon_node/http_api/tests/tests.rs:3638:21:
Expecting a blinded block
---- tests::blinded_block_production_with_skip_slots_blinded_payload_premerge stdout ----
thread 'tests::blinded_block_production_with_skip_slots_blinded_payload_premerge' panicked at beacon_node/http_api/tests/tests.rs:3537:21:
Expecting a blinded block
---- tests::blinded_block_production_with_skip_slots_full_payload_premerge stdout ----
thread 'tests::blinded_block_production_with_skip_slots_full_payload_premerge' panicked at beacon_node/http_api/tests/tests.rs:3537:21:
Expecting a blinded block
failures:
tests::blinded_block_production_blinded_payload_premerge
tests::blinded_block_production_full_payload_premerge
tests::blinded_block_production_no_verify_randao_blinded_payload_premerge
tests::blinded_block_production_no_verify_randao_full_payload_premerge
tests::blinded_block_production_with_skip_slots_blinded_payload_premerge
tests::blinded_block_production_with_skip_slots_full_payload_premerge
@michaelsproul do take a look
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.
i have committed a change where it throws error in case of a Full Block, can you PTAL @michaelsproul @eserilev
Ah I see, that's some important stuff to get done with! No issues |
a1171ee
to
6f70e93
Compare
6f70e93
to
176a8bf
Compare
176a8bf
to
c988628
Compare
@michaelsproul, in order for the tests to pass, what should we do in case of panic for FullBlock? |
what you suggested about only panicking post Bellatrix sounds good |
317b16d
to
f8523b4
Compare
…ed tests for that endpoint
…ithout the blinded block endpoints
f8523b4
to
00f985e
Compare
@michaelsproul can you PTAL now |
Issue Addressed
Fixes #7456
Proposed Changes
Remove client/server code for deprecated GET
validator/blinded_blocks
endpoint and subsequently, removed the tests which were just testing the blinded endpoint, and modified other endpoints to use the new GET/eth/v3/validator/blocks
endpointAdditional Info
None