Skip to content

implements ptc beacon apis#16306

Open
james-prysm wants to merge 6 commits intodevelopfrom
gloas-ptc-api
Open

implements ptc beacon apis#16306
james-prysm wants to merge 6 commits intodevelopfrom
gloas-ptc-api

Conversation

@james-prysm
Copy link
Contributor

@james-prysm james-prysm commented Jan 30, 2026

What type of PR is this?

Feature

What does this PR do? Why is it needed?

Implements the following endpoints
GET /eth/v1/validator/payload_attestation_data/{slot}
POST /eth/v1/beacon/pool/payload_attestations
GET /eth/v1/beacon/pool/payload_attestations

NOTE: DOES NOT IMPLEMENT POOL AND USES INTERFACE STUBS, DOES NOT IMPLEMENT gRPC

Which issues(s) does this PR fix?

references ethereum/beacon-APIs#552

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).

defer span.End()

currentEpoch := slots.ToEpoch(s.TimeFetcher.CurrentSlot())
if currentEpoch < params.BeaconConfig().GloasForkEpoch {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we need these guards right?

continue
}

if err := s.Broadcaster.Broadcast(ctx, consensusMsg); err != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

do i just insert it into the pool or do I also broadcast here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think both. At least it should mirror how we handle beacon attestation


var data []*structs.PayloadAttestation
for _, att := range allAtts {
if rawSlot != "" && att.Data.Slot != primitives.Slot(slot) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

is filtering this way safe? or is having a separate function on the pool better?

BlockRewardFetcher rewards.BlockRewardsFetcher
TrackedValidatorsCache *cache.TrackedValidatorsCache
PayloadIDCache *cache.PayloadIDCache
PayloadAttestationPool payloadattestation.PoolManager
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these are not initialized anywhere for now

@james-prysm james-prysm marked this pull request as ready for review February 3, 2026 16:24

// PayloadStatusFetcher determines the payload presence and blob data availability
// for a given slot. This is used by PTC validators to produce PayloadAttestationData.
type PayloadStatusFetcher interface {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I dont think this would be implemented in pool package
i think this would be implemented in blockchainpackage
but i could be wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the attestation pools live here under attestations folder so i thought it would be the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants