Commit c763be7
fix(archiver): restore pending block height metric under pipelining (#22994)
## Motivation
The `aztec.archiver.block_height` series with no status attribute
(rendered as the "Pending chain" line on the network, prover, and
fisherman Grafana dashboards) stopped being published a couple of weeks
ago. With pipelining enabled every checkpoint arriving from L1 already
has its blocks in the proposed store, so the L1 synchronizer always took
the new promotion fast path introduced in #22716, leaving
`checkpointsToAdd` empty and skipping the metric call.
## Approach
Record the checkpointed block-height metrics across all valid
checkpoints in the batch instead of only the ones routed through
`addCheckpoints`, so the promoted checkpoint contributes too. The
duration is averaged over the full batch since `addCheckpoints` performs
the work for both paths in a single transaction.
## Changes
- **archiver (`l1_synchronizer.ts`)**: Move the
`processNewCheckpointedBlocks` call to use `validCheckpoints` rather
than `checkpointsToAdd`, restoring the empty-status `block_height`,
`checkpoint_height`, `sync_block_count`, and `sync_per_checkpoint`
series under pipelining.
---------
Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>1 parent c4e1914 commit c763be7
2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
973 | 973 | | |
974 | 974 | | |
975 | 975 | | |
976 | | - | |
| 976 | + | |
977 | 977 | | |
978 | | - | |
979 | | - | |
| 978 | + | |
| 979 | + | |
980 | 980 | | |
981 | 981 | | |
982 | 982 | | |
| |||
0 commit comments