fix(SEV-046): bump deploy SOL floor 5→20 (empirical 12.5 SOL needed)#393
Merged
Merged
Conversation
Rehearsal-1f finally got past every workflow bug and surfaced the
real cost: anchor deploy of 4 programs needs ~12.5 SOL, not the
~3-4 SOL my original docs claimed. Run failed mid-deploy with:
Error: Account 5ZpFtJePb2hGKhG9RJ6Fdwmo5y8wuwKXZZcKttoN1Jgo has
insufficient funds for spend (6.13730712 SOL) + fee (0.00438 SOL)
Per-program rent-exempt minimum is 2× bytecode size:
roundfi_core ~880KB → ~6.14 SOL
roundfi_reputation ~370KB → ~2.6 SOL
roundfi_yield_kamino ~294KB → ~2.0 SOL
roundfi_yield_mock ~254KB → ~1.8 SOL
TOTAL ≈ 12.5 SOL + ~0.05 tx fees
Fixes:
- devnet-deploy.yml + mainnet-deploy.yml balance floor 5 → 20 SOL
(20 = 1.6× empirical for priority-fee spikes + temporary buffer
accounts during multi-program deploys)
- Header comment updated with per-program breakdown so future devs
don't have to re-derive empirically.
- docs/operations/cd-pipeline.md: all 5 refs to "5 SOL" updated
to "20 SOL" with the cost rationale inline.
This is the LAST plausible workflow change for SEV-046 execution.
Next failure mode (if any) is a Solana-side RPC issue, not a
workflow bug — the workflow itself is now demonstrably correct
through `anchor deploy` invocation.
Note for operator on rehearsal-1f's burned SOL: the buffer account
AqUsc5qqMG7bk5W6kZZzbhsfbWeuEMbEzuVpLkwr4PSH has the lamports
escrowed. Recoverable via:
solana program close AqUsc5qqMG7bk5W6kZZzbhsfbWeuEMbEzuVpLkwr4PSH \
--recipient 5ZpFtJePb2hGKhG9RJ6Fdwmo5y8wuwKXZZcKttoN1Jgo \
--url devnet
Optional — devnet SOL is free; faster to just airdrop more.
https://claude.ai/code/session_01YapZy1Z5gzbV5EammBkSQm
alrimarleskovar
pushed a commit
that referenced
this pull request
May 18, 2026
Companion to docs/operations/cd-pipeline.md (architecture spec). This is the empirical lessons-learned counterpart documenting why SEV-046's "clean" PR #388 took 5 follow-up PRs (#389-#393) before a single anchor deploy actually completed. Contents: - Headline: 5 bugs, each one-line, none catchable by lint/typecheck - Per-rehearsal chronology (1a → 1g) - Per-bug root cause analysis (JSON parse trap, anchor-syn IDL, anchor wallet resolution chain, empirical SOL cost) - What would have prevented it: localnet smoke-test workflow that exercises the full deploy path against solana-test-validator - Mainnet-deploy mitigation summary (all 5 fixes already in) - Outstanding operator-side work tracker Filed as follow-up: the localnet smoke-test workflow design is sketched but not implemented in scope of SEV-046. Tracking for post-canary cleanup. Generalized lesson burned in: workflow code is untestable except by running it. The CI lanes pass; the workflow still doesn't work. https://claude.ai/code/session_01YapZy1Z5gzbV5EammBkSQm
2 tasks
alrimarleskovar
added a commit
that referenced
this pull request
May 19, 2026
#395) Documents the 5-PR chain (#389-#393) that the SEV-046 CD scaffolding (PR #388) needed before a single anchor deploy actually ran end-to-end. Companion to docs/operations/cd-pipeline.md (architecture spec) — this is the empirical lessons-learned counterpart. Generalized lesson: workflow code is untestable except by running it. CI lanes can be green while the workflow itself is broken in ways that only surface against real runner conditions. https://claude.ai/code/session_01YapZy1Z5gzbV5EammBkSQm
alrimarleskovar
pushed a commit
that referenced
this pull request
May 19, 2026
…closed First green end-to-end CD devnet deploy after the 5-PR bug chain (#389–#393). Run 26086314957 deployed all 4 RoundFi programs on a clean ubuntu-latest runner, artifact captured, keypair scrubbed. Changes: - docs/operations/rehearsal-logs/2026-05-19-SEV-046-rehearsal-1g-success.md — full run record with program IDs, Solscan links, cost breakdown, next-rehearsal plan. - docs/operations/rehearsal-logs/2026-05-18-SEV-046-rehearsal-saga.md — row 1g flipped from "pending" to ✓ green + headline update note. - docs/operations/mainnet-canary-plan.md §3.3 — CD pipeline checkbox flipped [x] with link to the 1g success log. Stretch goal of 3× clean still at 1/3. - docs/security/internal-audit-findings.md — SEV-046 tracker row updated with PR chain breadcrumb (#388 + #389–#393 + #395) + empirical close status. - CHANGELOG.md — new [Unreleased] entry summarizing the rehearsal 1g outcome above the existing #272 scaffolding entry. §3.3 strict "at least once" criterion: ✓ satisfied. 3× clean reproducibility (cd-pipeline.md §"Rehearsal protocol"): 1/3. Operator can now disparar rehearsals 2 + 3 with no expected code changes. https://claude.ai/code/session_01YapZy1Z5gzbV5EammBkSQm
This was referenced May 19, 2026
Merged
alrimarleskovar
added a commit
that referenced
this pull request
May 19, 2026
…tag (#398) SEV-046 rehearsal 2 abort log + 1g tag correction. Operator disparou rehearsal-2 post-1g merge; workflow correctly aborted at the 20 SOL balance gate (deployer wallet was at 12.38 SOL post-1g — 1g consumed the ~12.5 SOL PR #393 predicted). Floor working as designed, not a code bug. Recorded across saga doc + 1g success doc + canary-plan §3.3 checkbox. Side fix: 1g doc Tag field corrected from 20260518 → 20260519 to match actual git tag. §3.3 strict "at least once" criterion remains satisfied by 1g; 3× stretch goal still at 1/3, NOT a mainnet blocker.
3 tasks
alrimarleskovar
added a commit
that referenced
this pull request
May 19, 2026
Second green CD devnet deploy via run 26115425088 — 4 programs deployed with fresh keypairs, 12.62 SOL consumed (within 1% of PR #393 prediction). Recorded full run + 1g-vs-2b reproducibility table (8/8 properties match or within 1%) + saga continuation row + canary plan §3.3 checkbox 1/3 → 2/3 + CHANGELOG. Reproducibility empirically demonstrated: the 5-PR bug chain in 1b–1f (PRs #389–#393) has no siblings. Remaining gap is operator-side SOL availability for rehearsal-3 (post-2b balance is 9.76 SOL; needs top-up to clear 20 SOL floor). §3.3 strict criterion ("at least once") remains satisfied since 1g. 3× stretch goal is NOT a mainnet blocker.
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.
TL;DR
Rehearsal-1f finally got past every workflow bug (PRs #389, #390, #391, #392) and surfaced the real cost: anchor deploy of 4 programs needs ~12.5 SOL, not the ~3-4 SOL my original docs claimed. Bumps the workflow floor 5 → 20 SOL.
What rehearsal-1f surfaced
Two important facts here:
Empirical per-program cost
roundfi_coreroundfi_reputationroundfi_yield_kaminoroundfi_yield_mockFix
.github/workflows/devnet-deploy.yml+mainnet-deploy.yml— balance check floor 5 → 20 SOL (1.6× empirical for priority-fee spikes + multi-program buffer-account temporaries during deploy).docs/operations/cd-pipeline.md— all 5 refs to "5 SOL" updated to "20 SOL" with cost rationale inline.Recovery note for operator
Rehearsal-1f's failed deploy left a buffer account
AqUsc5qqMG7bk5W6kZZzbhsfbWeuEMbEzuVpLkwr4PSHwith escrowed lamports. Recoverable via:Optional — devnet SOL is free, faster to just request more airdrops. Important for mainnet: the same lock-up pattern would happen there too if balance is insufficient. Mainnet floor at 20 SOL is critical.
Rehearsal chronology (full saga)
solana balance --output json | jqreturns nullanchor build(no --no-idl) hits IDL gen erroranchor deployignores ANCHOR_WALLET envanchor deployignoressolana config, reads Anchor.tomlAfter this merges + operator funds wallet to 25+ SOL: rehearsal-1g either succeeds or the next failure is RPC/Solana-side, not workflow.
Test plan
devnet-deploy-v$(date +%Y%m%d)-rehearsal-1gafter wallet topped to 25+ SOL — should completeanchor deploysuccessfully and upload artifactFreeze status
Permitted (SEV-046 follow-up). 3 files, ~37 lines net.
Recommended merge method
Squash.
https://claude.ai/code/session_01YapZy1Z5gzbV5EammBkSQm
Generated by Claude Code