Skip to content

Add Giga fetch/serve and BlockDB prune metrics (CON-438) - #4329

Merged
wen-coding merged 2 commits into
mainfrom
wen/giga-testnet-metrics
Sep 24, 2026
Merged

wen-coding merged 2 commits into
mainfrom
wen/giga-testnet-metrics

Conversation

@wen-coding

@wen-coding wen-coding commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add tendermint_autobahn_blockstore_prune_watermark at the BlockDB prune choke point (actual floor after clamp, seeded on open).
  • Add tendermint_p2p_giga_fetch{resource,reason} for GetBlock, FullCommitQC, AppQC, CommitQC, and lane-proposal client paths (ok, unavailable, open_stream, send, receive, decode, process, wrong_lane).
  • Add tendermint_p2p_giga_serve{resource,reason} on GetBlock empty/error replies (pruned, not_found, store_error) so a lagging node's unavailable can be joined with a tip node's pruned.

Test plan

  • GOWORK=off go test --count=0 ./sei-tendermint/autobahn/blockstore ./sei-tendermint/internal/p2p/giga ./sei-tendermint/internal/autobahn/data
  • scripts/ramtest.sh ./sei-tendermint/autobahn/blockstore/... ./sei-tendermint/internal/p2p/giga/... ./sei-tendermint/internal/autobahn/data/...
  • On a giga testnet node, scrape Prometheus and confirm prune_watermark, fetch, and serve series appear; compare a lagging node's fetch{resource="block",reason="unavailable"} with a tip node's serve{resource="block",reason="pruned"} and next_block{stage="receive"}.

Made with Cursor

Expose why GetBlock/QC/lane-proposal catch-up stalls and how far BlockDB has actually pruned, without changing consensus behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedSep 24, 2026, 11:12 PM

@wen-coding wen-coding added the backport giga-1 Backport to experimental Giga 1 branch label Sep 24, 2026
@codecov

codecov Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.33333% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.39%. Comparing base (c1f6409) to head (a081928).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
sei-tendermint/internal/p2p/giga/data.go 46.15% 14 Missing ⚠️
sei-tendermint/internal/p2p/giga/avail.go 30.76% 9 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4329      +/-   ##
==========================================
- Coverage   67.49%   66.39%   -1.11%     
==========================================
  Files        2181     2063     -118     
  Lines      167844   155883   -11961     
==========================================
- Hits       113294   103500    -9794     
+ Misses      54540    52373    -2167     
  Partials       10       10              
Flag Coverage Δ
sei-chain-pr 79.20% <69.33%> (?)
sei-db 74.50% <ø> (ø)
sei-db-state-db ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sei-tendermint/autobahn/blockstore/metrics.gen.go 100.00% <100.00%> (ø)
sei-tendermint/autobahn/blockstore/store.go 87.50% <100.00%> (+0.10%) ⬆️
sei-tendermint/internal/p2p/giga/metrics.gen.go 100.00% <100.00%> (ø)
sei-tendermint/internal/p2p/giga/metrics.go 100.00% <100.00%> (ø)
sei-tendermint/internal/p2p/giga/avail.go 69.79% <30.76%> (-3.74%) ⬇️
sei-tendermint/internal/p2p/giga/data.go 71.15% <46.15%> (-5.19%) ⬇️

... and 121 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds metrics only: a BlockDB prune-watermark gauge, updated when the store opens and inside PruneBefore, plus Giga fetch/serve counters whose label sets are fixed and small. Behaviour doesn't change, and I found no correctness issues; the one note is that the new metrics have no tests.

Findings: 0 blocking | 1 non-blocking | 0 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • [suggestion] No tests cover the new metrics. A small test would pin the reason labels and stop them drifting. It could check that PruneBefore sets prune_watermark to the clamped floor, and that serverGetBlock increments serve{block,pruned} and serve{block,not_found} for ErrPruned and ErrNotFound. Any gatherer or registry helper works for reading the values back.

Pin the new label names and watermark gauge on the collector and mesh paths that already exercise those outcomes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@wen-coding
wen-coding added this pull request to the merge queue Sep 24, 2026
@wen-coding wen-coding changed the title Add Giga fetch/serve and BlockDB prune metrics Add Giga fetch/serve and BlockDB prune metrics (CON-438) Sep 24, 2026
Merged via the queue into main with commit b9f0e8f Sep 24, 2026
62 checks passed
@wen-coding
wen-coding deleted the wen/giga-testnet-metrics branch September 24, 2026 23:47
@seidroid

seidroid Bot commented Sep 24, 2026

Copy link
Copy Markdown

Successfully created backport PR for giga-1:

yzang2019 added a commit that referenced this pull request Sep 25, 2026
* main: (21 commits)
  Backport evmonly parse, app-hash and changeset perf fixes from giga-1 (#4345)
  Remove the oracle module behind a v6.8 upgrade (#4319)
  fix(seidb): report only the current migration boundary on the snapshot gauge (#4327)
  fix(flatkv): keep 10 old checkpoints instead of mirroring memIAVL's count (#4322)
  Backport Autobahn execute-loop and produced-tx metrics from giga-1 (#4330)
  Add giga.storage.receipts to toggle the Autobahn receipt store (#4333)
  optimize gather phase (#4326)
  Regenerate the Unreleased changelog as a plain PR list (#4336)
  Bump sei-protocol/go-ethereum to v1.15.7-sei-21 (#4332)
  Fail dynamic-gas precompile out-of-gas as an EVM out-of-gas call (#4318)
  Add dashboard and topology option for Autobahn e2e (#4167)
  Add Giga fetch/serve and BlockDB prune metrics (#4329)
  Add eth_getLogs to the EVM-only Giga RPC (#4308)
  Generate v6.8 precompiles (#4320)
  Add [giga] app.toml section and honor it on the Autobahn node (#4323)
  feat(evmonly): add eth_estimateGas via existing libraries (#4325)
  Use Pebble batch directly in SS (#4300)
  Fix pruning issue in SS causing huge disk spike (#4321)
  Make Autobahn always run the EVM-only executor, disable/remove some integration tests (#4316)
  reduce seal lock contention (#4314)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport giga-1 Backport to experimental Giga 1 branch non-app-hash-breaking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants