rainshowerLabs / sothis

Replay and track historical state
Mozilla Public License 2.0
204 stars 7 forks source link

[BUG] sothis track mode freezes up with local node #7

Open engn33r opened 1 year ago

engn33r commented 1 year ago

Describe the bug

Cannot use keyboard to interrupt sothis process. Instead, I have to manually kill the process.

Separate issues: cannot kill anvil process with keyboard interrupt, anvil blocks not increasing after the sothis track mode instance is started.

To Reproduce

Steps to reproduce the behavior:

  1. Run anvil: anvil --fork-url https://eth-mainnet.alchemyapi.io/v2/xxxx --fork-block-number 17499990 --cups 2000
  2. Run sothis historic replay instance: sothis --source_rpc https://mainnet.gateway.tenderly.co/xxxx --replay_rpc http://127.0.0.1:8545 --terminal_block 17500100
  3. Run sothis track mode instance: sothis --mode track --source_rpc http://127.0.0.1:8545 --contract_address 0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640 --storage_slot 0 --filename uniswap-slot0.json --path ./
  4. Try to use keyboard interrupt on the sothis track mode instance. Does not work, must kill process manually.
  5. Try to use keyboard interrupt on the anvil process. Does not work, must kill process manually.
  6. Anvil block number not increasing anymore like it was before the sothis track mode instance was started.

I did not have this issue with track mode on a live node (current block), I have only observed the issue using a local node.

Expected behavior

Can use keyboard interrupt to kill process. Anvil block numbers should increase.

Screenshots

N/A

Setup (please complete the following information):

Additional context

makemake-kbo commented 1 year ago

The keyboard interrupt likely didn't work because its checked once on every new block. If no new blocks are produced, that's likely the cause for that.

I haven't been able to reproduce this issue so far. Is anvli producing any output (is it accepting transactions)? Could also be that tenderly is incompatible, but I highly doubt it as its not using any non standard RPC calls for reading state.

makemake-kbo commented 1 year ago

I added a warning to the latest pr that will show every 60 seconds if no new blocks appear, it should clear up some confusion

engn33r commented 1 year ago

I pulled the latest sothis 0.3.2 to test this again: