You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add CI check that protocol bumps come with an overlay version bump - #5316
Adds a CI check that fails if the ledger protocol version (MAX_SUPPORTED_PROTOCOL_VERSION) is bumped without also bumping OVERLAY_PROTOCOL_VERSION in the same change.
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 (not yet in complete's needs, so it doesn't block merges), and a matching standalone job in build-private.yml.
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.
Compare overlay version against PR base, not prior ledger bump
scripts/check-protocol-overlay-versions.sh:138
This deliberately compares against the overlay value from the previous ledger bump rather than the PR base, so a ledger bump with HEAD_OVERLAY == BASE_OVERLAY passes whenever the overlay was incremented earlier. That contradicts the stated base-vs-head contract that the protocol-bump change must also bump the overlay version. Either compare against BASE_OVERLAY, or explicitly revise the PR contract to permit pre-bumps and explain how intermediate builds remain distinguishable.
scripts/check-protocol-overlay-versions.sh fails if the ledger protocol version
increases without OVERLAY_PROTOCOL_VERSION increasing in the same change, or if
the overlay version is lowered. Runs as a non-blocking protocol-version-check job.
The reason will be displayed to describe this comment to others. Learn more.
As a non-blocking check, I think this is fine. If/when we move it to blocking there are some more things we'll want to consider. For example, suppose we have a PR A that bumps the overlay version and a PR B that bumps the protocol version. If B is pushed before A merges but is added to the merge queue later, we could get an error when the merge queue check runs. Claude also notes that the docs for github.event.merge_group.base_sha aren't super clear in the case with multiple PRs in the queue. I think this case is pretty unlikely.
It's also maybe worth considering what we want to do if we've bumped overlay before we bump protocol. Since the check is currently non-blocking, we can figure out how we want to handle that when it happens (burn a sequence number or ignore the check). If we get rid of the separate no-op bumps we do before protocol upgrades, I think this will be even rarer.
As a non-blocking check, I think this is fine. If/when we move it to blocking there are some more things we'll want to consider. For example, suppose we have a PR A that bumps the overlay version and a PR B that bumps the protocol version. If B is pushed before A merges but is added to the merge queue later, we could get an error when the merge queue check runs. Claude also notes that the docs for github.event.merge_group.base_sha aren't super clear in the case with multiple PRs in the queue. I think this case is pretty unlikely.
It's also maybe worth considering what we want to do if we've bumped overlay before we bump protocol. Since the check is currently non-blocking, we can figure out how we want to handle that when it happens (burn a sequence number or ignore the check). If we get rid of the separate no-op bumps we do before protocol upgrades, I think this will be even rarer.
So I intentionally made the check non-blocking due to those scenarios. I don't think this should ever be a blocking check.
…#5475)
Adds a daily workflow that reads pubnet's protocol version from Horizon
and, once every release supporting that protocol has an overlay version
above `OVERLAY_PROTOCOL_MIN_VERSION`, opens (or updates) a single PR
raising the min to the lowest such overlay version and asking the
reviewer to verify the versions. `scripts/check-overlay-min-version.sh`
also fails if the min is above that value. Follow-up to stellar#5316.
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
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.
Description
Adds a CI check that fails if the ledger protocol version (
MAX_SUPPORTED_PROTOCOL_VERSION) is bumped without also bumpingOVERLAY_PROTOCOL_VERSIONin the same change.scripts/check-protocol-overlay-versions.shcompares both constants between the PR base and head (can also be run locally, e.g../scripts/check-protocol-overlay-versions.sh origin/master).protocol-version-checkjob inbuild.yml(not yet incomplete'sneeds, so it doesn't block merges), and a matching standalone job inbuild-private.yml.Checklist
clang-formatv8.0.0 (make formator the Visual Studio extension)