PocketIC: Multi-Subnet Canister Testing

Hello @michael-weigelt, how can I make tECDSA work when testing with pocket IC?

I initially requested the public key with the name dfx_test_key as I normally do in DFX but I got errors suggesting a bunch of other keys named master_ecdsa_public_key_*, one for each subnet I added to the PocketIcBuilder. I tried making the request with each of them but I always get the error: ecdsa_public_key failed InternalError(\"InvalidPoint\"). I tried adding different subnets but the result was always the same.

What am I doing wrong?

Hi Massimo
Could you share a code snippet?

This is how I setup PocketIC. The should_get_address test panics with the error:

ecdsa_public_key failed InternalError(\"InvalidPoint\")

When running the integration tests with PocketIC, I use the TestKeyLocalDevelopment key, which is set to master_ecdsa_public_key_yndj2-3ybaa-aaaaa-aaaap-yai as you can see here.

Are there any examples around to test tECDSA with PocketIC?

No, but we are looking into the issue.

tECDSA calls are now be fixed on master (please see here) and the fix will be included in the next PocketIC release

Hi massimo

Here is server version 3.0.1 with working ecdsa keys:

And the rust library is now on version 2.2.0:
https://crates.io/crates/pocket-ic

1 Like

Check out the new version of PocketIC: