Repository navigation
Expand program capacity automatically before upgrade proposals - #248
Merged
Merged
Conversation
edo-chan
marked this pull request as ready for review
November 5, 2026 16:08
austbot
approved these changes
Nov 5, 2026
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.
The mainnet upgrade workflow stopped when the new binary exceeded ProgramData capacity (release run 42054905703 needed 139,176 more bytes). CI now runs
swig-release preparebefore creating a tag or uploading a buffer. Preparation validates the deployment and full funding requirement, pays any required expansion from the existing proposer, confirms capacity, and refreshes the verification preflight because extension updates ProgramData's slot. Squads approval and execution of the upgrade remain unchanged.Reuse the devnet sizing and confirmed transaction submission code in one shared program module. Expansion follows the existing 10,240-byte rounding policy, includes rent and transaction reserves, and is skipped when live capacity is sufficient. Preserve the public signature before submission and archive expansion receipts even if a later check fails. Unknown outcomes stop the run; no automatic resubmission is added.
Validation:
cargo test --manifest-path tools/release/Cargo.toml --locked(56 passed), formatter, Clippy with-D warnings,actionlint .github/workflows/propose-upgrade.yml, andgit diff --check. Unit RPC fixtures cover the observed shortfall, exact/no-op capacity, rent/funding boundaries, payer and authority binding, refreshed slot metadata, failed/processed/uncertain transactions, and post-confirmation verification. No live extension was submitted. Independent review passed with no blocking findings at462c98e74b3032e850eb3e9417f53afb8bb0e001againsta05a9aa84661087a5d1e6eb9536f0ce76fc50ef9; it independently reproduced all local checks. Exact-head Build and Test, release-cli and Test Results and lint all passed.Loader behavior checked against Agave v4.2.2:
ExtendProgrampermits the payer to fund expansion while retaining the upgrade authority, enforces allocation limits, and updates ProgramData's slot.preparation_extends_with_proposer_and_refreshes_slot_bound_preflight; no Swig layout changes.462c98e74b3032e850eb3e9417f53afb8bb0e001, basea05a9aa84661087a5d1e6eb9536f0ce76fc50ef9: local tests, fmt, Clippy, actionlint, independent review, Build and Test, release-cli, Test Results, and lint all pass. Full CI includes standard, ProgramScope, SDK and stake suites.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.