-
Notifications
You must be signed in to change notification settings - Fork 380
chore(nns): add support in release scripts for node-rewards canister #4252
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
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
3e2a350
chore(nns): add support in release scripts for node-rewards canister
max-dfinity e62c55b
Add constants
max-dfinity 83a45ab
Add to scripts to do updates
max-dfinity 249b31f
various fixes and additions
max-dfinity 24e6964
add helper for testing
max-dfinity c42933d
Fix test helpers so they compile
max-dfinity df8f0d3
Add canisters to protocol canisters list
max-dfinity 2f2783f
Adding latest release, generated by script
max-dfinity 9db3d88
Add to more workflows
max-dfinity cde809f
Add canister to nightly upgrade test
max-dfinity a95dcc2
make imports consistent
max-dfinity cac361c
Fix integration tests
max-dfinity e845ed2
Fix build
max-dfinity 4707f47
Update function to use better behavior (fewer potential conflicts wit…
max-dfinity 1ce0547
Attempt to fix the tests
max-dfinity 3a1c291
mini formatting fix
max-dfinity 05b7163
fix function
max-dfinity 76ae152
fix tests
max-dfinity 76ee7dd
Fix another test
max-dfinity 6695c25
Fix test
max-dfinity a4b26b6
Fix assertion to reflect new reality
max-dfinity 476fa91
Fix another test
max-dfinity 63d16c0
Change approach
max-dfinity a6f4e76
Clippy
max-dfinity 801fe51
Improve test
max-dfinity 7c7771b
clippy
max-dfinity 23fbf13
clippy
max-dfinity af0153a
Try to fix test
max-dfinity 5c2db81
Attempt fixing test
max-dfinity b5c266b
fix test
max-dfinity 91ef868
Minor fixes
max-dfinity 62d87b4
Test optimizations
max-dfinity 1655030
Another set of small fixes (reduce the amount of unneeded error loggi…
max-dfinity File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,8 @@ pub const LEDGER_INDEX_CANISTER_INDEX_IN_NNS_SUBNET: u64 = 11; | |
| pub const ICP_LEDGER_ARCHIVE_1_CANISTER_INDEX_IN_NNS_SUBNET: u64 = 12; | ||
| pub const SUBNET_RENTAL_CANISTER_INDEX_IN_NNS_SUBNET: u64 = 13; | ||
| pub const ICP_LEDGER_ARCHIVE_2_CANISTER_INDEX_IN_NNS_SUBNET: u64 = 14; | ||
| pub const ICP_LEDGER_ARCHIVE_3_CANISTER_INDEX_IN_NNS_SUBNET: u64 = 15; | ||
| pub const NODE_REWARDS_CANISTER_INDEX_IN_NNS_SUBNET: u64 = 16; | ||
| // Exchange Rate, Cycles Ledger (Index) Canisters are deployed to the II subnet. | ||
| pub const EXCHANGE_RATE_CANISTER_INDEX: u64 = 0x2100001; | ||
| pub const CYCLES_LEDGER_CANISTER_INDEX: u64 = 0x2100002; | ||
|
|
@@ -115,6 +117,12 @@ pub const SUBNET_RENTAL_CANISTER_ID: CanisterId = | |
| /// 14: q4eej-kyaaa-aaaaa-aaaha-cai | ||
| pub const ICP_LEDGER_ARCHIVE_2_CANISTER_ID: CanisterId = | ||
| CanisterId::from_u64(ICP_LEDGER_ARCHIVE_2_CANISTER_INDEX_IN_NNS_SUBNET); | ||
| // 15: q3fc5-haaaa-aaaaa-aaahq-cai | ||
| pub const ICP_LEDGER_ARCHIVE_3_CANISTER_ID: CanisterId = | ||
| CanisterId::from_u64(ICP_LEDGER_ARCHIVE_3_CANISTER_INDEX_IN_NNS_SUBNET); | ||
| // 16: sgymv-uiaaa-aaaaa-aaaia-cai | ||
| pub const NODE_REWARDS_CANISTER_ID: CanisterId = | ||
| CanisterId::from_u64(NODE_REWARDS_CANISTER_INDEX_IN_NNS_SUBNET); | ||
| /// 0x2_100_001 (34_603_009): uf6dk-hyaaa-aaaaq-qaaaq-cai | ||
| pub const EXCHANGE_RATE_CANISTER_ID: CanisterId = | ||
| CanisterId::from_u64(EXCHANGE_RATE_CANISTER_INDEX); | ||
|
|
@@ -139,7 +147,7 @@ pub const SNS_AGGREGATOR_CANISTER_ID: CanisterId = | |
| /// | ||
| /// As of May 2024, it looks like this is only used by (a whole bunch of) tests, mostly as the | ||
| /// argument to send_whitelist. | ||
| pub const ALL_NNS_CANISTER_IDS: [&CanisterId; 10] = [ | ||
| pub const ALL_NNS_CANISTER_IDS: [&CanisterId; 17] = [ | ||
| ®ISTRY_CANISTER_ID, | ||
| &GOVERNANCE_CANISTER_ID, | ||
| &LEDGER_CANISTER_ID, | ||
|
|
@@ -149,7 +157,14 @@ pub const ALL_NNS_CANISTER_IDS: [&CanisterId; 10] = [ | |
| &GENESIS_TOKEN_CANISTER_ID, | ||
| &IDENTITY_CANISTER_ID, | ||
| &NNS_UI_CANISTER_ID, | ||
| &ICP_LEDGER_ARCHIVE_CANISTER_ID, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's a bit confusing to me to have zero based indexing but then not call this |
||
| &SNS_WASM_CANISTER_ID, | ||
| &LEDGER_INDEX_CANISTER_ID, | ||
| &ICP_LEDGER_ARCHIVE_1_CANISTER_ID, | ||
| &SUBNET_RENTAL_CANISTER_ID, | ||
| &ICP_LEDGER_ARCHIVE_2_CANISTER_ID, | ||
| &ICP_LEDGER_ARCHIVE_3_CANISTER_ID, | ||
| &NODE_REWARDS_CANISTER_ID, | ||
| ]; | ||
|
|
||
| // The memory allocation for the ledger, governance and registry canisters | ||
|
|
@@ -190,12 +205,14 @@ pub fn canister_id_to_nns_canister_name(canister_id: CanisterId) -> String { | |
| GOVERNANCE_CANISTER_ID => "governance", | ||
| ICP_LEDGER_ARCHIVE_1_CANISTER_ID => "icp-ledger-archive-1", | ||
| ICP_LEDGER_ARCHIVE_2_CANISTER_ID => "icp-ledger-archive-2", | ||
| ICP_LEDGER_ARCHIVE_3_CANISTER_ID => "icp-ledger-archive-3", | ||
| ICP_LEDGER_ARCHIVE_CANISTER_ID => "icp-ledger-archive", | ||
| IDENTITY_CANISTER_ID => "identity", | ||
| LEDGER_CANISTER_ID => "ledger", | ||
| LEDGER_INDEX_CANISTER_ID => "ledger-index", | ||
| LIFELINE_CANISTER_ID => "lifeline", | ||
| NNS_UI_CANISTER_ID => "nns-ui", | ||
| NODE_REWARDS_CANISTER_ID => "node-rewards", | ||
| REGISTRY_CANISTER_ID => "registry", | ||
| ROOT_CANISTER_ID => "root", | ||
| SNS_WASM_CANISTER_ID => "sns-wasm", | ||
|
|
@@ -205,7 +222,7 @@ pub fn canister_id_to_nns_canister_name(canister_id: CanisterId) -> String { | |
| id_to_name.len(), | ||
| // Because 0 through 14 accounts for the first 15 canister + | ||
| // 1 for exchange rate canister. | ||
| 16, | ||
| 18, | ||
| "{:#?}", | ||
| id_to_name | ||
| ); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.