Closed Ja7ad closed 2 months ago
@b00f @Ja7ad To determine whether a node is a pruned or full node, it's better to pass this information to the store or sync module? Should it be a part of the config? Or check if we have the genesis each time or check once and keep it? I think the best way is to pass it to sync and read it from config.
@kehiy Based on PIP-27 if the genesis block or block number one exists, it is full node.
@b00f OK, I'll add it once #1400 got merged.
@b00f @Ja7ad If we check prune mode by checking the genesis block, each node will be pruned if it's a new node.
If we check prune mode by checking the genesis block, each node will be pruned if it's a new node.
Good find, check last certificate exists. If not we are at the genesis state.
Once a new block is committed, the following operations should be performed:
This process ensures that for each new block added, one old block will be removed, keeping the store blocks up to the RetentionBlocks number.
https://pips.pactus.org/PIPs/pip-27#pruning-on-new-block