Skip to content

fix: read the consensus protocol version from the committed block header - #73

Merged
ktechmidas merged 1 commit into
masterfrom
fix/consensus-protocol-from-block-header
Nov 20, 2026
Merged

ktechmidas merged 1 commit into
masterfrom
fix/consensus-protocol-from-block-header

Conversation

@ktechmidas

@ktechmidas ktechmidas commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

After a protocol upgrade activates, every Platform node turns warn with "DAPI epoch and consensus protocol disagree" and the network page keeps showing the old protocol number.

The probe takes the consensus side from Tenderdash /status → node_info.protocol_version.app. Tenderdash sets that field when it starts and does not refresh it. A protocol upgrade activates at an epoch boundary without a restart, so the field keeps the old number until the next restart.

Seen on devnet-palmatum on 2026-11-20: protocol 15 activated at Platform height 509 (14:04:52 UTC). Read on validators-002:

Source App version
/status node_info.protocol_version.app (Tenderdash started 12:31 UTC) 14
/block header.version.app, heights 509 and later 15
/consensus_params version.app_version 15
/abci_info app_version 15
DAPI getEpochsInfo, epoch 4 15

All 13 validators carried the warning. server/incidents.js uses the same field for its protocol proof.

Change

  • agent/probe.py: protocolApp is the app version in the latest block header, for every role with a Tenderdash RPC. node_info remains the fallback when the block cannot be read. Validators reuse the same block read for proposer and commit, so they make no extra request; other roles with an RPC make one more.
  • agent/test_probe.py: regression test with the Palmatum values. It fails on master (14 != 15) and passes here.

No change to shared/evaluate.js, the incident proof or the frontend: they keep reading protocolApp. The mainnet observer does not report this field.

Checked

  • agent/test_probe.py: 16 of 16.
  • The changed probe run read-only on validators-002 the way the collector runs it (sudo -n python3 - validator <ip>): protocolApp 15, DAPI epoch protocol 15, no errors, 1.1 s.

Not checked: a Tenderdash 1.x node. The header field is the same there as far as I know, and the fallback keeps today's value if it is missing.

Prepared by Claude (infraclaw).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved protocol version reporting by prioritizing the latest committed block’s version and falling back to the node-reported version when needed.
    • Invalid or unavailable version values are now handled without reporting a nonpositive version.

After a protocol upgrade activates, every Platform node turned warn with "DAPI epoch and consensus protocol disagree" and the network page kept showing the old protocol number. The probe took the consensus side from Tenderdash /status node_info.protocol_version.app, which Tenderdash sets when it starts and does not refresh, while a protocol upgrade activates at an epoch boundary without a restart.

Seen on devnet-palmatum on 2026-11-20: protocol 15 activated at Platform height 509; block headers, consensus_params and abci_info all said 15, and /status kept saying 14 on all 13 validators.

- agent/probe.py: protocolApp is the app version in the latest block header, for every role with a Tenderdash RPC. node_info remains the fallback when the block cannot be read. Validators reuse the same block read for proposer and commit, so they make no extra request.
- agent/test_probe.py: regression test with the Palmatum values.

Prepared by Claude (infraclaw).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Tenderdash now selects protocolApp from the latest block header when that value is a positive integer. It falls back to the status-reported version when needed. The latest block header also supplies proposer data.

Changes: Tenderdash Protocol Version

Layer / File(s) Summary
Header version selection and Tenderdash integration
agent/probe.py, agent/test_probe.py
app_version checks the header value before the node-info value and returns a positive integer or None. Tenderdash fetches the latest block once and uses its header for protocol version and proposer data. Tests cover validator and fullnode roles, fallback behavior, commit metadata, and version parsing.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: Minimal · up to f4835

This change makes the reported consensus protocol version follow the committed block header, so it no longer lags after an epoch-boundary upgrade. It falls back to the previous source if the header is unavailable. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the consensus protocol version is now read from the committed block header instead of the startup-time node_info value. The raw summary confirms that protocolApp now u…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the consensus protocol version is now read from the committed block header instead of the startup-time node_info value. The raw summary confirms that protocolApp now uses the latest block header's app version first, with node_info.protocol_version as fallback. The title is specific, concise, and uses the conventional fix: prefix.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b1adb4f7-b36f-475c-bf88-7f67e7466a00
Commits

Reviewing files that changed from the base of the PR and between a6ce4bb and f483535.

Files selected for processing: 2

  • agent/probe.py
  • agent/test_probe.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@ktechmidas
ktechmidas merged commit 072e171 into master Nov 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant