forked from OffchainLabs/nitro-testnode
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update migration test for TEE integration This commit updates the migration-test.bash script to reflect the new migration flow for the TEE integration. It also adds some utility scripts and updates some exsisting example files to assist in the migration test. * Remove changes to docker-compose.yml * Respond to review feedback * Update migration test to be compatible with integration branch * Fix the batch poster In this commit, a dummy TEE Verifier address is being used, we will use a correct one later * Fix config.ts to allow sequencer node to start * Update orbit-actions sub-module to integration branch * update migration test to point at integration branch * Fix smoke test --------- Co-authored-by: ImJeremyHe <[email protected]>
- Loading branch information
1 parent
100d2b3
commit cbb0718
Showing
11 changed files
with
144 additions
and
87 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
37 changes: 37 additions & 0 deletions
37
espresso-tests/DeployAndInitEspressoSequencerInboxTest.s.sol
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
import "forge-std/Script.sol"; | ||
import "nitro-contracts/bridge/SequencerInbox.sol"; | ||
import "nitro-contracts/bridge/ISequencerInbox.sol"; | ||
|
||
/// @notice This contract deploys and initializes a sequencerInbox contract that orbit chains can migrate to that enables compatibility | ||
/// with the espresso confirmation layer | ||
/// @dev BATCH_POSTER_ADDRS should be a comma delimited list that includes addresses. This list will give batch posting affordances to those addresses | ||
/// For chains using the Espresso TEE integration, this will be the address of your new batch poster, if you decide to change it. | ||
contract DeployAndInitEspressoSequencerInboxTest is Script { | ||
function run() external { | ||
bool isMigrationTest = vm.envBool("IS_MIGRATION_TEST"); | ||
// Grab addresses from env | ||
address reader4844Addr = vm.envAddress("READER_ADDRESS"); | ||
|
||
// Grab any uints we need to initialize the contract from envAddress | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
uint256 maxDataSize = vm.envUint("MAX_DATA_SIZE"); | ||
// Grab booleans we need from env | ||
bool isUsingFeeToken = vm.envBool("IS_USING_FEE_TOKEN"); | ||
// Trick the Vm into seeing that this opcode exsists if this isn't the migration test | ||
if (!isMigrationTest){ | ||
bytes memory code = vm.getDeployedCode("ArbSysMock.sol:ArbSysMock"); | ||
vm.etch(0x0000000000000000000000000000000000000064, code); | ||
} | ||
// initialize interfaces needed | ||
IReader4844 reader = IReader4844(reader4844Addr); | ||
// Start broadcast to deploy the SequencerInbox | ||
vm.startBroadcast(deployerPrivateKey); | ||
SequencerInbox sequencerInbox = new SequencerInbox(maxDataSize, reader, isUsingFeeToken); | ||
|
||
// Setting batch posters and batch poster manager | ||
vm.stopBroadcast(); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
import "forge-std/Script.sol"; | ||
import "nitro-contracts/mocks/EspressoTEEVerifier.sol"; | ||
|
||
contract DeployMockVerifier is Script { | ||
function run() external { | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
vm.startBroadcast(deployerPrivateKey); | ||
EspressoTEEVerifierMock mockVerifier = new EspressoTEEVerifierMock(); | ||
vm.stopBroadcast(); | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"chainId":412346, | ||
"homesteadBlock":0, | ||
"daoForkSupport":true, | ||
"eip150Block":0, | ||
"eip150Hash":"0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"eip155Block":0, | ||
"eip158Block":0, | ||
"byzantiumBlock":0, | ||
"constantinopleBlock":0, | ||
"petersburgBlock":0, | ||
"istanbulBlock":0, | ||
"muirGlacierBlock":0, | ||
"berlinBlock":0, | ||
"londonBlock":0, | ||
"clique":{ | ||
"period":0, | ||
"epoch":0 | ||
}, | ||
"arbitrum":{ | ||
"EnableArbOS":true, | ||
"AllowDebugPrecompiles":true, | ||
"DataAvailabilityCommittee":false, | ||
"InitialArbOSVersion":30, | ||
"InitialChainOwner":"0x5E1497dD1f08C87b2d8FE23e9AAB6c1De833D927", | ||
"GenesisBlockNum":0, | ||
"EspressoTEEVerifierAddress": "0x0" | ||
} | ||
} |
Submodule orbit-actions
updated
70 files
This file contains 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
Oops, something went wrong.