DarknodeSlasher
Contract: DarknodeSlasher
​
DarknodeSlasher will become a voting system for darknodes to deregister other misbehaving darknodes. Right now, it is a placeholder.
Inherits from:
Claimable
Ownable
Context
Initializable
Variables​
darknodeRegistry
: contract DarknodeRegistryLogicV1
​
blacklistSlashPercent
: uint256
​
maliciousSlashPercent
: uint256
​
secretRevealSlashPercent
: uint256
​
slashed
: mapping(uint256 => mapping(uint256 => mapping(address => bool)))
​
secretRevealed
: mapping(address => bool)
​
blacklisted
: mapping(address => bool)
​
Modifiers​
validPercent(uint256 _percent)
​
Restrict a function to have a valid percentage.
Functions​
constructor
(contract DarknodeRegistryLogicV1 _darknodeRegistry)
(public)​
updateDarknodeRegistry
(contract DarknodeRegistryLogicV1 _darknodeRegistry)
(external)​
Params
_darknodeRegistry
: The address of the Darknode Registry contract.
Allows the contract owner to update the address of the darknode registry contract.
setBlacklistSlashPercent
(uint256 _percentage)
(public)​
setMaliciousSlashPercent
(uint256 _percentage)
(public)​
setSecretRevealSlashPercent
(uint256 _percentage)
(public)​
slash
(address _guilty, address _challenger, uint256 _percentage)
(external)​
blacklist
(address _guilty)
(external)​
slashDuplicatePropose
(uint256 _height, uint256 _round, bytes _blockhash1, uint256 _validRound1, bytes _signature1, bytes _blockhash2, uint256 _validRound2, bytes _signature2)
(external)​
slashDuplicatePrevote
(uint256 _height, uint256 _round, bytes _blockhash1, bytes _signature1, bytes _blockhash2, bytes _signature2)
(external)​
slashDuplicatePrecommit
(uint256 _height, uint256 _round, bytes _blockhash1, bytes _signature1, bytes _blockhash2, bytes _signature2)
(external)​
slashSecretReveal
(uint256 _a, uint256 _b, uint256 _c, uint256 _d, uint256 _e, uint256 _f, bytes _signature)
(external)​
Events​
LogDarknodeRegistryUpdated
(contract DarknodeRegistryLogicV1 _previousDarknodeRegistry, contract DarknodeRegistryLogicV1 _nextDarknodeRegistry)
​
Emitted when the DarknodeRegistry is updated.
Params
_previousDarknodeRegistry
: The address of the old registry._nextDarknodeRegistry
: The address of the new registry.