Is it possible to use PocketIc to test Bitcoin integration?

I am trying to test out Bitcoin integration using PocketIC. I’ve installed ckBTC minter, KYT, and ledger canisters. I am able to retrieve btc address with get_btc_address call to ckBTC canister, but when I call the update_balance method, I get this error:

Err(TemporarilyUnavailable("management call 'bitcoin_get_utxos' failed: the canister queue is full"))

I wonder what this error means and if there’s a way to make ckBTC minter work in PocketIC?

My ckBTC minter configuration is:

    MinterArg::Init(crate::utils::btc::InitArgs {
        btc_network: BtcNetwork::Regtest,
        ecdsa_key_name: "master_ecdsa_public_key_fscpm-uiaaa-aaaaa-aaaap-yai".to_string(),
        retrieve_btc_min_amount: 100_000,
        ledger_id: ledger,
        max_time_in_queue_nanos: 100,
        min_confirmations: Some(12),
        mode: Mode::GeneralAvailability,
        kyt_fee: Some(2000),
        kyt_principal: Some(kyt),
    })

And naturally, I have Bitcoin regtest chain running on the port 18444

@michael-weigelt @fxgst any help with this?

Unfortunately, PocketIC does not yet support testing Bitcoin integration. There might be a way to make ckBTC minter work in PocketIC though if the minter (for the sake of testing) could be manually initialized with some BTC funds.

@mraszyk Any update on this issue? Is this possible in the latest pocket-ic?

Bitcoin integration is not supported in the latest PocketIC release, but I’m working on it literally now while typing this response. Please stay tuned!

1 Like

I could successfully test this draft PR for bitcoin integration in PocketIC following the developer docs. So I’m hopeful we could get it released in a week or two.

@mraszyk great, thanks! Will the new PocketIC release support Schnorr signatures too?

tSchnorr signatures are already supported in the latest release: PocketIC Version 6.0.0: Following the Roadmap - Developers / Rust - Internet Computer Developer Forum

1 Like

@mraszyk Is there any update on this?