-
Notifications
You must be signed in to change notification settings - Fork 12
Signing Cohort Formation #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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):
scripts/form_signing_cohort.py
Outdated
| threshold, | ||
| chain_id, | ||
| auto, | ||
| condition_file, |
Copilot
AI
Jun 10, 2025
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
scripts/form_signing_cohort.py
Outdated
| "--duration", | ||
| "-t", | ||
| help="Duration of the cohort in seconds. Must be at least 24h.", | ||
| type=MinInt(1), |
There was a problem hiding this comment.
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.
| type=MinInt(1), | |
| type=MinInt(60*60*24), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
scripts/form_signing_cohort.py
Outdated
| if domain not in (LYNX, TAPIR): | ||
| raise click.ClickException(f"Unsupported domain: {domain}. Supported domains are: {SUPPORTED_TACO_DOMAINS}") | ||
| providers = TESTNET_PROVIDERS[domain] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
scripts/form_signing_cohort.py
Outdated
| threshold, | ||
| chain_id, | ||
| auto, | ||
| condition_file, |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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}") |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
derekpierre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎸
Type of PR:
Feature
Required reviews:
1