Skip to content

ops(script): RKLB catch-up — gap-fill Ethereum deploy + single-tx swap authoring - #271

Merged
thedavidmeister merged 3 commits into
mainfrom
ops/rklb-catchup-scripts
Jul 23, 2026
Merged

ops(script): RKLB catch-up — gap-fill Ethereum deploy + single-tx swap authoring#271
thedavidmeister merged 3 commits into
mainfrom
ops/rklb-catchup-scripts

Conversation

@hardyjosh

@hardyjosh hardyjosh commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Operational scripts split out of the token-table pin (#259), which stays
pins-only:

  • 20260722-deploy-missing-tokens-ethereum (manual-broadcast): self-scoping
    gap-fill of the Ethereum token set — deploys exactly the canonical config
    rows whose Ethereum table entry is all-zero; refuses on a fully-hydrated
    table (NoMissingTokens). EXECUTED 2026-07-22 (run 29924926246, RKLB);
    status + post-execution test shape included.
  • 20260722-swap-rklb-authoriser (run-script): single-tx Safe authoring for
    RKLB's Base authoriser swap, kept separate from the six-vault bundle that
    was already 2-of-3 signed when RKLB entered the table (a regenerated 7-tx
    bundle would void those signatures). PENDING.

Both registered in their append-only workflow dropdowns; fork suites green
against live chains.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01VPs1hCTxusmaSeFKvoc4Kr

Summary by CodeRabbit

  • New Features

    • Added an operational workflow for deploying missing canonical tokens on Ethereum.
    • Added an operational workflow to prepare the RKLB receipt vault authorizer upgrade and generate a Safe transaction proposal.
    • Added preflight validation to prevent deployments or upgrades when required contracts, permissions, or configuration are inconsistent.
  • Tests

    • Added coverage for fully provisioned token tables, missing deployment prerequisites, already-completed upgrades, and unexpected authorizers.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 50ed5dbe-a725-4686-972a-025911ccf95c

📥 Commits

Reviewing files that changed from the base of the PR and between b2e3fa0 and 467c048.

📒 Files selected for processing (7)
  • .github/workflows/manual-broadcast.yaml
  • .github/workflows/run-script.yaml
  • script/20260722-deploy-missing-tokens-ethereum.s.sol
  • script/20260722-swap-rklb-authoriser.s.sol
  • test/script/20260722-deploy-missing-tokens-ethereum.t.sol
  • test/script/20260722-swap-rklb-authoriser.t.sol
  • test/script/DeployMissingTokensEthereumHarness.sol

📝 Walkthrough

Walkthrough

Adds two Forge scripts: one deploys missing Ethereum token vaults, and the other authors a Safe transaction to swap the RKLB vault authoriser. Both scripts gain workflow entries and focused fork-based or harness tests for preflight failures.

Changes

Ethereum token deployment

Layer / File(s) Summary
Deployment preflight and execution
script/20260722-deploy-missing-tokens-ethereum.s.sol
Validates pinned deployment prerequisites, selects missing canonical tokens, deploys vaults, configures the V4 authoriser, transfers ownership, and logs deployed addresses.
Deployment registration and validation
.github/workflows/manual-broadcast.yaml, test/script/DeployMissingTokensEthereumHarness.sol, test/script/20260722-deploy-missing-tokens-ethereum.t.sol
Registers the deployment script and tests fully hydrated selection plus a missing core deployer revert.

RKLB authoriser swap

Layer / File(s) Summary
Authoriser preflight and Safe simulation
script/20260722-swap-rklb-authoriser.s.sol
Validates the pinned V4 authoriser and RKLB vault state, simulates the Safe transaction, writes a Safe Tx Builder artifact, and checks forward-only re-issuance.
Swap registration and validation
.github/workflows/run-script.yaml, test/script/20260722-swap-rklb-authoriser.t.sol
Registers the swap script and tests already-swapped and unexpected-authoriser reverts on a Base fork.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested labels: ai:reject

Poem

I’m a rabbit with scripts in my den,
Deploying missing tokens again.
V4 guards the gate,
Safe hashes await,
And RKLB swaps cleanly—amen!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ops/rklb-catchup-scripts

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
.github/workflows/manual-broadcast.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

.github/workflows/run-script.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

hardyjosh commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

…p authoring

Operational scripts split out of the token-table pin (#259), which stays
pins-only:

- `20260722-deploy-missing-tokens-ethereum` (manual-broadcast): self-scoping
  gap-fill of the Ethereum token set — deploys exactly the canonical config
  rows whose Ethereum table entry is all-zero; refuses on a fully-hydrated
  table (NoMissingTokens). EXECUTED 2026-07-22 (run 29924926246, RKLB);
  status + post-execution test shape included.
- `20260722-swap-rklb-authoriser` (run-script): single-tx Safe authoring for
  RKLB's Base authoriser swap, kept separate from the six-vault bundle that
  was already 2-of-3 signed when RKLB entered the table (a regenerated 7-tx
  bundle would void those signatures). PENDING.

Both registered in their append-only workflow dropdowns; fork suites green
against live chains.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VPs1hCTxusmaSeFKvoc4Kr
thedavidmeister and others added 2 commits July 23, 2026 06:55
The Safe executed the swap on 2026-07-23:
0xf6744Fd94e27c2f58F6110aa9fDC77A87e41766B now reports authorizer()
0x315b16faa6eE413faBCa877d3851B3818369f0cD, read from three independent Base
RPCs. The script header still said PENDING.

The happy-path test drove run() against live Base, so it began failing the
moment the swap landed -- its own comment called for retiring it at exactly
this point. Left in place it would have held the PR red on a test that is
supposed to stop existing.

What remains is the inverted coverage: already-swapped and unknown-authoriser.
That is the coverage that still means something now, because it is what
refuses a re-dispatch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
rainix-sol-single-contract was failing: the .t.sol declared both the test and
an inline DeployMissingTokensEthereumHarness. That gate exists precisely to
stop inline helper contracts accumulating in test files, so it was doing its
job rather than getting in the way.

Split out to mirror test/src/lib/LibBeaconInvariantsHarness.sol, which sits
beside its own .t.sol for the same reason.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thedavidmeister

Copy link
Copy Markdown
Contributor

Reviewed 467c048: approve

Run 29987588312 leaves one test failure — testDeployTag (0_1_8 != 0_1_22) — plus git-clean. Both inherited main-red. No PARITY PENDING in the log at all, so testCrossChainParity ran fully armed for the first time: all three legs compared on both chains now that #259 hydrated the Ethereum table.

Both scripts are well built, and better guarded than their predecessors in this stack. The gap-fill carries NoMissingTokens and TokenTableMisaligned, which cross-checks the canonical config against the table row-by-row on underlying — so it cannot deploy the right token into the wrong slot if the two lists ever drift. That is a structural check where a comment would have done. The swap script pre-flights the target authoriser's deployment, codehash and full grant map with distinct typed errors, refuses on RklbAlreadySwapped / UnexpectedRklbAuthoriser, and simulates the swap and asserts the post-state before authoring.

Keeping RKLB as its own single-tx bundle was right: the six-vault bundle was already 2-of-3 signed, and regenerating it as 7 txs would have changed the SafeTxHash and voided those signatures.

Two things I changed:

ee38675 — the swap script still read **PENDING.** after the Safe executed it today. Flipped to **EXECUTED 2026-07-23.** with the evidence, and retired testRunCompletesAndWritesArtifact. That test drove run() against live Base, so it began failing the instant the swap landed — its own comment called for retiring it at exactly this point. Left in place it would have held this PR red on a test designed to stop existing. The inverted coverage remains, which is what refuses a re-dispatch.

467c048rainix-sol / static was failing on rainix-sol-single-contract: the .t.sol declared both the test contract and an inline DeployMissingTokensEthereumHarness. That gate exists precisely to stop inline helpers accumulating in test files, so it was working as intended. Split out to mirror test/src/lib/LibBeaconInvariantsHarness.sol. Verified before pushing: the gate run over every tracked .sol is clean, forge fmt --check clean, all four tests pass.

Worth recording what this PR now is: both scripts have executed, and both refuse to run again. It is a record of what happened plus the guards that stop it happening twice — which is the shape rain.deploy#15 argues should be an on-chain migration registry rather than a status marker a human flips.

@thedavidmeister
thedavidmeister marked this pull request as ready for review July 23, 2026 07:25
@thedavidmeister
thedavidmeister merged commit efab843 into main Jul 23, 2026
4 of 6 checks passed
hardyjosh pushed a commit that referenced this pull request Jul 23, 2026
Per review: the wallet is first-class state, not a drive-by grant.

- LibAuthoriserInvariants.GRANTEE_SERVICE_MINTER_3D0C pinned +
  expectedGrants grows to 13 (DEPOSIT + WITHDRAW for the minter EOA; the
  address is chain-shared, the grants per-chain). Every existing consumer
  of the map now ENFORCES the provisioning: the per-chain clone-grant
  assertions (StoxProdV4PostSwap on Base, the Ethereum pin test) and the
  cross-chain parity authoriser leg (assertExpectedGrants per chain) go
  RED on each chain until its 20260723 bundle executes — the forcing
  function, exactly like every other migration in this repo.
- 20260619 clone-deploy MIRROR_COUNT 6 -> 8 (slice guard + suite updated):
  future chain bootstraps (HyperEVM) auto-provision the minter wallet at
  authoriser-deploy time, no Safe signing needed there.
- The 20260723 authoring script now references the canonical pin and its
  drift guard skips the wallet's own (deliberately not-yet-true) rows.
- Stale hardcoded grant counts in docs made count-agnostic.

Sequencing note: the pending authoriser-swap authorings (#269/#271) carry
full-map drift guards, so re-dispatching them AFTER this merges and BEFORE
the minter bundles execute reverts on the minter rows — dispatch order:
execute the already-signed swap bundles and the minter bundles in any
order on-chain, but author from the matching refs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VPs1hCTxusmaSeFKvoc4Kr
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