dfinity / cdk-rs

Rust canister development kit for the Internet Computer.
Apache License 2.0
201 stars 90 forks source link

feat: add management canister methods for interacting with the chunk store #461

Closed hpeebles closed 7 months ago

hpeebles commented 10 months ago

Description

Adds upload_chunk, stored_chunks, clear_chunk_store and install_chunked_code to the management canister API.

How Has This Been Tested?

I have tested this locally by uploading a wasm comprised of 3 chunks, the I queried stored_chunks which returned the chunks, then I called install_chunked_code which completed successfully, then I called clear_chunk_store, then I queried stored_chunks again and this time it was empty.

Checklist:

lwshang commented 9 months ago

@hpeebles

For the inconsistency between the interface-spec and the replica implementation, the conclusion is that the replica will be modified to align with the spec. So we have to wait for that before we can complete this PR.

And since it will be pub chunk_hashes_list: Vec<ChunkHash> in the end, we don't have to implement the custom serde methods now.

Turning this PR back to draft now.