Streaming block updates not getting new headers
halljson opened this issue · comments
After a full sync, I'm seeing this output on repeat:
latest block number: 17678866
last seen block number: 17678867
...
latest block number: 17678866
last seen block number: 17678867
It appears that this line is not getting new headers:
https://github.com/joshstevens19/reth-indexer/blob/master/src/indexer.rs#L231-L233
My reth node is definitely syncing new blocks:
# curl localhost:8545 -X POST -H "Content-Type: application/json" --data '{"method":"eth_blockNumber","params":["latest",false],"id":1,"jsonrpc":"2.0"}' | jq
{
"jsonrpc": "2.0",
"result": "0x10ddca3",
"id": 1
}
# curl localhost:8545 -X POST -H "Content-Type: application/json" --data '{"method":"eth_blockNumber","params":["latest",false],"id":1,"jsonrpc":"2.0"}' | jq
{
"jsonrpc": "2.0",
"result": "0x10ddca4", <-- updated
"id": 1
}
Nice ok let me fix this for you again in morning as I am AFK right now! Thanks for testing and raising these things
Thank you, I'm trying to debug them as I go but I am brand new to rust. Hopefully I can get up to speed and get some contributions in.
All good thanks for testing
cant spot this error from scanning need to look a bit deeper didn't have time today will look over the weekend
can you try again with the latest i pushed this commit i think the reth provider is holding cache
let me know
will have results for you by tomorrow
@joshstevens19 most recent commit got this:
synced all data to postgres, waiting for new blocks and reth-indexer will now index as they come in.
Elapsed time: 18597.81s
to_block: 18446744073709551615
u64::max: 18446744073709551615
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InitTransaction(11)', src/node_db.rs:66:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
yeah i can recreate moving back to the provider I'm guessing that is holding some cache somewhere trying to work out why
ok found the bug was due to the provider i think this commit should do the job i tested my side seem to now keep going when blocks update let me know > 80c554f
working for me now:
synced all data to postgres, waiting for new blocks and reth-indexer will now index as they come in.
Elapsed time: 65.60s
to_block: 18446744073709551615
u64::max: 18446744073709551615
new block(s) found check from: 17708000... last seen: 17707999... latest block: 17708004
new block(s) found check from: 17708005... last seen: 17708004... latest block: 17708005
new block(s) found check from: 17708006... last seen: 17708005... latest block: 17708006
db is updating as expected, thank you!
Amazing!!!!