Questions tagged [taproot]

Taproot is a Bitcoin softfork activated in 2021. It introduced a new output type, P2TR (Pay to Taproot), which uses the Schnorr signature scheme to combine a public key with an optional script tree. The public key can additionally be an aggregation of multiple keys, which enables cheaper and more private multisignature transactions.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

Do multiple issuances of a taproot asset, using the same group_key, count conceptually as the same asset, even if they have different asset_ids?

I am trying to understand the minting of Taproot Assets. In particular I want to understand how to mint more of an existing asset, i.e. add to the existing supply of that asset. I am experimenting ...
alexg's user avatar
  • 263
1 vote
1 answer
83 views

Is the signature check performed when the signature is the empty vector?

In this answer Vojtěch Strnad wrote the following: OP_CHECKSIGADD always performs one check per signature, since unused public keys are required to be paired with an empty witness item and are ...
Mudja Adjum's user avatar
1 vote
1 answer
55 views

What are the all benefits/advantages of OP_CHECKSIGADD over OP_CHECKMULTISIG?

What are all the benefits of introducing OP_CHECKSIGADD in Taproot instead of OP_CHECKMULTISIG? I assume the first benefit is the following. For example, in pre-taproot approach, if we have 3-of-10 ...
Mudja Adjum's user avatar
0 votes
1 answer
55 views

What would happen if we provide witness program different than 32 bytes for SegWit 1?

If the witness program (at the time of writing this question) is greater than 1, it is considered as anyone-can-spend output. Also, if the witness version is 1 and the witness program is 32 bytes, ...
LeaBit's user avatar
  • 468
0 votes
1 answer
77 views

Do we need a taproot commit for multisignatures if there is no script path, but we are using the MuSig2 protocol?

I read in some article for Taproot that if there is no need for a script path spending and a number of participant (multisignature with key aggregation) create together a taproot output key (key for a ...
LeaBit's user avatar
  • 468
1 vote
0 answers
45 views

Bip32 Root Key in Metamask Signature? [closed]

I recently fell victim to an inferno contract that took a significant amount of my ERC-20 coins. I realize that this is a Bitcoin site, but a white hat hacker approached and offered to help, and told ...
rnaka's user avatar
  • 11
0 votes
1 answer
40 views

Enforcing PSBT Signature Rules: Finalizer/Extractor and Deserialization Implementation

Should PSBT finalizers/extractors and deserialization functions enforce the rule that a taproot schnorr signature should only append a SIGHASH_* unless it is SIGHASH_DEFAULT (0), or is it left to the ...
solar's user avatar
  • 13
1 vote
1 answer
56 views

Is it true that we don't care about parity with the key path, but it is not case with the script path? (Taproot)

I am reading materials related to the Taproot (specially, BIP341) and I know that there is two possible ways to spend the output: via key path via script path I also know that the Taproot output ...
LeaBit's user avatar
  • 468
0 votes
1 answer
58 views

What is the leaf version in Taproot and how is it used?

I asked a few questions within this one. They are all related to the leaf version, so I didn't find it necessary to split them into multiple separate questions as they can all be answered in 1/2 a ...
LeaBit's user avatar
  • 468
2 votes
1 answer
39 views

non-mandatory-script-verify-flag (Invalid Schnorr signature) when trying to reveal a TR output

I'm building a Bitcoin wallet, and I'm trying to spend a Taproot output via a script spend path, but I keep running into this "Invalid Schnorr signature" error from my RPC node: { "...
Michael Hamilton's user avatar
0 votes
0 answers
84 views

how to spend ordinals/inscriptions?

so, i have some sats with ordinals and brc20 tokens in them. useless. might as well treat them as ordinary btc. question is - how do i spend them? ie send them to a btc address? unisat wallet wont ...
TheCatTehCat's user avatar
0 votes
2 answers
98 views

How to get x-only public key from the private key, and what does the obtained value represent?

In ECDSA, the public key is the result of multiplying the private key (some random 256-bit value) with a generic point (G). So the public key would be one of the points (X,Y) of the elliptic curve ...
LeaBit's user avatar
  • 468
0 votes
2 answers
53 views

Why there duplicated transactions on the blockchain? (with different hashes)

I just found a couple of transactions that looks very similar, they have different hashes, but are exactly equal in everything else: 3d69534a43b4396faac62e84ba6092d539335dd1c6601da626020f69082280c1 (...
eloyesp's user avatar
  • 202
1 vote
1 answer
148 views

How to get signature for tweaked public key in P2TR in case of multiple signature?

EDIT: Can we just tweak the signature with the root MAST as well? As I understand, the public key in scriptPubKey for P2TR is obtained by tweaking (let's call it original public key) and the root of ...
LeaBit's user avatar
  • 468
1 vote
1 answer
87 views

What is the way to create public key in P2TR?

I've started learning Taproot and I'm having trouble understanding some of the general story behind how it works in the context of a public key in scriptPubKey. The segWit v1 (Taproot) scriptPubKey ...
LeaBit's user avatar
  • 468
1 vote
1 answer
72 views

Verifying a zkSNARK on Bitcoin/Hope for a future with OP_MUL

I am trying to write a script that can verify a SNARK, but from what I understand OP_MUL is still disabled in TapScript. Is anyone working on a BIP to provide OP_MUL or OP_MUL64? It seems ...
Carter Feldman's user avatar
0 votes
2 answers
103 views

Example of key-path BIP-0341 signature message computation

Is there an example of key-path BIP-0341 signature message computation, perhaps? Or, could you tell what is incorrect in the example below, please? deriveaddresses "rawtr(...
Greg Tonoski's user avatar
2 votes
1 answer
72 views

"Witness program hash mismatch" code -26 when broadcasting a transaction

I'm trying to broadcast a transaction to my RPC provider: curl https://my-quicknode-rpc-provider/ \ -X POST \ -H "Content-Type: application/json" \ --data '{"method": &...
Michael Hamilton's user avatar
3 votes
1 answer
131 views

How many recipients can fit in a single Ark shared output?

It's the only boundary the taproot/MAST limitation of 128 levels of the tree, ie. 2^128?
Marco Argentieri's user avatar
3 votes
1 answer
74 views

How many transactions go on-chain if a user unilaterally exits from an Ark?

In Ark, if Alice decides to unilaterally exit will this means the entire tree must be revealed? How is congestion control handled?
bordalix's user avatar
  • 477
0 votes
1 answer
92 views

How can I tell from the `getrawtransaction` if a transaction signaled Taproot?

I'm trying to "distill" Taproot transactions in the raw transaction output, but: It is still not clear to me what tx version number a Taproot transaction uses. How to find out if it's a ...
Bart DV's user avatar
  • 71
1 vote
1 answer
72 views

Segwit Taproot xPub switchup

I'm hoping someone can help me out here. I added a new wallet to my BTCPayServer, but I did not add "-[taproot]" to the end of the xPub. I assume that it then was perceived as a Segwit ...
Buster Mønster's user avatar
0 votes
1 answer
42 views

Are contrived combinations of address format and segwit version program possible?

I wonder that I'm unable to see how exactly BIP 0341 forbids v1+ segwit from using bech32. Does consensus allow combining v1+ segwit programs with the bech32 format? I could expect v0 segwit was maybe ...
Mercedes's user avatar
  • 797
5 votes
0 answers
76 views

Which wallets are spending P2TR with SIGHASH_ALL?

I noticed there are quite a lot of transactions spending taproot key path inputs that use SIGHASH_ALL instead of SIGHASH_DEFAULT in signatures (around 20% in the last two weeks). Recall that ...
Vojtěch Strnad's user avatar
4 votes
1 answer
165 views

Where can I find (free) "deep-dive" materials related to Taproot?

I'm not sure how much bitcoin stack exchange is really meant for questions like this (this is probably more for reddit) but maybe someone can help me. I'm totally fine if the question is closed. ...
dassd's user avatar
  • 1,029
3 votes
1 answer
130 views

taproot script spending issue

I have been working in a bitcoin library for educational purposes (being taught in courses/meetups/etc.). I had quite some time to work on it and decided it was about time to support taproot. I have ...
karask's user avatar
  • 2,520
1 vote
1 answer
128 views

Is the Taproot upgrade really essential for BRC-20 tokens on Bitcoin?

BRC-20 currently relies on the Taproot upgrade. I'm wondering how blockchains such as Dogecoin, which have Bitcoin as their predecessor and did not upgrade to Taproot, manage to support BRC-20. More ...
leotron's user avatar
  • 13
4 votes
1 answer
90 views

How did Taproot get its name?

I've looked around best I could, but couldn't find a good answer to this. Is there any place it's documented publicly as to why the soft fork was called Taproot?
Hunter Beast's user avatar
3 votes
1 answer
201 views

How can I tell if a Taproot input is a key path spend or a script path spend?

In some analyses of chain activity, I sometimes see Taproot spends divided into key path and script path. Why are they called that? Which BIPs should I read to learn more? When I look at a P2TR tx in ...
Hunter Beast's user avatar
2 votes
0 answers
70 views

Is there a limit on the number and size of script inputs when spending a script path in a P2TR transaction?

From BIP 341, Spending using one of the scripts: A Taproot output can be spent by satisfying any of the scripts used in its construction. To do so, a witness stack consisting of the script's inputs, ...
Pramod Kandel's user avatar
3 votes
1 answer
155 views

Sweep Taproot and native Segwit v0 coins in a single transaction using Bitcoin Core wallet

My goal Learn how to send an imported tr(wif) and wpkh() utxo in the same transaction. What I've tried I imported a WIF utxo containing a v1 segwit utxo. bitcoin-cli importdescriptors '[{"desc&...
Michael Tidwell's user avatar
2 votes
1 answer
112 views

Taproot Script Path Spending can't pass signature verification

I am trying to verify the witness of a P2TR transaction, but the signature verification failed, could you please help? The raw transaction: ...
lj zn's user avatar
  • 31
6 votes
1 answer
332 views

Can't verify Taproot signatures that use SIGHASH_ANYONECANPAY

I wrote a program that verifies signatures for Taproot transactions using the secp256k1 library. My program works perfectly for SIGHASH_ALL, SIGHASH_NONE and SIGHASH_SINGLE. But in February, we saw ...
Zephyrus's user avatar
  • 658
0 votes
1 answer
419 views

How to verify that a signature was signed by a pubkey? Taproot and BIP0322

Using wallets like XVerse, users can sign a message using their ordinal btc address, let's say bc1XXX, the message is hashed based on BIP0322. So I have: User wallet: bc1XXX Message hash: YYY ...
toto's user avatar
  • 126
4 votes
1 answer
272 views

Taproot Script Path - Multisig Invalid Schnorr Signature

I am trying to implement a script-path spend on taproot, where the 1 script is a 1 of 2 multisig (yes I know this isn't the most efficient way of achieving this outcome). I can get the key-path to ...
Peter's user avatar
  • 115
0 votes
0 answers
154 views

Generate a Bitcoin taproot address with specific prefix for burning assets

I would like to generate a bitcoin taproot address (bc1p) for burning assets. Which means not one would have the private key. But in the mean time I would also want a vanity address (an address start ...
daniaoren's user avatar
2 votes
2 answers
161 views

Can someone explain the byte composition of an inscription reveal transaction?

Doom was inscribed on chain. The reveal transaction had the following script OP_PUSHBYTES_32 1809cc80b0c9bf0277e774f7f78c5dd0c61f9eda7bec7875dc99457bbf61af8f OP_CHECKSIG OP_0 OP_IF OP_PUSHBYTES_3 ...
DeLorean88's user avatar
1 vote
2 answers
118 views

Inscriptions with size less than 10Kb were seemingly possible before taproot, why did they become popular only now?

In 2017 SegWit soft fork introduced consensus limit on script size MAX_STANDARD_P2WSH_SCRIPT_SIZE=10000. With P2WSH, one could seemingly use the same script structure ("envelope") OP_FALSE ...
DeLorean88's user avatar
2 votes
1 answer
294 views

Derive taproot addresses from BIP39 mnemonic

I have two questions, but here's some general info to start: I wrote a little C program to generate addresses for BIP44, BIP49, and BIP84, and I wanted to (finally) update it to include BIP86. I've ...
MrPuzzler's user avatar
  • 233
1 vote
1 answer
176 views

I get an Invalid Schnorr signature when trying to broadcast a taproot transaction

I have 0.00036134 testnet bitcoin at the segwit v1 address: tb1p3au39skpdd8suuhunr4ymp6ca6akv9keq20v5twuagpmyqntqaasl22f4w I wrote this script to achieve 2 things: archive a hash in a transaction and ...
ChristianOConnor's user avatar
3 votes
1 answer
93 views

Questions wrt taproot's message digest signing

BIP-341 describes how to construct the message to be signed for taproot (subsection Common signature message). It mostly makes sense but I have a couple of quick questions: Is the ext_flag 0 when ...
karask's user avatar
  • 2,520
2 votes
2 answers
308 views

Get the scriptPubKey from a Taproot address

I have this function that converts a Bitcoin private key as an integer to a public key and an address. def get_seg_v1_from_pkey(imported_key): imported_key_toint = int(imported_key) ...
ChristianOConnor's user avatar
3 votes
1 answer
178 views

How can I find the public key corresponding to a P2TR input?

Can you please tell me what is inside the Taproot Witness data? For P2WPKH, it is defined in BIP-0141 and we have: <signature> <pubkey> But for Taproot, I can't find anything similar. Per ...
Sina Sharifzade's user avatar
1 vote
0 answers
76 views

I get a not a P2TR scriptPubKey error when trying to generate a bech32m taproot compliant P2TR address with python

I have the following script that is supposed to derive a taproot P2TR address: from bitcointx import set_custom_secp256k1_path set_custom_secp256k1_path('./bitcointx_secp256k1_here/libsecp256k1.2....
ChristianOConnor's user avatar
2 votes
2 answers
359 views

How do I generate a testnet segwit v1 taproot compliant bitcoin address?

I have a script that generates a segwit v1 taproot compliant address and private key. The script currently generates a regtest address but with minor tweaks it spits out a mainnet address. I think the ...
ChristianOConnor's user avatar
1 vote
1 answer
56 views

Can Taproot Script condition over the amount from a particular output being spent

Imagine a single multisig taproot address funded by a buyer. He bought from two vendors in a single order, but the resolution of each order/vendor pair is unknown ahead of time, and will happen at ...
Meglio's user avatar
  • 287
5 votes
1 answer
311 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 ...
Bitcoin_1o1's user avatar
2 votes
1 answer
536 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?
Orny's user avatar
  • 131
4 votes
1 answer
243 views

What is this || notation in BIP 341?

SHA256(SHA256(tag) || SHA256(tag) || x) What is the || notation? Is this the conjunction of the different elements? Bitwise OR? or modulus?
Will Jackson's user avatar
3 votes
1 answer
68 views

Inconsistent behavior testing Taproot Workshop - Section: 0.2 Elliptic Curve Math

Workshop link: https://github.com/bitcoinops/taproot-workshop/ In the section 0.2.4 Programming Exercise: Distributivity of scalar operations we implement the following code: a_key = ECKey().set(a) ...
Poseidon's user avatar
  • 633

1
2 3 4 5