Skip to content

Re-add next-epoch lookahead for PTC duties - #16591

Merged
satushh merged 3 commits into
developfrom
ptc-duties-next-epoch-lookahead
Mar 30, 2026
Merged

Re-add next-epoch lookahead for PTC duties#16591
satushh merged 3 commits into
developfrom
ptc-duties-next-epoch-lookahead

Conversation

@satushh

@satushh satushh commented Mar 26, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

Feature

What does this PR do? Why is it needed?

Add current and next epoch lookahead as per ethereum/beacon-APIs#592

Which issues(s) does this PR fix?

Fixes #

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

@github-project-automation github-project-automation Bot moved this to Unassigned in Gloas Mar 30, 2026
@satushh
satushh marked this pull request as ready for review March 30, 2026 15:39
if rpcErr != nil {
return nil, status.Errorf(core.ErrorReasonToGRPC(rpcErr.Reason), "%v", rpcErr.Err)
}
nextPTCDuties, rpcErr := vs.CoreService.PTCDuties(ctx, s, req.Epoch+1, requestIndices)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I realized we can probably use .Add(1) instead of +1 for this and other ones

cs := s.TimeFetcher.CurrentSlot()
currentEpoch := slots.ToEpoch(cs)
if requestedEpoch > currentEpoch {
nextEpoch := currentEpoch + 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i guess we can do .Add(1) here too

@satushh
satushh added this pull request to the merge queue Mar 30, 2026
Merged via the queue into develop with commit c33f0d0 Mar 30, 2026
19 checks passed
@satushh
satushh deleted the ptc-duties-next-epoch-lookahead branch March 30, 2026 18:17
@github-project-automation github-project-automation Bot moved this from Unassigned to Done in Gloas Mar 30, 2026
bharath-123 pushed a commit to bharath-123/prysm that referenced this pull request Mar 31, 2026
**What type of PR is this?**

Feature

**What does this PR do? Why is it needed?**

Add current and next epoch lookahead as per
ethereum/beacon-APIs#592

**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).
github-merge-queue Bot pushed a commit that referenced this pull request Apr 2, 2026
**What type of PR is this?**

 Bug fix


**What does this PR do? Why is it needed?**

adding next epoch fix for grpc endpoint ( currently unused) 

#16591

**Which issues(s) does this PR fix?**

Fixes #

**Other notes for review**

**Acknowledgements**

- [x] I have read
[CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md).
- [x] I have included a uniquely named [changelog fragment
file](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md#maintaining-changelogmd).
- [x] I have added a description with sufficient context for reviewers
to understand this PR.
- [x] I have tested that my changes work as expected and I added a
testing plan to the PR description (if applicable).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants