From 11770317e29d60612b5b6fe4a8bac03a84c856ee Mon Sep 17 00:00:00 2001 From: Severin Siffert Date: Thu, 1 Feb 2024 08:49:50 +0100 Subject: [PATCH 1/4] add compatibility for dfx 0.16.1 --- compatibility.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compatibility.json b/compatibility.json index f95e5a9..bd0a5c8 100644 --- a/compatibility.json +++ b/compatibility.json @@ -1,4 +1,12 @@ { + "0.16.1": { + "nns": { + "versions": ["0.2.1"] + }, + "sns": { + "versions": ["0.2.1"] + } + }, "0.16.0": { "nns": { "versions": ["0.2.1"] From cedf81c56d87165004a63347c812cc5778f19a3e Mon Sep 17 00:00:00 2001 From: Severin Siffert Date: Tue, 6 Feb 2024 11:49:55 +0100 Subject: [PATCH 2/4] update revision --- extensions-utils/src/dependencies/download_ic_binaries.rs | 2 +- extensions/nns/build.rs | 2 +- extensions/sns/build.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions-utils/src/dependencies/download_ic_binaries.rs b/extensions-utils/src/dependencies/download_ic_binaries.rs index 4b1aa02..d9858fe 100644 --- a/extensions-utils/src/dependencies/download_ic_binaries.rs +++ b/extensions-utils/src/dependencies/download_ic_binaries.rs @@ -20,7 +20,7 @@ pub fn download_ic_binary(replica_rev: &str, binary_name: &str, destination_path }; let url = format!( - "https://download.dfinity.systems/ic/{replica_rev}/openssl-static-binaries/{arch}-{os}/{binary_name}.gz", + "https://download.dfinity.systems/ic/{replica_rev}/binaries/{arch}-{os}/{binary_name}.gz", arch = arch, os = os, binary_name = binary_name, diff --git a/extensions/nns/build.rs b/extensions/nns/build.rs index 22f3e5e..1706503 100644 --- a/extensions/nns/build.rs +++ b/extensions/nns/build.rs @@ -1,7 +1,7 @@ use std::env; use std::path::PathBuf; -const REPLICA_REV: &str = "f99495f3772d5a85d25ef5008179b49a5f12c5c2"; +const REPLICA_REV: &str = "044cfd5147fc97d7e5a214966941b6580c325d72"; const BINARY_DEPENDENCIES: &[(&str, &str)] = &[ // (downloaded binary name, renamed binary name) diff --git a/extensions/sns/build.rs b/extensions/sns/build.rs index 41561cd..2a36e1b 100644 --- a/extensions/sns/build.rs +++ b/extensions/sns/build.rs @@ -1,7 +1,7 @@ use std::env; use std::path::PathBuf; -const REPLICA_REV: &str = "f99495f3772d5a85d25ef5008179b49a5f12c5c2"; +const REPLICA_REV: &str = "044cfd5147fc97d7e5a214966941b6580c325d72"; const BINARY_DEPENDENCIES: &[(&str, &str)] = &[ // (downloaded binary name, renamed binary name) From 99246222ba7cf5c538539a3c27ef7250df629cc5 Mon Sep 17 00:00:00 2001 From: Severin Siffert Date: Tue, 6 Feb 2024 11:50:27 +0100 Subject: [PATCH 3/4] replace valid init.yml with an actually valid one --- .../sns/e2e/assets/sns/valid/sns_v2.yml | 146 +++++++++++------- 1 file changed, 94 insertions(+), 52 deletions(-) diff --git a/extensions/sns/e2e/assets/sns/valid/sns_v2.yml b/extensions/sns/e2e/assets/sns/valid/sns_v2.yml index 590ceb4..f596891 100644 --- a/extensions/sns/e2e/assets/sns/valid/sns_v2.yml +++ b/extensions/sns/e2e/assets/sns/valid/sns_v2.yml @@ -1,64 +1,106 @@ name: Daniel description: > - The best software engineer you ever did saw. + The best software engineer you ever did saw. logo: logo.png -url: https://forum.dfinity.org/ +url: https://some-link-to-a-project.org + NnsProposal: - title: "Proposal to Create an SNS named Daniel" - url: "https://forum.dfinity.org/" - summary: "This is just a short summary, but I think it's pretty good." -Principals: [] + title: "Proposal to Create an SNS named Daniel" + url: "https://forum.dfinity.org/thread-where-this-sns-is-discussed" + summary: "This is just a short summary, but I think it's pretty good." + + +Principals: + - id: 5zxxw-63ouu-faaaa-aaaap-4ai + name: Bruce Wayne + email: batman@superherosinc.com + - id: uqf5l-jukmu-fqaaa-aaaap-4ai + name: Alfred Pennyworth + - id: c2n4r-wni5m-dqaaa-aaaap-4ai + name: employees (canister) + - id: ucm27-3lxwy-faaaa-aaaap-4ai + name: departments (canister) + fallback_controller_principals: - - hpikg-6exdt-jn33w-ndty3-fc7jc-tl2lr-buih3-cs3y7-tftkp-sfp62-gqe + - 5zxxw-63ouu-faaaa-aaaap-4ai # TODO: Bruce Wayne + dapp_canisters: [] + Token: - name: Batman - symbol: BTM - transaction_fee: 10_000 e8s - logo: logo.png + name: Batman + symbol: BTM + transaction_fee: 10_000 e8s + logo: logo.png + Proposals: - rejection_fee: 1 token - initial_voting_period: 4d - maximum_wait_for_quiet_deadline_extension: 1 day + rejection_fee: 1 token + initial_voting_period: 4d + maximum_wait_for_quiet_deadline_extension: 1 day + Neurons: - minimum_creation_stake: 61800 e8s + minimum_creation_stake: 61800 e8s + Voting: - minimum_dissolve_delay: 26 weeks - MaximumVotingPowerBonuses: - DissolveDelay: - duration: 8 years - bonus: 100% - Age: - duration: 4 years - bonus: 25% - RewardRate: - initial: 10% - final: 2.25% - transition_duration: 12 years + minimum_dissolve_delay: 26 weeks + + MaximumVotingPowerBonuses: + DissolveDelay: + duration: 8 years + bonus: 100% + + Age: + duration: 4 years + bonus: 25% + + RewardRate: + initial: 10% + final: 2.25% + transition_duration: 12 years + Distribution: - Neurons: - - principal: dktcs-d43lz-rosn2-wnwsj-kef34-6kl3i-ux7qb-ka6xr-biref-ykeaj-sqe - stake: 15 tokens - memo: 0 - dissolve_delay: 1 years - vesting_period: 1 year 1 second - InitialBalances: - governance: 60 tokens - swap: 40 tokens - total: 115 tokens # 60 + 40 + 15 + + Neurons: + + - principal: 5zxxw-63ouu-faaaa-aaaap-4ai # TODO: Bruce Wayne + stake: 15 tokens + memo: 42 + # TODO: Add support for non-integer numbers in duration strings? + dissolve_delay: 1 years + vesting_period: 1 year 1 second + + - principal: uqf5l-jukmu-fqaaa-aaaap-4ai # TODO: Alfred Pennyworth + stake: 14.9 tokens + dissolve_delay: 52 weeks + vesting_period: 53 weeks + + InitialBalances: + governance: 60 tokens + swap: 40 tokens + + # Optional, but highly recommended. This is a literal + # checksum. + total: 129.9 tokens # 60 + 40 + 15 + 14.9 + Swap: - minimum_participants: 50 - minimum_icp: 123 tokens - maximum_icp: 65000 tokens - minimum_participant_icp: 650 tokens - maximum_participant_icp: 6500 tokens - confirmation_text: Hello, world? - restricted_countries: - - US - - CH - VestingSchedule: - events: 83 - interval: 17 days - start_time: 12:00 UTC - duration: 7 days - neurons_fund_investment_icp: 1_000 tokens + minimum_participants: 50 + + minimum_direct_participation_icp: 113 tokens + maximum_direct_participation_icp: 64990 tokens + + minimum_participant_icp: 650 tokens + maximum_participant_icp: 6500 tokens + + confirmation_text: Hello, world? + + restricted_countries: + - US + - CH + + VestingSchedule: + events: 83 + interval: 17 days + + start_time: 12:00 UTC + duration: 7 days + + neurons_fund_participation: true \ No newline at end of file From 60371bb406b8948e34f64fb775d18a315eaf5264 Mon Sep 17 00:00:00 2001 From: Severin Siffert Date: Tue, 6 Feb 2024 13:16:31 +0100 Subject: [PATCH 4/4] fix new panic format --- extensions/nns/e2e/tests/nns.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/nns/e2e/tests/nns.bash b/extensions/nns/e2e/tests/nns.bash index b9f3dfa..2297c1d 100755 --- a/extensions/nns/e2e/tests/nns.bash +++ b/extensions/nns/e2e/tests/nns.bash @@ -25,7 +25,8 @@ teardown() { # it panics, but still shows help run "$(dfx cache show)/extensions/nns/ic-nns-init" --help assert_failure - assert_output --partial "thread 'main' panicked at 'Illegal arguments:" + assert_output --partial "thread 'main' panicked" + assert_output --partial "Illegal arguments:" assert_output --partial "ic-nns-init [OPTIONS]" assert_output --regexp "-h, --help.*Print help information" assert_output --regexp '--version.*Print version information'