erigon icon indicating copy to clipboard operation
erigon copied to clipboard

Be able to use downloaded snapshots with prune flag

Open MrFreezeDZ opened this issue 1 year ago • 2 comments

Rationale

We run erigon on the polygon blockchain. To not be forced to sync from scratch we use the snapshots from https://snapshots.polygon.technology/. Our current state of knowledge is, that we only are able to use pruned data when we let erigon sync from the genesis block.

We would like to have the option to be able to load the snapshots but erigon should be able to delete all blocks before a given block.

Implementation

I have no experience with the erigon code. One initial idea could be a new flag that forces erigon to delete all data before a given block. Perhaps something like pruneDataBeforeBlockNumber?

MrFreezeDZ avatar Mar 25 '24 16:03 MrFreezeDZ

Such command to force change prune flag exists. Just we (erigon dev team) can’t support such nodes. Too complicated to reproduce: “i did force enabled prune, then disabled, then enabled, etc…” We can’t answer questions/bugs about nodes passed through such scenarios.

Fyi: we also just released 2x smaller pruned node feature - see https://github.com/ledgerwatch/erigon/releases/tag/v2.59.0

AskAlexSharov avatar Mar 26 '24 02:03 AskAlexSharov

Hi AskAlexSharov,

thank you for the information. I understand that there is a force-prune-flag but the erigon dev team does not support the usage of it.

As I am very curious about this now, could you share the command? Because from erigon --help I only see the different prune flags and do not see any force flag and the documentation says:

We don't allow change this flag after first start. -- Erigon Readme

So I am not sure right now, how we could use the downloaded snapshots from the polygon team and still use the prune flag, even if it is not supported. Or do I just think too complicated and the "We don't allow change this flag after first start." is not hard coded?

MrFreezeDZ avatar Mar 27 '24 11:03 MrFreezeDZ

seems very old issue. closing

AskAlexSharov avatar Aug 05 '25 06:08 AskAlexSharov