Hot answers tagged

18 votes
Accepted

What is the script assembly and execution in P2TR spend (spend from Taproot)

Before we start I realize your question is only about single-sig scenarios, and you want an answer focused on how validation works. I will address these things, but I think I need to elaborate a bit ...
user avatar
11 votes
Accepted

BIP-341: Should key-path-only P2TR be eschewed altogether?

Let's first introduce some terminology, because "key path only" could mean different things. Say: A raw taproot output is one where the output key (the one in the scriptPubKey) is exactly ...
user avatar
10 votes
Accepted

How can I find samples for P2TR transactions on mainnet?

Taproot activated in block 709 632, but the first P2TR transactions were in block 709 635. A few P2TR transactions that may be useful for test vectors would be: 33e7…9036, the first P2TR transaction ...
user avatar
  • 64.6k
9 votes

What is the largest multisig quorum currently possible?

The rules governing this depend on the type of script used and whether that script is in the output script, in a P2SH, in a P2WSH, or in P2TR. Additionally, the rules are more restrictive for ...
user avatar
  • 62.4k
9 votes
Accepted

How can I create P2TR addresses with Bitcoin Core 22.0?

This functionality in the Bitcoin Core wallet has deliberately not been merged pre activation to prevent users from easily generating and giving out Taproot addresses prior to the Taproot rules being ...
user avatar
9 votes
Accepted

XPRIV/XPUB type for P2TR

There is no ypub/zpub similar thing for Taproot. The recommendation is to use xpriv/xpub along with some extra information indicating that the script to create is Taproot, (e.g. with a tr() descriptor)...
user avatar
  • 62.4k
9 votes
Accepted

Should the Bitcoin Core wallet (or any wallet) prevent users from sending funds to a Taproot address pre activation?

TL;DR: Wallets SHOULD allow sending to all bech32m addresses at this point, but wallets MUST NOT request P2TR outputs before the Taproot spending rules are enforced on the network¹. The design of ...
user avatar
  • 64.6k
7 votes
Accepted

How do the fees for taproot transactions compare to P2WPKH?

Taproot inputs are smaller but outputs are larger. Specifically, P2WPKH (Native SegWit) inputs and outputs take 68 and 31 vbytes in a transaction, respectively, while P2TR (Taproot) inputs and outputs ...
user avatar
7 votes
Accepted

Will P2TR make P2WSH obsolete?

As far as I can tell, P2TR is better than P2WSH in almost every way. I cannot think of a case in which it would be a significant advantage to use P2WSH over P2TR, except that P2WSH is already ...
user avatar
  • 64.6k
7 votes
Accepted

Is there a way to convert a P2PKH address into P2TR?

Short answer: no, at least not via the key path (and using a script path would be less efficient than using P2WPKH instead) Longer answer: no, and even if it were possible, this would be a terrible ...
user avatar
5 votes
Accepted

Is taproot considered nonstandard to older clients?

P2TR outputs (and higher-version native witness outputs) are standard since Bitcoin Core v0.19: https://github.com/bitcoin/bitcoin/pull/15846 Inputs spending P2TR outputs are non-standard in all ...
user avatar
4 votes

tracking invoice address type migration

You can find the first on https://txstats.com/dashboard/db/utxo-set-repartition-by-output-type?orgId=1. For a version weighed by value you can look at the graphs of the individual output types on the ...
user avatar
3 votes
Accepted

Issue when broadcasting Taproot transaction to older nodes

How am I supposed to broadcast a Taproot transaction to older nodes when they won't accept it? You can't. You need to broadcast it to new nodes for it to propagate.
user avatar
3 votes
Accepted

Where can I find taproot spend examples on testnet/signet?

As Pieter said in the comments there are Taproot test vectors that have recently been merged into BIP 341. You can also find additional P2TR spends on signet, testnet on block explorers e.g. mempool....
user avatar
3 votes

How can I spend from a P2TR address on Signet with the Bitcoin Core wallet in 22.0?

This is a draft answer (incomplete). To get set up on Signet ie sync the Signet chain and claim some Signet Bitcoin, follow these instructions. (You can run a Signet node in parallel with your mainnet ...
user avatar
3 votes

Should the Bitcoin Core wallet (or any wallet) prevent users from sending funds to a Taproot address pre activation?

For a sender to send to a P2TR address pre activation they must have received that P2TR address from the receiver and so it would be an indirect safeguard to protect the receiver having given out P2TR ...
user avatar
3 votes
Accepted

P2TR: Is pub key hashed in address?

Public keys are not hashed in Taproot (SegWit v1). The Taproot (Merkle) tree in the script path uses hashes but the Merkle root of this tree tweaks the unhashed public key (internal key) and the ...
user avatar
2 votes
Accepted

Using key aggregation (multsig) in P2TR script path spends

You are right. You could either use a leaf with a single aggregated key or a leaf with a more traditional multisig construction using OP_CHECKSIGADD. The advantage of the aggregated key is its smaller ...
user avatar
  • 64.6k
2 votes
Accepted

How do I construct a P2TR address if I just want to use the key path?

BIP 341 (BIP-Taproot) discusses this example where you don't require the script path. If the spending conditions do not require a script path, the output key should commit to an unspendable script ...
user avatar
2 votes
Accepted

Tests for Pay To Taproot addresses?

Meanwhile, BIP341 has been updated to link to a set of test vectors covering scriptPubKey computation, keypath spending, and control block construction.
user avatar
  • 64.6k
2 votes
Accepted

Recognizing Taproot outputs in raw transactions

What can be the contents of an P2TR output script? Is it always OP_1 0x20 <32-bit public key>? A Taproot output contains a 32 byte witness program (a tweaked internal key or an untweaked public ...
user avatar
2 votes
Accepted

tracking invoice address type migration

While I think Pieter's answer provides exactly what you were asking for with the UTXO set repartition by output type, I think that you may also be interested in the Output Types by Count chart on ...
user avatar
  • 64.6k
2 votes

What is the weight of a P2TR input?

TL;DR: A P2TR keypath input will weigh 57.5 vbytes. A P2TR scriptpath input will weigh a variable amount greater than that. Composition of a P2TR input Each input commits to spending a specific UTXO ...
user avatar
  • 64.6k
2 votes
Accepted

Taproot signing with PSBT: How to determine signing method?

Yes, that looks correct. I suppose you are correct that PSBT_IN_TAP_INTERNAL_KEY is not strictly necessary, but one of the main ideas with PSBTs is to include as much information as possible, and to ...
user avatar
  • 62.4k
1 vote
Accepted

Which wallets or libraries besides core support (or will support) P2TR descriptors?

At the time of writing (May 2022) the only Bitcoin implementation other than Bitcoin Core (and Core derivatives like Knots) and rust-bitcoin I'm aware of that supports Taproot is btcd (Go). The ...
user avatar
1 vote

How can I find samples for P2TR transactions on mainnet?

On mainnet there are a number of P2TR transactions in block 709635. A few transaction IDs are included in the index of my bitcoin-dev mailing list post.
user avatar
1 vote
Accepted

Can you use un-tweaked public key with P2TR?

It depends on what you mean by public key. P2TR outputs encode an "x-only pubkey", that is a public key with just the X coordinate. The Y coordinate is implicitly the even one (on elliptic ...
user avatar

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