Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
ffcd98d
Initial musing about creation of signing cohort, utilizing a separate…
derekpierre Apr 15, 2025
5c394bd
Minor rename.
derekpierre Apr 15, 2025
b61c1cc
Store SigningCohortParticipants as a list instead of a mapping.
derekpierre Apr 16, 2025
c28b8f7
Add getSigner() function and fix bug where signature was not stored f…
derekpierre Apr 17, 2025
207e960
Use eip191 signing for signing cohort formation.
derekpierre Apr 22, 2025
23fd883
Add the ability to deployer a multisig as part of cohort formation - …
derekpierre Apr 24, 2025
0570525
Be sure to use operator addresses and not provider address for signers.
derekpierre Apr 24, 2025
64a4578
Adjust logic for caching signatures.
derekpierre Apr 25, 2025
0fae651
Signing cohort id is a uint32 (for now), so use it for cohort mapping…
derekpierre Apr 25, 2025
f1afe8a
Ensure that signatures for cohort multisig are unique and that repeat…
derekpierre Apr 25, 2025
718a12c
Obtain data to sign for ritual from contract.
derekpierre Apr 28, 2025
546021f
Limit initiation of signing cohort rituals to only accounts with init…
derekpierre Apr 29, 2025
918ef37
Deploy signing infrastructure contracts to polygon amoy for the lynx …
derekpierre Apr 29, 2025
25d3135
introduces condition storage to the signing cohort struct
KPrasch May 1, 2025
9ad0d30
basic testing for onchain conditions
KPrasch May 1, 2025
4254cf3
signing corrdinator upgrade deployment scripts
KPrasch May 1, 2025
b3137f1
Test cleanup.
derekpierre May 1, 2025
20df5b2
Redeploy SigningCoordinator after trying to upgrade but then storage …
derekpierre May 1, 2025
602bca1
Fix linting for PolygonChile.
derekpierre May 9, 2025
e6a1927
Initial musing about canonical SigningCoordinator contract that can b…
derekpierre May 9, 2025
15dc5db
Initial musing regarding Optimism-based bridged contracts eg. Eth Sep…
derekpierre May 9, 2025
2908cc0
Ensure that ape chain id is properly maintained for tests.
derekpierre May 12, 2025
d2d20d1
Some initial code for managing cohorts across different chains via a …
derekpierre May 12, 2025
ddd4b54
Update tests to account for set up of single signing coordinator, sig…
derekpierre May 12, 2025
0303b13
Rename sender/receiver contracts.
derekpierre May 12, 2025
3f557d9
Establish abstracted interfaces for L1->L2 sender/receiver contracts …
derekpierre May 14, 2025
7941cef
Update implementations of sender/receiver interfaces to match updated…
derekpierre May 14, 2025
3d0b324
Update SigningCoordinator to be able to handle deployment of signing …
derekpierre May 14, 2025
589daf9
Update code for deploying cohort multisigs on other chains.
derekpierre May 14, 2025
e701331
Code cleanup for internal method on SigningCoordinator.
derekpierre May 15, 2025
47b4379
Update SigningCoordinator to use TACoApplication instead of TACoChild…
derekpierre May 15, 2025
c68f1de
Update contracts to follow parent-child dynamic of parent being deplo…
derekpierre May 17, 2025
ebe47c0
Add root and child deployment scripts for signing infrastructure cont…
derekpierre May 17, 2025
17087f6
Don't disable initializers for ThresholdSigningMultisig since it will…
derekpierre May 20, 2025
20620d8
Allow ability to obtain child app address from SigningCoordinator bas…
derekpierre May 20, 2025
b2adee2
Add ability to modify max dkg size and dispatcher contract used by Si…
derekpierre May 21, 2025
c8f5e63
Add ability to modify initialization values afterwards for SigningCoo…
derekpierre May 21, 2025
92609e9
Update function for getUnsignedTransactionHash to use EIP191 standard.
derekpierre May 21, 2025
7360cd0
Apply RFCs from #366.
derekpierre May 22, 2025
e6ac365
Only set conditions for chains that already have multisigs deployed.
derekpierre May 26, 2025
ec420dd
Add SigningCoordinator to contract list exposed to sdk
theref Jun 18, 2025
c0da4a3
Add signing infrastructure root deployment information to the lynx re…
derekpierre May 23, 2025
40bc0b3
Remove unnecessary underscores.
derekpierre May 22, 2025
9901070
Add SigningCoordinator function to extend cohort durations - only the…
derekpierre Jun 25, 2025
90bd925
Add `getThreshold` to SigningCoordinator
theref Jun 18, 2025
fdbd793
Make modifications to OpL2Receiver so that setting the address of L1 …
derekpierre May 23, 2025
6ca8925
Add storage gap.
derekpierre May 22, 2025
55e5243
Upgrade SigningCoordinator on lynx and update contract registry with …
derekpierre Jun 25, 2025
a1328a9
Update scripts for upgrading signing coordinator contract on lynx.
derekpierre Jun 18, 2025
538c519
first draft: form signing cohort scripting
KPrasch Jun 10, 2025
1c17598
Update lynx registry with latest child infra deployments to base.
derekpierre May 23, 2025
2613b84
Apply RFC from #366.
derekpierre May 23, 2025
d2f8bbf
Additional testing for signing coordinator to try to deploy signing c…
derekpierre Jun 26, 2025
4106327
Remove deprecated oryx domain and add sepolia as a possible chain id …
derekpierre Jun 18, 2025
8299bd6
includes condition setting script for signing cohorts
KPrasch Jun 10, 2025
61424c1
Fix bug in child deployment script - allowed caller should be l2 rece…
derekpierre May 26, 2025
b6b4765
Merge pull request #366 from derekpierre/secreto
derekpierre May 23, 2025
8bed9da
Deprecate getCondition in favour of getSigningCohortConditions. Didn'…
derekpierre Jun 27, 2025
9083b57
Adjust tests to be more specific about testing polygon contracts.
derekpierre Jun 18, 2025
1c646e4
respond to RFCs in PR #393
KPrasch Jun 17, 2025
1afcab2
Merge pull request #382 from derekpierre/secreto-deployment
derekpierre May 26, 2025
34bb21a
Remove duplicate getCondition method from SigningCoordinator contract.
derekpierre Jun 27, 2025
aac4cc2
Upgrade SigningCoordinator for lynx which updated contract registry a…
derekpierre Jun 18, 2025
7d65022
Merge pull request #393 from KPrasch/signing-formation
KPrasch Jun 18, 2025
d3646d5
Upgraded deployed SigningCoordinator to remove getCondition function.
derekpierre Jun 27, 2025
0248308
Merge pull request #398 from theref/signingCoordinator
derekpierre Jun 19, 2025
1bd49cd
Allows operator to set signer address
vzotova Oct 15, 2025
e414d9c
Merge pull request #385 from derekpierre/various-updates
derekpierre Jun 27, 2025
c9d25d6
SigningCoordinator: remove `operator` from storage layout
vzotova Oct 21, 2025
ab01b9d
Bump version: 0.25.0 → 0.26.0-alpha.1
derekpierre Aug 5, 2025
8a088aa
SignerCoordinator: Signer has to sign operator address
vzotova Oct 24, 2025
0e58a0a
Update version to 0.26.0-alpha.1 in package-lock.json.
derekpierre Aug 5, 2025
c7ab113
Adds signing request key to the contract state
vzotova Oct 29, 2025
ac07cf8
Ensure that ordering follows contract (checksum as int) and not lexic…
derekpierre Oct 27, 2025
08c176e
Merge pull request #436 from vzotova/operator-signer
derekpierre Oct 27, 2025
6eddbdd
respond to RFCs in PR #438
vzotova Oct 30, 2025
205e7df
Merge pull request #437 from derekpierre/node-ordering
derekpierre Oct 30, 2025
d315bf8
Merge pull request #438 from vzotova/request-key
derekpierre Nov 7, 2025
720cb9b
Relock dependencies using latest from `nucypher-core`.
derekpierre Nov 8, 2025
8ec51dc
Update Dispatcher contract to be proxyable.
derekpierre Nov 8, 2025
3485c46
Update/add scripts for root signing infra - in particular SigningCoor…
derekpierre Nov 8, 2025
df34d71
Update root signing infra information for `lynx` after updated deploy…
derekpierre Nov 9, 2025
54578a6
Update address of Dispatcher used by child signing infra update script.
derekpierre Nov 9, 2025
6a64789
Update child signing infra information in `lynx` contract registry af…
derekpierre Nov 9, 2025
23517ad
Update proxy change to Dispatcher for signing root deploy script.
derekpierre Nov 9, 2025
6762e0a
Fully redeploy child signing infrastructure since old SigningCoordina…
derekpierre Nov 9, 2025
86983b3
Add ability to verify more than one contract in one call.
derekpierre Nov 9, 2025
2e7f5ca
Add script to deploy signing cohort to additional chains if the cohor…
derekpierre Nov 10, 2025
ff57ccb
Bump version to 0.26.0-alpha.2
derekpierre Nov 10, 2025
66fc2dd
Remove scripts for redeploying/updating signing infra. Those scripts …
derekpierre Nov 10, 2025
466eac6
Add isSigner assertions to ThresholdSigningMultisig tests.
derekpierre Nov 12, 2025
b0d56dd
Clean up script.
derekpierre Nov 10, 2025
39722b2
Update SigningCoordinatorDispatcher to ensure l1 sender address is 0-…
derekpierre Nov 12, 2025
3285d85
Add tests for threshold signing multisig contract.
derekpierre Nov 11, 2025
5804859
Merge pull request #441 from derekpierre/new-signing-coordinator
derekpierre Nov 10, 2025
98c3f91
Add tests for SigningCoordinatorChild.
derekpierre Nov 12, 2025
7588451
Merge pull request #442 from derekpierre/multisig-testing
derekpierre Nov 12, 2025
406295c
Merge pull request #443 from derekpierre/more-testing
derekpierre Nov 12, 2025
48273ab
Draft for conditions hierarchy
vzotova Nov 12, 2025
cba3b3a
Adds server id as a parameter
vzotova Nov 17, 2025
5a3f9a9
Allows to set server conditions only if they are signed by cohort
vzotova Dec 1, 2025
84c0de8
Renames server -> domain. Simplifies hash
vzotova Dec 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ape-infura = "*"
ape-foundry = "*"
flake8 = "*"
isort = "*"
nucypher-core = "==0.15.0"
nucypher-core = { git = "https://github.com/nucypher/nucypher-core.git", ref = "main", subdirectory = "nucypher-core-python" }
pre-commit = "*"
tox = "*"
pyyaml = "*"
Expand Down
3,784 changes: 2,041 additions & 1,743 deletions Pipfile.lock

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions ape-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ polygon:
mainnet:
transaction_acceptance_timeout: 600 # 10 minutes
amoy:
gas_limit: auto # because we are cutting it close with Coordinator
gas_limit: auto # because we are cutting it close with Coordinator

foundry:
host: auto
Expand All @@ -65,5 +65,7 @@ etherscan:
rate_limit: 5

test:
provider:
chain_id: 131277322940537 # ensure ape doesn't change chain id to 1337
mnemonic: test test test test test test test test test test test junk
number_of_accounts: 40
number_of_accounts: 70
5 changes: 3 additions & 2 deletions contracts/contracts/coordination/Coordinator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ contract Coordinator is Initializable, AccessControlDefaultAdminRulesUpgradeable

bytes32 public constant FEE_MODEL_MANAGER_ROLE = keccak256("FEE_MODEL_MANAGER_ROLE");
bytes32 public constant HANDOVER_SUPERVISOR_ROLE = keccak256("HANDOVER_SUPERVISOR_ROLE");
uint256 public constant DECRYPTION_REQUEST_KEY_LENGTH = 42;

ITACoChildApplication public immutable application;
uint96 private immutable minAuthorization; // TODO use child app for checking eligibility
Expand Down Expand Up @@ -495,7 +496,7 @@ contract Coordinator is Initializable, AccessControlDefaultAdminRulesUpgradeable
);

require(
decryptionRequestStaticKey.length == 42,
decryptionRequestStaticKey.length == DECRYPTION_REQUEST_KEY_LENGTH,
"Invalid length for decryption request static key"
);

Expand Down Expand Up @@ -584,7 +585,7 @@ contract Coordinator is Initializable, AccessControlDefaultAdminRulesUpgradeable
require(isRitualActive(ritualId), "Ritual is not active");
require(transcript.length > 0, "Parameters can't be empty");
require(
decryptionRequestStaticKey.length == 42,
decryptionRequestStaticKey.length == DECRYPTION_REQUEST_KEY_LENGTH,
"Invalid length for decryption request static key"
);

Expand Down
16 changes: 16 additions & 0 deletions contracts/contracts/coordination/IL1Sender.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: AGPL-3.0-or-later

pragma solidity ^0.8.0;

/**
* @title IL1Sender
* @notice Interface for sending data to the L2 receiver contract.
*/
interface IL1Sender {
/**
* @notice Sends data to the L2 receiver contract.
* @param target The address of the target contract on L2.
* @param data The data to be sent to the target contract.
*/
function sendData(address target, bytes calldata data) external;
}
15 changes: 15 additions & 0 deletions contracts/contracts/coordination/IL2Receiver.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: AGPL-3.0-or-later

pragma solidity ^0.8.0;

/**
* @title IL2Receiver
* @notice Interface for receiving data from the L1 sender contract.
*/
interface IL2Receiver {
/**
* @notice Receives data from the L1 sender contract.
* @param data The data sent from the L1 sender contract.
*/
function recvData(bytes calldata data) external;
}
31 changes: 31 additions & 0 deletions contracts/contracts/coordination/ISigningCoordinatorChild.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// SPDX-License-Identifier: AGPL-3.0-or-later

pragma solidity ^0.8.0;

/**
* @title ISigningCoordinatorChild
* @notice Interface for x-chain interactions from SigningCoordinator to Child
*/
interface ISigningCoordinatorChild {
event CohortMultisigDeployed(uint32 indexed cohortId, address multisig);
event CohortMultisigUpdated(
uint32 indexed cohortId,
address multisig,
address[] signers,
uint16 threshold,
bool clearSigners
);

function deployCohortMultiSig(
uint32 cohortId,
address[] calldata signers,
uint16 threshold
) external;

function updateMultiSigParameters(
uint32 cohortId,
address[] calldata signers,
uint16 threshold,
bool clearSigners
) external;
}
13 changes: 13 additions & 0 deletions contracts/contracts/coordination/IThresholdSigningMultisig.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: AGPL-3.0-or-later

pragma solidity ^0.8.0;

interface IThresholdSigningMultisig {
function initialize(address[] memory, uint16, address) external;

function updateMultiSigParameters(
address[] calldata signers,
uint16 threshold,
bool clearSigners
) external;
}
50 changes: 50 additions & 0 deletions contracts/contracts/coordination/OpL1Sender.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// SPDX-License-Identifier: AGPL-3.0-or-later

pragma solidity ^0.8.0;

import "@openzeppelin-upgradeable/contracts/proxy/utils/Initializable.sol";
import "./IL1Sender.sol";
import "./IL2Receiver.sol";

interface ICrossDomainMessenger {
function sendMessage(address target, bytes calldata message, uint32 gasLimit) external;
}

/**
* @title OpL1Sender
* @notice Optimism-based contract responsible for sending data
* to the L2 receiver contract via the bridge messenger.
*/
contract OpL1Sender is IL1Sender, Initializable {
ICrossDomainMessenger public immutable messenger;
address public immutable dispatcher;
uint32 public immutable gasLimit;
IL2Receiver public l2Receiver;

/**
* @param _dispatcher The address of the dispatcher contract.
* @param _messenger The address of the CrossDomainMessenger contract.
* @param _gasLimit The gas limit for the message.
*/
constructor(address _dispatcher, ICrossDomainMessenger _messenger, uint32 _gasLimit) {
dispatcher = _dispatcher;
messenger = _messenger;
gasLimit = _gasLimit;
}

function initialize(IL2Receiver _l2Receiver) external initializer {
l2Receiver = _l2Receiver;
}

/**
* @notice Sends data to the L2 receiver contract via the messenger.
* @param target The address of the target contract on L2.
* @param data The data to be sent to the target contract.
*/
function sendData(address target, bytes calldata data) external {
require(dispatcher == msg.sender, "Unauthorized caller");
bytes memory payload = abi.encode(target, data);
bytes memory callData = abi.encodeWithSelector(l2Receiver.recvData.selector, payload);
messenger.sendMessage(address(l2Receiver), callData, gasLimit);
}
}
50 changes: 50 additions & 0 deletions contracts/contracts/coordination/OpL2Receiver.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// SPDX-License-Identifier: AGPL-3.0-or-later

pragma solidity ^0.8.0;

import "@openzeppelin-upgradeable/contracts/proxy/utils/Initializable.sol";
import "./IL2Receiver.sol";

interface ICrossDomainMessenger {
function xDomainMessageSender() external view returns (address);
}

/**
* @title OpL2Receiver
* @notice Contract is used to receive data from the L1 sender contract via the bridge messenger.
*/
contract OpL2Receiver is IL2Receiver, Initializable {
address public immutable messenger;
address public l1Sender;

event Executed(address target, bytes result);

/**
* @param _messenger The address of the CrossDomainMessenger contract.
*/
constructor(address _messenger) {
messenger = _messenger;
}

function initialize(address _l1Sender) external initializer {
l1Sender = _l1Sender;
}

/**
* @notice Receives data from the L1 sender contract via the messenger.
* @param data The data sent from the L1 sender contract.
*/
function recvData(bytes calldata data) external {
require(messenger == msg.sender, "Not from messenger");
require(
l1Sender == ICrossDomainMessenger(messenger).xDomainMessageSender(),
"Invalid sender"
);
(address target, bytes memory callData) = abi.decode(data, (address, bytes));
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory result) = target.call(callData);
require(success, "L2 Receiver Execution failed");

emit Executed(target, result);
}
}
Loading
Loading