Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deployOpChain using OPCM #12291

Merged
merged 30 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
eebbdc9
feat: move log to top of save function
maurelian Oct 4, 2024
0bd9c93
feat: Deploy system with OPCM
maurelian Oct 4, 2024
0dffeb7
feat: Deploy missing Permissionless DWETH
maurelian Oct 4, 2024
75ae3a9
feat: Fully OPCM based deployment
maurelian Oct 4, 2024
2ba9562
feat: Refactor _setFaultGameImplementation
maurelian Oct 7, 2024
5105450
test: Make caller explicit in unauthorized test case
maurelian Oct 7, 2024
3ffa7a5
test: Fix have guardian setRespectedGameType to Cannon
maurelian Oct 7, 2024
d435653
test: Bridge_Initializer defaulst to FP on
maurelian Oct 7, 2024
0c1732d
test: setRespectedGameType to Cannon in Deploy
maurelian Oct 7, 2024
af8d99b
test: Bridge_Initializer defaulst to FP on
maurelian Oct 7, 2024
dab9787
feat: resetInitializedProxy func to allow reinitializing contracts
maurelian Oct 8, 2024
d4c8486
feat: Delete initializeOpChain, we don't need it anymore
maurelian Oct 8, 2024
d0c19b8
feat: Set batch inbox address in config using hashed method
maurelian Oct 8, 2024
262ad65
feat: Make caller explicit in testFuzz_removeDependency_notDependency…
maurelian Oct 8, 2024
773943f
feat: lint
maurelian Oct 8, 2024
b89b308
Revert "test: Bridge_Initializer defaulst to FP on"
maurelian Oct 8, 2024
646994b
Merge branch 'develop' into opcm/tests/deploy-opchain
maurelian Oct 8, 2024
548e63b
feat: Consolidate useFaultProofs modifications into _run
maurelian Oct 8, 2024
a465901
Revert "test: Bridge_Initializer defaulst to FP on"
maurelian Oct 8, 2024
d1c0c5c
feat: Some annotations in Deploy.s.ol
maurelian Oct 8, 2024
044d019
feat: Skip checking L2OO in Initializable.t.sol
maurelian Oct 8, 2024
eec3deb
feat: Delete unused initialize functions
maurelian Oct 8, 2024
8c64732
fix: Remove unused imports
maurelian Oct 8, 2024
fa0eef0
fix: unused import
maurelian Oct 8, 2024
14998cb
feat: Use respectedGameType from deploy-config
maurelian Oct 10, 2024
342ed64
use startPrank
maurelian Oct 10, 2024
531d5a4
feat: Prevent deploying legacy portal for interop
maurelian Oct 11, 2024
3d92be2
fix: incorrect var name
maurelian Oct 11, 2024
3287bdc
feat: detect when OPCM is deploying the Permissionless game
maurelian Oct 11, 2024
199a892
fix: error format
maurelian Oct 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sequencerWindowSize": 200,
"channelTimeout": 120,
"p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"batchInboxAddress": "0xff00000000000000000000000000000000000901",
"batchInboxAddress": "0x00289C189bEE4E70334629f04Cd5eD602B6600eB",
maurelian marked this conversation as resolved.
Show resolved Hide resolved
"batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
"l1StartingBlockTag": "earliest",
"l2OutputOracleSubmissionInterval": 10,
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-bedrock/deploy-config/hardhat.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"sequencerWindowSize": 15,
"channelTimeout": 40,
"p2pSequencerAddress": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"batchInboxAddress": "0xff00000000000000000000000000000000000000",
"batchInboxAddress": "0x00289C189bEE4E70334629f04Cd5eD602B6600eB",
"batchSenderAddress": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
"l2OutputOracleSubmissionInterval": 6,
"l2OutputOracleStartingTimestamp": 1,
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-bedrock/scripts/Artifacts.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ abstract contract Artifacts {
/// @param _name The name of the deployment.
/// @param _deployed The address of the deployment.
function save(string memory _name, address _deployed) public {
console.log("Saving %s: %s", _name, _deployed);
maurelian marked this conversation as resolved.
Show resolved Hide resolved
if (bytes(_name).length == 0) {
revert InvalidDeployment("EmptyName");
}
if (bytes(_namedDeployments[_name].name).length > 0) {
revert InvalidDeployment("AlreadyExists");
}

console.log("Saving %s: %s", _name, _deployed);
Deployment memory deployment = Deployment({ name: _name, addr: payable(_deployed) });
_namedDeployments[_name] = deployment;
_newDeployments.push(deployment);
Expand Down
640 changes: 187 additions & 453 deletions packages/contracts-bedrock/scripts/deploy/Deploy.s.sol

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ import { GameTypes, OutputRoot, Hash } from "src/dispute/lib/Types.sol";
/// should be defined in that contract instead.
library Constants {
/// @notice Returns the default starting anchor roots value to be used in a new dispute game.
function DEFAULT_OUTPUT_ROOT() internal pure returns (OutputRoot memory) {
return OutputRoot({ root: Hash.wrap(bytes32(hex"dead")), l2BlockNumber: 0 });
}

function DEFAULT_STARTING_ANCHOR_ROOTS() internal pure returns (IAnchorStateRegistry.StartingAnchorRoot[] memory) {
IAnchorStateRegistry.StartingAnchorRoot[] memory defaultStartingAnchorRoots =
new IAnchorStateRegistry.StartingAnchorRoot[](1);
defaultStartingAnchorRoots[0] = IAnchorStateRegistry.StartingAnchorRoot({
gameType: GameTypes.PERMISSIONED_CANNON,
outputRoot: OutputRoot({ root: Hash.wrap(bytes32(hex"dead")), l2BlockNumber: 0 })
outputRoot: DEFAULT_OUTPUT_ROOT()
});
return defaultStartingAnchorRoots;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ contract SystemConfigInterop_Test is CommonTest {

/// @dev Tests that adding a dependency as not the dependency manager reverts.
function testFuzz_addDependency_notDependencyManager_reverts(uint256 _chainId) public {
require(alice != _systemConfigInterop().dependencyManager(), "SystemConfigInterop_Test-100");
vm.expectRevert("SystemConfig: caller is not the dependency manager");
vm.prank(alice);
_systemConfigInterop().addDependency(_chainId);
}

Expand All @@ -100,7 +102,9 @@ contract SystemConfigInterop_Test is CommonTest {

/// @dev Tests that removing a dependency as not the dependency manager reverts.
function testFuzz_removeDependency_notDependencyManager_reverts(uint256 _chainId) public {
require(alice != _systemConfigInterop().dependencyManager(), "SystemConfigInterop_Test-100");
vm.expectRevert("SystemConfig: caller is not the dependency manager");
vm.prank(alice);
_systemConfigInterop().removeDependency(_chainId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ contract Initializer_Test is Bridge_Initializer {
/// 3. The `initialize()` function of each contract cannot be called again.
function test_cannotReinitialize_succeeds() public {
// Collect exclusions.
string[] memory excludes = new string[](8);
string[] memory excludes = new string[](9);
// TODO: Neither of these contracts are labeled properly in the deployment script. Both are
// currently being labeled as their non-interop versions. Remove these exclusions once
// the deployment script is fixed.
Expand All @@ -412,6 +412,8 @@ contract Initializer_Test is Bridge_Initializer {
// TODO: Eventually remove this exclusion. Same reason as above dispute contracts.
excludes[6] = "src/L1/OPContractsManager.sol";
excludes[7] = "src/L1/OPContractsManagerInterop.sol";
// The L2OutputOracle is not always deployed (and is no longer being modified)
excludes[8] = "src/L1/L2OutputOracle.sol";

// Get all contract names in the src directory, minus the excluded contracts.
string[] memory contractNames = ForgeArtifacts.getContractNames("src/*", excludes);
Expand Down