Skip to main content
6 votes
Accepted

Why is my P2WSH OP_IF/NOTIF argument not minimal?

In SegWit (by standardness) and Taproot (by consensus), the arguments to OP_IF and OP_NOTIF must be minimal, i.e. be either the empty vector or the one-byte vector 01. Your transaction uses 00, which ...
Vojtěch Strnad's user avatar
6 votes
Accepted

Is there an economic incentive to use P2WSH over P2TR?

Yes, having only a single leaf and all else being equal, a P2TR input costs 34 witness bytes (8.5 vbytes) more than a P2WSH input with the same script. However, almost all current usage of P2WSH (...
Vojtěch Strnad's user avatar
3 votes

Code: -26, Error: non-mandatory-script-verify-flag (Data push larger than necessary)" when trying to spend from P2WSH

Bitcoin Core standardness rules require data pushes to be minimal, i.e. where multiple ways exist to push the same byte vector, the shortest one must be used. (See explanation at Opcode Explained.) In ...
Vojtěch Strnad's user avatar
2 votes

Generating P2WSH addresses | Is there a standard WitnessScript?

First of all, like pointed out in the first comment on your question, you're confusing the "witness program" and "witness script". The witness program for p2wpkh is OP_0 followed ...
Steven Roose's user avatar
  • 11.9k
1 vote

Properly Import P2WSH Descriptors into a Watch-Only Wallet to Reflect All Balances and Transactions

Wrong checksum You'll need to use the right checksum. The getdescriptorinfo RPC can tell you the checksum for a descriptor that lacks one (as does the error message you're quoting). Active ...
Pieter Wuille's user avatar
1 vote

Why does my PSBT's input script not have a pub key?

Though it is named scriptPubKey, it is a script which often does not contain a pubkey, nor even if it did, just a pubkey. The PSBT does not contain a pubkey because Bitcoin Core does not know enough ...
Ava Chow's user avatar
  • 71.5k
1 vote
Accepted

broadcast ps2wsh transaction failed

The witness script is the last element pushed on witness, and in your case is a821.... Your address is tb1qlwf... A P2WSH address is sha256(witness script), let's verify that: $ hal address -t create -...
bordalix's user avatar
  • 735

Only top scored, non community-wiki answers of a minimum length are eligible