Skip to content

Commit

Permalink
feat(protocol): request zk proofs(risc0 & sp1) in mainnet (#18467)
Browse files Browse the repository at this point in the history
  • Loading branch information
YoGhurt111 authored Nov 8, 2024
1 parent 0b11101 commit 1fab427
Showing 1 changed file with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,21 @@ contract MainnetTierRouter is ITierRouter, TierProviderBase {

/// @inheritdoc ITierProvider
function getTierIds() external pure returns (uint16[] memory tiers_) {
tiers_ = new uint16[](3);
tiers_ = new uint16[](5);
tiers_[0] = LibTiers.TIER_SGX;
tiers_[1] = LibTiers.TIER_GUARDIAN_MINORITY;
tiers_[2] = LibTiers.TIER_GUARDIAN;
tiers_[1] = LibTiers.TIER_ZKVM_RISC0;
tiers_[2] = LibTiers.TIER_ZKVM_SP1;
tiers_[3] = LibTiers.TIER_GUARDIAN_MINORITY;
tiers_[4] = LibTiers.TIER_GUARDIAN;
}

/// @inheritdoc ITierProvider
function getMinTier(
address, /*_proposer*/
uint256 /*_rand*/
)
public
pure
override
returns (uint16)
{
function getMinTier(address _proposer, uint256 _rand) public view override returns (uint16) {
if (_proposer == DAO_FALLBACK_PROPOSER) {
if (_rand % 1000 == 0) return LibTiers.TIER_ZKVM_RISC0;
else if (_rand % 1000 == 1) return LibTiers.TIER_ZKVM_SP1;
else return LibTiers.TIER_SGX;
}
return LibTiers.TIER_SGX;
}
}

0 comments on commit 1fab427

Please sign in to comment.