Questions tagged [p2tr]

Pay to Taproot is the native SegWit v1 output format. It commits directly to a public key which in turn can optionally commit to a script tree, thus combining capabilities of previous output formats. P2TR addresses are Bech32m encoded and start with the prefix `bc1p`.

Filter by
Sorted by
Tagged with
3 votes
1 answer
22 views

Error creating a Taproot descriptor with a single key as script path

I need to implement 1 of 2 multisig with P2TR. My friend's Bitcoin public key is 0374d5f29bc6c15066437856c512f7f9e5a14a1eb93cab2776d33b27b4103c62d8. My own Bitcoin public key is ...
  • 51
4 votes
1 answer
56 views

How do you construct witness stack and controlblock in P2TR Script Path outputs?

I have been documenting how to create different types of Tx outputs here, leveraging the Bitcoin Core Test Framework. Particularly for Taproot, I'm working on a scenario of a P2TR Script Path with a ...
2 votes
1 answer
160 views

How to extract the internal key of a simple P2TR address?

Is it possible to extract the taproot internal key out of a P2TR address?
  • 129
2 votes
1 answer
57 views

Validation of segwit v0-v1 tx automatically adds OP_CHECKSIG?

When I create a segwit transaction v0 (P2WPKH) or v1 (P2TR key-path spend) I do like that (let's spend a P2TR output): Locking Script (of the P2TR output I'm spending): OP_1 PK_size PK Witness: 1 (...
  • 113
2 votes
1 answer
50 views

How to create a 1-of-2 multisig with P2TR?

We have two companies and we want to spend funds with 1-of-2 multisig. We successfully did such a multisig with P2SH. How can I do this in P2TR? Can any give me a detailed instruction step by step? ...
  • 51
0 votes
2 answers
47 views

How can I create a multi sign for a large number of users

I want to create a DAO-like wallet where each member would have to sign for any given tx. Tx should go through if 51% of the users signed. Is this possible?
  • 123
1 vote
2 answers
53 views

Is tweak used when spending from script path for Taproot?

I understand that a taproot output can be either spent using key path or script path. With key path, a tweak is applied to the private key and then sign the sighash. The signature is provided as a ...
6 votes
2 answers
493 views

Is a P2TR address a compressed public key?

From what I understand, a public key can be compressed from 64 bytes into 32 bytes, but an additional byte is needed for the sign, so it usually winds up being 33 bytes total. But P2TR addresses only ...
  • 173
2 votes
1 answer
63 views

Error validating transaction: unexpected witness payload for non-witness script in a P2TR using script path

I am trying to create a raw transaction P2TR, spending a Taproot UTXO using the script path. I did the following: Create a random private key d and corresponding pubkey P (the internal pubkey) ...
  • 113
3 votes
1 answer
87 views

non-mandatory-script-verify-flag (Invalid Schnorr signature) when I try to send a P2TR tx on testnet

I'm learning to create tx from scratch in order to understand better how bitcoin tx works and how they are structured. I learnt to create tx with legacy address, segwit v0 and I am now learning ...
  • 113
1 vote
1 answer
95 views

How to choose a nothing-up-my-sleeve (NUMS) point on secp256k1 for use in Taproot?

Per BIP-341, if you want to create a Taproot output that is only spendable via the script-path spend (and not a key-path spend), you must "pick as internal key a point with unknown discrete ...
3 votes
1 answer
64 views

How to spend an imported rawtr() descriptor with bitcoin-cli?

I created a transaction that creates a taproot output that can be spent using the private key (KEY) corresponding to the taproot output key. Then I imported the WIF formatted private key into Bitcoin ...
0 votes
1 answer
50 views

What are the last bytes for in a taproot script-path sighash?

I am trying to follow BIP341 to understand the signature hash calculation for taproot script path spends. From the bitcoin testing framework code, I see that if the transaction is spending from a ...
  • 779
1 vote
2 answers
94 views

Can one infer the multisig status of a P2TR spend?

Given raw transaction input/output data, is it possible to know if a Taproot output is multisig or not? I'm getting raw block data from a bitcoin node, and want to classify each spend according to the ...
1 vote
1 answer
80 views

What would happen if you tweaked a public key with an odd y-coordinate?

From BIP341 this example code shows how you can tweak an x-only pubkey: def taproot_tweak_pubkey(pubkey, h): t = int_from_bytes(tagged_hash("TapTweak", pubkey + h)) if t >= ...
  • 779
2 votes
2 answers
163 views

How do you calculate a taproot sighash?

I'm having trouble manually recreating the taproot sighash from the example below. I used btcdeb to pass in an input transaction (with a P2TR output), and a valid tx that spends from it. In the logs ...
  • 779
5 votes
1 answer
318 views

What is the largest multisig quorum currently possible?

Bitcoin script allows for a UTXO to be (un)encumbered by an N-of-N signature. When N is 1, this is referred to as a single signature. What are the limits of N for this application? What is the ...
9 votes
1 answer
393 views

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

Consider BIP-341 "Constructing and spending Taproot outputs" where it says If the spending conditions do not require a script path, the output key should commit to an unspendable script ...
  • 261
4 votes
1 answer
211 views

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

I want to help test the WIP Bitcoin Dev Kit "Add support for Taproot and tr() descriptors", PR #593 against other implementations besides Bitcoin Core (already testing again Core 22.0). In ...
3 votes
1 answer
210 views

Taproot signing with PSBT: How to determine signing method?

As far as I can tell there are three ways you can produce a valid Schnorr signature in a Taproot environment: For a p2tr output that uses a BIP-0086 commitment (key spend, sign with internal key, ...
  • 228
4 votes
1 answer
246 views

Is taproot considered nonstandard to older clients?

When asking an older bitcoind node to broadcast a transaction which includes or spends a p2tr output, how will they respond? Will they broadcast the transaction? Will only certain bitcoind versions ...
  • 1,588
0 votes
1 answer
65 views

Keypath spending: Verify destination address across address formats [duplicate]

In a Tapscript Keypath Transaction (there is an unrelated Scriptpath too) I can have outputs to all possible address? (I.e. to P2PKH, P2SH, P2WPKH / P2WSH and P2TR) I have a list of addresses in all ...
  • 133
1 vote
0 answers
55 views

which wallets/softwares utilize taproot capabilites?

this question is not about being able to pay/receive to taproot addresses as I know there's a list for that here. I'm curious to see if anyone knows about wallets/software that utilize taproot ...
2 votes
1 answer
160 views

What is the weight of a P2TR input?

I'm looking for a detailed explanation of the weight, vsize and serialized length of a P2TR input, in the same vein as How big is the input of a P2PKH transaction?.
  • 68.6k
11 votes
1 answer
2k views

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

So I have found and fundamentally understand how P2PKH is assembled from inputs and outputs to create a bitcoin forth-like script for execution. I looked at the SegWit BIP examples section and I found ...
  • 441
7 votes
2 answers
1k views

How can I find samples for P2TR transactions on mainnet?

Can I ask for a P2TR transaction id example past block 709632? I was trying to debug one of my scripts and something is wrong when searching for witness_v1_keyhash, and couldn't manually find one in ...
  • 1,646
1 vote
1 answer
127 views

Issue when broadcasting Taproot transaction to older nodes

I'm trying to broadcast a Taproot transaction to random nodes across the network (Testnet3). When I try to broadcast to older nodes like 0.18.0, I get the error "Witness version reserved for soft-...
user avatar
5 votes
1 answer
455 views

XPRIV/XPUB type for P2TR

As far as I understand, there is a standard that describes what address types an extended private key or extended public key is intended to derive and it works as such: xpriv/xpub => Legacy ...
4 votes
0 answers
311 views

P2TR bech32m mismatch

When attempting to create a p2tr address using the private key 0x0000...01 I get, bc1pmfr3p9j00pfxjh0zmgp99y8zftmd3s5pmedqhyptwy6lm87hf5sspknck9 which does not match the provided test vectors provided ...
  • 5,388
3 votes
1 answer
260 views

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

I am in the middle of writing some Taproot libraries and would like some testnet/signet p2tr spends. Is there an easy way to find them? Most explorers don't have any filters like that. Even a list of ...
  • 7,699
6 votes
1 answer
1k views

How can I create P2TR addresses with Bitcoin Core 22.0?

I'm trying to test P2TR with Bitcoin Core, and I don't know how to get taproot addresses. How should I create them using 22.0?
3 votes
1 answer
269 views

Tests for Pay To Taproot addresses?

I am having trouble finding examples showing a known WIF to a valid mainnet P2TR address. I am working on a tool and want to see if my P2TR conversions/encodings are outputting the correct P2TR ...
  • 5,388
2 votes
1 answer
234 views

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>? Can multisig script be there, and if yes - in what format, and more importantly - how do I convert ...
2 votes
2 answers
112 views

tracking invoice address type migration

I'd love to see charts with stats on percent of utxos by invoice address type (specially P2PKH, P2SH, P2SH-P2WPKH, P2WPKH, P2TR), over time; and same for percent of coin supply. No doubt I can pay a ...
  • 637
0 votes
1 answer
105 views

Can you use un-tweaked public key with P2TR?

Given some public key, is turning it into a working P2TR address and then going back from P2TR to get the same pubkey possible? I've read about the tweaking but don't really get it - do you need to ...
  • 35
3 votes
1 answer
246 views

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

As far as I understand, Taproot enhances privacy by allowing someone to only reveal a specific key path, which in my understanding means that it's fairly flexible - is it possible to construct a P2TR ...
  • 35
1 vote
0 answers
87 views

P2TR Scriptpath failing (Timelocked contract)

Goal is to archive the following logic: $alice = A; $bob = B; pk($bob) || (pk($alice) && older(10)) I went through The Taproot Workshop and came up with the following code: from io import ...
  • 133
5 votes
1 answer
666 views

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

Apparently (credit 0xB10C) there are only 20 key-path and 5 script-path spends of P2TR outputs on the Signet blockchain today (July 7th 2021). How can I increase this number today with say the Bitcoin ...
7 votes
2 answers
679 views

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

The Bitcoin Core wallet prevents mainnet Taproot descriptors from being imported pre activation (November 2021) as a safeguard. However, you can send mainnet Bitcoin to a Taproot (P2TR) address pre ...
6 votes
1 answer
235 views

Will P2TR make P2WSH obsolete?

Assuming users have upgraded their wallets to handle P2TR outputs and trust the validation rules of P2TR, would there be any advantage of using P2WSH over P2TR?
  • 779
3 votes
1 answer
353 views

P2TR: Is pub key hashed in address?

Are the new Taproot addresses (SegWit v1) also a hash of the (potentially tweaked) public key, or is the public key directly encoded into the address, without hashing it?
3 votes
1 answer
502 views

How do the fees for taproot transactions compare to P2WPKH?

How would the most basic taproot transactions (not involving scripts) compare to P2WPKH transactions in terms of vbytes or fees?
  • 779
4 votes
1 answer
267 views

How are taproot scripts represented in general?

I'm pretty familiar with the opcode style of writing down scripts. I can understand the stack-based language nature of bitcoin script where you can write down different script spend paths via ifs like ...
  • 1,511
2 votes
1 answer
166 views

Using key aggregation (multsig) in P2TR script path spends

I know that it is possible to create a 2-2 multsig using Taproot by combining both private keys into one public key and defining that as the key path spend. I also know that it is possible to use ...
1 vote
1 answer
2k views

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

I want to create a P2TR (Pay to Taproot) address but I just want access to the key path spend, I have no use for the script path spend in this specific example. What should I do in regard to the ...