Skip to content

Backport release/v6.7: Export known peer address count as a Prometheus gauge - #4520

Merged
alexander-sei merged 1 commit into
release/v6.7from
backport-4514-to-release/v6.7
Oct 11, 2026
Merged

alexander-sei merged 1 commit into
release/v6.7from
backport-4514-to-release/v6.7

Conversation

@seidroid

@seidroid seidroid Bot commented Oct 9, 2026

Copy link
Copy Markdown

Backport of #4514 to release/v6.7.

@seidroid seidroid Bot assigned masih Oct 9, 2026
@seidroid seidroid Bot added the backport label Oct 9, 2026
@seidroid

seidroid Bot commented Oct 9, 2026

Copy link
Copy Markdown
Author

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-4514-to-release/v6.7
git worktree add --checkout .worktree/backport-4514-to-release/v6.7 backport-4514-to-release/v6.7
cd .worktree/backport-4514-to-release/v6.7
git reset --hard HEAD^
git cherry-pick -x 2009d55d2412da32368144563d8bd51da0eac09a
git push --force-with-lease

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedOct 9, 2026, 10:57 PM

@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.80%. Comparing base (a547c47) to head (a1d44b9).

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##           release/v6.7    #4520      +/-   ##
================================================
- Coverage         61.84%   60.80%   -1.04%     
================================================
  Files              2168     2068     -100     
  Lines            188740   176791   -11949     
================================================
- Hits             116728   107505    -9223     
+ Misses            61158    59404    -1754     
+ Partials          10854     9882     -972     
Flag Coverage Δ
sei-chain-pr 72.31% <100.00%> (?)
sei-db 69.80% <ø> (ø)
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/internal/p2p/metrics.gen.go 97.70% <100.00%> (+0.26%) ⬆️
sei-tendermint/internal/p2p/metrics.go 100.00% <ø> (ø)
sei-tendermint/internal/p2p/peermanager.go 82.70% <ø> (+1.08%) ⬆️
sei-tendermint/internal/p2p/router.go 91.53% <100.00%> (+0.06%) ⬆️

... and 100 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.

Follow-up to #4500, which changes `/net_info` `n_peers` to count
connected peers so it stops reporting the ~180-200 known addresses that
operators took for a broken peer cap. The known-address count is still
worth watching, for example to see how much the PEX tables grow, so this
exports it as a Prometheus gauge rather than an RPC field, as wen
suggested on #4500.

`tendermint_p2p_known_addresses` is the length of
`peerManager.AllAddrs()`: distinct node IDs across the live connections
and the persistent and regular PEX tables, the same set `/net_info`
`peers` lists. `NewRouter` seeds it and `metricsRoutine` refreshes it
every 10s, next to `tendermint_p2p_peers`, which keeps counting live
connections and is unchanged. The seed-node Prometheus test now also
checks that the new series is served. This only adds a metric, with no
consensus or state impact.

(cherry picked from commit 2009d55)
@devin-ai-integration
devin-ai-integration Bot force-pushed the backport-4514-to-release/v6.7 branch from 070167d to a1d44b9 Compare October 9, 2026 22:55
@masih
masih marked this pull request as ready for review October 9, 2026 22:57
@cursor

cursor Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Observability-only gauge wiring with no changes to connection or PEX behavior.

Overview
Adds a tendermint_p2p_known_addresses Prometheus gauge for the count of distinct peers with a known address (active connections plus addresses learned via PEX), using the same seed-at-NewRouter / refresh-in-metricsRoutine pattern as tendermint_p2p_peers.

The value comes from peerManager.AllAddrs(); only a comment on that helper and the seed-node metrics test are updated to expect the new series on scrape.

Reviewed by Cursor Bugbot for commit a1d44b9. Bugbot is set up for automated code reviews on this repo. Configure here.

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This is a clean backport of #4514. It adds a tendermint_p2p_known_addresses gauge, sets it in NewRouter when the router is built and again every 10 seconds in metricsRoutine, the same way the existing peers gauge works, and the node test now checks the new series appears. I found no issues; Codex and Cursor also reported none.

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

Blockers

  • None at the file/PR level.

Non-blocking

  • None at the file/PR level.

@alexander-sei
alexander-sei merged commit 206d3ce into release/v6.7 Oct 11, 2026
79 of 81 checks passed
@alexander-sei
alexander-sei deleted the backport-4514-to-release/v6.7 branch October 11, 2026 21:53
masih pushed a commit that referenced this pull request Oct 16, 2026
Systematic changelog re-generation for the v6.7.2 patch release.

Adds the PRs merged to `release/v6.7` since the v6.7.1 changelog
(#4481), as reported by `scripts/generate-changelog.sh release/v6.6
release/v6.7`.

New in v6.7.2:
- #4520 Backport `release/v6.7`: Export known peer address count as a
Prometheus gauge
- #4515 Backport `release/v6.7`: Count only connected peers in /net_info
n_peers
- #4508 Backport `release/v6.7`: Fix pruning issue in SS causing huge
disk spike
- #4507 Backport `release/v6.7`: Initialize app from last header when a
frozen node restarts

Shipped in v6.7.1, but merged after #4481 was generated, so the v6.7.1
changelog never listed them:
- #4503 Backport `release/v6.7`: Refuse pinned write modes that disagree
with persisted migration
- #4502 Backport `release/v6.7`: Guard FlatKV rollback floor
- #4499 Backport `release/v6.7`: Resolve composite iteration duplicates
to memiavl, matching Read
- #4489 Backport `release/v6.7`: Remove genesis export
- #4486 Backport `release/v6.7`: Re-derive the composite write mode on
rollback
- #4485 Backport `release/v6.7`: Make the composite store flatKV and
write mode atomic
- #4474 Backport `release/v6.7`: Validate module names in the memiavl
snapshot importer

v6.7.1 release bookkeeping:
- #4506 Backport `release/v6.7`: Update v6.7 change log in prep to cut
v6.7.1 patch
- #4482 Bump version to v6.7.1 in prep for patch release

Only the `## v6.7` PR list changes, so the `backport release/v6.7`
cherry-pick applies cleanly (simulated with `git merge-tree` against
`origin/release/v6.7`).

Co-authored-by: Cursor <cursoragent@cursor.com>
masih added a commit that referenced this pull request Oct 16, 2026
## Summary
- Bump `version.json` from `v6.7.1` to `v6.7.2` for the patch release.
- Merge after the `release/v6.7` backport of #4557 (the v6.7.2
changelog), so the release includes it.
- New since v6.7.1: #4507, #4508, #4515 and #4520. All four are labeled
`non-app-hash-breaking`, so moving from v6.7.1 to v6.7.2 should not need
a coordinated validator switch.
- Push `v6.7.2` by hand on this PR's merge commit once it has merged;
the tagging ruleset stops `uci-release-publish` from creating it.

## Test plan
- [x] `git diff --check`

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Masih H. Derkani <m@derkani.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants