Skip to content

Commit

Permalink
fix(protocol): fix tier id conflicts (#18004)
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored Aug 30, 2024
1 parent f7bcf1d commit 0df1ad4
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions packages/protocol/contracts/L1/tiers/LibTiers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0df1ad4

Please sign in to comment.