-
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.
feat(protocol): add proposer address to getMinTier func (#17919)
Co-authored-by: David <[email protected]>
- Loading branch information
1 parent
d559ce8
commit d6ea6f3
Showing
7 changed files
with
13 additions
and
9 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
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
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
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
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
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 |
---|---|---|
|
@@ -6,6 +6,8 @@ import "../L1/tiers/TierProviderBase.sol"; | |
/// @title HeklaTierProvider | ||
/// @custom:security-contact [email protected] | ||
contract HeklaTierProvider is TierProviderBase { | ||
address public constant LAB_PROPOSER = 0xD3f681bD6B49887A48cC9C9953720903967E9DC0; | ||
|
||
/// @inheritdoc ITierProvider | ||
function getTierIds() public pure override returns (uint16[] memory tiers_) { | ||
tiers_ = new uint16[](5); | ||
|
@@ -17,14 +19,15 @@ contract HeklaTierProvider is TierProviderBase { | |
} | ||
|
||
/// @inheritdoc ITierProvider | ||
function getMinTier(uint256 _rand) public pure override returns (uint16) { | ||
if (_rand % 1000 == 0) { | ||
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 proofs. | ||
return LibTiers.TIER_ZKVM_RISC0; | ||
} else if (_rand % 2 == 0) { | ||
// 50% of the total blocks will require SGX proofs. | ||
return LibTiers.TIER_SGX; | ||
} else { | ||
return LibTiers.TIER_OPTIMISTIC; | ||
} | ||
return LibTiers.TIER_OPTIMISTIC; | ||
} | ||
} |
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