SkaleDKG
Contains functions to manage distributed key generation per Joint-Feldman protocol.
correctGroup correctGroup(bytes32 schainHash)
modifier
correctGroupWithoutRevert correctGroupWithoutRevert(bytes32 schainHash)
modifier
correctNode correctNode(bytes32 schainHash, uint256 nodeIndex)
modifier
correctNodeWithoutRevert correctNodeWithoutRevert(bytes32 schainHash, uint256 nodeIndex)
modifier
onlyNodeOwner onlyNodeOwner(uint256 nodeIndex)
modifier
refundGasBySchain refundGasBySchain(bytes32 schainHash, struct SkaleDKG.Context context)
modifier
refundGasByValidatorToSchain refundGasByValidatorToSchain(bytes32 schainHash, struct SkaleDKG.Context context)
modifier
alright alright(bytes32 schainHash, uint256 fromNodeIndex)
external
broadcast broadcast(bytes32 schainHash, uint256 nodeIndex, struct G2Operations.G2Point[] verificationVector, struct SkaleDKG.KeyShare[] secretKeyContribution)
external
complaintBadData complaintBadData(bytes32 schainHash, uint256 fromNodeIndex, uint256 toNodeIndex)
external
preResponse preResponse(bytes32 schainId, uint256 fromNodeIndex, struct G2Operations.G2Point[] verificationVector, struct G2Operations.G2Point[] verificationVectorMultiplication, struct SkaleDKG.KeyShare[] secretKeyContribution)
external
complaint complaint(bytes32 schainHash, uint256 fromNodeIndex, uint256 toNodeIndex)
external
response response(bytes32 schainHash, uint256 fromNodeIndex, uint256 secretNumber, struct G2Operations.G2Point multipliedShare)
external
openChannel openChannel(bytes32 schainHash)
external
Allows Schains and NodeRotation contracts to open a channel.
Emits a ChannelOpened
event.
Requirements:
-
Channel is not already created.
deleteChannel deleteChannel(bytes32 schainHash)
external
Allows SchainsInternal contract to delete a channel.
Requirements:
-
Channel must exist.
setStartAlrightTimestamp setStartAlrightTimestamp(bytes32 schainHash)
external
setBadNode setBadNode(bytes32 schainHash, uint256 nodeIndex)
external
finalizeSlashing finalizeSlashing(bytes32 schainHash, uint256 badNode)
external
getChannelStartedTime getChannelStartedTime(bytes32 schainHash) → uint256
external
getChannelStartedBlock getChannelStartedBlock(bytes32 schainHash) → uint256
external
getNumberOfBroadcasted getNumberOfBroadcasted(bytes32 schainHash) → uint256
external
getNumberOfCompleted getNumberOfCompleted(bytes32 schainHash) → uint256
external
getTimeOfLastSuccessfulDKG getTimeOfLastSuccessfulDKG(bytes32 schainHash) → uint256
external
getComplaintData getComplaintData(bytes32 schainHash) → uint256, uint256
external
getComplaintStartedTime getComplaintStartedTime(bytes32 schainHash) → uint256
external
getAlrightStartedTime getAlrightStartedTime(bytes32 schainHash) → uint256
external
isChannelOpened isChannelOpened(bytes32 schainHash) → bool
external
Checks whether channel is opened.
isLastDKGSuccessful isLastDKGSuccessful(bytes32 schainHash) → bool
external
isBroadcastPossible isBroadcastPossible(bytes32 schainHash, uint256 nodeIndex) → bool
external
Checks whether broadcast is possible.
isComplaintPossible isComplaintPossible(bytes32 schainHash, uint256 fromNodeIndex, uint256 toNodeIndex) → bool
external
Checks whether complaint is possible.
isAlrightPossible isAlrightPossible(bytes32 schainHash, uint256 nodeIndex) → bool
external
Checks whether sending Alright response is possible.
isPreResponsePossible isPreResponsePossible(bytes32 schainHash, uint256 nodeIndex) → bool
external
Checks whether sending a pre-response is possible.
isResponsePossible isResponsePossible(bytes32 schainHash, uint256 nodeIndex) → bool
external
Checks whether sending a response is possible.
isNodeBroadcasted isNodeBroadcasted(bytes32 schainHash, uint256 nodeIndex) → bool
external
isAllDataReceived isAllDataReceived(bytes32 schainHash, uint256 nodeIndex) → bool
external
Checks whether all data has been received by node.
hashData hashData(struct SkaleDKG.KeyShare[] secretKeyContribution, struct G2Operations.G2Point[] verificationVector) → bytes32
external
initialize initialize(address contractsAddress)
public
checkAndReturnIndexInGroup checkAndReturnIndexInGroup(bytes32 schainHash, uint256 nodeIndex, bool revertCheck) → uint256, bool
public
isEveryoneBroadcasted isEveryoneBroadcasted(bytes32 schainHash) → bool
public
ChannelOpened ChannelOpened(bytes32 schainHash)
event
Emitted when a channel is opened.
ChannelClosed ChannelClosed(bytes32 schainHash)
event
Emitted when a channel is closed.
BroadcastAndKeyShare BroadcastAndKeyShare(bytes32 schainHash, uint256 fromNode, struct G2Operations.G2Point[] verificationVector, struct SkaleDKG.KeyShare[] secretKeyContribution)
event
Emitted when a node broadcasts key share.
AllDataReceived AllDataReceived(bytes32 schainHash, uint256 nodeIndex)
event
Emitted when all group data is received by node.
SuccessfulDKG SuccessfulDKG(bytes32 schainHash)
event
Emitted when DKG is successful.
BadGuy BadGuy(uint256 nodeIndex)
event
Emitted when a complaint against a node is verified.
FailedDKG FailedDKG(bytes32 schainHash)
event
Emitted when DKG failed.
NewGuy NewGuy(uint256 nodeIndex)
event
Emitted when a new node is rotated in.
ComplaintError ComplaintError(string error)
event
Emitted when an incorrect complaint is sent.
ComplaintSent ComplaintSent(bytes32 schainHash, uint256 fromNodeIndex, uint256 toNodeIndex)
event
Emitted when a complaint is sent.