Skip to content

AcidTest: bip32_derivation not populated for mainnet coins #124

@OttoAllmendinger

Description

@OttoAllmendinger

Summary

AcidTest only populates bip32_derivation in PSBT inputs for testnet coins. When using mainnet coins (e.g., btc, bch, ltc), the generated PSBTs have empty bip32_derivation and tap_key_origins fields.

Reproduction

import { testutils } from '@bitgo/wasm-utxo';
const { AcidTest } = testutils;

// Works - testnet with full psbt
const testnetPsbt = AcidTest.withConfig('tbtc', 'unsigned', 'psbt').createPsbt();

// Fails - mainnet with full psbt (missing bip32_derivation)
const mainnetPsbt = AcidTest.withConfig('btc', 'unsigned', 'psbt').createPsbt();

Observed behavior

When parsing mainnet PSBTs created by AcidTest, consumers that require derivation info will fail:

Failed to parse transaction: Input 0: missing or invalid derivation info (not replay protection): Invalid input: both bip32_derivation and tap_key_origins are empty

Expected behavior

AcidTest should populate bip32_derivation for mainnet coins the same way it does for testnet coins when using full psbt format.

Notes

  • This also affects psbt-lite format for both testnet and mainnet (expected, as psbt-lite intentionally omits derivation info)
  • Discovered while writing tests for parseTransaction in indexerdb-microservice

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions