Skip to content
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

Use proper state to verify attestations #5498

Closed
wemeetagain opened this issue May 16, 2023 · 1 comment · Fixed by #5500
Closed

Use proper state to verify attestations #5498

wemeetagain opened this issue May 16, 2023 · 1 comment · Fixed by #5500
Assignees

Comments

@wemeetagain
Copy link
Member

wemeetagain commented May 16, 2023

@twoeths
Copy link
Contributor

twoeths commented May 17, 2023

I think we don't have to always dial to target epoch, if targetEpoch - headBlockEpoch === 1 we can just use the state at headBlock thanks to 1 epoch look ahead (the nextShuffling in state). Teku had this same optimization https://github.com/ConsenSys/teku/pull/7142/files#diff-63983da705fcf1ea1194c2a3e3ee4ede93548b1b7658041bcf9a8d0b47f107b6L73

it means with maxSkippedSlot=32 it's most likely we don't have to do epoch transition at all

one edge case is if headBlock and targetEpoch are in different forks (we're at fork transition) then we should dial to target epoch as specified in #4831

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants