Error when deploying SNS testflight to mainnet

I’m trying to run the following command:

dfx sns deploy-testflight --init-config-file="sns_init.yaml" --network ic

when I do, i get the following error:

Error encountered when generating the SnsInitPayload: Unable to parse contents of "sns_init.yaml": did not find expected key at line 68 column 3, while parsing a block mapping at line 62 column 1
Error: Extension exited with non-zero status code '1'.

Does anyone know what would be causing this error?
@lara perhaps?

here is the link to the .yaml file:

Hi @Jesse,

you might need to upgrade your version of the sns extension in dfx.

To do that, you could run two commands:

dfx extension uninstall sns
dfx extension install sns

You should see this output: Extension 'sns' version 0.4.7 installed successfully.

With version 0.4.7, the tool provides the following feedback:

  • (“pd-logo.png”): No such file or directory — I then ran touch pd-logo.png to see what else would fail).
  • Error: The following PrincipalIds have a dissolve_delay_seconds configured greater than the allowed max_dissolve_delay_seconds (31557600): [ctxle-npx2f-chovw-pd6nx-m3l22-kqhk3-i4hj4-6tdub-s54lz-hcrbk-rae]
  • SnsMetadata.description must be less than 2000 characters

Please let us know if you have further questions.

3 Likes

@aterga now, when I run the following command:

dfx sns deploy-testflight --init-config-file="sns_init.yaml" --network ic

I get this error message:

Error: Could not build canister init payloads: Error in validate_all_post_execution_swap_parameters_are_set: The one-proposal SNS initialization requires some SnsInitPayload parameters to be Some. But the following fields were set to None: nns_proposal_id, swap_start_timestamp_seconds, swap_due_timestamp_seconds
Error: nns_proposal_id must be specified
Error: swap_start_timestamp_seconds must be specified
Error: Extension exited with non-zero status code '1'.

I’m following the steps laid out here but it appears there may be a step missing.

how do I go about setting the missing parameters: nns_proposal_id, swap_start_timestamp_seconds, swap_due_timestamp_seconds?

Also @aterga, at what point do i specify the wallet addresses where the $ICP that is raised from the SNS swap is supposed to be sent to? I don’t see any mention of it in the SNS documentation

@diegop @lara, are either of you able to ping someone available to help me resolve this issue?

Hi @Jesse,

Indeed there seems to have been a bug in the testflight subcommand of the sns cli tool. We fixed the bug (thanks, @Andre-Popovitch). While the fix is not yet released as part of the dfx sns extension, you could already download the fixed binary directly:

case "$(uname -sr)" in
   Darwin*)
     export OS="darwin"
     ;;

   Linux*Microsoft*)
     export OS="linux"
     ;;

   Linux*)
     export OS="linux"
     ;;

   *)
     echo "Unknown OS!"
     ;;
esac
IC_COMMIT=aac42c05675378734cbd21cf73a9979c3cd253df
curl --fail -L "https://download.dfinity.systems/ic/${IC_COMMIT}/binaries/x86_64-${OS}/sns.gz" -o sns.gz
gzip -fd sns.gz
chmod +x sns

Then just run ./sns ... instead of dfx sns ... while following the instructions.


I’ve then noticed that the developer neurons are not being printed by the tool (perhaps another bug; will try to fix it soon). For now, you could get the information about the developer neurons that can be used to operate an SNS in testflight mode via the following command:

dfx canister \
    call sns_governance list_neurons \
        '(record { of_principal = null; limit = 0 : nat32; start_page_at = null })' \
        | idl2json | jq