ICP Ledger Canister Suite Upgrades 2025-01-31

The Financial Integrations team has submitted the following proposals today, 2025-01-31 for upgrading the ICP Ledger canister suite. DFINITY plans to vote on these proposals on Monday.

ICP index (proposal 135057):

Proposal to upgrade the ICP index canister

Repository: https://github.com/dfinity/ic.git

Release: Release ledger-suite-icp-2025-01-30 · dfinity/ic · GitHub

Git hash: 6bc1943fc5bcff846959025c5f3f2f7f510489cf

New compressed Wasm hash: 7a304969d53f16bc0701b48f8cc1dc9bdbb50f170ac75f85717a5341a4928592

Upgrade args hash: 0fee102bd16b053022b69f2c65fd5e2f41d150ce9c214ac8731cfaf496ebda4e

Target canister: qhbym-qaaaa-aaaaa-aaafq-cai

Previous ICP index proposal: https://dashboard.internetcomputer.org/proposal/134489


Motivation

  • Bump rust to v1.84

Upgrade args

git fetch
git checkout 6bc1943fc5bcff846959025c5f3f2f7f510489cf
cd rs/ledger_suite/icp/index
didc encode '()' | xxd -r -p | sha256sum

Release Notes

git log --format='%C(auto) %h %s' 7c6309cb5bec7ab28ed657ac7672af08a59fc1ba..6bc1943fc5bcff846959025c5f3f2f7f510489cf -- packages/icrc-ledger_types rs/ledger_suite/icp/index rs/ledger_suite/icp/src rs/ledger_suite/common/ledger_canister_core/src rs/ledger_suite/common/ledger_core rs/rust_canisters/http_types rs/rust_canisters/canister_log
215a697e14 feat: ICP-ledger: FI-1440: Implement V4 for ICP ledger - migrate balances to stable structures (#3314)
eb32930c01 test(ICP_Ledger): FI-1036: Add ICP ledger and index encoded block response compatibility (#3398)
92ae5bc28b test(ICP_Ledger): FI-1506: Remove flaky flag from ICP ledger and index tests (#3410)
c741e34945 feat: ICRC-ledger: FI-1439: Implement V4 for ICRC ledger - migrate balances to stable structures (#2901)
03a9b37a0e fix(ICP_Ledger): FI-1607: Accept variable length account identifier in account_balance query (#3094)
b1f4339d48 fix(ICP_Ledger): FI-1590: Change length type in GetBlocksArgs (#3092)

Wasm Verification

Verify that the hash of the gzipped WASM matches the proposed hash.

git fetch
git checkout 6bc1943fc5bcff846959025c5f3f2f7f510489cf
"./ci/container/build-ic.sh" "--canisters"
sha256sum ./artifacts/canisters/ic-icp-index-canister.wasm.gz

ICP ledger (proposal 135058):

Proposal to upgrade the ICP ledger canister

Repository: https://github.com/dfinity/ic.git

Release: Release ledger-suite-icp-2025-01-30 · dfinity/ic · GitHub

Git hash: 6bc1943fc5bcff846959025c5f3f2f7f510489cf

New compressed Wasm hash: 6dae518b33ef5814462ff921e81d13acd5e7a8f4e383ab849d87a33b0a608b08

Upgrade args hash: 0fee102bd16b053022b69f2c65fd5e2f41d150ce9c214ac8731cfaf496ebda4e

Target canister: ryjl3-tyaaa-aaaaa-aaaba-cai

Previous ICP ledger proposal: https://dashboard.internetcomputer.org/proposal/134492


Motivation

  • Migrate the account balances to stable structures
  • Accept variable length account identifier in account_balance query
  • Change length type in GetBlocksArgs
  • Bump rust to v1.84

Upgrade args

git fetch
git checkout 6bc1943fc5bcff846959025c5f3f2f7f510489cf
cd rs/ledger_suite/icp
didc encode '()' | xxd -r -p | sha256sum

Release Notes

git log --format='%C(auto) %h %s' 7c6309cb5bec7ab28ed657ac7672af08a59fc1ba..6bc1943fc5bcff846959025c5f3f2f7f510489cf -- packages/icrc-ledger_types rs/ledger_suite/icp/ledger/src rs/ledger_suite/icp/src rs/ledger_suite/common/ledger_canister_core/src rs/ledger_suite/common/ledger_core/src
215a697e14 feat: ICP-ledger: FI-1440: Implement V4 for ICP ledger - migrate balances to stable structures (#3314)
c741e34945 feat: ICRC-ledger: FI-1439: Implement V4 for ICRC ledger - migrate balances to stable structures (#2901)
03a9b37a0e fix(ICP_Ledger): FI-1607: Accept variable length account identifier in account_balance query (#3094)
b1f4339d48 fix(ICP_Ledger): FI-1590: Change length type in GetBlocksArgs (#3092)

Wasm Verification

Verify that the hash of the gzipped WASM matches the proposed hash.

git fetch
git checkout 6bc1943fc5bcff846959025c5f3f2f7f510489cf
"./ci/container/build-ic.sh" "--canisters"
sha256sum ./artifacts/canisters/ledger-canister_notify-method.wasm.gz

ICP archive1 (proposal 135059):

Proposal to upgrade the ICP archive1 canister

Repository: https://github.com/dfinity/ic.git

Release: Release ledger-suite-icp-2025-01-30 · dfinity/ic · GitHub

Git hash: 6bc1943fc5bcff846959025c5f3f2f7f510489cf

New compressed Wasm hash: 09c5b0098aa0bf5bad7c777472542fce7146b45296a914469f03b146891751bb

Upgrade args hash: 0fee102bd16b053022b69f2c65fd5e2f41d150ce9c214ac8731cfaf496ebda4e

Target canister: qjdve-lqaaa-aaaaa-aaaeq-cai

Previous ICP archive1 proposal: https://dashboard.internetcomputer.org/proposal/134493


Motivation

  • Bump rust to v1.84

Upgrade args

git fetch
git checkout 6bc1943fc5bcff846959025c5f3f2f7f510489cf
cd rs/ledger_suite/icp
didc encode '()' | xxd -r -p | sha256sum

Release Notes

git log --format='%C(auto) %h %s' 7c6309cb5bec7ab28ed657ac7672af08a59fc1ba..6bc1943fc5bcff846959025c5f3f2f7f510489cf -- packages/icrc-ledger_types rs/ledger_suite/icp/archive rs/ledger_suite/icp/src rs/ledger_suite/common/ledger_canister_core rs/ledger_suite/common/ledger_core
215a697e14 feat: ICP-ledger: FI-1440: Implement V4 for ICP ledger - migrate balances to stable structures (#3314)
2c79ddcfd8 feat(PocketIC): new call response types (#3425)
c741e34945 feat: ICRC-ledger: FI-1439: Implement V4 for ICRC ledger - migrate balances to stable structures (#2901)
03a9b37a0e fix(ICP_Ledger): FI-1607: Accept variable length account identifier in account_balance query (#3094)
b1f4339d48 fix(ICP_Ledger): FI-1590: Change length type in GetBlocksArgs (#3092)

Wasm Verification

Verify that the hash of the gzipped WASM matches the proposed hash.

git fetch
git checkout 6bc1943fc5bcff846959025c5f3f2f7f510489cf
"./ci/container/build-ic.sh" "--canisters"
sha256sum ./artifacts/canisters/ledger-archive-node-canister.wasm.gz

ICP archive2 (proposal 135060):

Proposal to upgrade the ICP archive2 canister

Repository: https://github.com/dfinity/ic.git

Release: Release ledger-suite-icp-2025-01-30 · dfinity/ic · GitHub

Git hash: 6bc1943fc5bcff846959025c5f3f2f7f510489cf

New compressed Wasm hash: 09c5b0098aa0bf5bad7c777472542fce7146b45296a914469f03b146891751bb

Upgrade args hash: 0fee102bd16b053022b69f2c65fd5e2f41d150ce9c214ac8731cfaf496ebda4e

Target canister: qsgjb-riaaa-aaaaa-aaaga-cai

Previous ICP archive2 proposal: https://dashboard.internetcomputer.org/proposal/134494


Motivation

  • Bump rust to v1.84

Upgrade args

git fetch
git checkout 6bc1943fc5bcff846959025c5f3f2f7f510489cf
cd rs/ledger_suite/icp
didc encode '()' | xxd -r -p | sha256sum

Release Notes

git log --format='%C(auto) %h %s' 7c6309cb5bec7ab28ed657ac7672af08a59fc1ba..6bc1943fc5bcff846959025c5f3f2f7f510489cf -- packages/icrc-ledger_types rs/ledger_suite/icp/archive rs/ledger_suite/icp/src rs/ledger_suite/common/ledger_canister_core rs/ledger_suite/common/ledger_core
215a697e14 feat: ICP-ledger: FI-1440: Implement V4 for ICP ledger - migrate balances to stable structures (#3314)
2c79ddcfd8 feat(PocketIC): new call response types (#3425)
c741e34945 feat: ICRC-ledger: FI-1439: Implement V4 for ICRC ledger - migrate balances to stable structures (#2901)
03a9b37a0e fix(ICP_Ledger): FI-1607: Accept variable length account identifier in account_balance query (#3094)
b1f4339d48 fix(ICP_Ledger): FI-1590: Change length type in GetBlocksArgs (#3092)

Wasm Verification

Verify that the hash of the gzipped WASM matches the proposed hash.

git fetch
git checkout 6bc1943fc5bcff846959025c5f3f2f7f510489cf
"./ci/container/build-ic.sh" "--canisters"
sha256sum ./artifacts/canisters/ledger-archive-node-canister.wasm.gz

ICP archive3 (proposal 135061):

Proposal to upgrade the ICP archive3 canister

Repository: https://github.com/dfinity/ic.git

Release: Release ledger-suite-icp-2025-01-30 · dfinity/ic · GitHub

Git hash: 6bc1943fc5bcff846959025c5f3f2f7f510489cf

New compressed Wasm hash: 09c5b0098aa0bf5bad7c777472542fce7146b45296a914469f03b146891751bb

Upgrade args hash: 0fee102bd16b053022b69f2c65fd5e2f41d150ce9c214ac8731cfaf496ebda4e

Target canister: q4eej-kyaaa-aaaaa-aaaha-cai

Previous ICP archive3 proposal: https://dashboard.internetcomputer.org/proposal/134495


Motivation

  • Bump rust to v1.84

Upgrade args

git fetch
git checkout 6bc1943fc5bcff846959025c5f3f2f7f510489cf
cd rs/ledger_suite/icp
didc encode '()' | xxd -r -p | sha256sum

Release Notes

git log --format='%C(auto) %h %s' 7c6309cb5bec7ab28ed657ac7672af08a59fc1ba..6bc1943fc5bcff846959025c5f3f2f7f510489cf -- packages/icrc-ledger_types rs/ledger_suite/icp/archive rs/ledger_suite/icp/src rs/ledger_suite/common/ledger_canister_core rs/ledger_suite/common/ledger_core
215a697e14 feat: ICP-ledger: FI-1440: Implement V4 for ICP ledger - migrate balances to stable structures (#3314)
2c79ddcfd8 feat(PocketIC): new call response types (#3425)
c741e34945 feat: ICRC-ledger: FI-1439: Implement V4 for ICRC ledger - migrate balances to stable structures (#2901)
03a9b37a0e fix(ICP_Ledger): FI-1607: Accept variable length account identifier in account_balance query (#3094)
b1f4339d48 fix(ICP_Ledger): FI-1590: Change length type in GetBlocksArgs (#3092)

Wasm Verification

Verify that the hash of the gzipped WASM matches the proposed hash.

git fetch
git checkout 6bc1943fc5bcff846959025c5f3f2f7f510489cf
"./ci/container/build-ic.sh" "--canisters"
sha256sum ./artifacts/canisters/ledger-archive-node-canister.wasm.gz
3 Likes

Approve Proposal 135057

Proposal

  • Canister id qhbym-qaaaa-aaaaa-aaafq-cai is indeed the icp index canister.
  • The upgrade args correspond to the empty args.
  • The install mode is indeed upgrade.
  • The wasm hash is reproducible.

Screenshot 2025-02-01 at 21.24.49

Code Review

Update GetBlocksArgs to reflect the type change of the field length.

Approve Proposal 135058

Proposal

  • Canister id ryjl3-tyaaa-aaaaa-aaaba-cai is indeed the icp ledger canister.
  • The upgrade args correspond to the empty args.
  • The install mode is indeed upgrade.
  • The wasm hash is reproducible.

Screenshot 2025-02-01 at 21.40.44

Code Review

  • Good call on removing the trimming logic and opting to store the balances map directly in stable memory. The previous implementation felt a bit hacky, and this change simplifies the logic while making the solution more robust and maintainable for the long term. Nice improvement!
  • Switching the type of length to u64 is a smart move. It removes unnecessary conversions in the from_proto method, making the code cleaner and more efficient. This is a solid optimization.

Approve Proposal 135059

Proposal

  • Canister id qjdve-lqaaa-aaaaa-aaaeq-cai is indeed the icp archive1 canister.
  • The upgrade args correspond to the empty args.
  • The install mode is indeed upgrade.
  • The wasm hash is reproducible.

Screenshot 2025-02-01 at 21.46.17

Code Review

Update GetBlocksArgs to reflect the type change of the field length.

Approve Proposal 135060

Proposal

  • Canister id qsgjb-riaaa-aaaaa-aaaga-cai is indeed the icp archive2 canister.
  • The upgrade args correspond to the empty args.
  • The install mode is indeed upgrade.
  • The wasm hash is reproducible.

Screenshot 2025-02-01 at 21.46.17

Code Review

Update GetBlocksArgs to reflect the type change of the field length.

Approve Proposal 135061

Proposal

  • Canister id q4eej-kyaaa-aaaaa-aaaha-cai is indeed the icp archive3 canister.
  • The upgrade args correspond to the empty args.
  • The install mode is indeed upgrade.
  • The wasm hash is reproducible.

Screenshot 2025-02-01 at 21.46.17

Code Review

Update GetBlocksArgs to reflect the type change of the field length.

2 Likes

proposal - 135057 – Cyberowl | CodeGov

Vote: ADOPT
Hash Match: MATCH
Feedback: NONE 
Proposer Check: MATCH
Reason: I successfully built and verified the hash. All the commit descriptions match their code changes.
Commits Summary

215a697e14
Removed the obsolete “ic-nns-inspector” crate and all its associated files and references. Updated ledger migration and storage to leverage stable structures for balances.

eb32930c01
New test check_index_and_ledger_encoded_block_compatibility.

92ae5bc28b
Matches description remove flaky flag from ICP ledger and index tests

c741e34945
Added new canister targets for ledger canisters (“ck_btc_ledger_v1/v2” and “ck_eth_ledger_v1/v2”) in the WORKSPACE and mainnet-canister-revisions files. Updated the scheduler and related configuration files to reference these new ledger versions.

03a9b37a0e
Modified the account_balance_candid_ function to accept an AccountIdentifierByteBuf and convert it into BinaryAccountBalanceArgs using a TryFrom implementation.
Enhanced tests to validate behavior for both valid (32-byte) and zero-length account identifiers.

b1f4339d48
The length field in GetBlocksArgs has been standardized to use a u64 type instead of usize across the archive, index, ledger, and test modules.

proposal - 135058 – Cyberowl | CodeGov

Vote: ADOPT
Hash Match: MATCH
Feedback: NONE 
Proposer Check: MATCH
Reason: No new commits. 
Commits Summary

[ALL DUPLICATES]

proposal - 135059 – Cyberowl | CodeGov

Vote: ADOPT
Hash Match: MATCH
Feedback: NONE 
Proposer Check: MATCH
Reason:
I successfully built and verified the hash. Commit matches description. 
Commits Summary

2c79ddcfd8
Added a new rust_doc_test target in the BUILD file to run documentation tests for the pocket-ic crate.
Replaced multiple response and error types (such as WasmResult, UserError, and CallError) with a single unified reject response type RejectResponse throughout the API.

proposal - 135060 – Cyberowl | CodeGov

Vote: ADOPT
Hash Match: MATCH
Feedback: NONE 
Proposer Check: MATCH
Reason: No new commits. 
Commits Summary

[ALL DUPLICATES]

proposal - 135061 – Cyberowl | CodeGov

Vote: ADOPT
Hash Match: MATCH
Feedback: NONE 
Proposer Check: MATCH
Reason: No new commits. 
Commits Summary

[ALL DUPLICATES]

2 Likes

Proposal #135057 for ICP index — Zack | CodeGov

Vote: Adopted

Reason: Builds fine and the wasm and arguments hash match.

-Using the V4 implementation for ICP and ICRC ledger, it migrates balances to stable structures.

-The variable length (other then 32 bytes) account identifier is now accepted in account_balance query. Adds the AccountIdentifierByteBuf Struct and a TryFrom conversion for handling account identifiers, thus it ensures Data Integrity as only valid 32-byte account identifiers are converted, provides meaningful error messages when invalid data is encountered and uses ByteBuf for better memory management over Vec.

-Changes the length type in GetBlocksArgs to use u64 type instead of usize across the Ledger Suite.

Proposal #135058 for ICP ledger — Zack | CodeGov

Vote: Adopted

Reason: Builds fine and the wasm and arguments hash match.

Same commits.

Proposal #135059 for ICP archive1 — Zack | CodeGov

Vote: Adopted

Reason: Builds fine and the wasm and arguments hash match.

2c79ddcfd8 feat(PocketIC): new call response types (#3425)
In pocket-ic one single reject response type pocket_ic::RejectResponse replaces the response types pocket_ic::WasmResult, pocket_ic::UserError, and pocket_ic::CallError .
While in pocket-ic-server the Result<RawMessageId, RejectResponse> replaced RawSubmitIngressResult and response types RawWasmResult and UserError in RawCanisterResult are replaced by Vec<u8> and RejectResponse.
It is good that the initail forum post was included for context.
Rest of the commits are the same.

Proposal #135060 for ICP archive2 — Zack | CodeGov

Vote: Adopted

Reason: Builds fine and the wasm and arguments hash match.

Same commits, obv as for archive1.

Proposal #135061 for ICP archive3 — Zack | CodeGov

Vote: Adopted

Reason: Builds fine and the wasm and arguments hash match.

Same commits, obv as for archive1.

About CodeGov (click to expand).

CodeGov has a team of developers who review and vote independently on the following proposal topics: IC-OS Version Election, Protocol Canister Management, Subnet Management, Node Admin, and Participant Management. The CodeGov NNS known neuron is configured to follow our reviewers on these topics and Synapse on most other topics. We strive to be a credible and reliable Followee option that votes on every proposal and every proposal topic in the NNS. We also support decentralization of SNS projects such as WaterNeuron and KongSwap with a known neuron and credible Followees.


Learn more about CodeGov and its mission at codegov.org.

Proposal 135057 (ICP index canister) – LaCosta | CodeGov

Vote: ADOPT

Reason:
Build successful and hashes match, commits look great and match the description. Found no issues.

[eb32930c01]: Adds the test check_index_and_ledger_encoded_block_compatibility that validates if the ICP ledger and index encoded block response types are compatible by checking if the QueryEncodedBlocksResponse is a subtype of the GetBlocksResponse type.

[92ae5bc28b]: Removes the flaky flag

[c741e34945] & [215a697e14]: Migrates account balances from the heap to stable memory. V4 implementation of the ICP ledger.

[03a9b37a0e]: Accepts account identifiers of length other than 32 bytes as input to the account_balance query, by switching the input format from BinaryAccountBalanceArgs that has the account field restricted to 32 bytes to the AccountIdentifierByteBuf format stores the account field as ByteBuf which does not make such restrictions. Implements then a TryFrom conversion to BinaryAccountBalanceArgs validating that the account identifier is exactly 32 bytes in length, otherwise returning a error message.

[b1f4339d48]: Changes the type of the length field in the ledger struct GetBlocksArgs from usize to u64.

Proposal 135058 (ICP ledger canister) – LaCosta | CodeGov

Vote: ADOPT

Reason:
Build successful and hashes match, commits look great and match the description. Found no issues.

DUPLICATE PROPOSALS

Proposal 135059 (ICP archive1 canister) – LaCosta | CodeGov

Vote: ADOPT

Reason:
Build successful and hashes match, commits look great and match the description. Found no issues.

[2c79ddcfd8]: Change the PocketIC call response types to be similar to IC agent (update/query) calls response types.

Proposal 135060 (ICP archive2 canister) – LaCosta | CodeGov

Vote: ADOPT

Reason:
Build successful and hashes match, commits look great and match the description. Found no issues.

DUPLICATE PROPOSALS

Proposal 135061 (ICP archive3 canister) – LaCosta | CodeGov

Vote: ADOPT

Reason:
Build successful and hashes match, commits look great and match the description. Found no issues.

DUPLICATE PROPOSALS

About CodeGov…

CodeGov has a team of developers who review and vote independently on the following proposal topics: IC-OS Version Election, Protocol Canister Management, Subnet Management, Node Admin, and Participant Management. The CodeGov NNS known neuron is configured to follow our reviewers on these topics and Synapse on most other topics. We strive to be a credible and reliable Followee option that votes on every proposal and every proposal topic in the NNS. We also support decentralization of SNS projects such as WaterNeuron and KongSwap with a known neuron and credible Followees.

Learn more about CodeGov and its mission at codegov.org.

Proposal 135057 - Zane | CodeGov

Vote: ADOPT
Reason: Build completes successfully, both hashes and reviewed commits match their descriptions, so I’ve decided voted to adopt.

215a697e14 Implement Storable trait for Tokens. Updated ledger_balance_store_entries metric to fetch balances from stable memory. Added memory ID for stable balances and assigned it to BALANCES_MEMORY. Extended migration logic used for allowances to also migrate balances, the instruction limit for the initial batch performed on upgrade has been bumped to 300 billion, if it is reached a timer is scheduled for the next round until all balances have been migrated. Removed logic for balance trimming as it is no longer needed and removed related fields: max_number_of_accounts and accounts_overflow_trim_quantity from LedgerCanisterInitPayloadBuilder and InitArgs structs. Delete ic-nns-inspector package.

eb32930c01 Added path to candid file for the icp ledger to ic_icp_index_canister_test target and implemented new unit test check_index_and_ledger_encoded_block_compatibility to ensure the ledger’s and index’s encoded block definitions compatibility by checking that the former, i.e QueryEncodedBlocksResponse, is a subtype of the latter, i.e GetBlocksResponse. Left comment here

92ae5bc28b Removed flaky flag from ICP ledger_canister_test and ic_icp_index_test.

c741e34945 Reserved memory id for storing balances in stable memory and extended migration logic used for allowances to also support balances. maximum_number_of_accounts and accounts_overflow_trim_quantity fields have been removed from init and upgrade args and over all deprecated in the ICRC1 ledger since with stable memory balances are no longer trimmed rendering them useless.

03a9b37a0e Added AccountIdentifierByteBuf struct and use it for passing args in place of BinaryAccountBalanceArgs for account_balance_candid_ method, if conversion to BinaryAccountBalanceArgs fails due to incorrect account identifier length, Tokens::ZERO is returned, allowing the method to be called with any account identifier length. Added test to ensure both legacy and new behaviour work as expected.

b1f4339d48 Modified type of length field of GetBlocksArgs from usize to u64.

Proposal 135058 - Zane | CodeGov

Vote: ADOPT
Reason: Build completes successfully, both hashes and reviewed commits match their descriptions, so I’ve decided voted to adopt.
135058

Proposal 135059 - Zane | CodeGov

Vote: ADOPT
Reason: Build completes successfully, both hashes and reviewed commits match their descriptions, so I’ve decided voted to adopt.
135059

2c79ddcfd8 Replaced pocket_ic::WasmResult, pocket_ic::UserError, and pocket_ic::CallError response types with pocket_ic::RejectResponse.

Proposal 135060 - Zane | CodeGov

Vote: ADOPT
Reason: Build completes successfully, both hashes and reviewed commits match their descriptions, so I’ve decided voted to adopt.
135060

Proposal 135061 - Zane | CodeGov

Vote: ADOPT
Reason: Build completes successfully, both hashes and reviewed commits match their descriptions, so I’ve decided voted to adopt.

135061

About CodeGov

CodeGov has a team of developers who review and vote independently on the following proposal topics: IC-OS Version Election, Protocol Canister Management, Subnet Management, Node Admin, and Participant Management. The CodeGov NNS known neuron is configured to follow our reviewers on these topics and Synapse on most other topics. We strive to be a credible and reliable Followee option that votes on every proposal and every proposal topic in the NNS. We also support decentralization of SNS projects such as WaterNeuron and KongSwap with a known neuron and credible Followees.

Learn more about CodeGov and its mission at codegov.org.