EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.29k stars 3.6k forks source link

Generate missing trace data for a production node? #11018

Closed camharris closed 2 years ago

camharris commented 2 years ago

In reference to #10937, I'd like to replay just up until the blocks I need to prevent an excessive downtime of the node in question in order to create traces for missing block traces. Following the documentation how to replay from a blocks.log and assuming my existing blocks.log database contains the blocks in question. What would be the process of replaying the up to the specific blocks in question without needing to replay the entire chain or corrupting my existing data. Pointing to relevant documentation would greatly appreciated 🙏🏿

From what I understand it seems like the ideal approach would be

nodeos -e -p eossio --data-dir /eos \
 --config /eos/config.ini \
 --replay-blockchain \ 
 --terminate-at-block 216000000 \ 
 --plugin eosio::trace_api_plugin \
 --plugin eosio::producer_plugin  \
  --plugin eosio::chain_api_plugin \
  --plugin eosio::http_plugin      \
camharris commented 2 years ago

Looks like I'd need to update to 2.1.0 in order to make use of --terminate-at-block

camharris commented 2 years ago

I ended up replaying the existing blocks.log with nodeos -e -p eosio --data-dir /var/lib/eos --config /var/lib/eos/config.ini --replay-blockchain --hard-replay-blockchain --disable-replay-opts