Skip to content

Get block v4#16488

Merged
james-prysm merged 39 commits into
developfrom
get-block-v4
Apr 14, 2026
Merged

Get block v4#16488
james-prysm merged 39 commits into
developfrom
get-block-v4

Conversation

@james-prysm
Copy link
Copy Markdown
Contributor

@james-prysm james-prysm commented Mar 6, 2026

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

  • I have read CONTRIBUTING.md.
  • I have included a uniquely named changelog fragment file.
  • 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).

Comment thread proto/prysm/v1alpha1/gloas.ssz.go Fixed
@james-prysm james-prysm marked this pull request as ready for review March 12, 2026 20:22
@github-project-automation github-project-automation Bot moved this to Unassigned in Gloas Mar 12, 2026
@james-prysm james-prysm moved this from Unassigned to Assigned in Gloas Mar 12, 2026
@james-prysm james-prysm moved this from Assigned to In progress in Gloas Mar 12, 2026
@james-prysm
Copy link
Copy Markdown
Contributor Author

note, pr includes changes from #16358

Comment thread proto/prysm/v1alpha1/gloas.ssz.go Fixed
// 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())
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

StateByRoot doesn't take gloas into account. So we should use GetPrestateToPropose like before unless I am missing something?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think you're right let me fix this


// Offset (3) 'Blobs'
dst = ssz.WriteOffset(dst, offset)
offset += len(b.Blobs) * 131072
satushh
satushh previously approved these changes Apr 10, 2026
Copy link
Copy Markdown
Collaborator

@satushh satushh left a comment

Choose a reason for hiding this comment

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

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) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should it be renamed to computePostBlockStateAndRoot ? Or something similar, as it does more than just computing state root.

satushh
satushh previously approved these changes Apr 10, 2026
satushh
satushh previously approved these changes Apr 10, 2026
@james-prysm james-prysm enabled auto-merge April 10, 2026 15:06
@james-prysm james-prysm added this pull request to the merge queue Apr 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 10, 2026
@james-prysm james-prysm enabled auto-merge April 13, 2026 19:42
@james-prysm james-prysm added this pull request to the merge queue Apr 14, 2026
Merged via the queue into develop with commit 9069afc Apr 14, 2026
19 checks passed
@james-prysm james-prysm deleted the get-block-v4 branch April 14, 2026 03:30
@github-project-automation github-project-automation Bot moved this from In progress to Done in Gloas Apr 14, 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants