Skip to content

Commit

Permalink
Merge branch 'develop' into release-1.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaStebaev committed Mar 20, 2024
2 parents 42aff92 + 4b05269 commit a8c9231
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 28 deletions.
2 changes: 1 addition & 1 deletion contracts/IContractManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ interface IContractManager {
function getTokenState() external view returns (address);
function getPunisher() external view returns (address);
function getContract(string calldata name) external view returns (address);
}
}
4 changes: 3 additions & 1 deletion contracts/INodes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ interface INodes {
bytes4 previousIP,
bytes4 newIP
);

function removeSpaceFromNode(uint nodeIndex, uint8 space) external returns (bool);
function addSpaceToNode(uint nodeIndex, uint8 space) external;
function changeNodeLastRewardDate(uint nodeIndex) external;
Expand Down Expand Up @@ -168,5 +168,7 @@ interface INodes {
function isNodeExist(address from, uint nodeIndex) external view returns (bool);
function isNodeActive(uint nodeIndex) external view returns (bool);
function isNodeLeaving(uint nodeIndex) external view returns (bool);
function isNodeVisible(uint256 nodeIndex) external view returns (bool);
function getLastChangeIpTime(uint nodeIndex) external view returns (uint);
function getFreeSpace(uint256 nodeIndex) external view returns (uint8 freeSpace);
}
1 change: 0 additions & 1 deletion contracts/ISchainsInternal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ interface ISchainsInternal {
)
external
returns (uint[] memory);
function changeLifetime(bytes32 schainHash, uint lifetime, uint deposit) external;
function removeSchain(bytes32 schainHash, address from) external;
function removeNodeFromSchain(uint nodeIndex, bytes32 schainHash) external;
function deleteGroup(bytes32 schainHash) external;
Expand Down
60 changes: 35 additions & 25 deletions contracts/ISkaleDKG.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ interface ISkaleDKG {
bytes32[2] publicKey;
bytes32 share;
}

/**
* @dev Emitted when a channel is opened.
*/
Expand Down Expand Up @@ -115,7 +115,9 @@ interface ISkaleDKG {
* @dev Emitted when a complaint is sent.
*/
event ComplaintSent(bytes32 indexed schainHash, uint indexed fromNodeIndex, uint indexed toNodeIndex);


// External

function alright(bytes32 schainHash, uint fromNodeIndex) external;
function broadcast(
bytes32 schainHash,
Expand All @@ -125,7 +127,11 @@ interface ISkaleDKG {
uint rotationCounter
)
external;
function complaint(bytes32 schainHash, uint fromNodeIndex, uint toNodeIndex) external;
function complaintBadData(bytes32 schainHash, uint fromNodeIndex, uint toNodeIndex) external;
function deleteChannel(bytes32 schainHash) external;
function finalizeSlashing(bytes32 schainHash, uint badNode) external;
function openChannel(bytes32 schainHash) external;
function preResponse(
bytes32 schainId,
uint fromNodeIndex,
Expand All @@ -134,30 +140,39 @@ interface ISkaleDKG {
KeyShare[] memory secretKeyContribution
)
external;
function complaint(bytes32 schainHash, uint fromNodeIndex, uint toNodeIndex) external;
function resetPendingToBeReplaced(bytes32 schainHash) external;
function response(
bytes32 schainHash,
uint fromNodeIndex,
uint secretNumber,
G2Point memory multipliedShare
)
external;
function openChannel(bytes32 schainHash) external;
function deleteChannel(bytes32 schainHash) external;
function setStartAlrightTimestamp(bytes32 schainHash) external;
function setBadNode(bytes32 schainHash, uint nodeIndex) external;
function finalizeSlashing(bytes32 schainHash, uint badNode) external;
function getChannelStartedTime(bytes32 schainHash) external view returns (uint);
function setStartAlrightTimestamp(bytes32 schainHash) external;

// External view

function checkAndReturnIndexInGroup(
bytes32 schainHash,
uint nodeIndex,
bool revertCheck
)
external
view
returns (uint, bool);
function getAlrightStartedTime(bytes32 schainHash) external view returns (uint);
function getChannelStartedBlock(bytes32 schainHash) external view returns (uint);
function getChannelStartedTime(bytes32 schainHash) external view returns (uint);
function getComplaintData(bytes32 schainHash) external view returns (uint, uint);
function getComplaintStartedTime(bytes32 schainHash) external view returns (uint);
function getNumberOfBroadcasted(bytes32 schainHash) external view returns (uint);
function getNumberOfCompleted(bytes32 schainHash) external view returns (uint);
function getTimeOfLastSuccessfulDKG(bytes32 schainHash) external view returns (uint);
function getComplaintData(bytes32 schainHash) external view returns (uint, uint);
function getComplaintStartedTime(bytes32 schainHash) external view returns (uint);
function getAlrightStartedTime(bytes32 schainHash) external view returns (uint);
function isChannelOpened(bytes32 schainHash) external view returns (bool);
function isLastDKGSuccessful(bytes32 groupIndex) external view returns (bool);
function isAllDataReceived(bytes32 schainHash, uint nodeIndex) external view returns (bool);
function isAlrightPossible(bytes32 schainHash, uint nodeIndex) external view returns (bool);
function isBroadcastPossible(bytes32 schainHash, uint nodeIndex) external view returns (bool);
function isChannelOpened(bytes32 schainHash) external view returns (bool);
function isComplaintPossible(
bytes32 schainHash,
uint fromNodeIndex,
Expand All @@ -166,20 +181,15 @@ interface ISkaleDKG {
external
view
returns (bool);
function isAlrightPossible(bytes32 schainHash, uint nodeIndex) external view returns (bool);
function isEveryoneBroadcasted(bytes32 schainHash) external view returns (bool);
function isLastDKGSuccessful(bytes32 groupIndex) external view returns (bool);
function isNodeBroadcasted(bytes32 schainHash, uint nodeIndex) external view returns (bool);
function isPreResponsePossible(bytes32 schainHash, uint nodeIndex) external view returns (bool);
function isResponsePossible(bytes32 schainHash, uint nodeIndex) external view returns (bool);
function isNodeBroadcasted(bytes32 schainHash, uint nodeIndex) external view returns (bool);
function isAllDataReceived(bytes32 schainHash, uint nodeIndex) external view returns (bool);
function checkAndReturnIndexInGroup(
bytes32 schainHash,
uint nodeIndex,
bool revertCheck
)
external
view
returns (uint, bool);
function isEveryoneBroadcasted(bytes32 schainHash) external view returns (bool);
function pendingToBeReplaced(bytes32 schainHash) external view returns (uint256);

// External pure

function hashData(
KeyShare[] memory secretKeyContribution,
G2Point[] memory verificationVector
Expand Down

0 comments on commit a8c9231

Please sign in to comment.