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

Create Live Snapshot without shutting down node #2816

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ganeshvanahalli
Copy link
Contributor

@ganeshvanahalli ganeshvanahalli commented Dec 3, 2024

This PR enables creation of live snapshot of databases (arbitrumdata, l2chaindata, ancient and wasm) without having to shutdown the node.

Supply the destination directory for the databases using the reloadable config option --snapshot-dir=<pathToDestDir> and one can trigger snapshot generation by invoking an arbdebug rpc command arbdebug_createDBSnapshot

Note: This feature is only available for archive nodes running on pebble databases
Sample usage-

start node => ./target/bin/nitro --conf.file=<pathToConfigWithSnapshotDir>
trigger snapshot creation => curl -X POST 127.0.0.1:8547 -H "Content-Type: application/json" --data '{"jsonrpc": "2.0","method": "arbdebug_createDBSnapshot","params": [],"id": 1}'

Testing

Triggered snapshot creation and successfully reused it run a new node in multiple scenario- small and large db sizes for arb1 and arb-sepolia nodes.

Pulls in geth PR- OffchainLabs/go-ethereum#380
Resolves NIT-2658

@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant