Skip to content

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

Open
wants to merge 5 commits into
base: unstable
Choose a base branch
from

Conversation

PoulavBhowmick03
Copy link
Contributor

@PoulavBhowmick03 PoulavBhowmick03 commented May 24, 2025

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 endpoint

Additional Info

None

@PoulavBhowmick03 PoulavBhowmick03 force-pushed the remove/blinded_blocks branch from 0d463bd to 7cfbced Compare May 24, 2025 13:41
@PoulavBhowmick03 PoulavBhowmick03 changed the title Removed code for GET validator/blinded_blocks and also adjusted/removed tests Removed code for GET validator/blinded_blocks and also adjusted/removed tests May 24, 2025
@PoulavBhowmick03 PoulavBhowmick03 force-pushed the remove/blinded_blocks branch from 7cfbced to b0b57b5 Compare May 24, 2025 14:08
@PoulavBhowmick03
Copy link
Contributor Author

@michaelsproul @eserilev PTAL at this

@michaelsproul michaelsproul added ready-for-review The code is ready for review code-quality backwards-incompat Backwards-incompatible API change labels May 25, 2025
@michaelsproul michaelsproul added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels May 25, 2025
@PoulavBhowmick03 PoulavBhowmick03 force-pushed the remove/blinded_blocks branch 2 times, most recently from 53dc327 to 3936be5 Compare May 29, 2025 11:33
@PoulavBhowmick03
Copy link
Contributor Author

@michaelsproul can you take a look at the changes and the implementation now please?

Comment on lines +4638 to +4863
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"),
};
Copy link
Member

@eserilev eserilev May 29, 2025

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!

Copy link
Member

@eserilev eserilev left a comment

Choose a reason for hiding this comment

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

LGTM!

@PoulavBhowmick03
Copy link
Contributor Author

Any update on this? @michaelsproul
Would be great, i would love to create a pr for #7478 but this would otherwise cause merge conflicts

Copy link
Member

@michaelsproul michaelsproul left a 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);
Copy link
Member

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);
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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

@PoulavBhowmick03
Copy link
Contributor Author

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

Ah I see, that's some important stuff to get done with! No issues
Thanks a lot!

@PoulavBhowmick03
Copy link
Contributor Author

@michaelsproul, in order for the tests to pass, what should we do in case of panic for FullBlock?

@michaelsproul
Copy link
Member

what you suggested about only panicking post Bellatrix sounds good

@PoulavBhowmick03 PoulavBhowmick03 force-pushed the remove/blinded_blocks branch from 317b16d to f8523b4 Compare July 8, 2025 06:17
@PoulavBhowmick03 PoulavBhowmick03 force-pushed the remove/blinded_blocks branch from f8523b4 to 00f985e Compare July 8, 2025 06:18
@PoulavBhowmick03
Copy link
Contributor Author

@michaelsproul can you PTAL now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backwards-incompat Backwards-incompatible API change code-quality waiting-on-author The reviewer has suggested changes and awaits thier implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants