diff --git a/packages/protocol/audit/sigma_prime_taiko_smart_contract_security_assessment_report_v2_0.pdf b/packages/protocol/audit/sigma_prime_taiko_smart_contract_security_assessment_report_v2_0.pdf new file mode 100644 index 00000000000..ec6382909aa Binary files /dev/null and b/packages/protocol/audit/sigma_prime_taiko_smart_contract_security_assessment_report_v2_0.pdf differ diff --git a/packages/protocol/contracts/L1/TaikoData.sol b/packages/protocol/contracts/L1/TaikoData.sol index bdf9a1372dd..f2cf2ee1b5f 100644 --- a/packages/protocol/contracts/L1/TaikoData.sol +++ b/packages/protocol/contracts/L1/TaikoData.sol @@ -127,7 +127,6 @@ library TaikoData { bytes32 blockHash; bytes32 stateRoot; bytes32 graffiti; - bytes32[2] __reserved; } /// @dev Struct representing state transition data. diff --git a/packages/protocol/script/SetRemoteBridgeSuites.s.sol b/packages/protocol/script/SetRemoteBridgeSuites.s.sol index 150739225f1..8bb18397cc8 100644 --- a/packages/protocol/script/SetRemoteBridgeSuites.s.sol +++ b/packages/protocol/script/SetRemoteBridgeSuites.s.sol @@ -23,6 +23,7 @@ contract SetRemoteBridgeSuites is DeployCapability { address public timelockAddress = vm.envAddress("TIMELOCK_ADDRESS"); address public addressManagerAddress = vm.envAddress("ADDRESS_MANAGER_ADDRESS"); uint256[] public remoteChainIDs = vm.envUint("REMOTE_CHAIN_IDS", ","); + address[] public remoteSignalServices = vm.envAddress("REMOTE_SIGNAL_SERVICES", ","); address[] public remoteBridges = vm.envAddress("REMOTE_BRIDGES", ","); address[] public remoteERC20Vaults = vm.envAddress("REMOTE_ERC20_VAULTS", ","); address[] public remoteERC721Vaults = vm.envAddress("REMOTE_ERC721_VAULTS", ","); @@ -32,6 +33,10 @@ contract SetRemoteBridgeSuites is DeployCapability { require( remoteChainIDs.length == remoteBridges.length, "invalid remote bridge addresses length" ); + require( + remoteChainIDs.length == remoteSignalServices.length, + "invalid remote SignalService addresses length" + ); require( remoteChainIDs.length == remoteERC20Vaults.length, "invalid remote ERC20Vault addresses length" @@ -51,6 +56,7 @@ contract SetRemoteBridgeSuites is DeployCapability { uint64 chainid = uint64(remoteChainIDs[i]); if (securityCouncilPrivateKey == 0) { + register(addressManagerAddress, "signal_service", remoteSignalServices[i], chainid); register(addressManagerAddress, "bridge", remoteBridges[i], chainid); register(addressManagerAddress, "erc20_vault", remoteERC20Vaults[i], chainid); register(addressManagerAddress, "erc721_vault", remoteERC721Vaults[i], chainid); @@ -58,6 +64,9 @@ contract SetRemoteBridgeSuites is DeployCapability { continue; } + registerByTimelock( + addressManagerAddress, "signal_service", remoteSignalServices[i], chainid + ); registerByTimelock(addressManagerAddress, "bridge", remoteBridges[i], chainid); registerByTimelock(addressManagerAddress, "erc20_vault", remoteERC20Vaults[i], chainid); registerByTimelock( diff --git a/packages/protocol/test/L1/TaikoL1LibProvingWithTiers.t.sol b/packages/protocol/test/L1/TaikoL1LibProvingWithTiers.t.sol index bd4e3042cd1..a1d35e73d61 100644 --- a/packages/protocol/test/L1/TaikoL1LibProvingWithTiers.t.sol +++ b/packages/protocol/test/L1/TaikoL1LibProvingWithTiers.t.sol @@ -790,8 +790,7 @@ contract TaikoL1LibProvingWithTiers is TaikoL1TestBase { parentHash: parentHash, blockHash: blockHash, stateRoot: stateRoot, - graffiti: 0x0, - __reserved: [bytes32(0), bytes32(0)] + graffiti: 0x0 }); TaikoData.TierProof memory proof; diff --git a/packages/protocol/test/L1/TaikoL1TestBase.sol b/packages/protocol/test/L1/TaikoL1TestBase.sol index e6b686e641e..6c311af7f58 100644 --- a/packages/protocol/test/L1/TaikoL1TestBase.sol +++ b/packages/protocol/test/L1/TaikoL1TestBase.sol @@ -243,8 +243,7 @@ abstract contract TaikoL1TestBase is TaikoTest { parentHash: parentHash, blockHash: blockHash, stateRoot: stateRoot, - graffiti: 0x0, - __reserved: [bytes32(0), bytes32(0)] + graffiti: 0x0 }); bytes32 instance = diff --git a/packages/protocol/test/verifiers/GuardianVerifier.t.sol b/packages/protocol/test/verifiers/GuardianVerifier.t.sol index d9fbc135f6a..62da3490899 100644 --- a/packages/protocol/test/verifiers/GuardianVerifier.t.sol +++ b/packages/protocol/test/verifiers/GuardianVerifier.t.sol @@ -33,8 +33,7 @@ contract TestGuardianVerifier is TaikoL1TestBase { parentHash: bytes32(0), blockHash: bytes32(0), stateRoot: bytes32(0), - graffiti: bytes32(0), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32(0) }); // TierProof @@ -62,8 +61,7 @@ contract TestGuardianVerifier is TaikoL1TestBase { parentHash: bytes32(0), blockHash: bytes32(0), stateRoot: bytes32(0), - graffiti: bytes32(0), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32(0) }); // TierProof diff --git a/packages/protocol/test/verifiers/PseZkVerifier.t.sol b/packages/protocol/test/verifiers/PseZkVerifier.t.sol index 3cf64da601d..27705ec19e9 100644 --- a/packages/protocol/test/verifiers/PseZkVerifier.t.sol +++ b/packages/protocol/test/verifiers/PseZkVerifier.t.sol @@ -51,8 +51,7 @@ contract TestPseZkVerifier is TaikoL1TestBase { parentHash: bytes32(0), blockHash: bytes32(0), stateRoot: bytes32(0), - graffiti: bytes32(0), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32(0) }); // TierProof @@ -80,8 +79,7 @@ contract TestPseZkVerifier is TaikoL1TestBase { parentHash: bytes32(0), blockHash: bytes32(0), stateRoot: bytes32(0), - graffiti: bytes32(0), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32(0) }); // TierProof @@ -133,8 +131,7 @@ contract TestPseZkVerifier is TaikoL1TestBase { parentHash: bytes32("12"), blockHash: bytes32("23"), stateRoot: bytes32("34"), - graffiti: bytes32("1234"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("1234") }); // TierProof @@ -172,8 +169,7 @@ contract TestPseZkVerifier is TaikoL1TestBase { parentHash: bytes32("12"), blockHash: bytes32("23"), stateRoot: bytes32("34"), - graffiti: bytes32("1234"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("1234") }); // TierProof @@ -203,8 +199,7 @@ contract TestPseZkVerifier is TaikoL1TestBase { parentHash: bytes32("12"), blockHash: bytes32("23"), stateRoot: bytes32("34"), - graffiti: bytes32("1234"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("1234") }); // TierProof @@ -243,8 +238,7 @@ contract TestPseZkVerifier is TaikoL1TestBase { parentHash: bytes32("12"), blockHash: bytes32("23"), stateRoot: bytes32("34"), - graffiti: bytes32("1234"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("1234") }); // TierProof @@ -282,8 +276,7 @@ contract TestPseZkVerifier is TaikoL1TestBase { parentHash: bytes32("12"), blockHash: bytes32("23"), stateRoot: bytes32("34"), - graffiti: bytes32("1234"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("1234") }); // TierProof @@ -318,8 +311,7 @@ contract TestPseZkVerifier is TaikoL1TestBase { parentHash: bytes32("12"), blockHash: bytes32("23"), stateRoot: bytes32("34"), - graffiti: bytes32("1234"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("1234") }); // TierProof @@ -361,8 +353,7 @@ contract TestPseZkVerifier is TaikoL1TestBase { parentHash: bytes32("12"), blockHash: bytes32("23"), stateRoot: bytes32("34"), - graffiti: bytes32("1234"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("1234") }); // TierProof @@ -404,8 +395,7 @@ contract TestPseZkVerifier is TaikoL1TestBase { parentHash: bytes32("12"), blockHash: bytes32("23"), stateRoot: bytes32("34"), - graffiti: bytes32("1234"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("1234") }); // TierProof @@ -444,8 +434,7 @@ contract TestPseZkVerifier is TaikoL1TestBase { parentHash: bytes32("12"), blockHash: bytes32("23"), stateRoot: bytes32("34"), - graffiti: bytes32("1234"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("1234") }); // TierProof diff --git a/packages/protocol/test/verifiers/SgxVerifier.t.sol b/packages/protocol/test/verifiers/SgxVerifier.t.sol index 98dd8f8ec8e..ed3550474eb 100644 --- a/packages/protocol/test/verifiers/SgxVerifier.t.sol +++ b/packages/protocol/test/verifiers/SgxVerifier.t.sol @@ -196,8 +196,7 @@ contract TestSgxVerifier is TaikoL1TestBase, AttestationBase { parentHash: bytes32("12"), blockHash: bytes32("34"), stateRoot: bytes32("56"), - graffiti: bytes32("78"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("78") }); // TierProof @@ -246,8 +245,7 @@ contract TestSgxVerifier is TaikoL1TestBase, AttestationBase { parentHash: bytes32("12"), blockHash: bytes32("34"), stateRoot: bytes32("56"), - graffiti: bytes32("78"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("78") }); // TierProof @@ -279,8 +277,7 @@ contract TestSgxVerifier is TaikoL1TestBase, AttestationBase { parentHash: bytes32("12"), blockHash: bytes32("34"), stateRoot: bytes32("56"), - graffiti: bytes32("78"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("78") }); // TierProof @@ -314,8 +311,7 @@ contract TestSgxVerifier is TaikoL1TestBase, AttestationBase { parentHash: bytes32("12"), blockHash: bytes32("34"), stateRoot: bytes32("56"), - graffiti: bytes32("78"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("78") }); // TierProof @@ -354,8 +350,7 @@ contract TestSgxVerifier is TaikoL1TestBase, AttestationBase { parentHash: bytes32("12"), blockHash: bytes32("34"), stateRoot: bytes32("56"), - graffiti: bytes32("78"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("78") }); // TierProof @@ -395,8 +390,7 @@ contract TestSgxVerifier is TaikoL1TestBase, AttestationBase { parentHash: bytes32("12"), blockHash: bytes32("34"), stateRoot: bytes32("56"), - graffiti: bytes32("78"), - __reserved: [bytes32(0), bytes32(0)] + graffiti: bytes32("78") }); // TierProof