What happens if not values for the archive options are set on the launch of a ledger.
The archive options can be changed by specifying the ChangeArchiveOptions field in the UpgradeArgs in a ledger upgrade.
What are the default settings?
I expanded a bit on the archive options in the documentation. In particular, I linked to the default settings, and also some more useful recommended settings that are used, e.g., for SNS ledgers. The ck-token ledger and SNS ledgers should all have some reasonable values set. For independently-deployed ICRC ledgers based on the DFINITY Rust implementation, what you could do to check the archiving is the following:
- Query the
archives()
endpoint of the ledger (this is for the ckBTC ledger - replace the canister ID with that of your ledger)- If one or more archives exists, then archiving is configured correctly (if there are loads of archives, then perhaps
node_max_memory_size_bytes
is too small, but I haven’t seen cases of that in the wild). - If no archives exists, check the number of blocks in the ledger by querying the
get_blocks
endpoint, withstart = 0
andlength = 1
. If there are lots of blocks in the ledger (chain_length
is e.g., more than2_000
), then there may be an issue with the archive options.
- If one or more archives exists, then archiving is configured correctly (if there are loads of archives, then perhaps
The lowest-risk way to set the archiving options would be to upgrade the ledger to same WASM it is currently running, and only setting the ChangeArchiveOptions
in the UpgradeArgs
. For more info on how to upgrade your ledger, and if you don’t know what WASM your ledger is currently running, refer to the instructions in the ICRC Ledger Suite Upgrade forum post.