reth icon indicating copy to clipboard operation
reth copied to clipboard

Make sync metrics work for engine2

Open Rjected opened this issue 1 year ago • 0 comments

Right now we do not output any stage metrics for engine2: Screenshot 2024-08-09 at 4 36 14 PM

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.

Rjected avatar Aug 09 '24 20:08 Rjected