Questions tagged [witness-data]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
44 views

Why do some P2SH spending transactions have data both in the ScriptSig and Witness field?

I wonder if the wallet screwed up or if I am missing something in my bitcoin understanding. Here is the tx output being spent: "value": 0.00180675, "n": 154, ...
J S's user avatar
  • 35
0 votes
0 answers
16 views

Data insertions through Layer 2 Protocols

I was wondering if there was a way I could use bitcoin nodes to see if there is a data insertion through Layer-2 protocols? Thanks.
mark's user avatar
  • 25
2 votes
1 answer
78 views

Is a BIP required for the removal of SegWit Discount for Inscriptions?

Is a BIP required for the removal of SegWit Discount for Inscriptions? The rationale of such a change is to standardize the fee structure across all data types included in a block, ensuring that ...
BitcoinFanatic's user avatar
-1 votes
1 answer
107 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
  • 69
0 votes
1 answer
38 views

What mechanism is used by nodes to link Witness data to its Transaction?

I am stuck in developing an understanding of how a node could go from SegWit TXID to lookup Witness data, or vice-versa. I see that eventually a witness TXID is calculated and included in a Merkle ...
Nicholas Sandomeno's user avatar
-2 votes
1 answer
93 views

Asumming a quantum computer gets deployed. Is it safe to prune the witness area and make blocks 1MB again?

Assuming a quantum computer gets deployed. ECDSA doesn't prove anything anymore. Can we prune the witness area to save space and turn old transactions into a proper anyone can spend?
Hcomber's user avatar
3 votes
1 answer
173 views

What is considered witness data in SegWit?

What fields in a transaction are considered witness data? I need this to calculate the vsize for fee. My understanding is these are marker, flag and witness (from 1 and 2). Or is it just witness, ...
WebOrCode's user avatar
  • 333
5 votes
2 answers
276 views

Is a transaction with a non-segwit input STILL considered malleable? If so how?

Below are a few examples of witness malleability, along with reasons why I believe they are no longer valid: DER Malleability For every DER signature with (r,s), there exists 2 valid 's' values -> ...
Peter's user avatar
  • 115
14 votes
2 answers
1k views

Why is witness data downloaded during IBD in prune mode?

Why do pruned nodes download (segregated) witness data during IBD if much of that data is marked as Assumevalid? These nodes seem to be downloading witness data just to prune it. Since we already know ...
Son Kaos999's user avatar
13 votes
2 answers
933 views

Follow-up to Segwit: Arbitrary data storage in witness?

In 2017 a question about Segwit: Arbitrary data storage in witness? asked whether people wanting to store more data in the blockchain than OP_RETURN allows could instead store data in the witness ...
RedGrittyBrick's user avatar
0 votes
2 answers
89 views

How can I calculate the length (in bytes) of the Witness data in a transaction?

I'm trying to parse a bitcoin block. I took as an example this block from 2019. I'm trying to parse the first transaction. I don't understand how to calculate how many bytes I have to read for the &...
nem0z's user avatar
  • 103
0 votes
1 answer
175 views

How do I determine whether an input or output is segwit? - revisited

This is a discussion that has already been had here, but bear with me. We're gonna be talking about tx faae7e55db14a32e083cbf6a91db8a5ab6a3b05e050d9cefdec80b47f966848e all I got is the encoded ...
RooSoft's user avatar
  • 147
0 votes
1 answer
447 views

Missing Witness field in p2wpkh decoded tx hex

I have placed together a raw tx hex but when it's unable to be broadcasted as I keep getting an error below sendrawtransaction RPC error: {"code":-25,"message":"bad-txns-...
jiamijiang's user avatar
1 vote
1 answer
1k views

What is "Witness"?

What really is "Witness"? I saw this data in blockchain and can not identify what it really is. Here is the dump of transaction for example. TX hash = ...
Denis Leonov's user avatar
1 vote
1 answer
144 views

How is the witness reserved value set in a coinbase transaction?

In a coinbase transaction the second transaction output seems always to be a 32-byte witness reserved value. Is there any constraint on this value?
Andy's user avatar
  • 233
3 votes
1 answer
379 views

Where is the witness data stored in the raw block data

I can see in BIP-141 where the merkle hash is stored. And I think its clear that the witness data won't be streamed inline with the TXN data. So I assume the witness data is simply thunked on to the ...
Dan's user avatar
  • 461
4 votes
1 answer
2k views

Redeem script. script hash, witness script and witness program

I have a little confusion about naming in Bitcoin. Redeem script is the conditions that will be satisfy. For example P2PKH inside P2SH OP_DUP OP_HASH160 <PubKHash> OP_EQUALVERIFY OP_CHECKSIG ...
monkeyUser's user avatar
0 votes
3 answers
691 views

Generate P2SH-P2WSH

I want to generate P2SH-P2WSH with script P2PKH. My public key is 027712968e8f2f9dfa79abe10940a3d915a0c95a0b97750881e6201acf2b66da97 SHA256 and RIPEMD160 of Public key ---------- Witness Script ...
monkeyUser's user avatar
3 votes
1 answer
774 views

Confusion about Addresses

I have a little bit confusion about addresses segwit and not segwit. I can see P2WPKH and P2WSH from this link https://en.bitcoin.it/wiki/BIP_0173, and they are segwit and start with bc (mainnet) or ...
monkeyUser's user avatar
1 vote
1 answer
339 views

Generate P2WSH native

I want to create P2WSH native like https://en.bitcoin.it/wiki/BIP_0173. I have already a script to generate P2WPKH and it works, thank the python part and re-arrange group byte works. I read that ...
monkeyUser's user avatar
1 vote
1 answer
598 views

Re-index/Re-download from specific height?

I seem to have discovered corrupt blocks on one of my nodes. The node is on all the time to keep up to sync and the rest of my nodes connect to it to retrieve block data when they need to sync. The ...
Shadouts's user avatar
  • 141
3 votes
1 answer
197 views

Why does a same transaction signed separately have different witness values?

I signed a bitcoin testnet transaction using nbitcoin library and got an output: ...
Akshay Dev's user avatar
0 votes
0 answers
79 views

How do I ask for witness data from a Bitcoin full node?

So, I'm trying to build a Bitcoin block explorer using my own Python library. I'm doing it just as an exercise to better understand how Bitcoin works under the hood. Right now, when I send a block ...
Jonathan Erlich's user avatar
1 vote
0 answers
173 views

(P2WSH-nestedin-P2SH) Problem in solving question 1+5=6

this is my first question at this platform. this matter has scratched my head badly, please pay patient to read my question. i am trying to move traditional p2sh tx into p2wsh-nestedin-p2sh tx and ...
Atlas Chiew's user avatar
1 vote
2 answers
221 views

How does storing the witness outside of the block prevent malleability?

I have some question on how segregated witness work. I'm reading this post and in the answer exist this phrase Since signature data (witness data) is stored outside the transaction (and outside ...
vincenzopalazzo's user avatar
1 vote
1 answer
523 views

Concept of Block weight and segwit are still unclear

It seems like duplicated question, but i read many articles and posts to undestand about segwit. Below links are something i read What is block weight and how is it different from block size? After ...
HSKim's user avatar
  • 41
1 vote
1 answer
100 views

How to generate an output address from output scrips which start with 0x00?

A few days ago, I got a BITCOIN traffic which contains some tx message. some of tx messages contain witness data. I want to produce all output addresses from transaction output scripts. I extracted ...
Saeed's user avatar
  • 125
3 votes
1 answer
72 views

Would signature aggregation reduce the largest feasible blocksize

If a Schnorr signature aggregation scheme were to be integrated into Bitcoin. Would the reduction in witness data versus non witness data (need less bytes for a signature therefore witness data usage ...
Bertram Lund's user avatar
11 votes
2 answers
4k views

How do virtual size, stripped size and raw size compare between legacy address formats and native segwit?

This answer states that SegWit doesn't reduce transaction size. If this is true, why is it cheaper to send a SegWit transaction?
ecurrencyhodler's user avatar
3 votes
2 answers
257 views

Why is the wtxid considered malleable?

Why is the wtxid considered malleable since the transaction is unconfirmed? How can a third-party modify it?
dcfg's user avatar
  • 404
2 votes
3 answers
711 views

Calculating the witness size of a transaction

I want to calculate how many % of a block, and thus, transactions that are witness data. I need to calculate the size of the witness data in bytes in every transaction. And as I understand it, I ...
Jonas Svensson's user avatar
2 votes
1 answer
64 views

Does my segwit node only have segwit blocks?

My segwit node makes a gettxout RPC query and checks the scriptPubKey.type is "witness_v0_keyhash" and does things accordingly. To my understanding old nodes have different blocks and if I happened ...
nopara73's user avatar
  • 806
8 votes
3 answers
9k views

What is the Witness and what data does it contain?

I've learned about the Segregated Witness but couldn't find info on breaking it down. I know usually when legacy addresses are used the public keys for example will be under Scriptig. With P2SH, I ...
Robert's user avatar
  • 351
5 votes
2 answers
630 views

How does a SegWit node verify a block?

I know that non-SegWit node could verify a block without witness. For SegWit node, is witness necessary to verify a block? Because I know witness are committed as wtxid merkle node in coinbase. What'...
fjchen's user avatar
  • 91
1 vote
1 answer
49 views

What happens to witness blocks?

What happens to witness blocks after they are broadcast to other witness nodes? Are they kept or forgotten after some blocks?
MCCCS's user avatar
  • 10.2k
1 vote
1 answer
452 views

How much will Segwit *actually* increase bitcoin capacity for realistic transactions?

I often see claims that Segwit increases transactions per block by 1.7x to 2x. I'm not sure if this is true, but if I do the math myself, I don't get this number. My understanding is: 1) The “weight”...
Brian's user avatar
  • 133
2 votes
0 answers
186 views

How much will Segwit increase the number of transactions that can fit in each block?

How much weight would the witness data have on the total block size? What is the culminating effect of this on the number of transactions that can fit into each block? Thanks in advance :)
James P.'s user avatar
  • 122
3 votes
1 answer
260 views

Parsing a SegWit transaction, what are stack items in witness data

For every input we can have multiple stack items, what do these represent? As a reference this question is helpful Are these defined here? For eg. P2WPKH would have a signature followed by a pubkey, (...
Albert S's user avatar
  • 1,630
3 votes
1 answer
632 views

Segwit: Arbitrary data storage in witness?

Let's say I want to encode the text of the King James version of the Bible into the block chain, one piece at a time (replace this with any zany idea to consume copious quantities of block space). ...
Rich Apodaca's user avatar
  • 2,341
1 vote
2 answers
201 views

What is the weight of a block that contains no pay-to-witness scripts?

I'm trying to understand block weight, a metric introduced by segwit (BIP-141): block weight = 3 * base size + total size "base size" is the length of a pre-segwit block, which contains only ...
Rich Apodaca's user avatar
  • 2,341
9 votes
3 answers
1k views

Why is the witness data fee discounted by a factor of four?

I've read that it encourages users to consolidate UTXO sets. How would it be doing that?
Murch's user avatar
  • 74.5k