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

Remove extra tick #3548

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Remove extra tick #3548

merged 1 commit into from
Nov 29, 2023

Conversation

hwwhww
Copy link
Contributor

@hwwhww hwwhww commented Nov 14, 2023

Thank @rolfyone for reporting it!

https://media.githubusercontent.com/media/ethereum/consensus-spec-tests/master/tests/mainnet/bellatrix/fork_choice/should_override_forkchoice_update/pyspec_tests/should_override_forkchoice_update__true/steps.yaml

There is a tick 1573 after tick 1576, which should be impossible.

Another further bug-free fix is to add the precondition assert time > store.time in on_tick function, given that we have stated " on_tick(store, time) whenever time > store.time where time is the current Unix time". I'll open another PR for it.

Copy link
Contributor

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

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

LGTM, I think theres a similar incident in capella

- {block: block_0x129d58f5945e490563ba0da2bdf1b3df1ce7577901b37c542d8e27ea349046f9,
  valid: true}
- checks:
    time: 212
    head: {slot: 35, root: '0xa540106e6971b4322e43ca5975de038c2a42351ec589be7f29eeaa6dd8cf7ff5'}
    justified_checkpoint: {epoch: 3, root: '0x7385661d892adb7018c4440b8c3ffeb743303643ddb718aa14e4193c32d96df5'}
    finalized_checkpoint: {epoch: 2, root: '0xc2899f74e6ea5681dd3658cc50ff405fe7077494eea3b97404fe2781934c2082'}
    proposer_boost_root: '0x0000000000000000000000000000000000000000000000000000000000000000'
- {tick: 211}
- checks:
    time: 211
    head: {slot: 35, root: '0xa540106e6971b4322e43ca5975de038c2a42351ec589be7f29eeaa6dd8cf7ff5'}
    justified_checkpoint: {epoch: 3, root: '0x7385661d892adb7018c4440b8c3ffeb743303643ddb718aa14e4193c32d96df5'}
    finalized_checkpoint: {epoch: 2, root: '0xc2899f74e6ea5681dd3658cc50ff405fe7077494eea3b97404fe2781934c2082'}
    proposer_boost_root: '0x0000000000000000000000000000000000000000000000000000000000000000'
    

If I understand correctly, these should be cleaned up by this change too :)

@hwwhww hwwhww merged commit 1028093 into dev Nov 29, 2023
26 checks passed
@hwwhww hwwhww deleted the fix-fc-script branch November 29, 2023 10:36
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.

3 participants