Repository navigation
feat: precommit metrics - #5251
Merged
Merged
Conversation
technicallyty
marked this pull request as ready for review
July 2, 2025 19:16
zrbecker
approved these changes
Jul 2, 2025
aljo242
approved these changes
Jul 2, 2025
Contributor
Author
|
merging this as i confirmed it worked on a local network. |
rootulp
added a commit
to celestiaorg/celestia-core
that referenced
this pull request
Jun 2, 2026
## Overview Backport of upstream [cometbft/cometbft#5251](cometbft/cometbft#5251) (shipped in v0.38.18). Adds observability metrics for the precommit step, mirroring the existing prevote-delay metric: - **`QuorumPrecommitDelay`** — interval (seconds) between the proposal timestamp and the earliest precommit that achieved a quorum. - **`PrecommitsCounted`** — number of precommit votes counted after the timeout-commit period ends. - **`PrecommitsStakingPercentage`** — voting-power percentage of precommits at the end of the timeout-commit period. `emitPrecommitTimeoutMetrics` is called from `handleTimeout` (the `RoundStepPrecommitWait` branch) and `calculatePrecommitMessageDelayMetrics` from `finalizeCommit`, alongside the existing prevote metric. ## Notes - The upstream code was adapted to celestia's `cs.rs` round-state accessors (celestia keeps round state in `cs.rs` rather than directly on `cs`). - `consensus/metrics.gen.go` was regenerated via `make metrics`. - Observability only — no consensus behavior change. Matches the existing untested `calculatePrevoteMessageDelayMetrics` pattern; upstream #5251 shipped without tests as well. ## Testing - `go test -tags deadlock ./consensus/` passes. - `golangci-lint` clean. Closes PROTOCO-1869 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
This was referenced Jun 2, 2026
rootulp
added a commit
to celestiaorg/celestia-core
that referenced
this pull request
Jun 2, 2026
## Overview Backport of upstream [cometbft/cometbft#5251](cometbft/cometbft#5251) (shipped in v0.38.18). Adds observability metrics for the precommit step, mirroring the existing prevote-delay metric: - **`QuorumPrecommitDelay`** — interval (seconds) between the proposal timestamp and the earliest precommit that achieved a quorum. - **`PrecommitsCounted`** — number of precommit votes counted after the timeout-commit period ends. - **`PrecommitsStakingPercentage`** — voting-power percentage of precommits at the end of the timeout-commit period. `emitPrecommitTimeoutMetrics` is called from `handleTimeout` (the `RoundStepPrecommitWait` branch) and `calculatePrecommitMessageDelayMetrics` from `finalizeCommit`, alongside the existing prevote metric. ## Notes - The upstream code was adapted to celestia's `cs.rs` round-state accessors (celestia keeps round state in `cs.rs` rather than directly on `cs`). - `consensus/metrics.gen.go` was regenerated via `make metrics`. - Observability only — no consensus behavior change. Matches the existing untested `calculatePrevoteMessageDelayMetrics` pattern; upstream #5251 shipped without tests as well. ## Testing - `go test -tags deadlock ./consensus/` passes. - `golangci-lint` clean. Closes PROTOCO-1869 🤖 Generated with [Claude Code](https://claude.com/claude-code)<hr>This is an automatic backport of pull request #3081 done by [Mergify](https://mergify.com). Co-authored-by: Rootul P <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
rootulp
added a commit
to celestiaorg/celestia-core
that referenced
this pull request
Jun 2, 2026
## Overview Backport of upstream [cometbft/cometbft#5251](cometbft/cometbft#5251) (shipped in v0.38.18). Adds observability metrics for the precommit step, mirroring the existing prevote-delay metric: - **`QuorumPrecommitDelay`** — interval (seconds) between the proposal timestamp and the earliest precommit that achieved a quorum. - **`PrecommitsCounted`** — number of precommit votes counted after the timeout-commit period ends. - **`PrecommitsStakingPercentage`** — voting-power percentage of precommits at the end of the timeout-commit period. `emitPrecommitTimeoutMetrics` is called from `handleTimeout` (the `RoundStepPrecommitWait` branch) and `calculatePrecommitMessageDelayMetrics` from `finalizeCommit`, alongside the existing prevote metric. ## Notes - The upstream code was adapted to celestia's `cs.rs` round-state accessors (celestia keeps round state in `cs.rs` rather than directly on `cs`). - `consensus/metrics.gen.go` was regenerated via `make metrics`. - Observability only — no consensus behavior change. Matches the existing untested `calculatePrevoteMessageDelayMetrics` pattern; upstream #5251 shipped without tests as well. ## Testing - `go test -tags deadlock ./consensus/` passes. - `golangci-lint` clean. Closes PROTOCO-1869 🤖 Generated with [Claude Code](https://claude.com/claude-code)<hr>This is an automatic backport of pull request #3081 done by [Mergify](https://mergify.com). Co-authored-by: Rootul P <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
adds metrics for: