forked from DMDcoin/diamond-contracts-core
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Dev #5
Merged
Merged
Dev #5
Conversation
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
Bonus Score System implementation
function totalStakeAmount() external view returns (uint256);
I236 staked amount total
fix total stake Amount interface compatibility
…eports-system Remove malice reports system
Added method for getting allowed range with selector for dao value guards merged, but we need to work on coverage for value guards at some point.
…s in Block Reward
added changeable parameter range for governancePotShareNominatorParam…
Staking: added method to check if pool is valid (is active or inactive)
Comment on lines
+252
to
+270
function _decideEarlyEpochEndNeeded(uint256 epoch) private { | ||
// skip checks since notification has already been sent | ||
if (isEarlyEpochEnd[epoch]) { | ||
return; | ||
} | ||
|
||
uint256 threshold = earlyEpochEndThreshold(); | ||
uint256 faultyValidatorsCount = _countFaultyValidators(epoch); | ||
|
||
// threshold has not been passed | ||
if (faultyValidatorsCount < threshold) { | ||
return; | ||
} | ||
|
||
uint256 unflaggedValidatorsCount = validatorSetContract.getCurrentValidatorsCount() - flaggedValidators.length; // 16 - 4 = 12 | ||
isEarlyEpochEnd[epoch] = true; | ||
blockRewardContract.notifyEarlyEpochEnd(); | ||
|
||
emit NotifyEarlyEpochEnd(epoch, block.number); | ||
} |
Check notice
Code scanning / Slither
Reentrancy vulnerabilities Low
Reentrancy in ConnectivityTrackerHbbft._decideEarlyEpochEndNeeded(uint256):
External calls:
- blockRewardContract.notifyEarlyEpochEnd()
Event emitted after the call(s):
- NotifyEarlyEpochEnd(epoch,block.number)
External calls:
- blockRewardContract.notifyEarlyEpochEnd()
Event emitted after the call(s):
- NotifyEarlyEpochEnd(epoch,block.number)
/// @dev duration of ban in epochs | ||
uint256 public banDuration; | ||
/// @custom:oz-renamed-from banDuration | ||
uint256 public _unused8; |
Check warning
Code scanning / Slither
State variables that could be declared constant Warning
ValidatorSetHbbft._unused8 should be constant
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
updrate of the registry branch to latest version