Skip to content

Commit

Permalink
feat(protocol): Increase the probability of sgx proof for lab proposer (
Browse files Browse the repository at this point in the history
  • Loading branch information
YoGhurt111 authored Oct 24, 2024
1 parent 49267ab commit fd0dbbb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
26 changes: 16 additions & 10 deletions packages/protocol/contracts/layer1/hekla/HeklaTierProvider.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,23 @@ contract HeklaTierProvider is TierProviderBase, ITierRouter {

/// @inheritdoc ITierProvider
function getMinTier(address _proposer, uint256 _rand) public pure override returns (uint16) {
if (_proposer == LAB_PROPOSER && _rand % 1000 == 0) {
// 0.1% of the total blocks will require ZKVM Risc0 proofs.
return LibTiers.TIER_ZKVM_RISC0;
} else if (_proposer == LAB_PROPOSER && _rand % 1000 == 1) {
// 0.1% of the total blocks will require ZKVM Sp1 proofs.
return LibTiers.TIER_ZKVM_SP1;
} else if (_rand % 2 == 0) {
// 50% of the total blocks will require SGX proofs.
return LibTiers.TIER_SGX;
if (_proposer == LAB_PROPOSER) {
if (_rand % 1000 == 0) {
// 0.1% of the total blocks will require ZKVM Risc0 proofs.
return LibTiers.TIER_ZKVM_RISC0;
} else if (_rand % 1000 == 1) {
// 0.1% of the total blocks will require ZKVM Sp1 proofs.
return LibTiers.TIER_ZKVM_SP1;
} else {
return LibTiers.TIER_SGX;
}
} else {
return LibTiers.TIER_OPTIMISTIC;
if (_rand % 2 == 0) {
// 50% of the total blocks will require SGX proofs.
return LibTiers.TIER_SGX;
} else {
return LibTiers.TIER_OPTIMISTIC;
}
}
}
}
3 changes: 2 additions & 1 deletion packages/protocol/deployments/hekla-contract-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,14 @@

### tierRouter

- impl: `0xE17dBD745f0144b8b7133cbBA044B74Ff34A7aA2`
- impl: `0xACF97d3b3c15c3C009eB04a640954d48237fc3ff`
- logs:
- deployed on Jun 10, 2024 at commit `d5965bb`
- upgraded on Jun 14, 2024 at commit `cc10b04`
- upgraded on Jun 19, 2024 at commit `b7e12e3`
- upgraded on Aug 15, 2024 at commit `05d49b0`
- upgraded on Sep 02, 2024 at commit `9dae5c8`
- upgraded on Oct 24, 2024 at commit `78f9ac0`

### prover_set

Expand Down

0 comments on commit fd0dbbb

Please sign in to comment.