|
2 | 2 | pragma solidity ^0.8.28; |
3 | 3 |
|
4 | 4 | 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 |
5 | 8 | function maxBidFraction() external view returns (uint16) { |
6 | 9 | return _maxBidFraction(); |
7 | 10 | } |
| 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 |
8 | 13 |
|
9 | 14 | function livenessWindow() external view returns (uint40) { |
10 | 15 | return _livenessWindow(); |
11 | 16 | } |
12 | 17 |
|
| 18 | + /// @notice Returns the time delay before a new prover takes over after a successful bid |
| 19 | + /// @return _ The succession delay value in seconds |
13 | 20 | function successionDelay() external view returns (uint40) { |
14 | 21 | return _successionDelay(); |
15 | 22 | } |
16 | 23 |
|
| 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 |
17 | 26 | function exitDelay() external view returns (uint40) { |
18 | 27 | return _exitDelay(); |
19 | 28 | } |
20 | 29 |
|
| 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 |
21 | 32 | function provingWindow() external view returns (uint40) { |
22 | 33 | return _provingWindow(); |
23 | 34 | } |
24 | 35 |
|
| 36 | + /// @notice Returns the minimum stake required to be a prover |
| 37 | + /// @return _ The liveness bond value in wei |
25 | 38 | function livenessBond() external view returns (uint96) { |
26 | 39 | return _livenessBond(); |
27 | 40 | } |
28 | 41 |
|
| 42 | + /// @notice Returns the fraction (in bps) of the liveness bond that the evictor gets as an incentive |
| 43 | + /// @return _ The evictor incentive fraction |
29 | 44 | function evictorIncentiveFraction() external view returns (uint16) { |
30 | 45 | return _evictorIncentiveFraction(); |
31 | 46 | } |
32 | 47 |
|
| 48 | + /// @notice Returns the fraction (in bps) of the remaining liveness bond rewarded to the prover |
| 49 | + /// @return _ The reward fraction |
33 | 50 | function rewardFraction() external view returns (uint16) { |
34 | 51 | return _rewardFraction(); |
35 | 52 | } |
36 | 53 |
|
| 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%). |
37 | 57 | function delayedFeePercentage() external view returns (uint16) { |
38 | 58 | return _delayedFeePercentage(); |
39 | 59 | } |
40 | 60 |
|
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 |
44 | 62 | function _maxBidFraction() internal view virtual returns (uint16) { |
45 | 63 | return 9500; // 95% in basis points |
46 | 64 | } |
47 | 65 |
|
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 |
50 | 67 | function _livenessWindow() internal view virtual returns (uint40) { |
51 | 68 | return 60; |
52 | 69 | } |
53 | 70 |
|
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 |
56 | 72 | function _successionDelay() internal view virtual returns (uint40) { |
57 | 73 | return 10; |
58 | 74 | } |
59 | 75 |
|
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 |
62 | 77 | function _exitDelay() internal view virtual returns (uint40) { |
63 | 78 | return 10; |
64 | 79 | } |
65 | 80 |
|
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 |
68 | 82 | function _provingWindow() internal view virtual returns (uint40) { |
69 | 83 | return 30; |
70 | 84 | } |
71 | 85 |
|
72 | | - /// @dev Returns the minimum stake required to be a prover |
73 | | - /// @return _ The liveness bond value in wei |
| 86 | + /// @dev See livenessBond |
74 | 87 | function _livenessBond() internal view virtual returns (uint96) { |
75 | 88 | return 1 ether; |
76 | 89 | } |
77 | 90 |
|
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 |
80 | 92 | function _evictorIncentiveFraction() internal view virtual returns (uint16) { |
81 | 93 | return 500; // 5% in basis points |
82 | 94 | } |
83 | 95 |
|
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 |
86 | 97 | function _rewardFraction() internal view virtual returns (uint16) { |
87 | 98 | return 9000; // 90% in basis points |
88 | 99 | } |
89 | 100 |
|
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 |
93 | 102 | function _delayedFeePercentage() internal view virtual returns (uint16) { |
94 | 103 | return 150; |
95 | 104 | } |
|
0 commit comments