Skip to content

Conversation

@KPrasch
Copy link
Member

@KPrasch KPrasch commented Jun 10, 2025

Type of PR:
Feature

Required reviews:
1

@KPrasch KPrasch requested review from Copilot and derekpierre June 10, 2025 14:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new CLI command for forming a signing cohort and updates the constants to support testnet providers.

  • Added a new CLI command "form-signing-cohort" in scripts/form_signing_cohort.py.
  • Introduced the TESTNET_PROVIDERS mapping in deployment/constants.py to support different domains.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
scripts/form_signing_cohort.py Added command line options and transaction initiation logic
deployment/constants.py Added TESTNET_PROVIDERS constant mapping
Comments suppressed due to low confidence (1)

scripts/form_signing_cohort.py:70

  • The domain parameter is validated using click.Choice(SUPPORTED_TACO_DOMAINS) but is later restricted to LYNX and TAPIR. Ensure that the allowed domain values remain consistent across the code.
    if domain not in (LYNX, TAPIR):

threshold,
chain_id,
auto,
condition_file,
Copy link

Copilot AI Jun 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'condition_file' parameter is defined but not utilized within the function body. Consider either removing it or adding logic to handle the condition configuration if intended.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ Guess we can remove condition_file.

Adding the condition can be done in a separate script - I don't think you can add the conditions until the cohort is deemed active i.e. the ritual is completed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"--duration",
"-t",
help="Duration of the cohort in seconds. Must be at least 24h.",
type=MinInt(1),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in seconds i.e.

Suggested change
type=MinInt(1),
type=MinInt(60*60*24),

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 70 to 72
if domain not in (LYNX, TAPIR):
raise click.ClickException(f"Unsupported domain: {domain}. Supported domains are: {SUPPORTED_TACO_DOMAINS}")
providers = TESTNET_PROVIDERS[domain]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(LYNX, TAPIR) is different from SUPPORTED_TACO_DOMAINS (which includes mainnet), right? So a bit of a contradiction here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

threshold,
chain_id,
auto,
condition_file,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ Guess we can remove condition_file.

Adding the condition can be done in a separate script - I don't think you can add the conditions until the cohort is deemed active i.e. the ritual is completed.

transactor = Transactor(account=account, autosign=auto)
signing_coordinator = registry.get_contract(domain=domain, contract_name="SigningCoordinator")

result = transactor.transact(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

raise click.ClickException("Condition file is empty or not provided.")

if domain not in (LYNX, TAPIR):
raise click.ClickException(f"Unsupported domain: {domain}. Supported domains are: {SUPPORTED_TACO_DOMAINS}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here about mismatch between SUPPORTED_TACO_DOMAINS (which includes mainnet) and (LYNX, TAPIR).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

print(f"Setting conditions for cohort {cohort_id} on {domain}:{network} with chain ID {chain_id}")

transactor = Transactor(account=account, autosign=auto)
signing_coordinator = registry.get_contract(domain=domain, contract_name="SigningCoordinator")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@KPrasch KPrasch marked this pull request as ready for review June 17, 2025 11:53
Copy link
Member

@derekpierre derekpierre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎸

@KPrasch KPrasch merged commit 220dc46 into nucypher:signing Jun 18, 2025
2 checks passed
@derekpierre derekpierre mentioned this pull request Jun 18, 2025
23 tasks
derekpierre pushed a commit that referenced this pull request Aug 8, 2025
derekpierre pushed a commit that referenced this pull request Aug 8, 2025
derekpierre pushed a commit that referenced this pull request Aug 8, 2025
derekpierre pushed a commit that referenced this pull request Aug 8, 2025
derekpierre pushed a commit that referenced this pull request Aug 19, 2025
derekpierre pushed a commit that referenced this pull request Aug 19, 2025
derekpierre pushed a commit that referenced this pull request Nov 14, 2025
derekpierre pushed a commit that referenced this pull request Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants