feat(contracts-rootstock): carry the dispute-game init bond as an ABI argument - #52
Merged
Merged
Conversation
|
PR Triager kept |
… argument
RSKDeployOPChain gains an RSK-owned entry point that takes the init bond for
the enabled permissioned game as an explicit argument, so oprsk-deployer can
supply a configured value — PAYROLLUP-191 ships 0 on regtest, which stops a
permissioned network parking proposer capital.
runSplitWithBond(input, bond) implementation
runSplit(input) applies DEFAULT_INIT_BOND (upstream parity)
runWithBytes(bytes) unchanged
runSplitWithBytes(bytes) decodes (DeployOPChainInput, uint256)
Upstream's Types.DeployOPChainInput is untouched: the extra element lives in
this entry point's own tuple, so byte-compatibility with DeployOPChain.run is
unaffected and the four parity tests pass unmodified. The script has no notion
of "unset" — the caller resolves the effective value, matching how Go already
owns every other dispute parameter.
Disabled game types keep a literal 0 bond regardless of the argument, which
the splitter's config validation requires.
The bond tests are ordinary tests: no environment, no harness, no quarantined
invocation, so CI stays a single forge test run. A new assertion pins
DEFAULT_INIT_BOND to the Go-side constant so an upstream bump has to be
reconciled deliberately instead of drifting apart on a merge.
PAYROLLUP-191
asoto-iov
force-pushed
the
rsk/payrollup-191-init-bond-env
branch
from
September 7, 2026 19:48
d0aff8e to
e49152d
Compare
asoto-iov
marked this pull request as ready for review
September 7, 2026 21:19
asoto-iov
requested review from
fedejinich
and
a balanced review from Copilot
September 7, 2026 21:19
There was a problem hiding this comment.
🟡 Changes recommended
Add coverage verifying custom-bond behavior for the super-permissioned deployment mode.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds an ABI argument for configuring dispute-game initialization bonds while preserving upstream-compatible defaults.
Changes:
- Adds bond-aware deployment entry points.
- Applies the bond only to the enabled permissioned game.
- Adds bond configuration, ABI-decoding, and lifecycle tests.
File summaries
| File | Description |
|---|---|
packages/contracts-rootstock/test/RSKOPCMSplitter.t.sol |
Tests zero-bond game creation and resolution. |
packages/contracts-rootstock/test/RSKDeployOPChainInitBond.t.sol |
Tests custom, default, zero, and ABI-decoded bonds; lacks super-root-enabled coverage. |
packages/contracts-rootstock/script/RSKDeployOPChain.s.sol |
Accepts and applies an explicit initialization bond. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
fedejinich
approved these changes
Sep 9, 2026
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.
Makes the dispute-game init bond an explicit argument to an RSK-owned entry point, so
oprsk-deployercan deploy a configured value. PAYROLLUP-191 ships0on regtest, which stops a permissioned network parking proposer capital.Paired with rsksmart/rootstack#129, which supplies the value.
Merge order: this PR first, as a squash merge (the model in
AGENTS_rsk.mdfor feature PRs). Then repin rootstack's submodule gitlink to the resultingrsk/developSHA — a squash merge creates a new commit, so this branch's head is not reachable fromrsk/developafterwards and the old pin would dangle.Layering
Upstream's
Types.DeployOPChainInputis untouched — the extra element lives in this entry point's own tuple, so byte-compatibility withDeployOPChain.runis unaffected and the four parity tests pass unmodified.The script has no notion of "unset": the caller resolves the effective value, matching how Go already owns every other dispute parameter. Disabled game types keep a literal
0regardless of the argument, which the splitter's config validation requires.Rejected alternative: an environment variable
An earlier draft (#49, closed unmerged) carried the bond as
RSK_DISPUTE_GAME_INIT_BOND_WEI. Recorded here because PAYROLLUP-191 asks for the rejected alternatives and their reasons:vm.env; the one that does (VerifyOPCM) verifies rather than deploys.nosemgrepbypass of this repo's own rule, a virtualinitBond()plus a harness, avm.setEnvpin in the shared fixture, a quarantinedtest/isolated/directory and a second CI invocation.None of that machinery exists in this diff — the env channel never landed on
rsk/develop, so this is the first mechanism to reach it.Tests
The bond tests are ordinary tests: no environment, no harness, no quarantined invocation, so CI stays a single
forge test. 26/26 locally (forge build+forge test), including the four upstream-parity tests. A new assertion pinsDEFAULT_INIT_BONDto the Go-sideDefaultDisputeGameInitBondWeiso an upstream bump has to be reconciled deliberately instead of drifting apart on a merge.Validated end to end on the rootstack side:
just verify-regtestPASS with this pin, receipt linked in PAYROLLUP-191.PAYROLLUP-191