Granola-Team / mina-indexer

The Mina Indexer is a re-imagined version of the software collectively called the "Mina archive node."
Apache License 2.0
18 stars 10 forks source link

Problem: the '--ledger-cadence' command line switch is ignored #539

Closed robinbb closed 6 months ago

robinbb commented 6 months ago

time ./target/release/mina-indexer server start -s /mnt/mina-log-storage/mina_network_block_data/ -d ./full-database --log-dir ./full-logs --ledger-cadence 10

The above command does not result in progress every 10 blocks, as expected from the '--ledger-cadence' setting. Rather, the following is found in the log:

2024-03-06T01:10:19.336773Z  INFO mina_indexer::state: Parsed and added 5000 blocks to the witness tree in 746.922684684s

... and no similar entries beforehand, suggesting that a ledger cadence of 5000 is being used.

robinbb commented 6 months ago

@Isaac-DeFrain worked on this recently, if I am not mistaken.

trevorbernard commented 6 months ago

@robinbb you have a misunderstanding of what that flag does. It's the cadence at which we persist a ledger into Rocks. Setting this value to 1 will result in a ledger being stored at each blockchain height.

      --ledger-cadence <LEDGER_CADENCE>
          Cadence for computing and storing ledgers [default: 100]
robinbb commented 6 months ago

Ouch. That's a new problem!