Bitmime
You have not selected any currencies to display
  • Bitmime – Bitcoin, Ethereum, Crypto News and Market Analysis
  • Cryptocurrency
    • Crypto Mining
  • Bitcoin
  • Ethereum
  • DeFi
  • Blockchain
  • Metaverse
No Result
View All Result
  • Bitmime – Bitcoin, Ethereum, Crypto News and Market Analysis
  • Cryptocurrency
    • Crypto Mining
  • Bitcoin
  • Ethereum
  • DeFi
  • Blockchain
  • Metaverse
No Result
View All Result
Bitmime
No Result
View All Result
Home Bitcoin

bitcoin core – Subject: Taproot Multisig Script Path Spending Fails with “Witness program hash mismatch”

Martin Spielberg by Martin Spielberg
March 11, 2025
in Bitcoin
0
bitcoin core – Subject: Taproot Multisig Script Path Spending Fails with “Witness program hash mismatch”
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


I generated a Taproot multisig handle utilizing Bitcoin Core’s deriveaddresses command with multi_a:

deriveaddresses "tr(tprv8ZgxMBicQKsPdgBQV2Y9EVPSjAGhyZXArhwSzHwnV3FytzPRr8KCR8EKEpLeHbANAncgbc31a6QoXjBTARQiZ2h1Z2NgSCjFYeTqKpAN5Gc/86h/1h/0h/0/1,multi_a(2,tprv8ZgxMBicQKsPdgBQV2Y9EVPSjAGhyZXArhwSzHwnV3FytzPRr8KCR8EKEpLeHbANAncgbc31a6QoXjBTARQiZ2h1Z2NgSCjFYeTqKpAN5Gc/86h/1h/0h/0/2,tprv8ZgxMBicQKsPdgBQV2Y9EVPSjAGhyZXArhwSzHwnV3FytzPRr8KCR8EKEpLeHbANAncgbc31a6QoXjBTARQiZ2h1Z2NgSCjFYeTqKpAN5Gc/86h/1h/0h/0/3))"

Key-path spending works accurately.

Script-path spending fails with error:

mandatory-script-verify-flag-failed (Witness program hash mismatch)

Code for Developing Script Path Spending Transaction

closing script = Script(script: [
  pk2.toXOnlyHex(),
  'OP_CHECKSIG',
  pk3.toXOnlyHex(),
  'OP_CHECKSIGADD',
  2,
  'OP_NUMEQUAL'
]);

closing handle = pk.toTaprootAddress(scripts: [
  [script]
]);

closing sig1 = prv1.signTapRoot(
  tx.getTransactionTaprootDigset(
    txIndex: 0,
    tapleafScript: script,
    scriptPubKeys: [address.toScriptPubKey()],
    quantities: [amount],
  ),
  tweak: false
);

closing sig2 = prv2.signTapRoot(
  tx.getTransactionTaprootDigset(
    txIndex: 0,
    tapleafScript: script,
    scriptPubKeys: [address.toScriptPubKey()],
    quantities: [amount],
  ),
  tweak: false
);

closing controlBlock = ControlBlock(
  public: pk,
  scripts: toTapleafTaggedHash(script.toBytes())
);

closing witness = TxWitnessInput(
  stack: [ sig1, sig2, script.toHex(), controlBlock.toHex()]
);

tx = tx.copyWith(witnesses: [witness]);

Uncooked Transaction

020000000001012543af34ab664d559d793946dd47345d5b6fff9f2e89456e03a5cc8acf57bf0e0100000000ffffffff0210270000000000001976a914e12bdac26ab92798ca56a38fd81bd09406458d5a88acb44e070000000000225120577176e689685df89c26a97cf400f11e33431ace42973389f48b78c14310d13a0440051c660118fbf450304e929389074629303fa4c5777a3e638c1956e64960e885fc5df26b430063e3b57012b6ec69262f30c0e922a2528aeeee472cdcada508eb40dd52984447622f84b473fa92336ebb4c3482c51cf4ad74b6ce50b76441c00cc59d69cab1b0fc76a9627847a87a7a0ca6a37860c15a574e052c675b323f90d64d46200db491b6b7b47d42a78b270a1e395e6b8f62886d4286c39c6111d326cdd31dc6ac20116d5f1c9eee66aef644423bd29e3b7549dd3e3d7e44702f3076305b7fd9d946ba529c41c0ba4e3cf774e82577c830c1e99b4e08ce158644f7ddd04aeca712b0daa72c74c01819cabf8c966ff15284017054ef1ce61b18dd66ccefa4b67941d2c0d04be44200000000

What’s inflicting the witness hash mismatch?
Is my management block appropriate?
Does Bitcoin Core enable spending by way of script-path for multi_a descriptors?
Am I lacking any required tweaks or flags.
Thanks

Related articles

Weekend Crypto Replace: $100k BTC Narrative Nonetheless Alive, Cathie Wooden & Tom Lee Affirm

Weekend Crypto Replace: $100k BTC Narrative Nonetheless Alive, Cathie Wooden & Tom Lee Affirm

November 30, 2025
Shopping for Bitcoin Will get An Improve As Apple Pay Joins The Crypto Wave

Shopping for Bitcoin Will get An Improve As Apple Pay Joins The Crypto Wave

November 30, 2025


I generated a Taproot multisig handle utilizing Bitcoin Core’s deriveaddresses command with multi_a:

deriveaddresses "tr(tprv8ZgxMBicQKsPdgBQV2Y9EVPSjAGhyZXArhwSzHwnV3FytzPRr8KCR8EKEpLeHbANAncgbc31a6QoXjBTARQiZ2h1Z2NgSCjFYeTqKpAN5Gc/86h/1h/0h/0/1,multi_a(2,tprv8ZgxMBicQKsPdgBQV2Y9EVPSjAGhyZXArhwSzHwnV3FytzPRr8KCR8EKEpLeHbANAncgbc31a6QoXjBTARQiZ2h1Z2NgSCjFYeTqKpAN5Gc/86h/1h/0h/0/2,tprv8ZgxMBicQKsPdgBQV2Y9EVPSjAGhyZXArhwSzHwnV3FytzPRr8KCR8EKEpLeHbANAncgbc31a6QoXjBTARQiZ2h1Z2NgSCjFYeTqKpAN5Gc/86h/1h/0h/0/3))"

Key-path spending works accurately.

Script-path spending fails with error:

mandatory-script-verify-flag-failed (Witness program hash mismatch)

Code for Developing Script Path Spending Transaction

closing script = Script(script: [
  pk2.toXOnlyHex(),
  'OP_CHECKSIG',
  pk3.toXOnlyHex(),
  'OP_CHECKSIGADD',
  2,
  'OP_NUMEQUAL'
]);

closing handle = pk.toTaprootAddress(scripts: [
  [script]
]);

closing sig1 = prv1.signTapRoot(
  tx.getTransactionTaprootDigset(
    txIndex: 0,
    tapleafScript: script,
    scriptPubKeys: [address.toScriptPubKey()],
    quantities: [amount],
  ),
  tweak: false
);

closing sig2 = prv2.signTapRoot(
  tx.getTransactionTaprootDigset(
    txIndex: 0,
    tapleafScript: script,
    scriptPubKeys: [address.toScriptPubKey()],
    quantities: [amount],
  ),
  tweak: false
);

closing controlBlock = ControlBlock(
  public: pk,
  scripts: toTapleafTaggedHash(script.toBytes())
);

closing witness = TxWitnessInput(
  stack: [ sig1, sig2, script.toHex(), controlBlock.toHex()]
);

tx = tx.copyWith(witnesses: [witness]);

Uncooked Transaction

020000000001012543af34ab664d559d793946dd47345d5b6fff9f2e89456e03a5cc8acf57bf0e0100000000ffffffff0210270000000000001976a914e12bdac26ab92798ca56a38fd81bd09406458d5a88acb44e070000000000225120577176e689685df89c26a97cf400f11e33431ace42973389f48b78c14310d13a0440051c660118fbf450304e929389074629303fa4c5777a3e638c1956e64960e885fc5df26b430063e3b57012b6ec69262f30c0e922a2528aeeee472cdcada508eb40dd52984447622f84b473fa92336ebb4c3482c51cf4ad74b6ce50b76441c00cc59d69cab1b0fc76a9627847a87a7a0ca6a37860c15a574e052c675b323f90d64d46200db491b6b7b47d42a78b270a1e395e6b8f62886d4286c39c6111d326cdd31dc6ac20116d5f1c9eee66aef644423bd29e3b7549dd3e3d7e44702f3076305b7fd9d946ba529c41c0ba4e3cf774e82577c830c1e99b4e08ce158644f7ddd04aeca712b0daa72c74c01819cabf8c966ff15284017054ef1ce61b18dd66ccefa4b67941d2c0d04be44200000000

What’s inflicting the witness hash mismatch?
Is my management block appropriate?
Does Bitcoin Core enable spending by way of script-path for multi_a descriptors?
Am I lacking any required tweaks or flags.
Thanks

Tags: BitcoincoreFailsHashIssuemismatchMultisigpathProgramscriptSpendingtaprootWitness
Share76Tweet47

Related Posts

Weekend Crypto Replace: $100k BTC Narrative Nonetheless Alive, Cathie Wooden & Tom Lee Affirm

Weekend Crypto Replace: $100k BTC Narrative Nonetheless Alive, Cathie Wooden & Tom Lee Affirm

by Martin Spielberg
November 30, 2025
0

It’s the weekend once more, and in as we speak’s crypto replace, the broader market stays oversold with the Worry...

Shopping for Bitcoin Will get An Improve As Apple Pay Joins The Crypto Wave

Shopping for Bitcoin Will get An Improve As Apple Pay Joins The Crypto Wave

by Martin Spielberg
November 30, 2025
0

Trusted Editorial content material, reviewed by main business specialists and seasoned editors. Advert Disclosure The pathway to buying Bitcoin and...

Bitcoin Value Stays Above $90K — How Lengthy Can It Maintain On?

Bitcoin Value Stays Above $90K — How Lengthy Can It Maintain On?

by Martin Spielberg
November 29, 2025
0

Over the previous week, the Bitcoin worth had its greatest efficiency for the reason that notorious October 10 downturn, which...

DMND Pool Now Open To All Miners, With SOC 2 Compliance And Stratum V2 Assist

DMND Pool Now Open To All Miners, With SOC 2 Compliance And Stratum V2 Assist

by Martin Spielberg
November 29, 2025
0

DMND, a brand new mining pool constructed round Stratum V2 which started taking candidates for a gentle personal launch earlier...

Steerage for newbie making an attempt to fetch information on Blockchain

Steerage for newbie making an attempt to fetch information on Blockchain

by Martin Spielberg
November 28, 2025
0

I'd actually recognize your skilled's steering on just a little mission I want to get going. The concept could be...

Load More
  • Trending
  • Comments
  • Latest
Alchemy Quietly Buys NFT Launchpad HeyMint – Right here’s Extra data

Alchemy Quietly Buys NFT Launchpad HeyMint – Right here’s Extra data

May 25, 2025
BitHub 77-Bit token airdrop information

BitHub 77-Bit token airdrop information

January 15, 2025
Volatility Shares debuts first 1x XRP futures ETF for US buyers

Volatility Shares debuts first 1x XRP futures ETF for US buyers

May 26, 2025
Texas football’s rivalry matchup with Texas A&M

Texas football’s rivalry matchup with Texas A&M

May 9, 2025
6 Methods Web3 Is Altering On-line Communities

6 Methods Web3 Is Altering On-line Communities

1
Dogecoin (DOGE) Eyes $0.50 Once more: Is a New Rally on the Horizon?

Dogecoin (DOGE) Eyes $0.50 Once more: Is a New Rally on the Horizon?

0
Binance Pool Introduces Merged Mining with Fractal Bitcoin (FB) Rewards

Binance Pool Introduces Merged Mining with Fractal Bitcoin (FB) Rewards

0
Are Retail Buyers Behind The Bitcoin Worth Surge This Bull Run?

Are Retail Buyers Behind The Bitcoin Worth Surge This Bull Run?

0
Weekend Crypto Replace: $100k BTC Narrative Nonetheless Alive, Cathie Wooden & Tom Lee Affirm

Weekend Crypto Replace: $100k BTC Narrative Nonetheless Alive, Cathie Wooden & Tom Lee Affirm

November 30, 2025
Crypto Holders Warned as UK Finances Confirms Platforms Will Observe Features

Crypto Holders Warned as UK Finances Confirms Platforms Will Observe Features

November 30, 2025
UK Launches Tax Crackdown On Resident Crypto Transactions

UK Launches Tax Crackdown On Resident Crypto Transactions

November 30, 2025
Shopping for Bitcoin Will get An Improve As Apple Pay Joins The Crypto Wave

Shopping for Bitcoin Will get An Improve As Apple Pay Joins The Crypto Wave

November 30, 2025

About Us

Welcome to Bitmime.com, your go-to destination for the latest and most reliable news from the world of cryptocurrency, blockchain, and decentralized finance.

Categories

  • Bitcoin
  • Blockchain
  • Crypto Mining
  • Cryptocurrency
  • DeFi
  • Ethereum
  • Metaverse
  • Uncategorized

Recent Posts

  • Weekend Crypto Replace: $100k BTC Narrative Nonetheless Alive, Cathie Wooden & Tom Lee Affirm
  • Crypto Holders Warned as UK Finances Confirms Platforms Will Observe Features
  • UK Launches Tax Crackdown On Resident Crypto Transactions
  • Bitmime – Bitcoin, Ethereum, Crypto News and Market Analysis
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions

© 2024 bitmime.com. All rights reserved.

No Result
View All Result
  • Bitmime – Bitcoin, Ethereum, Crypto News and Market Analysis
  • Cryptocurrency
    • Crypto Mining
  • Bitcoin
  • Ethereum
  • DeFi
  • Blockchain
  • Metaverse

© 2024 bitmime.com. All rights reserved.