Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [segregated-witness]

This tag should be used for questions regarding Segregated Witness (segwit), an activated softfork that defined a new transaction format which doesn't include signatures in the transaction identifier (txid).

2
votes
1answer
123 views

What does it mean if TXID and WTXID are the same?

I'm having a tough time understanding what exactly WTXID is and what it means when WTXID and TXID are the same (and vica versa). What I understand is that WTXID includes the witness data. Since non-...
3
votes
1answer
53 views

What is the rationale for inclusion of previous amount in SegWit signing process?

When spending a P2PKH output, the "data" we hash only includes the output script from previous transaction but when spending a P2WPKH (the new serialization) we also include the amount field from ...
0
votes
0answers
34 views

Send to bech32 segwit address from Bitcoin Core 17.1

I have a non-HD wallet in Bitcoin Core v17.1. I have never used SegWit before. I need to send some coins to a bech32 address from bitcoin-qt GUI. The problem is after selecting the specific coin ...
1
vote
1answer
40 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 ...
4
votes
2answers
100 views

On chain cost of Segwit version 1 versus version 0

How do total blockchain cost for Segwit version 0 compare to version 1 which is being proposed? I'm specifically interested in a single user transactions – both paying to public key (or pk hash) and ...
1
vote
1answer
39 views

What is the O(n^2) signature hashing problem and how does SegWit solves it?

One of the many benefits of SegWit is that it solves the O(n^2) signature hashing problem. What exactly is the O(n^2) hashing problem and how segregating signatures to separate witness field solve it?
4
votes
1answer
64 views

Does v1 Segwit includes v0?

My question is whether the version 1 of Segwit script will allow you to use version 0 scripts types inside of it. In other words, is version 1 superset of version 0? Please include reasoning behind ...
1
vote
1answer
96 views

Multisig scripts hashing (p2sh): difference between legacy and segwit

Some time ago I noticed that, given the same inputs, addmultisigaddress and createmultisig Bitcoin core's methods were generating different p2sh (addresses). I asked around and a user from the ...
1
vote
1answer
46 views

Why do most exchanges still have not implemented segwit bc1 addresses to save block space?

Segwit bech32 bc1 addresses has been out for a good 2 years. Why do most exchanges still refuse to implement such a feature for its users? Exchanges create a bulk of the bitcoin transactions and also ...
0
votes
1answer
43 views

Following SegWit implementation, is BIP-146 signalling and implementation still on the docket?

Is BIP 146, which defines using the low S value, still on the docket to be signalled and implemented given that SegWit fixed the txid malleability issue by moving the witness outside the transaction? ...
1
vote
1answer
113 views

How to calculate segwit transaction fee in bytes?

I'm trying to calculate SegWit transaction fees in bytes, I have two Segwit inputs and 2 segwit outputs. can anyone calculate this transaction fees if I'm paying 100 Sat per byte?
1
vote
0answers
31 views

Stripped segwit data

I have two client Bitcoin, 0.17.0 and 0.12.0 and I want to see the difference between the same transaction. 0.17 has segwit, 0.12 doesn't have. If I do that RPC call in 0.17.0 /bin/bitcoin-cli -...
1
vote
1answer
259 views

Are there still miners or mining pool which refuse to implement SegWit?

It was well known that initially while SegWit got more than 50% of hashrate after activation that a part of the mining pools refused to implement it. But are there still blocks being mined by miners ...
1
vote
1answer
30 views

Failed CHECK(MULTI)SIG operation - BIP143 hash pre-image

Using Blockstream's api to broadcast a raw transaction to the Bitcoin testnet, I encountered the following error: sendrawtransaction RPC error: {"code":-26,"message":"non-mandatory-script-verify-flag ...
0
votes
0answers
22 views

Bitcoin was sent out and still hasn't been received

I sent bitcoin out to a segwit address (P2SH) and it split the transactions in 2 but I still haven't seen them delivered in into the wallet
0
votes
1answer
74 views

How to sweep a bc1… bitcoin segwit address using a mobile app?

I have a bitcoin private key with some money on the segwit bc1 address, but when I try to sweep this private key using mycellium android wallet, it shows up as a 3... address. What other mobile app ...
2
votes
1answer
34 views

Why does witness use count instead of length?

In legacy transaction (without SegWit) the scriptSig is easily parsed by knowing the length of it (a CompactInt value) and without needing to read the script in place. However in SegWit transaction ...
0
votes
1answer
64 views

How to generate the digest from a raw bitcoin transaction for verifying signature of specific input?

I'm writing a stand alone process that needs to verify that a known UTXO is part of a new transaction with a valid signature. Inputs [ UTXO, raw transaction, input_number ] How do to I verify the ...
4
votes
1answer
143 views

Activation of SegWit v1

The segregated witness soft fork of August 2017 included a versioning field which would allow for future incrementation. Anthony Towns has recently posted an early draft of the proposal for the SegWit ...
0
votes
0answers
15 views

Swift implementation of bitcoin transaction creation

Is there a well known and widely used Swift implementation for creating raw Bitcoin transactions and getting their hash (SegWit and Non-SegWit) of signing? If not, is there a reference document that ...
1
vote
2answers
98 views

If I was developing a Bitcoin wallet, should I support both legacy and compatibility addresses?

To receive funds, I was thinking of giving a user the option of displaying two QR codes: Legacy - p2phk e.g. 1AKDDsfTh8uY4X3ppy1m7jw1fVMBSMkzjP Compatibility - p2sh(p2wpkh) e.g. ...
5
votes
2answers
53 views

Why SHOULD the funding tx consume BIP 141 inputs?

In BOLT 02 we read that the funding TX should only consume segwit inputs. The sender: when creating the funding transaction: SHOULD use only BIP141 (Segregated Witness) inputs. What is the reason ...
1
vote
1answer
122 views

Why hash witness script instead of pubkey script in signature?

When a segwit input is signed, the signature will commit to the witness script (or a p2pkh-like script in case of p2wpkh). This is specified in BIP143: For P2WPKH witness program, the scriptCode ...
1
vote
1answer
46 views

Transaction version 2 - bytes between tx version and number of inputs

In the bitcoin transaction version 2, there are additional two bytes (hex: "0001") between transaction version (hex: "02000000"), and number of inputs (hex: "01"). What it is? Here's an example https:...
1
vote
1answer
26 views

which was the purpose of changing the signature of a TX? or it was just a bug before segwit?

Was there any purpose in changing the signature of a transaction? Or it was a bug before segregated witness? Does segregated witness disable some wanted feature?
1
vote
1answer
65 views

What's the segwit transaction serialization “flag” field for?

According to bip 141, the segwit transaction serialization format (used to compute the wtxid) is: [nVersion][marker][flag][txins][txouts][witness][nLockTime] The bip mentions that the flag field ...
0
votes
1answer
106 views

regtest: ERROR: ProcessNewBlock: AcceptBlock FAILED: unexpected witness data found (code 16) on v0.14.3

I have two bitcoind regtest processes; v0.16.3 and v0.14.3. I got "unexpected witness data found (code 16)" when v0.14.3 node try to received a block from the peer (v0.16.3) How can I fix it? (I'm ...
2
votes
2answers
180 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?
0
votes
0answers
37 views

SegWit-incapable miners won't include SegWit tx's but accept them as valid?

Why SegWit-incapable miners won't include SegWit tx's in their blocks but will accept as valid someone else's block with SegWit tx's in it?
1
vote
1answer
93 views

Can you send a transaction from non-native segwit to native(bech32) segwit address?

Let's say I have a wallet with a non-native segwit address (prefixed with 3- like multisig). Can I send my utxos from this address to a native segwit (bech32) address?
2
votes
2answers
123 views

How does the structure of a segwit block differ from a non-segwit block?

Is there any difference in the structure of a segwit block in comparison to a traditional non-segwit block? A diagram would be helpful if possible.
2
votes
1answer
32 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?
1
vote
2answers
73 views

Electrum's “script hash” form with NBitcoin?

I've come across how scripts are hashed in the electrum (stratum) protocol implementation by looking at the docs. I'm using NBitcoin, and I've tried to generate this hash from a segwit address, first ...
0
votes
2answers
77 views

SHA256 vs RIPEMD160 in SegWit

In Pay-To-Witness-Public-Key-Hash (P2WPKH), the RIPEMD160 hash function is used to hash the public key of the recipient in the locking script. On the contrary, Pay-To-Witness-Script-Hash (P2WSH) uses ...
2
votes
3answers
287 views

Why does the decode function of the segwit bech32 encoder/decoder take a hrp (human readable part) as input?

Looking at the code referenced in bip-0173, specifically for example here: https://github.com/sipa/bech32/blob/master/ref/javascript/segwit_addr.js function decode (hrp, addr) { var dec = ...
2
votes
1answer
277 views

Are “1” , “3” and “Bech” Addresses (BTC) forward and backward compatible?

Wondering if lets say someone has funds in Bech32 and they send to a "1" or "3" address due to less characters to remember ect.
1
vote
2answers
43 views

BIP 144 transaction format and soft-forks and old nodes

I was trying to manually parse a raw Bitcoin transaction in order to better understand how it works. This is how it starts: "0200000000010141035625cd030eca667c95d1729a" I think I've parsed the Tx ...
4
votes
2answers
140 views

What were the main technological reasons that Bitcoin Cash did not want to adopt SegWit?

What are the key risks/drawbacks to SegWit and why did the Bitcoin Cash community conduct a risky hard fork to avoid it?
2
votes
1answer
195 views

In simple terms, what are the major differences between P2WPKH and P2WSH bech32 addresses?

I've read over the bip173, bip141, and bip143 specifications and they're a bit too technical to get at the simple answers I'm looking for.
1
vote
2answers
105 views

How can Segwit increase transaction throughput if the same amount of data is stored in the blockchain?

I'm posting this after reading the answers to this: Where is the Signature stored in a SegWit transaction? I've found out from reading that, that in Segwit, the "witnesses" (or signatures) that ...
3
votes
2answers
70 views

SegWit Version - is there a proposal for new versions?

I can see transactions with version 0 Are there any other versions of SegWit proposed or in existence?
-2
votes
1answer
144 views

How to make segwit transaction and bech32 mandatory

Is it possible to make segwit transactions (and possibly segwit address: Bech32) mandatory in the Bitcoin Core code? In other words, when a transaction is created using the wallet, the transaction ...
0
votes
2answers
38 views

Transaction order in the blockchain

What is the difference between segregated witness (segwit) and canonical transaction ordering (CTOR) ?
1
vote
1answer
68 views

What percentage of nodes currently support segwit?

What percentage of nodes currently support segwit? It seems Bitnodes could figure this out, but I can't find such a stat on its website.
0
votes
1answer
62 views

Struggling to successfully broadcast a p2pkh transaction

I've been experimenting with sending bitcoin transactions with python for the past week. I successfully was able to send p2wpkh->ALL address types, p2sh-p2wpkh->ALL address types. What I am ...
0
votes
1answer
113 views

Segwit txin. Witness data association

I am trying to learn more about the bitcoin protocol and I am writing some python software to make a light wallet. I have advanced quite far and I have come across something that I dont really ...
5
votes
2answers
284 views

Why didn't Bitcoin implement segwit in the first place?

Why didn't Bitcoin implement segwit in the first place? Why and how does non-segwit Bitcoin enable a miner to change a transaction's txid? From Mastering Bitcoin ch. 7 § "Transaction identifiers": ...
2
votes
2answers
75 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 ...
1
vote
1answer
33 views

Does my segwit node only have segwit bocks?

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 ...
1
vote
1answer
47 views

Transaction Malleability, if i want to change signature, what part should I change, so that it would remain valid?

I know what transaction malleability is, but I don't understand how someone can change my signature so that it would remain valid. For example, If I want to change signature what part should I change, ...