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

feat: ✨ add maintenance mode to node #389

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

TDemeco
Copy link
Contributor

@TDemeco TDemeco commented Mar 5, 2025

Maintenance mode allows node operators to run their nodes without them interacting with the rest of the network. This allows them to do manual changes to the file or forest storage in case of inconsistencies between what's on-chain vs the local state.

TODO:

  • Check if we should completely ignore block imports instead of just ignoring events in blocks.

Maintenance mode allows node operators to run their nodes without them interacting with the rest of the network. This allows them to do manual changes to the file or forest storage in case of inconsistencies between what's on-chain vs the local state.
@TDemeco TDemeco requested review from ffarall and santikaplan March 5, 2025 03:59
Comment on lines 222 to 225
if self.maintenance_mode {
info!(target: LOG_TARGET, "🔒 Maintenance mode is enabled. Skipping message processing.");
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could allow commands being sent to the BlockchainService. Just in case we need that functionality while in maintenance.

Comment on lines 1299 to 1302
if self.maintenance_mode {
info!(target: LOG_TARGET, "🔒 Maintenance mode is enabled. Skipping processing ofblock import #{}: {}", block_number, block_hash);
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I would apply this boolean further up, to basically not include the block import and finality events in the queue. Cause this way it is still possible that the node will attempt some action in the initial sync.

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.

2 participants