Skip to content
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

sns-testing subcommands #7

Open
wants to merge 4 commits into
base: serokell/sns-testing
Choose a base branch
from

Conversation

rvem
Copy link
Member

@rvem rvem commented Mar 19, 2025

This PR adds two subcommands to the sns-testing binary:

  1. To validate that the provided IC network is suitable for running sns-testing-related scenarios.
  2. To complete the swap for the newly created SNS.

@rvem rvem requested a review from sras March 19, 2025 10:07
@rvem rvem self-assigned this Mar 19, 2025
}

#[derive(Debug, Parser)]
pub enum SnsTestingSubCommand {
Copy link
Member Author

Choose a reason for hiding this comment

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

Perhaps, it's worth splitting the sns-testing into two binaries: one to do the init part, and the other to run "scenarios"

@rvem rvem force-pushed the rvem/sns-testing-subcommands branch from b2a8929 to 3ae1280 Compare March 19, 2025 10:20
@rvem rvem force-pushed the serokell/sns-testing branch from 3c8c66a to ee3a1fd Compare March 20, 2025 10:25
@rvem rvem force-pushed the rvem/sns-testing-subcommands branch from c8e88ad to 5023804 Compare March 20, 2025 11:06
rvem added 2 commits March 20, 2025 13:22
Currently, 'sns-testing' is only capable of deploying hardcoded SNS with
the provided SNS-controlled canister. This makes it impossible to tweak
SNS settings without recompiling 'sns-testing'.

The suggested way to create SNSes is to use 'dfx sns propose' command.
To support the workflow to deploy SNSes using this command,
'sns-testing' CLI was extended with the subcommand to complete the swap
for the created SNS.

'sns-testing run swap-complete' will wait for swap to be open, generate
required number of participation with sufficient amount of tokens to
complete the swap, and wait for swap to be completed.
@rvem rvem force-pushed the rvem/sns-testing-subcommands branch from 5023804 to 0d1a794 Compare March 20, 2025 12:22
Extract NNS init part into a dedicated binary to simplify the interface.
@rvem rvem force-pushed the rvem/sns-testing-subcommands branch from 0d1a794 to 96af6f0 Compare March 20, 2025 12:25

The suggested way to do this is to use `dfx sns propose` command. For more information please refer to the [documentation](https://internetcomputer.org/docs/building-apps/governing-apps/launching/launch-steps-1proposal#3-submit-nns-proposal-to-create-sns).

Make use to use `sns-testing` identity when creating the proposal.
Copy link
Member

Choose a reason for hiding this comment

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

Something seems off with this sentence.

Copy link
Member Author

Choose a reason for hiding this comment

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

s/use/sure/, apparently 😅

bazel run //rs/sns/testing:sns-testing -- --network http://127.0.0.1:8080 swap-complete --sns-name "<SNS name>" --follow-principal-neurons "$(dfx identity get-principal --identity sns-testing)"
```

This command will generate required number of participations with the sufficient amount of direct participations to complete the swap.
Copy link
Member

Choose a reason for hiding this comment

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

required number of participations

Not sure if you meant "participants" here.

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