# PocketIC Version 10.0.0: bootstrapping system canisters

**URL:** <https://forum.dfinity.org/t/pocketic-version-10-0-0-bootstrapping-system-canisters/57413>\
**Category:** Rust\
**Created:** [September 12, 2025, 7:04pm UTC](https://forum.dfinity.org/t/pocketic-version-10-0-0-bootstrapping-system-canisters/57413 "2025-09-12T19:04:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mraszyk](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/mraszyk/32/7945_2.png) [@mraszyk](https://forum.dfinity.org/u/mraszyk)\
**Post date:** [September 12, 2025, 7:04pm UTC](https://forum.dfinity.org/t/pocketic-version-10-0-0-bootstrapping-system-canisters/57413/1 "2025-09-12T19:04:11Z")

</div>

# PocketIC

We have released [PocketIC server 10.0.0](https://github.com/dfinity/pocketic/releases/tag/10.0.0) and its compatible libraries:

- [Rust library 10.0.0](https://crates.io/crates/pocket-ic/10.0.0);

- [Python Library 3.1.1](https://pypi.org/project/pocket-ic/3.1.1);

- [Javascript Library 0.15.0](https://www.npmjs.com/package/@dfinity/pic/v/0.15.0).

The main new feature included in this release is support for bootstrapping system canisters transparently as part of PocketIC instance creation. The release also includes a full matrix of PocketIC server binaries for both linux/macOS and x86\_64/arm64.

## Changelog

Here’s an overview of the new features included in the latest PocketIC release and their use cases:

- bootstrapping system canisters as part of PocketIC instance creation: a set of [ICP features](https://github.com/dfinity/ic/blob/a299620cd5e73ed21b415f2ebe3da0bb43a3649d/packages/pocket-ic/src/common/rest.rs#L575-L589) can be specified to be enabled during PocketIC instance creation by deploying system canisters implementing the features (the corresponding system canisters are not deployed if some option is not specified);

- “nonmainnet” configuration: flags for [ICP configuration](https://github.com/dfinity/ic/blob/a299620cd5e73ed21b415f2ebe3da0bb43a3649d/packages/pocket-ic/src/common/rest.rs#L555-L567) options can be specified during PocketIC instance creation (“mainnet” configuration is used if some option is not specified).

For a complete list of changes, see the [server changelog](https://github.com/dfinity/ic/blob/a299620cd5e73ed21b415f2ebe3da0bb43a3649d/rs/pocket_ic_server/CHANGELOG.md#1000---2025-09-12) and the [Rust library changelog](https://github.com/dfinity/ic/blob/a299620cd5e73ed21b415f2ebe3da0bb43a3649d/packages/pocket-ic/CHANGELOG.md#1000---2025-09-12).

## Conclusion

Your feedback helps us improve PocketIC, so please let us know your thoughts and questions in this thread.

Thank you for providing feature requests and feedback on your PocketIC user experience!

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [September 14, 2025, 8:02am UTC](https://forum.dfinity.org/t/pocketic-version-10-0-0-bootstrapping-system-canisters/57413/2 "2025-09-14T08:02:35Z")

</div>

Thanks for the release 🙌

> The argument of the endpoint `/instances/` takes an additional optional field `incomplete_state` specifying if incomplete state (e.g., resulting from not deleting a PocketIC instance gracefully) is allowed.

What is the default value of `incomplete_state` used by PocketIC, I’m guessing `false`, and, if that’s a correct assumption, what are the drawbacks of enabling it?

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [September 14, 2025, 8:33am UTC](https://forum.dfinity.org/t/pocketic-version-10-0-0-bootstrapping-system-canisters/57413/3 "2025-09-14T08:33:40Z")

</div>

> [@mraszyk](#):
>
> a set of [ICP features](https://github.com/dfinity/ic/blob/a299620cd5e73ed21b415f2ebe3da0bb43a3649d/packages/pocket-ic/src/common/rest.rs#L575-L589) can be specified to be enabled during PocketIC instance creation by deploying system canisters implementing the features

Regarding `icp_features`, is there any documentation available on what each option does and which canisters are spun up by each option? For example, does `icp_token` include both the ledger and the index canister? Does `sns` spin up an example SNS project, or only the necessary canisters for creating and proposing projects? etc.

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [September 14, 2025, 7:10pm UTC](https://forum.dfinity.org/t/pocketic-version-10-0-0-bootstrapping-system-canisters/57413/4 "2025-09-14T19:10:44Z")

</div>

Is there a new option that needs to be set in order to deploy a custom CMC canister? I’m facing the following error when I’m bootstrapping it with PocketIC v10:

> ⚠ CLI Error: e [AgentError]: Call failed:  
> Canister: aaaaa-aa  
> Method: install\_code (update)  
> “Request ID”: “57a9b8cb6f3826c87b1fd3ac11d9f2e91688d99736ebc33cae10f3f3b604d065”  
> “Error code”: “IC0505”  
> “Reject code”: “5”  
> “Reject message”: “Error from Canister rkp4c-7iaaa-aaaaa-aaaca-cai: Canister’s Wasm module is not valid: Wasm module has an invalid import section. Module imports function ‘mint\_cycles’ from ‘ic0’ that is not exported by the runtime..\nIf you are running this canister in a test environment (e.g., dfx), make sure the test environment is up to date. Otherwise, this is likely an error with the compiler/CDK toolchain being used to build the canister. Please report the error to IC devs on the forum: [https://forum.dfinity.org](https://forum.dfinity.org) and include which language/CDK was used to create the canister.”

Note: I double-checked, and it seems the wasm.gz for the commit I’ve been using since May 2025 is still available to download, so the error is unlikely due to an empty wasm.

---

<div class="post-metadata">

**Author:** ![mraszyk](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/mraszyk/32/7945_2.png) [@mraszyk](https://forum.dfinity.org/u/mraszyk)\
**Post date:** [September 15, 2025, 7:21am UTC](https://forum.dfinity.org/t/pocketic-version-10-0-0-bootstrapping-system-canisters/57413/5 "2025-09-15T07:21:18Z")

</div>

> [@peterparker](#):
>
> What is the default value of `incomplete_state` used by PocketIC, I’m guessing `false`, and, if that’s a correct assumption, what are the drawbacks of enabling it?

Incomplete state is indeed not enabled per default. The drawback of enabling incomplete state is that messages and their effects on canister state might be lost in an incomplete state.

> [@peterparker](#):
>
> Regarding `icp_features`, is there any documentation available on what each option does and which canisters are spun up by each option?

I added documentation in this [PR](https://github.com/dfinity/ic/pull/6746).

> [@peterparker](#):
>
> Is there a new option that needs to be set in order to deploy a custom CMC canister?

The error is due to using an old WASM that is no longer compatible with a recent replica. I’d recommend using the `cycles_minting` ICP feature to deploy CMC transparently during PocketIC instance creation.

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [September 15, 2025, 1:58pm UTC](https://forum.dfinity.org/t/pocketic-version-10-0-0-bootstrapping-system-canisters/57413/6 "2025-09-15T13:58:26Z")

</div>

> [@mraszyk](#):
>
> The drawback of enabling incomplete state is that messages and their effects on canister state might be lost in an incomplete state.

Apologies, I don’t get it. Could you try to rephrase, or is there any documentation about this feature?

> [@mraszyk](#):
>
> I added documentation in this [PR](https://github.com/dfinity/ic/pull/6746).

Nice, thanks!

> [@mraszyk](#):
>
> The error is due to using an old WASM that is no longer compatible with a recent replica.

I upgraded my CMC commit to the latest deployed on mainnet, it resolved the issue. Thanks for the hint! 👍

> [@mraszyk](#):
>
> I’d recommend using the `cycles_minting` ICP feature

It’s likely that I’ll ultimately use the new `icp_features`, but one thing at a time 🙂.

---

<div class="post-metadata">

**Author:** ![mraszyk](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/mraszyk/32/7945_2.png) [@mraszyk](https://forum.dfinity.org/u/mraszyk)\
**Post date:** [September 15, 2025, 3:51pm UTC](https://forum.dfinity.org/t/pocketic-version-10-0-0-bootstrapping-system-canisters/57413/7 "2025-09-15T15:51:06Z")

</div>

> [@peterparker](#):
>
> > [@mraszyk](#):
> >
> > The drawback of enabling incomplete state is that messages and their effects on canister state might be lost in an incomplete state.
> 
> Apologies, I don’t get it. Could you try to rephrase, or is there any documentation about this feature?

The feature was added to address [this issue](https://forum.dfinity.org/t/pocket-ic-unable-to-load-after-being-shutdown-abruptly-before-entering-into-an-unable-to-connect-error-loop/53047).

My expectation was that it’d be used internally by dfx so I didn’t plan to advertise it publicly here (and confuse people). But now that you’re interested in it, let me elaborate a bit on a concrete scenario showing why that feature might give unexpected results:

- a PocketIC instance is created and configured to persists its state in a state directory;
- a counter canister is deployed to the PocketIC instance;
- the current value of the counter is 41;
- a checkpoint is created and written to the state directory;
- an update call is executed and the value of the counter becomes 42;
- the PocketIC server is killed (no graceful shutdown);
- a new PocketIC instance is created and configured to use the same state directory;
- the value of the counter is 41 (although it was already observed to be 42).

The reason for the counter being 41 again is that the new PocketIC instance loads its state from the last checkpoint and all changes made between the last checkpoint and the (abrupt) kill are lost. (There are other “low-level” side-effects such as non-monotone time which result in crashes reported on the linked thread, but the one described above could actually be confusing to end-users which is why an option to enable “incomplete” state was introduced as opposed to silently adjusting time to avoid the reported crash.)

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [September 15, 2025, 4:02pm UTC](https://forum.dfinity.org/t/pocketic-version-10-0-0-bootstrapping-system-canisters/57413/8 "2025-09-15T16:02:07Z")

</div>

Thanks a lot for the detailed explanation!! If I understand correctly, aside from a potential UX drawback, there aren’t really any technical issues with enabling this feature. Good to know then. I won’t enable it either right now, since I just released a version, but I wonder if, over time, this might become the default. Let’s see…

---

<div class="post-metadata">

**Author:** ![tiago89](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/tiago89/32/22332_2.png) [@tiago89](https://forum.dfinity.org/u/tiago89)\
**Post date:** [September 16, 2025, 8:58pm UTC](https://forum.dfinity.org/t/pocketic-version-10-0-0-bootstrapping-system-canisters/57413/9 "2025-09-16T20:58:07Z")

</div>

Thank you for this version.

Handling gracefully the shutdowns will improve developers experience. Looking forward to test it out.

Thanks
