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

IF: replay from before instant-finality transition #2141

Closed
Tracked by #2110
heifner opened this issue Jan 25, 2024 · 4 comments · Fixed by #2278 or #2287
Closed
Tracked by #2110

IF: replay from before instant-finality transition #2141

heifner opened this issue Jan 25, 2024 · 4 comments · Fixed by #2278 or #2287
Assignees
Labels
👍 lgtm OCI Work exclusive to OCI team

Comments

@heifner
Copy link
Member

heifner commented Jan 25, 2024

When replaying: nodeos option --replay-blockchain we clear state database and replay all blocks including reversible blocks in the fork database. The fork database is opened and consumed before replay. This causes an issue as the fork database needed during replay (until instant-finality transition) requires the legacy fork database. After instant-finality transition, it requires the new fork database.

On replay, need to delay consuming the fork database until after all blocks are replayed so the fork database can be opened and consumed in the correct mode with the expected data (block_state_legacy vs block_state).

The following tests current fail and are commented waiting on completion of this task. They should be uncommented in tests/CMakeLists.txt and verify they work as part of this effort.

  • nodeos_irreversible_mode_if_lr_test
  • restart-scenarios-if-test-hard_replay
  • terminate-scenarios-if-test-replay
  • terminate-scenarios-if-test-hard_replay
@heifner
Copy link
Member Author

heifner commented Jan 26, 2024

Immediate fix for hotstuff_integration branch. Update replay logic to not use fork_database::chain_head and instead pass current and previous to replay_push_block. replay_push_block can return the new pushed block state. Likely better to create a replay_push_irreversible_block (returns newly created block state) and replay_push_reveserable_block (just updates chain_head).

@heifner
Copy link
Member Author

heifner commented Jan 26, 2024

Long term fix: AntelopeIO/spring#7

@arhag arhag added 👍 lgtm and removed triage labels Jan 29, 2024
@BenjaminGormanPMP BenjaminGormanPMP added this to the Leap v6.0.0-rc1 milestone Jan 30, 2024
heifner added a commit that referenced this issue Jan 30, 2024
            - restart-scenarios-if-test-hard_replay (disabled) requires GH-2141
            - restart-scenarios-if-test-none
heifner added a commit that referenced this issue Jan 31, 2024
            - terminate-scenarios-if-test-replay (disabled) requires #2141
            - terminate-scenarios-if-test-hard_replay
@greg7mdp
Copy link
Contributor

Uncomment test terminate-scenarios-if-test-hard_replay in tests/CMakeLists.txt when it works.

@heifner heifner self-assigned this Feb 26, 2024
@heifner heifner added the OCI Work exclusive to OCI team label Feb 26, 2024
@heifner heifner moved this from Todo to In Progress in Team Backlog Feb 26, 2024
heifner added a commit that referenced this issue Mar 4, 2024
IF: Refactor: Move chain_head from fork database back to controller
heifner added a commit that referenced this issue Mar 5, 2024
Moved transition of block_state_legacy to block_state to controller out of fork_database.
Changed some fork_db.apply to chain_header apply where fork_db will not be available during replay.
heifner added a commit that referenced this issue Mar 6, 2024
heifner added a commit that referenced this issue Mar 6, 2024
@heifner heifner linked a pull request Mar 6, 2024 that will close this issue
heifner added a commit that referenced this issue Mar 7, 2024
heifner added a commit that referenced this issue Mar 7, 2024
IF: Support replay over instant finality transition
@heifner
Copy link
Member Author

heifner commented Mar 7, 2024

Resolved by #2287

@heifner heifner closed this as completed Mar 7, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Team Backlog Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👍 lgtm OCI Work exclusive to OCI team
Projects
Archived in project
5 participants