Skip to content

Conversation

@linh2931
Copy link
Contributor

@linh2931 linh2931 commented Apr 17, 2024

  • Create Transition Savanna block for snapshots during Savanna transition.
  • Read both Transition Legacy block and Transition Savanna block for snapshot created during transition.
  • Use Transition Savanna block as the starting point to recreate proper block
  • Add integration tests for snapshots created in both regular and irreversible mode.

Resolved #15

@linh2931 linh2931 requested review from greg7mdp and heifner April 17, 2024 19:50
@arhag arhag linked an issue Apr 17, 2024 that may be closed by this pull request
numTrxGenerators=2
Print("Stand up cluster")
# For now do not load system contract as it does not support setfinalizer
specificExtraNodeosArgs = { irreversibleNodeId: "--read-mode irreversible"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a snapshot from the irreversibleNode and make sure it can be used to start a node as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@linh2931 linh2931 requested review from greg7mdp and heifner April 22, 2024 11:38
assert(!legacy_branch.empty()); // should have started with a block_state chain_head or we transition during replay
// transition to savanna
block_state_ptr prev;
block_state_ptr prev = chain_head_trans_svnn_block; // If chain_head_trans_svnn_block should not null, it indicates replay from snapshot.
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of these two comments, why not have a boolean:

bool replay_from_snapshot = !chain_head_trans_svnn_block;

If you keep the comment, please fix small typo, and put comment on separate line to avoid excessively long lines.

Suggested change
block_state_ptr prev = chain_head_trans_svnn_block; // If chain_head_trans_svnn_block should not null, it indicates replay from snapshot.
block_state_ptr prev = chain_head_trans_svnn_block; // If chain_head_trans_svnn_block is not null, it indicates replay from snapshot.

@linh2931 linh2931 merged commit 053b53b into savanna Apr 22, 2024
@linh2931 linh2931 deleted the snapshot_transition_block_fix branch April 22, 2024 16:54
@ericpassmore
Copy link
Contributor

Note:start
group: IF
category: INTERNALS
summary: Improve support for snapshots during transition by detecting transition and reading both legacy and transition blocks.
Note:end

greg7mdp pushed a commit that referenced this pull request Apr 25, 2025
work around ASAN intercepting `mlock()` as a noop
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 this pull request may close these issues.

Create block_state for block_state_legacy for snapshot during transition

4 participants