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

lib/babe: first slot of network should be set on finalization of block 1 #1624

Closed
noot opened this issue Jun 4, 2021 · 0 comments · Fixed by #1640
Closed

lib/babe: first slot of network should be set on finalization of block 1 #1624

noot opened this issue Jun 4, 2021 · 0 comments · Fixed by #1640
Assignees

Comments

@noot
Copy link
Contributor

noot commented Jun 4, 2021

Describe the bug

  • the first slot of the network is determined by when block 1 was built
  • however gossamer currently sets the first slot of the network in 2 places (if an authority node), when just after building block 1 OR when importing block 1. this potentially results in being unable to validate imported blocks or the BABE algorithm becoming un-synced from the network as the first slot is set incorrectly
  • the first slot number should be set on finalization of block 1, instead of build/import
  • in the case where block 1 has not yet been finalized, there should be some list of unfinalized blocks with block number 1. when verifying a block and block 1 is not yet finalized, it should first use the slot number of block 1 on the canonical chain (which is what currently happens) as the first slot, but if that errors, try using other pending block 1.

sub-issue of #1587

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.

1 participant