From f3dc402c798ed7c15a2664e129ef47b3c345f168 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 14 May 2024 21:26:58 +0800 Subject: [PATCH] fix(protocol): fix tier ID check issue in `GuardianProver.approve()` (#17170) Co-authored-by: Daniel Wang --- packages/protocol/contracts/L1/provers/GuardianProver.sol | 4 ---- packages/protocol/contracts/L1/provers/Guardians.sol | 1 - 2 files changed, 5 deletions(-) diff --git a/packages/protocol/contracts/L1/provers/GuardianProver.sol b/packages/protocol/contracts/L1/provers/GuardianProver.sol index 6942a0b557c..74f351cb690 100644 --- a/packages/protocol/contracts/L1/provers/GuardianProver.sol +++ b/packages/protocol/contracts/L1/provers/GuardianProver.sol @@ -76,10 +76,6 @@ contract GuardianProver is IVerifier, Guardians { nonReentrant returns (bool approved_) { - if (_proof.tier != LibTiers.TIER_GUARDIAN) { - revert INVALID_PROOF(); - } - bytes32 hash = keccak256(abi.encode(_meta, _tran, _proof.data)); approved_ = approve(_meta.id, hash); diff --git a/packages/protocol/contracts/L1/provers/Guardians.sol b/packages/protocol/contracts/L1/provers/Guardians.sol index 10e84f1d597..2fa886abbb1 100644 --- a/packages/protocol/contracts/L1/provers/Guardians.sol +++ b/packages/protocol/contracts/L1/provers/Guardians.sol @@ -42,7 +42,6 @@ abstract contract Guardians is EssentialContract { error INVALID_GUARDIAN(); error INVALID_GUARDIAN_SET(); error INVALID_MIN_GUARDIANS(); - error INVALID_PROOF(); /// @notice Set the set of guardians /// @param _newGuardians The new set of guardians