erigon-pulse/cmd/integration
ledgerwatch b747ab5324
[WIP] CallTraces index (#1157)
* Initial commit for CallTraces index

* Fix compilation

* fix lint, add comment

* Fix integration

* Add Close function to ethdb.Cursor, fix some compile errors

* Try to stop cursor leak in Get

* Fix compile errors in RPC daemon

* Fix compile errors

* fixing another way

* Some fixes

* More fixes

* More fixes

* More fixes

* Fixes to core/state

* Fix lint

* Fix lint

* Fixes

* Stage caching for call trace stage

* Add mem stats

* Try to stop the leak

* Turn off debug

* Chunks for 10k blocks

* Print

* Revert "Print"

This reverts commit 5ffada4828d61e00e5dad1ca12c98258dfbbad00.

* Revert "Chunks for 10k blocks"

This reverts commit cfb9d498e782e5583d41c30abf0e2137da27383e.

* Trying to fix the leak

* Don't compute receipts in re-tracing

* Not compose block

* Print speed, fix receipts, bigger caches

* Fix lint

* Utilise changeset info

* Counters

* Use NoReceipts and ReadOnly

* ReadOnly is incompatible with caching

* Skip test leaking transactions

* Fix block test

* Change disable message for call-traces stage

* Use block option for call traces integration

* Fix retracing due to incarnation
2020-10-12 09:39:04 +01:00
..
commands [WIP] CallTraces index (#1157) 2020-10-12 09:39:04 +01:00
main.go Rpcdaemon as lib 2 (#943) 2020-08-20 10:52:27 +07:00
Readme.md integration_write_receipts (#1098) 2020-09-11 17:33:46 +07:00

Integration - tool to run TurboGeth stages in custom way: run single stage, or run all stages but reorg every X blocks, etc...

By examples. All commands require parameter --chaindata=/path/to/chaindata - I will skip it for readability.

integration --help
integration print_stages --block=1_000_000

# run all stages (which do not need internet). 
integration state_stages --unwind=1 --unwind_every=10  # process 10 blocks, then reorg 1 block, then process 10 blocks, ... 
integration state_stages --unwind=10 --unwind_every=1  # process 1 block, then reorg 10 blocks, then process 1 blocks, ...

# Run single stage 
integration stage_senders 
integration stage_exec  
integration stage_exec --block=1_000_000 # stop at 1M block
integration stage_hash_state 
integration stage_ih 
integration stage_history
integration stage_tx_lookup

# Drop data of single stage 
integration stage_exec --reset     
integration stage_history --reset
... 

# reset all data after stage_senders
integration reset_state

# hack which allows to force clear unwind stack of all stages
clear_unwind_stack

The way I usually run it:

go run -trimpath ./cmd/integration state_stages --chaindata=/path/to/chaindata --unwind=10 --unwind_every=20 --pprof 

Pre-requirements of state_stages command:

  • Headers/Bodies must be downloaded
  • TxSenders stage must be executed