Get block v4#16488
Merged
Merged
Conversation
Contributor
Author
|
note, pr includes changes from #16358 |
satushh
reviewed
Mar 20, 2026
| // It uses the same logic as CalculateStateRoot (Copy, feature flags, slot processing) | ||
| // but returns the full state instead of just its hash. | ||
| func (vs *Server) computePostBlockState(ctx context.Context, block interfaces.SignedBeaconBlock) (state.BeaconState, error) { | ||
| beaconState, err := vs.StateGen.StateByRoot(ctx, block.Block().ParentRoot()) |
Collaborator
There was a problem hiding this comment.
StateByRoot doesn't take gloas into account. So we should use GetPrestateToPropose like before unless I am missing something?
Contributor
Author
There was a problem hiding this comment.
I think you're right let me fix this
|
|
||
| // Offset (3) 'Blobs' | ||
| dst = ssz.WriteOffset(dst, offset) | ||
| offset += len(b.Blobs) * 131072 |
satushh
previously approved these changes
Apr 10, 2026
Collaborator
satushh
left a comment
There was a problem hiding this comment.
Small comment but otherwise Looks good in the checks I did and also did a quick kurtosis run.
| // returns it to the validator client. | ||
| func (vs *Server) computeStateRoot(ctx context.Context, block interfaces.SignedBeaconBlock) ([]byte, error) { | ||
| // returns both the state root bytes and the full post-block state. | ||
| func (vs *Server) computeStateRoot(ctx context.Context, block interfaces.SignedBeaconBlock) ([]byte, state.BeaconState, error) { |
Collaborator
There was a problem hiding this comment.
Should it be renamed to computePostBlockStateAndRoot ? Or something similar, as it does more than just computing state root.
satushh
previously approved these changes
Apr 10, 2026
satushh
previously approved these changes
Apr 10, 2026
satushh
approved these changes
Apr 10, 2026
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Apr 17, 2026
**What type of PR is this?** Feature **What does this PR do? Why is it needed?** Introduces the validator connection point for rest api to call block v4 and envelope endpoints builds on #16488 and #16522 testing ``` participants: - el_type: geth el_image: ethpandaops/geth:epbs-devnet-0 cl_type: prysm cl_image: gcr.io/offchainlabs/prysm/beacon-chain:latest vc_image: gcr.io/offchainlabs/prysm/validator:latest supernode: true count: 2 cl_extra_params: - --subscribe-all-subnets - --verbosity=debug vc_extra_params: - --enable-beacon-rest-api - --verbosity=debug - el_type: geth el_image: ethpandaops/geth:epbs-devnet-0 cl_type: prysm cl_image: gcr.io/offchainlabs/prysm/beacon-chain:latest vc_image: gcr.io/offchainlabs/prysm/validator:latest validator_count: 63 cl_extra_params: - --verbosity=debug vc_extra_params: - --enable-beacon-rest-api - --verbosity=debug network_params: fulu_fork_epoch: 0 gloas_fork_epoch: 2 seconds_per_slot: 6 genesis_delay: 40 additional_services: - dora global_log_level: debug dora_params: image: ethpandaops/dora:gloas-support ``` **Which issues(s) does this PR fix?** Fixes # **Other notes for review** **Acknowledgements** - [ ] I have read [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md). - [ ] I have included a uniquely named [changelog fragment file](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md#maintaining-changelogmd). - [ ] I have added a description with sufficient context for reviewers to understand this PR. - [ ] I have tested that my changes work as expected and I added a testing plan to the PR description (if applicable). --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
What type of PR is this?
Feature
What does this PR do? Why is it needed?
implements the new GET /eth/v4/validator/blocks/{slot} endpoint, we don't hook up the validator client to use it yet for post gloas in this pr.
Which issues(s) does this PR fix?
Fixes ethereum/beacon-APIs#580
Other notes for review
Acknowledgements