Skip to content

Commit

Permalink
Coordinator: Removes participants array from "rituals" ABI
Browse files Browse the repository at this point in the history
  • Loading branch information
vzotova committed Aug 21, 2024
1 parent 60b90c9 commit 7ef0b24
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
43 changes: 39 additions & 4 deletions contracts/contracts/coordination/Coordinator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,43 @@ contract Coordinator is Initializable, AccessControlDefaultAdminRulesUpgradeable
}
}

function rituals(uint32 ritualId) public view returns (Ritual memory) {
return storageRitual(ritualId);
function rituals(
uint32 ritualId
)
external
view
returns (
address initiator,
uint32 initTimestamp,
uint32 endTimestamp,
uint16 totalTranscripts,
uint16 totalAggregations,
//
address authority,
uint16 dkgSize,
uint16 threshold,
bool aggregationMismatch,
//
IEncryptionAuthorizer accessController,
BLS12381.G1Point memory publicKey,
bytes memory aggregatedTranscript,
IFeeModel feeModel
)
{
Ritual storage ritual = storageRitual(ritualId);
initiator = ritual.initiator;
initTimestamp = ritual.initTimestamp;
endTimestamp = ritual.endTimestamp;
totalTranscripts = ritual.totalTranscripts;
totalAggregations = ritual.totalAggregations;
authority = ritual.authority;
dkgSize = ritual.dkgSize;
threshold = ritual.threshold;
aggregationMismatch = ritual.aggregationMismatch;
accessController = ritual.accessController;
publicKey = ritual.publicKey;
aggregatedTranscript = ritual.aggregatedTranscript;
feeModel = ritual.feeModel;
}

// for backward compatibility
Expand All @@ -152,7 +187,7 @@ contract Coordinator is Initializable, AccessControlDefaultAdminRulesUpgradeable
}

function getInitiator(uint32 ritualId) external view returns (address) {
return rituals(ritualId).initiator;
return storageRitual(ritualId).initiator;
}

function getTimestamps(
Expand Down Expand Up @@ -377,7 +412,7 @@ contract Coordinator is Initializable, AccessControlDefaultAdminRulesUpgradeable
}

function getAuthority(uint32 ritualId) external view returns (address) {
return rituals(ritualId).authority;
return storageRitual(ritualId).authority;
}

function postAggregation(
Expand Down
1 change: 1 addition & 0 deletions scripts/ritual_state_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def cli(network, domain, ritual_id, realtime):
f"\tAccessController : "
f"{ritual.accessController} {'(GlobalAllowList)' if isGlobalAllowList else ''}"
)
print(f"\tFee Model : {ritual.feeModel}")
print("\tParticipants :")
for participant in participants:
provider = participant.provider
Expand Down

0 comments on commit 7ef0b24

Please sign in to comment.