Open
Conversation
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.
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.
TX_HASHenv var) toexecuteBoldUpgrade.ts-- fetches anexternally-executed upgrade receipt and runs the full verification suite without re-executing
script:bold-verifypackage.json entrytestUpgrade.bashto fork at a pre-BOLD block, seed template contracts viaanvil_setCode,and verify with
TX_HASHafter executiontestUpgradeExecFirst.bash-- validates the Safe multisig flow by generating calldata beforepopulate-lookup, executing viacast send, and verifying withTX_HASHbold-upgradeCI jobResolve BLK-385 and BLK-386