Skip to content

Commit 0c13176

Browse files
committed
natspec in config
1 parent 9318d44 commit 0c13176

1 file changed

Lines changed: 29 additions & 20 deletions

File tree

src/protocol/ProverManagerConfig.sol

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,94 +2,103 @@
22
pragma solidity ^0.8.28;
33

44
abstract contract ProverManagerConfig {
5+
/// @notice Returns the maximum fraction (in bps) of the previous bid a prover can offer and still have a successful
6+
/// bid
7+
/// @return _ The maximum bid fraction
58
function maxBidFraction() external view returns (uint16) {
69
return _maxBidFraction();
710
}
11+
/// @notice Returns the time window after which a publication is considered old enough for prover eviction
12+
/// @return _ The liveness window value in seconds
813

914
function livenessWindow() external view returns (uint40) {
1015
return _livenessWindow();
1116
}
1217

18+
/// @notice Returns the time delay before a new prover takes over after a successful bid
19+
/// @return _ The succession delay value in seconds
1320
function successionDelay() external view returns (uint40) {
1421
return _successionDelay();
1522
}
1623

24+
/// @notice Returns the delay after which the current prover can exit, or is removed if evicted
25+
/// @return _ The exit delay value in seconds
1726
function exitDelay() external view returns (uint40) {
1827
return _exitDelay();
1928
}
2029

30+
/// @notice Returns the time window for a prover to submit a valid proof after their period ends
31+
/// @return _ The proving window value in seconds
2132
function provingWindow() external view returns (uint40) {
2233
return _provingWindow();
2334
}
2435

36+
/// @notice Returns the minimum stake required to be a prover
37+
/// @return _ The liveness bond value in wei
2538
function livenessBond() external view returns (uint96) {
2639
return _livenessBond();
2740
}
2841

42+
/// @notice Returns the fraction (in bps) of the liveness bond that the evictor gets as an incentive
43+
/// @return _ The evictor incentive fraction
2944
function evictorIncentiveFraction() external view returns (uint16) {
3045
return _evictorIncentiveFraction();
3146
}
3247

48+
/// @notice Returns the fraction (in bps) of the remaining liveness bond rewarded to the prover
49+
/// @return _ The reward fraction
3350
function rewardFraction() external view returns (uint16) {
3451
return _rewardFraction();
3552
}
3653

54+
/// @notice The percentage of the fee that is charged for delayed publications
55+
/// @dev It is recommended to set this to >100 since delayed publications should usually be charged at a higher rate
56+
/// @return _ The multiplier as a percentage (two decimals). This value should usually be greater than 100 (100%).
3757
function delayedFeePercentage() external view returns (uint16) {
3858
return _delayedFeePercentage();
3959
}
4060

41-
/// @dev Returns the maximum fraction (in bps) of the previous bid a prover can offer and still have a successful
42-
/// bid
43-
/// @return _ The maximum bid fraction
61+
/// @dev See maxBidFraction
4462
function _maxBidFraction() internal view virtual returns (uint16) {
4563
return 9500; // 95% in basis points
4664
}
4765

48-
/// @dev Returns the time window after which a publication is considered old enough for prover eviction
49-
/// @return _ The liveness window value in seconds
66+
/// @dev See livenessWindow
5067
function _livenessWindow() internal view virtual returns (uint40) {
5168
return 60;
5269
}
5370

54-
/// @dev Returns the time delay before a new prover takes over after a successful bid
55-
/// @return _ The succession delay value in seconds
71+
/// @dev See successionDelay
5672
function _successionDelay() internal view virtual returns (uint40) {
5773
return 10;
5874
}
5975

60-
/// @dev Returns the delay after which the current prover can exit, or is removed if evicted
61-
/// @return _ The exit delay value in seconds
76+
/// @dev See exitDelay
6277
function _exitDelay() internal view virtual returns (uint40) {
6378
return 10;
6479
}
6580

66-
/// @dev Returns the time window for a prover to submit a valid proof after their period ends
67-
/// @return _ The proving window value in seconds
81+
/// @dev See provingWindow
6882
function _provingWindow() internal view virtual returns (uint40) {
6983
return 30;
7084
}
7185

72-
/// @dev Returns the minimum stake required to be a prover
73-
/// @return _ The liveness bond value in wei
86+
/// @dev See livenessBond
7487
function _livenessBond() internal view virtual returns (uint96) {
7588
return 1 ether;
7689
}
7790

78-
/// @dev Returns the fraction (in bps) of the liveness bond that the evictor gets as an incentive
79-
/// @return _ The evictor incentive fraction
91+
/// @dev See evictorIncentiveFraction
8092
function _evictorIncentiveFraction() internal view virtual returns (uint16) {
8193
return 500; // 5% in basis points
8294
}
8395

84-
/// @dev Returns the fraction (in bps) of the remaining liveness bond rewarded to the prover
85-
/// @return _ The reward fraction
96+
/// @dev See rewardFraction
8697
function _rewardFraction() internal view virtual returns (uint16) {
8798
return 9000; // 90% in basis points
8899
}
89100

90-
/// @dev The percentage of the fee that is charged for delayed publications
91-
/// @dev It is recommended to set this to >100 since delayed publications should usually be charged at a higher rate
92-
/// @return _ The multiplier as a percentage (two decimals). This value should usually be greater than 100 (100%).
101+
/// @dev See delayedFeePercentage
93102
function _delayedFeePercentage() internal view virtual returns (uint16) {
94103
return 150;
95104
}

0 commit comments

Comments
 (0)