Commit dc2b7141 authored by clabby's avatar clabby Committed by GitHub

fix(ctb): Update `proveWithdrawalTransaction` replay require. (#9892)

* Update `proveWithdrawalTransaction` require

* revert message update in test
parent c9bdd910
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
"sourceCodeHash": "0xf549ae16033b63e7cb3e032898a6495e1a13090dc8dd1422f7f650076ae973f8" "sourceCodeHash": "0xf549ae16033b63e7cb3e032898a6495e1a13090dc8dd1422f7f650076ae973f8"
}, },
"src/L1/OptimismPortal2.sol": { "src/L1/OptimismPortal2.sol": {
"initCodeHash": "0x718b2bc2925ca1551a98908b26237fc7dd6634f7ca35c766a42b3d7e20eecd5e", "initCodeHash": "0xd2947b6ce4c5976d550c84d72f14ead2c92f27449edc98ca8ef92b3e9c02b367",
"sourceCodeHash": "0x5941d020f7ce1f6eeab2be25bb492cd955b77c379eaed2d66880a5caaaeaf0de" "sourceCodeHash": "0x477df849308119f516e21e3c44e72422c1afa919fad5351be5046d3ec9f0e11f"
}, },
"src/L1/ProtocolVersions.sol": { "src/L1/ProtocolVersions.sol": {
"initCodeHash": "0x72cd467e8bcf019c02675d72ab762e088bcc9cc0f1a4e9f587fa4589f7fdd1b8", "initCodeHash": "0x72cd467e8bcf019c02675d72ab762e088bcc9cc0f1a4e9f587fa4589f7fdd1b8",
......
...@@ -117,8 +117,8 @@ contract OptimismPortal2 is Initializable, ResourceMetering, ISemver { ...@@ -117,8 +117,8 @@ contract OptimismPortal2 is Initializable, ResourceMetering, ISemver {
} }
/// @notice Semantic version. /// @notice Semantic version.
/// @custom:semver 3.2.0 /// @custom:semver 3.3.0
string public constant version = "3.2.0"; string public constant version = "3.3.0";
/// @notice Constructs the OptimismPortal contract. /// @notice Constructs the OptimismPortal contract.
constructor( constructor(
...@@ -273,11 +273,11 @@ contract OptimismPortal2 is Initializable, ResourceMetering, ISemver { ...@@ -273,11 +273,11 @@ contract OptimismPortal2 is Initializable, ResourceMetering, ISemver {
// in the case that an honest user proves their withdrawal against a dispute game that // in the case that an honest user proves their withdrawal against a dispute game that
// resolves against the root claim, or the dispute game is blacklisted, we allow // resolves against the root claim, or the dispute game is blacklisted, we allow
// re-proving the withdrawal against a new proposal. // re-proving the withdrawal against a new proposal.
IDisputeGame game = provenWithdrawal.disputeGameProxy; IDisputeGame oldGame = provenWithdrawal.disputeGameProxy;
require( require(
provenWithdrawal.timestamp == 0 || gameProxy.status() == GameStatus.CHALLENGER_WINS provenWithdrawal.timestamp == 0 || oldGame.status() == GameStatus.CHALLENGER_WINS
|| disputeGameBlacklist[gameProxy] || game.gameType().raw() != respectedGameType.raw(), || disputeGameBlacklist[oldGame] || oldGame.gameType().raw() != respectedGameType.raw(),
"OptimismPortal: withdrawal hash has already been proven, and dispute game is not invalid" "OptimismPortal: withdrawal hash has already been proven, and the old dispute game is not invalid"
); );
// Compute the storage slot of the withdrawal hash in the L2ToL1MessagePasser contract. // Compute the storage slot of the withdrawal hash in the L2ToL1MessagePasser contract.
......
...@@ -458,7 +458,9 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest { ...@@ -458,7 +458,9 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
_withdrawalProof: _withdrawalProof _withdrawalProof: _withdrawalProof
}); });
vm.expectRevert("OptimismPortal: withdrawal hash has already been proven, and dispute game is not invalid"); vm.expectRevert(
"OptimismPortal: withdrawal hash has already been proven, and the old dispute game is not invalid"
);
optimismPortal2.proveWithdrawalTransaction({ optimismPortal2.proveWithdrawalTransaction({
_tx: _defaultTx, _tx: _defaultTx,
_disputeGameIndex: _proposedGameIndex, _disputeGameIndex: _proposedGameIndex,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment