Skip to content

Feat/standalone verification#413

Open
yahgwai wants to merge 10 commits intov3.1.0-scriptsfrom
feat/standalone-verification
Open

Feat/standalone verification#413
yahgwai wants to merge 10 commits intov3.1.0-scriptsfrom
feat/standalone-verification

Conversation

@yahgwai
Copy link
Collaborator

@yahgwai yahgwai commented Feb 16, 2026

  • Add standalone verification mode (TX_HASH env var) to executeBoldUpgrade.ts -- fetches an
    externally-executed upgrade receipt and runs the full verification suite without re-executing
  • Add script:bold-verify package.json entry
  • Rework testUpgrade.bash to fork at a pre-BOLD block, seed template contracts via anvil_setCode,
    and verify with TX_HASH after execution
  • Add testUpgradeExecFirst.bash -- validates the Safe multisig flow by generating calldata before
    populate-lookup, executing via cast send, and verifying with TX_HASH
  • Re-enable the bold-upgrade CI job

Resolve BLK-385 and BLK-386

When TX_HASH is set, executeBoldUpgrade.ts skips execution and instead
fetches the transaction receipt to run verification against an upgrade
that was executed externally (e.g. via Safe multisig or cast send).

Post-upgrade state reconstruction works because wasmModuleRoot, feeToken,
and inbox/outbox lists are still readable from the old rollup and bridge.
Staker data (zeroed by cleanupOldRollup) results in an empty stakers
array, and checkOldRollup handles this naturally.

Also adds script:bold-verify package.json entry as a semantic alias.
After the EOA upgrade completes, captures the tx hash and re-runs
the script with TX_HASH set to test standalone verification mode
against the same Anvil fork.
Fork from block 21830859 (last block before BOLD deployment at
21830860) so the test has valid pre-upgrade state. The fork block
is overridable via FORK_BLOCK env var.

Re-enables the bold-upgrade CI job that was disabled when the
mainnet upgrade invalidated the test's preconditions.
The upgrade test only needs hardhat compilation, not forge. The
forge yul build has a pre-existing solar linter failure.
The Yul artifact (Reader4844.json) is needed at runtime by
prepareBoldUpgrade.ts. The solar lint failure is a local nightly
Foundry issue; CI uses stable which should build cleanly.
Single-upgrade transactions are the expected use case for standalone
verification. Reverts the RollupMigrated matching logic back to
expecting exactly one event. Keeps the receipt.logs change needed
for standalone mode (TransactionReceipt vs ContractReceipt).
The logs-to-events mapping is handled at the call site in main(),
so verifyPostUpgrade stays unchanged from the original.
Fork at a pre-upgrade block and seed BOLD templates via anvil_setCode,
since the templates were deployed on mainnet after the BOLD upgrade.

Add testUpgradeExecFirst.bash which validates that calldata generation
is independent of assertion state by running bold-local-execute before
bold-populate-lookup, then executing the upgrade externally via cast send.
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.

1 participant

Comments