Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(protocol): request zk proofs(risc0 & sp1) in mainnet #18467

Merged
merged 6 commits into from
Nov 8, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) {
davidtaikocha marked this conversation as resolved.
Show resolved Hide resolved
if (_proposer == DAO_FALLBACK_PROPOSER) {
if (_rand % 200 == 0) return LibTiers.TIER_ZKVM_RISC0;
else if (_rand % 100 == 1) return LibTiers.TIER_ZKVM_SP1;
else return LibTiers.TIER_SGX;
}
return LibTiers.TIER_SGX;
}
}