Questions tagged [witness-data]
The witness-data tag has no usage guidance.
34
questions
3
votes
1
answer
132
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, ...
4
votes
2
answers
205
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 -> ...
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 ...
12
votes
2
answers
693
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 ...
0
votes
2
answers
58
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 &...
0
votes
1
answer
74
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 ...
0
votes
1
answer
274
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-...
1
vote
1
answer
677
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 = ...
1
vote
1
answer
106
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?
3
votes
1
answer
281
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 ...
3
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 ...
0
votes
3
answers
645
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 ...
3
votes
1
answer
725
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 ...
1
vote
1
answer
266
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 ...
1
vote
1
answer
464
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 ...
3
votes
1
answer
159
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:
...
0
votes
0
answers
73
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 ...
1
vote
0
answers
158
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 ...
1
vote
2
answers
203
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 ...
1
vote
1
answer
478
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 ...
1
vote
1
answer
88
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 ...
3
votes
1
answer
68
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 ...
9
votes
2
answers
3k
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?
3
votes
2
answers
235
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?
2
votes
3
answers
542
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 ...
2
votes
1
answer
61
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 ...
8
votes
3
answers
8k
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 ...
5
votes
2
answers
616
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'...
1
vote
1
answer
47
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?
1
vote
1
answer
443
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”...
2
votes
0
answers
184
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 :)
3
votes
0
answers
199
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, (...
2
votes
1
answer
527
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). ...
1
vote
2
answers
193
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 ...