From 40f6ea6b2c43128ae2b53d79370d40ff65edf7cc Mon Sep 17 00:00:00 2001 From: Daniel Wang Date: Tue, 20 Aug 2024 15:40:36 +0800 Subject: [PATCH] rename --- packages/protocol/contracts/L1/tiers/TierProviderV2.sol | 4 ++-- packages/protocol/contracts/common/LibStrings.sol | 6 +++--- .../protocol/contracts/mainnet/LibRollupAddressCache.sol | 2 +- packages/protocol/script/DeployOnL1.s.sol | 2 +- packages/protocol/test/L1/TaikoL1TestBase.sol | 4 ++-- packages/protocol/test/L1/TestTierProvider.sol | 2 +- packages/protocol/test/common/AddressResolver.t.sol | 2 +- packages/protocol/test/verifiers/SP1Verifier.t.sol | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/protocol/contracts/L1/tiers/TierProviderV2.sol b/packages/protocol/contracts/L1/tiers/TierProviderV2.sol index 91d91d6401..43ed1b1c54 100644 --- a/packages/protocol/contracts/L1/tiers/TierProviderV2.sol +++ b/packages/protocol/contracts/L1/tiers/TierProviderV2.sol @@ -31,7 +31,7 @@ contract TierProviderV2 is ITierProvider { if (_tierId == LibTierId.TIER_TEE) { return ITierProvider.Tier({ - // verifierName can also be B_VERIFIER_TEE + // verifierName can also be B_VERIFIER_TEE_ANY verifierName: LibStrings.B_VERIFIER_TEE_SGX, validityBond: 150 ether, // TAIKO contestBond: 984.375 ether, // = 150 TAIKO * 6.5625 @@ -43,7 +43,7 @@ contract TierProviderV2 is ITierProvider { if (_tierId == LibTierId.TIER_ZK) { return ITierProvider.Tier({ - // verifierName can also be B_VERIFIER_ZK and B_VERIFIER_ZK_SP1 + // verifierName can also be B_VERIFIER_ZK_ANY and B_VERIFIER_ZK_SP1 verifierName: LibStrings.B_VERIFIER_ZK_RISC0, validityBond: 250 ether, // TAIKO contestBond: 1640.625 ether, // = 250 TAIKO * 6.5625 diff --git a/packages/protocol/contracts/common/LibStrings.sol b/packages/protocol/contracts/common/LibStrings.sol index aa84189168..6ed42088d9 100644 --- a/packages/protocol/contracts/common/LibStrings.sol +++ b/packages/protocol/contracts/common/LibStrings.sol @@ -27,11 +27,11 @@ library LibStrings { bytes32 internal constant B_TIER_ROUTER = bytes32("tier_router"); bytes32 internal constant B_VERIFIER_GUARDIAN = bytes32("verifier_guardian"); bytes32 internal constant B_VERIFIER_GUARDIAN_MINORITY = bytes32("verifier_guardian_minority"); - bytes32 internal constant B_VERIFIER_TEE = bytes32("verifier_tee"); + bytes32 internal constant B_VERIFIER_TEE_ANY = bytes32("verifier_tee_any"); bytes32 internal constant B_VERIFIER_TEE_SGX = bytes32("verifier_tee_sgx"); - bytes32 internal constant B_VERIFIER_ZK = bytes32("verifier_zk"); + bytes32 internal constant B_VERIFIER_ZK_ANY = bytes32("verifier_zk_any"); bytes32 internal constant B_VERIFIER_ZK_RISC0 = bytes32("verifier_zk_risc0"); - bytes32 internal constant B_VERIFIER_ZK_SP1 = bytes32("verifier_zk_sp1"); + bytes32 internal constant B_VERIFIER_ZK_SP1 = bytes32("verifier_zk_any_sp1"); bytes32 internal constant B_VERIFIER_ZK_AND_TEE = bytes32("verifier_zk_and_tee"); bytes32 internal constant B_WITHDRAWER = bytes32("withdrawer"); bytes32 internal constant H_RETURN_LIVENESS_BOND = keccak256("RETURN_LIVENESS_BOND"); diff --git a/packages/protocol/contracts/mainnet/LibRollupAddressCache.sol b/packages/protocol/contracts/mainnet/LibRollupAddressCache.sol index 39603f1632..67311e8801 100644 --- a/packages/protocol/contracts/mainnet/LibRollupAddressCache.sol +++ b/packages/protocol/contracts/mainnet/LibRollupAddressCache.sol @@ -40,7 +40,7 @@ library LibRollupAddressCache { if (_name == LibStrings.B_VERIFIER_ZK_SP1) { return (false, address(0)); } - if (_name == LibStrings.B_VERIFIER_ZK) { + if (_name == LibStrings.B_VERIFIER_ZK_ANY) { return (false, address(0)); } if (_name == LibStrings.B_VERIFIER_GUARDIAN_MINORITY) { diff --git a/packages/protocol/script/DeployOnL1.s.sol b/packages/protocol/script/DeployOnL1.s.sol index c3d183e93b..842204cc55 100644 --- a/packages/protocol/script/DeployOnL1.s.sol +++ b/packages/protocol/script/DeployOnL1.s.sol @@ -318,7 +318,7 @@ contract DeployOnL1 is DeployCapability { }); deployProxy({ - name: "verifier_tee", + name: "verifier_tee_any", impl: address(new SgxVerifier()), data: abi.encodeCall(SgxVerifier.init, (owner, rollupAddressManager)), registerTo: rollupAddressManager diff --git a/packages/protocol/test/L1/TaikoL1TestBase.sol b/packages/protocol/test/L1/TaikoL1TestBase.sol index 81bb22c38a..2c8900246e 100644 --- a/packages/protocol/test/L1/TaikoL1TestBase.sol +++ b/packages/protocol/test/L1/TaikoL1TestBase.sol @@ -55,7 +55,7 @@ abstract contract TaikoL1TestBase is TaikoTest { sv = SgxVerifier( deployProxy({ - name: "verifier_tee", + name: "verifier_tee_any", impl: address(new SgxVerifier()), data: abi.encodeCall(SgxVerifier.init, (address(0), address(addressManager))) }) @@ -89,7 +89,7 @@ abstract contract TaikoL1TestBase is TaikoTest { ); registerAddress("taiko", address(L1)); - registerAddress("verifier_tee", address(sv)); + registerAddress("verifier_tee_any", address(sv)); registerAddress("verifier_guardian", address(gp)); registerAddress("tier_router", address(cp)); registerAddress("signal_service", address(ss)); diff --git a/packages/protocol/test/L1/TestTierProvider.sol b/packages/protocol/test/L1/TestTierProvider.sol index 4c715d44ea..736d6043d2 100644 --- a/packages/protocol/test/L1/TestTierProvider.sol +++ b/packages/protocol/test/L1/TestTierProvider.sol @@ -31,7 +31,7 @@ contract TestTierProvider is ITierProvider, ITierRouter { if (_tierId == LibTierId.TIER_TEE) { return ITierProvider.Tier({ - verifierName: LibStrings.B_VERIFIER_TEE, + verifierName: LibStrings.B_VERIFIER_TEE_ANY, validityBond: 250 ether, // TKO contestBond: 1640 ether, // =250TKO * 6.5625 cooldownWindow: 1440, //24 hours diff --git a/packages/protocol/test/common/AddressResolver.t.sol b/packages/protocol/test/common/AddressResolver.t.sol index 265632997d..f312c7ce38 100644 --- a/packages/protocol/test/common/AddressResolver.t.sol +++ b/packages/protocol/test/common/AddressResolver.t.sol @@ -23,7 +23,7 @@ contract TestAddressResolver is TaikoL1TestBase { ); assertEq( - bridge.resolve(uint64(block.chainid), bytes32(bytes("verifier_tee")), false), + bridge.resolve(uint64(block.chainid), bytes32(bytes("verifier_tee_any")), false), address(sv), " wrong TEE verifier address" ); diff --git a/packages/protocol/test/verifiers/SP1Verifier.t.sol b/packages/protocol/test/verifiers/SP1Verifier.t.sol index 43a5ce2a3c..fa58ae7237 100644 --- a/packages/protocol/test/verifiers/SP1Verifier.t.sol +++ b/packages/protocol/test/verifiers/SP1Verifier.t.sol @@ -43,7 +43,7 @@ contract TestSP1Verifier is TaikoL1TestBase { // Deploy Taiko's SP1 proof verifier ('remitter') sp1 = SP1Verifier( deployProxy({ - name: "verifier_zk_sp1", + name: "verifier_zk_any_sp1", impl: address(new SP1Verifier()), data: abi.encodeCall(SP1Verifier.init, (address(0), address(addressManager))) })