-
Notifications
You must be signed in to change notification settings - Fork 427
feat: blocks backup / restore #3946
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
🛠 PR Checks Summary🔴 Pending initial approval by a review team member, or review from tech-staff Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
@jefft0 done |
Signed-off-by: Norman <[email protected]>
Hi @n0izn0iz . The CI checks in master are fixed now. Do you want to merge master and run the tests again? |
it was up to date and the failing check is a flaky one I think. the gnokms merge from yesterday introduced conflicts that I will fix asap |
Signed-off-by: Norman <[email protected]>
Signed-off-by: Norman <[email protected]>
Fixes #1827
Description
Backup
in the tendermint2 node that allows to stream blocks efficientlyIt has a single method
StreamBlocks
that take a start and end height. If end height is 0 it will stream to the latest height. It is disabled by default and require enabling it in theconfig.toml
contribs
binary namedtm2backup
that pulls blocks from the backup service and store them in compressed 100-blocks files. It takes a start and end height as well as supporting resuming.The tar format was chosen to bundle blocks since it's widely supported and efficient. The zstandard format was chosen for compression because it's fast, has a good compression ratio and is widely supported.
restore
subcommand to the gnoland binary that allows to replay blocks from a backup. It takes the options from thestart
subcommand as well as the backup directory and an optional end height.It will start at the current node height + 1.
The restore command can only restore at
backupEndHeight-1
because I did not figure a way to commit blockn
without blockn+1
. I'd gladly take ideas on how to do that.The backup is fast enough for now IMO (< 20min for test5 on my macbook) but can be optimized because it's not parallelized.
The restore bottleneck seems to be the gnovm currently but I would need to profile to be sure.
How to create a backup
config.toml
tm2backup
commandcd contribs/tm2backup tm2backup -o blocks-backup -remote http://localhost:4242
How to create a node from a backup
TODO
find a way to restore up to backup height if possible