Skip to content

move snapshot loading from nodeos to leap-util #2050

Open

Description

@matthewdarwin

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.

Activity

  1. matthewdarwin commented on Jan 6, 2024

    @matthewdarwin
    Author

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

  2. added
    enhancementNew feature or request
    considerationissues we aren't prioritizing today, but may consider at a later date
    and removed on Jan 9, 2024
  3. spoonincode commented on Aug 9, 2024

    @spoonincode
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    considerationissues we aren't prioritizing today, but may consider at a later datediscussionenhancementNew feature or request

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions