ChainSafe / forest

🌲 Rust Filecoin Node Implementation
https://forest.chainsafe.io
Apache License 2.0
637 stars 157 forks source link

Garbage collector should not collect manifests #4926

Open lemmih opened 4 hours ago

lemmih commented 4 hours ago

Describe the bug

Each network upgrade has a manifest. This manifest is stored in the blockstore on start-up. The manifests are unreachable from the blockstore and will, therefore, get garbage collected. The missing manifests will cause the next network upgrade to fail.

To reproduce

Run forest continuously for a week before a network upgrade.

Log output

Log Output ``` 2024-10-23T14:26:48.764982Z ERROR forest_filecoin::chain_sync::tipset_syncer: Syncing tipset range [2078795, 2078905] failed: Validation error: Processing error: Could not update state: manifest for network version NV24 not found in blockstore: bafy2bzaceax5zkysst7vtyup4whdxwzlpnaya3qp34rnoi6gyt4pongps7obw, Processing error: Failed to calculate state: manifest for network version NV24 not found in blockstore: bafy2bzaceax5zkysst7vtyup4whdxwzlpnaya3qp34rnoi6gyt4pongps7obw ```

Expected behaviour

Manifests should not be garbage collected.

Screenshots

Environment (please complete the following information):

Other information and links

ruseinov commented 3 hours ago

Is there an option to store manifests in a separate namespace so they don't get garbage collected ever?

lemmih commented 3 hours ago

Yes, like our settings, the manifests should be stored in a separate column.

LesnyRumcajs commented 38 minutes ago

Decide on the option by implementor:

  1. whitelist items to not get GCd (from the manifest file)
  2. Additional blessed column (watch out for reads)
  3. download the manifest just-in-time