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 a database entry to hold first non origin slot number after finalization #3866

Closed
EclesioMeloJunior opened this issue Apr 4, 2024 · 0 comments · Fixed by #3913
Closed
Assignees
Labels
C-simple Minor changes changes, no additional research needed. Good first issue/review. S-babe issues related to block production functionality.

Comments

@EclesioMeloJunior
Copy link
Member

EclesioMeloJunior commented Apr 4, 2024

Description

  • This is needed for full nodes that don't keep block history to hold the very first non origin block slot number in a case where block #1 is pruned from disk.

  • What should be done here is:

    • When finalization happens you should check if one of the blocks being finalized is block #1 if so you should persist its slot number in the database, then everytime you want to get the chain first slot you should use that value
    • PR feat(babe, epoch): retrieve first slot number correctly #3841 already addresses the case where finalization did not happen and there is no chain first slot persisted on DB.
    • On the node initialization you should check if the entry is in the database, if so you should retrieve it and cache it, you can place the persistency under dot/state/slot.go as well as field to hold the persisted chain first slot.
  • Depends on fix(lib/epoch): use correctly very first slot number #3795

  • More context about epoch changes: https://hackmd.io/@-8f0KkDaSXGl-AgsJkF8Jg/B1LIdTxAa

  • This task should be done on top of branch eclesio/move-slot-to-header or after the merge of PR feat(babe, epoch): retrieve first slot number correctly #3841

  • Maybe check in the retrieveFirstNonOriginBlockSlot if the entry is in the database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-simple Minor changes changes, no additional research needed. Good first issue/review. S-babe issues related to block production functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant