reth
reth copied to clipboard
Make sync metrics work for engine2
Right now we do not output any stage metrics for engine2:
We do this in the current engine by using MetricsListener:
https://github.com/paradigmxyz/reth/blob/9b5a166e5d3e8fa7d453bd3c146ca2360a984990/crates/stages/api/src/metrics/listener.rs#L40-L90
These messages are sent to the metrics listener in the current tree here: https://github.com/paradigmxyz/reth/blob/9b5a166e5d3e8fa7d453bd3c146ca2360a984990/crates/blockchain-tree/src/blockchain_tree.rs#L1355-L1374
We should do this in the tree, despite the fact that it may roll back a few blocks on restart, because being consistent with the most recent block and RPC seems important.