Reduce number of participants when testing SNS in local testing environment

,

I’m trying to limit the number of participants to 10 when testing SNS in my local environment. I modified the file run_basic_scenario.sh by changing this line of code from this:

./participate_sns_swap.sh

to this

./participate_sns_swap.sh 10

However, upon running the basic scenario, docker exec $SNS_TESTING_INSTANCE bash run_basic_scenario.sh, it defaults to using the identity default after the 10th participant, and it’s now running forever. This is a screenshot of the result

Could someone help me identify what might be causing this issue?

Thanks for bringing this up. We are looking into this and will get back with you when we know more.

The swap goes into the “committed” state when there has been enough participation by enough users within the specified time. Only in this state can the SNS deployment continue.

I think what’s happening here is that, because you reduced the number of participants to 10 users, the swap is not going to ever enter the “committed” state.

Then there is this line:

while [ "$(./get_sns_swap_state.sh | ./bin/idl2json | jq -r '.swap[0].lifecycle')" != "3" ]; do sleep 1; done

Which waits for it to enter the committed state. I haven’t verified this yet, but probably ./get_sns_swap_state.sh is what is printing Using identity: "Default".

This is just speculation, but tomorrow I or another NNS team member will verify it. In the meantime, could you tell me why you were limiting the participation to 10?

2 Likes

Each time I ran the script, it took as long as an hour to get to the 99th participant, and it froze from there. By limiting the participants to 10, I hoped to finish the process as quick as possible. And I also think it’s not as resource intensive.

Hi @Nimakra,

Andre is right, if you lower the number of participants, you should also make some adjustments in here: sns-testing/example_sns_init.yaml at main · dfinity/sns-testing · GitHub

I particular,

  • minimum_participants: 57 should be lowered to 10,
  • maximum_direct_participation_icp: 1_000_000 tokens and maximum_participant_icp: 10_000 tokens together mean that 10 participants cannot contribute enough ICP to make the swap finalize instantly (consider lowering the maximum_direct_participation_icp to 100_000).

Note that I didn’t test that the above suggestions are enough to make it work. I’ll try to find time to test it, but feel free to try it out independently, and please get back to us if you get stuck again.

Hello,

I tried reducing the figures in example_sns_init.yaml just as you said :point_down:

I then tried changing the environment variables in participate_sns_swap.sh :point_down:

However, the result is still the same. I’m still getting Using identity: "Default" after the 10th participant.

I’m also not sure if it’s my hardware or docker setup, but running docker exec $SNS_TESTING_INSTANCE bash run_basic_scenario.sh is taking as large as 40GB of my disk space, which is why I wanted to run it with fewer participants. I’m using the latest version of WSL.