From 5c371a181af444999f611e03774ec096ffbd1226 Mon Sep 17 00:00:00 2001 From: Daniel Wang <99078276+dantaik@users.noreply.github.com> Date: Wed, 23 Oct 2024 16:55:53 +0800 Subject: [PATCH] fix(protocol): fix issue in mainnet deployment script (#18283) --- ...tTierProvider.sol => DevnetTierRouter.sol} | 4 +-- .../script/layer1/DeployProtocolOnL1.s.sol | 25 +++++++++---------- .../script/layer1/deploy_protocol_on_l1.sh | 2 +- packages/protocol/test/layer1/TaikoL1Test.sol | 2 +- .../protocol/test/layer1/based/TaikoL1.t.sol | 4 +-- .../test/layer1/based/TaikoL1TestBase.sol | 6 ++--- .../test/layer1/based/TaikoL1TestGroup1.t.sol | 12 ++++----- .../test/layer1/based/TaikoL1TestGroup2.t.sol | 8 +++--- .../test/layer1/based/TaikoL1TestGroup3.t.sol | 8 +++--- .../test/layer1/based/TaikoL1TestGroup4.t.sol | 8 +++--- .../test/layer1/based/TaikoL1TestGroup5.t.sol | 4 +-- .../test/layer1/based/TaikoL1TestGroup6.t.sol | 4 +-- .../test/layer1/based/TaikoL1TestGroup7.t.sol | 4 +-- .../test/layer1/based/TaikoL1TestGroup9.t.sol | 4 +-- ...estTierProvider.sol => TestTierRouter.sol} | 4 +-- .../taiko-client/integration_test/l1_env.sh | 2 +- 16 files changed, 50 insertions(+), 51 deletions(-) rename packages/protocol/contracts/layer1/devnet/{DevnetTierProvider.sol => DevnetTierRouter.sol} (89%) rename packages/protocol/test/layer1/based/{TestTierProvider.sol => TestTierRouter.sol} (96%) diff --git a/packages/protocol/contracts/layer1/devnet/DevnetTierProvider.sol b/packages/protocol/contracts/layer1/devnet/DevnetTierRouter.sol similarity index 89% rename from packages/protocol/contracts/layer1/devnet/DevnetTierProvider.sol rename to packages/protocol/contracts/layer1/devnet/DevnetTierRouter.sol index 0b84292663..0f63411dbd 100644 --- a/packages/protocol/contracts/layer1/devnet/DevnetTierProvider.sol +++ b/packages/protocol/contracts/layer1/devnet/DevnetTierRouter.sol @@ -4,9 +4,9 @@ pragma solidity ^0.8.24; import "../tiers/TierProviderBase.sol"; import "../tiers/ITierRouter.sol"; -/// @title DevnetTierProvider +/// @title DevnetTierRouter /// @custom:security-contact security@taiko.xyz -contract DevnetTierProvider is TierProviderBase, ITierRouter { +contract DevnetTierRouter is TierProviderBase, ITierRouter { /// @inheritdoc ITierRouter function getProvider(uint256) external view returns (address) { return address(this); diff --git a/packages/protocol/script/layer1/DeployProtocolOnL1.s.sol b/packages/protocol/script/layer1/DeployProtocolOnL1.s.sol index 8e0f49b0ad..093a937168 100644 --- a/packages/protocol/script/layer1/DeployProtocolOnL1.s.sol +++ b/packages/protocol/script/layer1/DeployProtocolOnL1.s.sol @@ -19,9 +19,10 @@ import "src/layer1/automata-attestation/AutomataDcapV3Attestation.sol"; import "src/layer1/automata-attestation/lib/PEMCertChainLib.sol"; import "src/layer1/automata-attestation/utils/SigVerifyLib.sol"; import "src/layer1/devnet/DevnetTaikoL1.sol"; -import "src/layer1/devnet/DevnetTierProvider.sol"; +import "src/layer1/devnet/DevnetTierRouter.sol"; import "src/layer1/mainnet/rollup/MainnetGuardianProver.sol"; import "src/layer1/mainnet/rollup/MainnetTaikoL1.sol"; +import "src/layer1/mainnet/rollup/MainnetTierRouter.sol"; import "src/layer1/mainnet/rollup/verifiers/MainnetSgxVerifier.sol"; import "src/layer1/mainnet/multirollup/MainnetBridge.sol"; import "src/layer1/mainnet/multirollup/MainnetERC1155Vault.sol"; @@ -30,11 +31,10 @@ import "src/layer1/mainnet/multirollup/MainnetERC721Vault.sol"; import "src/layer1/mainnet/multirollup/MainnetSignalService.sol"; import "src/layer1/provers/GuardianProver.sol"; import "src/layer1/provers/ProverSet.sol"; -import "src/layer1/tiers/TierProviderV2.sol"; import "src/layer1/token/TaikoToken.sol"; import "src/layer1/verifiers/Risc0Verifier.sol"; import "src/layer1/verifiers/SP1Verifier.sol"; -import "test/layer1/based/TestTierProvider.sol"; +import "test/layer1/based/TestTierRouter.sol"; import "test/shared/token/FreeMintERC20.sol"; import "test/shared/token/MayFailFreeMintERC20.sol"; import "test/shared/DeployCapability.sol"; @@ -291,8 +291,7 @@ contract DeployProtocolOnL1 is DeployCapability { }); TaikoL1 taikoL1; - if (keccak256(abi.encode(vm.envString("TIER_PROVIDER"))) == keccak256(abi.encode("devnet"))) - { + if (keccak256(abi.encode(vm.envString("TIER_ROUTER"))) == keccak256(abi.encode("devnet"))) { taikoL1 = TaikoL1(address(new DevnetTaikoL1())); } else { taikoL1 = TaikoL1(address(new TaikoL1())); @@ -353,7 +352,7 @@ contract DeployProtocolOnL1 is DeployCapability { register( rollupAddressManager, "tier_router", - address(deployTierProvider(vm.envString("TIER_PROVIDER"))) + address(deployTierRouter(vm.envString("TIER_ROUTER"))) ); address[] memory guardians = vm.envAddress("GUARDIAN_PROVERS", ","); @@ -427,13 +426,13 @@ contract DeployProtocolOnL1 is DeployCapability { }); } - function deployTierProvider(string memory tierProviderName) private returns (address) { - if (keccak256(abi.encode(tierProviderName)) == keccak256(abi.encode("devnet"))) { - return address(new DevnetTierProvider()); - } else if (keccak256(abi.encode(tierProviderName)) == keccak256(abi.encode("testnet"))) { - return address(new TestTierProvider()); - } else if (keccak256(abi.encode(tierProviderName)) == keccak256(abi.encode("mainnet"))) { - return address(new TierProviderV2()); + function deployTierRouter(string memory tierRouterName) private returns (address) { + if (keccak256(abi.encode(tierRouterName)) == keccak256(abi.encode("devnet"))) { + return address(new DevnetTierRouter()); + } else if (keccak256(abi.encode(tierRouterName)) == keccak256(abi.encode("testnet"))) { + return address(new TestTierRouter()); + } else if (keccak256(abi.encode(tierRouterName)) == keccak256(abi.encode("mainnet"))) { + return address(new MainnetTierRouter()); } else { revert("invalid tier provider"); } diff --git a/packages/protocol/script/layer1/deploy_protocol_on_l1.sh b/packages/protocol/script/layer1/deploy_protocol_on_l1.sh index b225c2279a..391fd31cca 100755 --- a/packages/protocol/script/layer1/deploy_protocol_on_l1.sh +++ b/packages/protocol/script/layer1/deploy_protocol_on_l1.sh @@ -21,7 +21,7 @@ PAUSE_TAIKO_L1=true \ PAUSE_BRIDGE=true \ NUM_MIN_MAJORITY_GUARDIANS=7 \ NUM_MIN_MINORITY_GUARDIANS=2 \ -TIER_PROVIDER="devnet" \ +TIER_ROUTER="devnet" \ FOUNDRY_PROFILE="layer1" \ forge script ./script/layer1/DeployProtocolOnL1.s.sol:DeployProtocolOnL1 \ --fork-url http://localhost:8545 \ diff --git a/packages/protocol/test/layer1/TaikoL1Test.sol b/packages/protocol/test/layer1/TaikoL1Test.sol index 5f660fee47..e77e24220b 100644 --- a/packages/protocol/test/layer1/TaikoL1Test.sol +++ b/packages/protocol/test/layer1/TaikoL1Test.sol @@ -9,7 +9,7 @@ import "src/layer1/verifiers/Risc0Verifier.sol"; import "src/layer1/provers/GuardianProver.sol"; import "src/layer1/team/airdrop/ERC20Airdrop.sol"; import "src/shared/bridge/QuotaManager.sol"; -import "../layer1/based/TestTierProvider.sol"; +import "../layer1/based/TestTierRouter.sol"; import "../shared/TaikoTest.sol"; abstract contract TaikoL1Test is TaikoTest { } diff --git a/packages/protocol/test/layer1/based/TaikoL1.t.sol b/packages/protocol/test/layer1/based/TaikoL1.t.sol index 39918e9d14..ede0cffa22 100644 --- a/packages/protocol/test/layer1/based/TaikoL1.t.sol +++ b/packages/protocol/test/layer1/based/TaikoL1.t.sol @@ -225,13 +225,13 @@ contract TaikoL1Tests is TaikoL1TestBase { } function test_getTierIds() external { - uint16[] memory tiers = cp.getTierIds(); + uint16[] memory tiers = tr.getTierIds(); assertEq(tiers[0], LibTiers.TIER_OPTIMISTIC); assertEq(tiers[1], LibTiers.TIER_SGX); assertEq(tiers[2], LibTiers.TIER_GUARDIAN); vm.expectRevert(); - cp.getTier(123); + tr.getTier(123); } function proposeButRevert(address proposer, uint24 txListSize, bytes4 revertReason) internal { diff --git a/packages/protocol/test/layer1/based/TaikoL1TestBase.sol b/packages/protocol/test/layer1/based/TaikoL1TestBase.sol index f3620aaad0..8dad90a69e 100644 --- a/packages/protocol/test/layer1/based/TaikoL1TestBase.sol +++ b/packages/protocol/test/layer1/based/TaikoL1TestBase.sol @@ -14,7 +14,7 @@ abstract contract TaikoL1TestBase is TaikoTest { SP1Verifier public sp1; SgxVerifier public sv; GuardianProver public gp; - TestTierProvider public cp; + TestTierRouter public tr; Bridge public bridge; bytes32 public GENESIS_BLOCK_HASH = keccak256("GENESIS_BLOCK_HASH"); @@ -75,7 +75,7 @@ abstract contract TaikoL1TestBase is TaikoTest { setupGuardianProverMultisig(); - cp = new TestTierProvider(); + tr = new TestTierRouter(); bridge = Bridge( payable( @@ -91,7 +91,7 @@ abstract contract TaikoL1TestBase is TaikoTest { registerAddress("taiko", address(L1)); registerAddress("tier_sgx", address(sv)); registerAddress("tier_guardian", address(gp)); - registerAddress("tier_router", address(cp)); + registerAddress("tier_router", address(tr)); registerAddress("signal_service", address(ss)); registerL2Address("taiko", address(L2)); registerL2Address("signal_service", address(L2SS)); diff --git a/packages/protocol/test/layer1/based/TaikoL1TestGroup1.t.sol b/packages/protocol/test/layer1/based/TaikoL1TestGroup1.t.sol index 93aff49bbe..a6725bc229 100644 --- a/packages/protocol/test/layer1/based/TaikoL1TestGroup1.t.sol +++ b/packages/protocol/test/layer1/based/TaikoL1TestGroup1.t.sol @@ -14,7 +14,7 @@ contract TaikoL1TestGroup1 is TaikoL1TestGroupBase { giveEthAndTko(Alice, 10_000 ether, 1000 ether); giveEthAndTko(Taylor, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); @@ -117,7 +117,7 @@ contract TaikoL1TestGroup1 is TaikoL1TestGroupBase { giveEthAndTko(Alice, 10_000 ether, 1000 ether); giveEthAndTko(Taylor, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); @@ -212,7 +212,7 @@ contract TaikoL1TestGroup1 is TaikoL1TestGroupBase { giveEthAndTko(Alice, 10_000 ether, 1000 ether); giveEthAndTko(Taylor, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); @@ -263,7 +263,7 @@ contract TaikoL1TestGroup1 is TaikoL1TestGroupBase { giveEthAndTko(Alice, 10_000 ether, 1000 ether); giveEthAndTko(Taylor, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); @@ -314,7 +314,7 @@ contract TaikoL1TestGroup1 is TaikoL1TestGroupBase { giveEthAndTko(Taylor, 10_000 ether, 1000 ether); giveEthAndTko(William, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); @@ -364,7 +364,7 @@ contract TaikoL1TestGroup1 is TaikoL1TestGroupBase { giveEthAndTko(Alice, 10_000 ether, 1000 ether); giveEthAndTko(Taylor, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); diff --git a/packages/protocol/test/layer1/based/TaikoL1TestGroup2.t.sol b/packages/protocol/test/layer1/based/TaikoL1TestGroup2.t.sol index 9bb5f5cf8a..49cee98606 100644 --- a/packages/protocol/test/layer1/based/TaikoL1TestGroup2.t.sol +++ b/packages/protocol/test/layer1/based/TaikoL1TestGroup2.t.sol @@ -17,8 +17,8 @@ contract TaikoL1TestGroup2 is TaikoL1TestGroupBase { giveEthAndTko(Taylor, 10_000 ether, 1000 ether); giveEthAndTko(William, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); - ITierProvider.Tier memory tierSgx = TestTierProvider(cp).getTier(LibTiers.TIER_SGX); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierSgx = ITierProvider(tr).getTier(LibTiers.TIER_SGX); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); @@ -123,8 +123,8 @@ contract TaikoL1TestGroup2 is TaikoL1TestGroupBase { giveEthAndTko(Taylor, 10_000 ether, 1000 ether); giveEthAndTko(William, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); - ITierProvider.Tier memory tierSgx = TestTierProvider(cp).getTier(LibTiers.TIER_SGX); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierSgx = ITierProvider(tr).getTier(LibTiers.TIER_SGX); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); diff --git a/packages/protocol/test/layer1/based/TaikoL1TestGroup3.t.sol b/packages/protocol/test/layer1/based/TaikoL1TestGroup3.t.sol index 000fefb99e..832aa34198 100644 --- a/packages/protocol/test/layer1/based/TaikoL1TestGroup3.t.sol +++ b/packages/protocol/test/layer1/based/TaikoL1TestGroup3.t.sol @@ -18,8 +18,8 @@ contract TaikoL1TestGroup3 is TaikoL1TestGroupBase { giveEthAndTko(James, 10_000 ether, 1000 ether); giveEthAndTko(Taylor, 10_000 ether, 1000 ether); giveEthAndTko(William, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); - ITierProvider.Tier memory tierSgx = TestTierProvider(cp).getTier(LibTiers.TIER_SGX); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierSgx = ITierProvider(tr).getTier(LibTiers.TIER_SGX); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); @@ -131,8 +131,8 @@ contract TaikoL1TestGroup3 is TaikoL1TestGroupBase { giveEthAndTko(James, 10_000 ether, 1000 ether); giveEthAndTko(Taylor, 10_000 ether, 1000 ether); giveEthAndTko(William, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); - ITierProvider.Tier memory tierSgx = TestTierProvider(cp).getTier(LibTiers.TIER_SGX); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierSgx = ITierProvider(tr).getTier(LibTiers.TIER_SGX); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); diff --git a/packages/protocol/test/layer1/based/TaikoL1TestGroup4.t.sol b/packages/protocol/test/layer1/based/TaikoL1TestGroup4.t.sol index 01b503f5cd..ce0bbdde37 100644 --- a/packages/protocol/test/layer1/based/TaikoL1TestGroup4.t.sol +++ b/packages/protocol/test/layer1/based/TaikoL1TestGroup4.t.sol @@ -16,8 +16,8 @@ contract TaikoL1TestGroup4 is TaikoL1TestGroupBase { giveEthAndTko(Alice, 10_000 ether, 1000 ether); giveEthAndTko(Taylor, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); - ITierProvider.Tier memory tierSgx = TestTierProvider(cp).getTier(LibTiers.TIER_SGX); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierSgx = ITierProvider(tr).getTier(LibTiers.TIER_SGX); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); @@ -95,8 +95,8 @@ contract TaikoL1TestGroup4 is TaikoL1TestGroupBase { giveEthAndTko(David, 10_000 ether, 1000 ether); giveEthAndTko(Taylor, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); - ITierProvider.Tier memory tierSgx = TestTierProvider(cp).getTier(LibTiers.TIER_SGX); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierSgx = ITierProvider(tr).getTier(LibTiers.TIER_SGX); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); diff --git a/packages/protocol/test/layer1/based/TaikoL1TestGroup5.t.sol b/packages/protocol/test/layer1/based/TaikoL1TestGroup5.t.sol index ac7d7fc0ef..ebbaa4eea5 100644 --- a/packages/protocol/test/layer1/based/TaikoL1TestGroup5.t.sol +++ b/packages/protocol/test/layer1/based/TaikoL1TestGroup5.t.sol @@ -135,7 +135,7 @@ contract TaikoL1TestGroup5 is TaikoL1TestGroupBase { giveEthAndTko(Alice, 10_000 ether, 1000 ether); giveEthAndTko(William, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); @@ -223,7 +223,7 @@ contract TaikoL1TestGroup5 is TaikoL1TestGroupBase { giveEthAndTko(David, 10_000 ether, 1000 ether); giveEthAndTko(William, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); diff --git a/packages/protocol/test/layer1/based/TaikoL1TestGroup6.t.sol b/packages/protocol/test/layer1/based/TaikoL1TestGroup6.t.sol index 15fa6b57fb..cb42f8ea7a 100644 --- a/packages/protocol/test/layer1/based/TaikoL1TestGroup6.t.sol +++ b/packages/protocol/test/layer1/based/TaikoL1TestGroup6.t.sol @@ -15,8 +15,8 @@ contract TaikoL1TestGroup6 is TaikoL1TestGroupBase { giveEthAndTko(Alice, 10_000 ether, 1000 ether); giveEthAndTko(Taylor, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); - ITierProvider.Tier memory tierSgx = TestTierProvider(cp).getTier(LibTiers.TIER_SGX); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierSgx = ITierProvider(tr).getTier(LibTiers.TIER_SGX); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); diff --git a/packages/protocol/test/layer1/based/TaikoL1TestGroup7.t.sol b/packages/protocol/test/layer1/based/TaikoL1TestGroup7.t.sol index d255a89328..78c85f1a00 100644 --- a/packages/protocol/test/layer1/based/TaikoL1TestGroup7.t.sol +++ b/packages/protocol/test/layer1/based/TaikoL1TestGroup7.t.sol @@ -13,7 +13,7 @@ contract TaikoL1TestGroup7 is TaikoL1TestGroupBase { giveEthAndTko(Alice, 10_000 ether, 1000 ether); giveEthAndTko(Taylor, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); @@ -52,7 +52,7 @@ contract TaikoL1TestGroup7 is TaikoL1TestGroupBase { giveEthAndTko(Alice, 10_000 ether, 1000 ether); giveEthAndTko(Taylor, 10_000 ether, 1000 ether); giveEthAndTko(William, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); diff --git a/packages/protocol/test/layer1/based/TaikoL1TestGroup9.t.sol b/packages/protocol/test/layer1/based/TaikoL1TestGroup9.t.sol index 563512ef66..ba98ebd179 100644 --- a/packages/protocol/test/layer1/based/TaikoL1TestGroup9.t.sol +++ b/packages/protocol/test/layer1/based/TaikoL1TestGroup9.t.sol @@ -159,7 +159,7 @@ contract TaikoL1TestGroup5 is TaikoL1TestGroupBase { giveEthAndTko(Alice, 10_000 ether, 1000 ether); giveEthAndTko(William, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); @@ -249,7 +249,7 @@ contract TaikoL1TestGroup5 is TaikoL1TestGroupBase { giveEthAndTko(Alice, 10_000 ether, 1000 ether); giveEthAndTko(Carol, 10_000 ether, 1000 ether); giveEthAndTko(William, 10_000 ether, 1000 ether); - ITierProvider.Tier memory tierOp = TestTierProvider(cp).getTier(LibTiers.TIER_OPTIMISTIC); + ITierProvider.Tier memory tierOp = ITierProvider(tr).getTier(LibTiers.TIER_OPTIMISTIC); console2.log("====== Alice propose a block"); TaikoData.BlockMetadata memory meta = proposeBlock(Alice, ""); diff --git a/packages/protocol/test/layer1/based/TestTierProvider.sol b/packages/protocol/test/layer1/based/TestTierRouter.sol similarity index 96% rename from packages/protocol/test/layer1/based/TestTierProvider.sol rename to packages/protocol/test/layer1/based/TestTierRouter.sol index 09beb43d03..8eb53a868b 100644 --- a/packages/protocol/test/layer1/based/TestTierProvider.sol +++ b/packages/protocol/test/layer1/based/TestTierRouter.sol @@ -6,10 +6,10 @@ import "src/layer1/tiers/ITierProvider.sol"; import "src/layer1/tiers/LibTiers.sol"; import "src/layer1/tiers/ITierRouter.sol"; -/// @title TestTierProvider +/// @title TestTierRouter /// @dev Labeled in AddressResolver as "tier_router" /// @custom:security-contact security@taiko.xyz -contract TestTierProvider is ITierProvider, ITierRouter { +contract TestTierRouter is ITierProvider, ITierRouter { uint256[50] private __gap; /// @inheritdoc ITierRouter diff --git a/packages/taiko-client/integration_test/l1_env.sh b/packages/taiko-client/integration_test/l1_env.sh index 3fd0923f49..7bde57f70a 100755 --- a/packages/taiko-client/integration_test/l1_env.sh +++ b/packages/taiko-client/integration_test/l1_env.sh @@ -10,7 +10,7 @@ export PROVER_SET_ADMIN=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 export TAIKO_TOKEN_PREMINT_RECIPIENT=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 export TAIKO_TOKEN_NAME="Taiko Token Test" export TAIKO_TOKEN_SYMBOL="TTKOt" -export TIER_PROVIDER="devnet" +export TIER_ROUTER="devnet" export PAUSE_TAIKO_L1="false" export PAUSE_BRIDGE="false" export TAIKO_TOKEN=0x0000000000000000000000000000000000000000