Skip to content

fix(cluster-tool): pass systemProgram to opp_bootstrap - #86

Merged
valthon merged 1 commit into
masterfrom
fix/sol-bootstrap-system-program
Aug 31, 2026
Merged

fix(cluster-tool): pass systemProgram to opp_bootstrap#86
valthon merged 1 commit into
masterfrom
fix/sol-bootstrap-system-program

Conversation

@valthon

@valthon valthon commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Unblocks wire-solana #442 (SOL-385). One line, and inert until that lands.

#442 makes opp_bootstrap grow the operator registry. At MAX_OPERATORS = 128 the full account is 12 344 B — more than a CPI may allocate — so the PDA is created at INITIAL_SIZE (10 240 B) and the first bootstrap reallocs it to full size, topping up rent from admin. That transfer is why the instruction now requires system_program.

wire-solana's own suite was updated for the new account; this call site was not. It builds the account map explicitly, and the harness holds the program as Program<Idl>, so nothing resolves systemProgram for it — Anchor refuses the instruction before the program runs (Account 'systemProgram' not provided.) and every flow dies at EpochBootstrap / seed-solana-roster. That is what took run 33002424120, dispatched against #442's branch, to zero passing flows.

Safe to land before #442. Anchor builds the on-wire account list from the IDL it loads at runtime, so the extra key is ignored against today's next, which has no system_program. #444 is stacked on #442 and inherits the same requirement.

Verified by running flow-operator-collateral-deposit end-to-end against a #442 build — 140 steps, 0 non-ok, epochs 1 → 5, OPP circulating in all four directions. That flow covers both the bootstrap and a SOL collateral deposit, so it also exercises the registry_initialized gate SOL-385 added.

🤖 Generated with Claude Code

@valthon
valthon force-pushed the fix/sol-bootstrap-system-program branch 2 times, most recently from 2cbfc03 to 7cf100e Compare August 28, 2026 15:53
Every one of the 14 e2e flows failed at the same step --
`EpochBootstrap / seed-solana-roster`, with
`Account 'systemProgram' not provided.` -- so no cluster ever finished
bootstrapping and the whole gate went red.

SOL-385 made `system_program` a required account on `opp_bootstrap`: the
operator registry PDA is now created SHORT (`INITIAL_SIZE`, all a CPI may
allocate at 128 operators) and the first successful bootstrap GROWS it to
full size, topping the rent up from `admin`. wire-solana's own suite was
updated for that; this call site was not, and Anchor does not resolve the
account for us here, so the instruction is refused before the program
ever runs.

Verified the fix is COMPLETE rather than merely unblocking the first
error: `OppBootstrap` declares exactly `admin`, `global_config`,
`config`, `operator_registry`, `system_program`, and the harness now
supplies all five (`admin` + `globalConfig` via `getAdminAccounts`).
There is no second missing account behind this one -- Anchor reports
them one at a time, which is why that check matters.

Matches the five existing `systemProgram:` call sites in this file.
@valthon
valthon force-pushed the fix/sol-bootstrap-system-program branch from 7cf100e to 0c218ae Compare August 29, 2026 11:17
@valthon
valthon requested a review from jglanz August 29, 2026 11:21
@valthon
valthon merged commit f36f717 into master Aug 31, 2026
2 checks passed
@valthon
valthon deleted the fix/sol-bootstrap-system-program branch August 31, 2026 22:29
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