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

[1.0.2] Test regression of syncing and replay with actual committed reference blockchain data #827

Merged
merged 11 commits into from
Oct 1, 2024

Conversation

linh2931
Copy link
Member

@linh2931 linh2931 commented Sep 26, 2024

To be confident that changes do not unintentionally introduce changes of the consensus protocol, we would like to add a testing utility that generates reference blockchain data and a new test that checks for regression in compatibility of syncing and replaying the reference blockchain data.

The PR

  • provides a command line option --save-blockchain to generate and save the reference blockchain data to unittests/test-data/consensus_blockchain directory. The full command is unittests/unit_test -t savanna_misc_tests/verify_block_compatibitity -- --save-blockchain.
  • loads the reference blockchain into a nodeos by replaying it, and and verifies the block ID of the replayed LIB matches with the ID of LIB in the reference blocks log.
  • starts another nodeos instance from reference snapshot, sync blocks from the replayed nodeos, and verifies resulting block ID.

Resolves #742

…e saved if it needs to be changed in the future
@linh2931 linh2931 requested a review from greg7mdp October 1, 2024 20:09
@linh2931 linh2931 merged commit ca02daf into release/1.0 Oct 1, 2024
36 checks passed
@linh2931 linh2931 deleted the replay_with_ref_blockchain_1_0_2 branch October 1, 2024 21:13
@ericpassmore
Copy link
Contributor

Note:start
category: Tests
component: Internal
summary: Enhance test framework and test cases to sync and replay using actual committed reference blockchain data.
Note:end

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.

Test regression of syncing and replay with actual committed reference blockchain data
4 participants