Skip to content

Add CI check that protocol bumps come with an overlay version bump#5316

Open
sisuresh wants to merge 1 commit into
stellar:masterfrom
sisuresh:protocol-overlay-version-check
Open

Add CI check that protocol bumps come with an overlay version bump#5316
sisuresh wants to merge 1 commit into
stellar:masterfrom
sisuresh:protocol-overlay-version-check

Conversation

@sisuresh

@sisuresh sisuresh commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a CI check that fails if Config::CURRENT_LEDGER_PROTOCOL_VERSION is bumped without also bumping OVERLAY_PROTOCOL_VERSION in src/main/Config.cpp.

  • scripts/check-protocol-overlay-versions.sh compares both constants between the PR base and head (can also be run locally, e.g. ./scripts/check-protocol-overlay-versions.sh origin/master).
  • New protocol-version-check job in build.yml, wired into the complete job's needs so it blocks merges, and a matching standalone job in build-private.yml.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

Copilot AI review requested due to automatic review settings June 3, 2026 19:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a guardrail in CI to ensure that whenever Config::CURRENT_LEDGER_PROTOCOL_VERSION is bumped, the maximum supported overlay protocol version (OVERLAY_PROTOCOL_VERSION) is also bumped, keeping peer capability signaling aligned with protocol upgrades.

Changes:

  • Added a repo script that compares protocol/overlay version constants between a base revision and the PR head (or working tree).
  • Added a public CI job (protocol-version-check) to run that script on PR/merge-group events and wired it into the complete aggregator job.
  • Added an equivalent job in the private CI workflow.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
scripts/check-protocol-overlay-versions.sh New script that diffs ledger/overlay protocol constants across git revisions and fails if overlay wasn’t bumped alongside a ledger protocol bump.
.github/workflows/build.yml Adds a new CI job running the protocol/overlay bump check and makes complete depend on it.
.github/workflows/build-private.yml Adds the same check job for the private workflow.

Comment thread scripts/check-protocol-overlay-versions.sh Outdated
@sisuresh sisuresh force-pushed the protocol-overlay-version-check branch from 3ebbcc0 to a2badb9 Compare June 3, 2026 20:27
@sisuresh sisuresh requested a review from anupsdf June 4, 2026 23:16
@sisuresh

sisuresh commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

This PR only bumps the max overlay version, but we could also require updates to the min depending on a set criteria cc @marta-lokhova

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.

2 participants