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.1.0 -> main] Do not allow replay-blockchain without snapshot #1158

Merged
merged 5 commits into from
Feb 10, 2025

Conversation

heifner
Copy link
Member

@heifner heifner commented Feb 10, 2025

Do not allow --replay-blockchain option without --snapshot option unless a full block log is available as it will fail and leave the blockchain in a non-recoverable state.

While attempting to reproduce #1152, I kicked off a --replay-blockchain but forgot to add the --snapshot option. I didn't have a full block log. This resulted in the following:

info  2025-02-08T13:32:56.675 nodeos    chain_plugin.cpp:778          plugin_initialize    ] Replay requested: deleting state database
info  2025-02-08T13:32:57.062 nodeos    chain_plugin.cpp:933          plugin_initialize    ] Starting fresh blockchain state using default genesis state.
...
info  2025-02-08T13:32:57.915 nodeos    listener.hpp:150              log_listening        ] start listening on 127.0.0.1:7777 resolved from 127.0.0.1:7777 for API categories: all
warn  2025-02-08T13:32:57.916 nodeos    controller.cpp:4379           apply_blocks         ] 3020001 fork_db_block_not_found: Block can not be found
block 000000017c8ae6fcc236a1254b032f9b375971d88025e717fcba43aeee9aa41a does not exist
    {"id":"000000017c8ae6fcc236a1254b032f9b375971d88025e717fcba43aeee9aa41a"}
    nodeos  fork_database.cpp:509 fetch_branch_from_impl

warn  2025-02-08T13:32:57.916 nodeos    controller.cpp:4379           apply_blocks         ] 3020001 fork_db_block_not_found: Block can not be found
block 000000017c8ae6fcc236a1254b032f9b375971d88025e717fcba43aeee9aa41a does not exist
    {"id":"000000017c8ae6fcc236a1254b032f9b375971d88025e717fcba43aeee9aa41a"}
    nodeos  fork_database.cpp:509 fetch_branch_from_impl

error 2025-02-08T13:32:57.916 nodeos    producer_plugin.cpp:949       on_incoming_block    ] Cannot recover from 3020001 fork_db_block_not_found: Block can not be found
block 000000017c8ae6fcc236a1254b032f9b375971d88025e717fcba43aeee9aa41a does not exist
    {"id":"000000017c8ae6fcc236a1254b032f9b375971d88025e717fcba43aeee9aa41a"}
    nodeos  fork_database.cpp:509 fetch_branch_from_impl
rethrow
    {}
    nodeos  controller.cpp:4380 apply_blocks
. Shutting down.

At this point the the state directory has to be removed and restart is required from the snapshot.

Merges release/1.1 into main including #1156

@heifner heifner requested review from greg7mdp and linh2931 February 10, 2025 19:08
@heifner heifner added the OCI Work exclusive to OCI team label Feb 10, 2025
@heifner heifner merged commit 5fdeb83 into main Feb 10, 2025
36 checks passed
@heifner heifner deleted the replay-without-snapshot branch February 10, 2025 22:32
@ericpassmore
Copy link
Contributor

Note:start
category: Other
component: Internal
summary: Prevent replay-blockchain without snapshot.
Note:end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants