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

move snapshot loading from nodeos to leap-util #2050

Open
matthewdarwin opened this issue Jan 6, 2024 · 2 comments
Open

move snapshot loading from nodeos to leap-util #2050

matthewdarwin opened this issue Jan 6, 2024 · 2 comments
Labels
consideration issues we aren't prioritizing today, but may consider at a later date discussion enhancement New feature or request

Comments

@matthewdarwin
Copy link

move snapshot loading from nodeos to leap-util... or at least add snapshot loading into leap-util.

The reason for this is to allow snapshots to be downloaded, processed and removed (saving disk space).

With the current logic you need some scripts to download snapshots and then tell nodeos to start with the snapshot. But that script doesn't really know when nodeos is finished loading the snapshot to allow it to delete the snapshot file (could read the journal log to look for specific message, but that's fragile).

Would be much cleaner to just remove the whole snapshot loading logic out of nodeos and force leap-util to deal with creating the correct statedb and then start nodeos normally.

@matthewdarwin
Copy link
Author

Also using nodeos --snapshot with mapped_private mode doesn't free the RAM that it would normally without starting from a snapshot.

@bhazzard bhazzard added enhancement New feature or request consideration issues we aren't prioritizing today, but may consider at a later date discussion and removed triage labels Jan 9, 2024
@spoonincode
Copy link
Member

But that script doesn't really know when nodeos is finished loading the snapshot to allow it to delete the snapshot file

fwiw, at least as of AntelopeIO/spring#440 and possibly earlier, you can work around that by something like

#!/bin/bash

exec 3< snapshot-2024-07-31-19-eos-v6-0386459889.bin
rm snapshot-2024-07-31-19-eos-v6-0386459889.bin
exec nodeos --snapshot /proc/self/fd/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consideration issues we aren't prioritizing today, but may consider at a later date discussion enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

4 participants