-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(protocol): fix tier id conflicts (#18004)
- Loading branch information
Showing
1 changed file
with
11 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,29 +2,23 @@ | |
pragma solidity 0.8.24; | ||
|
||
/// @title LibTiers | ||
/// @dev Tier ID cannot be zero! | ||
/// @dev Tier ID cannot be zero and must be unique. | ||
/// @custom:security-contact [email protected] | ||
library LibTiers { | ||
/// @notice Optimistic tier ID. | ||
uint16 public constant TIER_OPTIMISTIC = 100; | ||
|
||
/// @notice SGX proof | ||
/// @notice TEE tiers | ||
/// Although these tiers have diffeerent IDs, at most one should be selected in a verifier. | ||
uint16 public constant TIER_SGX = 200; | ||
|
||
/// @notice TDX proof | ||
uint16 public constant TIER_TDX = 200; | ||
|
||
/// @notice Any TEE proof | ||
uint16 public constant TIER_TEE_ANY = 200; | ||
|
||
/// @notice Risc0's ZKVM proof | ||
uint16 public constant TIER_ZKVM_RISC0 = 290; | ||
|
||
/// @notice SP1's ZKVM proof | ||
uint16 public constant TIER_ZKVM_SP1 = 290; | ||
|
||
/// @notice Any ZKVM proof | ||
uint16 public constant TIER_ZKVM_ANY = 290; | ||
uint16 public constant TIER_TDX = 201; | ||
uint16 public constant TIER_TEE_ANY = 202; | ||
|
||
/// @notice ZK Tiers. | ||
/// Although these tiers have diffeerent IDs, at most one should be selected in a verifier. | ||
uint16 public constant TIER_ZKVM_RISC0 = 250; | ||
uint16 public constant TIER_ZKVM_SP1 = 251; | ||
uint16 public constant TIER_ZKVM_ANY = 252; | ||
|
||
/// @notice Any ZKVM+TEE proof | ||
uint16 public constant TIER_ZKVM_AND_TEE = 300; | ||
|