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).

1
vote
0answers
12 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 -...
0
votes
0answers
59 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
25 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
21 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
40 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
28 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
50 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
133 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
14 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
88 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
39 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
99 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
35 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
25 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
51 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
76 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
137 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
35 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
58 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
80 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
28 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
57 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
57 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 ...
1
vote
3answers
216 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
257 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
37 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
134 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
124 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
100 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
63 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
106 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
34 views

Transaction order in the blockchain

What is the difference between segregated witness (segwit) and canonical transaction ordering (CTOR) ?
1
vote
1answer
54 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
52 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
93 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
274 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
55 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
31 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
46 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, ...
1
vote
1answer
98 views

Transaction Malleability, How can I change signature?

I'm kind of desperate as I can't follow some ideas that I don't understand. I hope you can help me. Thank you in advance It's all about Segwit Question 1) It says that when bob makes a transaction ...
2
votes
1answer
138 views

How do I calculate the witness commitment hash for a given block?

From my understanding, every SegWit enabled block has an added output script which is used as a place to store the "Witness commitment" specified in BIP 141. One issue I've stumbled upon was ...
2
votes
1answer
71 views

Where is the pubkey for segwit inputs?

Normally when you spend an input, you reveal your public key and signature so that ECVERIFY can be done. I look at segwit raw transactions and cannot find the public key inside them, where do they go?...
2
votes
2answers
234 views

How can a third party spend BCH accidentally sent to a BTC address?

I transferred BCH to an Electrum wallet address and haven't ever received it because Electrum uses only BTC. As I have been trying to recover it, I looked up the transaction on explorer.bitcoin.com ...
0
votes
1answer
45 views

Is there any format change in block #498557

I wrote some python code to parse the block data, all the result are fine, until block01095.dat, block #498557. The code to deal with Transaction is: class Tx: def __init__(self, blockchain): ...
1
vote
0answers
14 views

I sent BCH to a segwit btc address, how can i get it back? [duplicate]

I accidentally sent bitcoin cash to a segwit bitcoin address, please can anyone help me on how i can get it back. i tried using this recovery service, https://bch.btc.com/docs/help/...
1
vote
1answer
255 views

sent BCH to a BTC Segwit address [duplicate]

Is there a way to recover the BCH ? Use his Ledger purse I've sent BCH To address BTC Segwit This link is treated https://explorer.bitcoin.com/bch/address/36CU6nDniJca1UVhvNhjsDdZpUsyYw5vSx I want ...
0
votes
1answer
96 views

Access funds on legacy address related to segwit address from which I have private key

The situation Hello. Our company running BTC pool. We've been mining BTC for a while and used segwit address 32Z3eXSPgxcHj2fnQy8d6dg66eVtZfxrBM as pool adress. But when we finally found a first ...
1
vote
1answer
260 views

Can you retrieve funds send to a legacy address created with a Segwit extended private key imported in Mycelium from a Ledger Nano S?

I imported a segwit xpub6-key in Mycelium as a watch only address. It only shows address starting with 1 instead of 3, which makes sense. I retrieved a small amount on the legacy address and it shows ...
5
votes
1answer
201 views

What exactly is hashed and signed in a segwit transaction

I have an unsigned raw segwit transaction on my regtest network: ...
0
votes
1answer
31 views

Are higher versions of segregated witness script non-standard?

My understanding is that only version 0 is defined but other versions are considered valid to allow extensions using soft forks, but are they non-standard at the moment?