Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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

Filter by
Sorted by
Tagged with
1
vote
1answer
44 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?
1
vote
1answer
156 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 ...
4
votes
1answer
85 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
76 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 ...
2
votes
1answer
363 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 ...
1
vote
1answer
284 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
346 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?
8
votes
2answers
4k views

Bech32 conversion to legacy P2PKH?

Electrum now generates Bech32 addresses for SegWit wallets. Example: bc1qnntcclssmtuvfw2te7q49lzvw67cfvpzxger4j Pubkey: 023f1b3421c6ae0c1758834d40806c2418194b507be261fa343a0636653f3ec75b If I ...
1
vote
0answers
52 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
243 views

Why do we need SegWit (technical explanation)

After reading a lot of articles, whitepapers and videos I am still confused why do we need SegWit an Lightning instead of just bigger blocks. I don‘t want to debate Bitcoin vs Bitcoin Cash but what ...
1
vote
1answer
250 views

Bitcoin segwit addresses from HEX

I loved those two https://github.com/grondilu/bitcoin-bash-tools https://www.bitaddress.org/ because you can convert HEX into WIF private key. Is there something similar what allows to create ...
5
votes
2answers
63 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 ...
4
votes
1answer
152 views

Does segregated witness allow to securely create LN channel opening transactions?

In Rusty Russell's paper about the simplified version of the Lightning Network, some problems about the practical implementation of the opening channel method from the original LN paper are mentioned: ...
4
votes
1answer
656 views

Qualities of “Pay to Nested Witness Key Hash”

The lightning dev tutorial mentions the np2wkh or Pay to Nested Witness Key Hash address type, and I would like to find out more about it, so far without success. Can anybody explain how they are ...
5
votes
2answers
423 views

Has UTXO selection methods changed since activation of Segwit?

Before Segwit, transactions were penalized higher fees for having more inputs than outputs due to the input size being larger despite those transactions actually decreasing the global UTXO set. Segwit ...
1
vote
1answer
45 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
24 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
1
vote
2answers
397 views

Derive LTC Segwit (M-Address) private key from Trezor

So I'm trying to get my head around this! I've got my 24 seed for my Trezor. I got my Segwit account for LTC (Address starts with M). I also have the P2H equivalent for my address (Starts with 3). ...
3
votes
4answers
2k views

Vanity address generation for Segwit?

Vanity address generation is currently strightforward for "old" Bitcoin addresses (starting with 1) with multiple software options available (oclvanitygen e.t.c). Is there any options to generate ...
2
votes
1answer
41 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 ...
5
votes
1answer
429 views

Can I mix P2PKH and P2WPKH inputs in the same transaction?

I'm trying to increase my knowledge of bech32 and SegWit and to that end am working my way through this explanation. Here's a hypothetical situation I'm trying to understand. Let's say Jamal has ...
3
votes
2answers
396 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
38 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?
0
votes
1answer
105 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 ...
0
votes
1answer
146 views

Confirming transactions in the Merkle root and SegWit

I'm trying to find out how exactly transactions are confirmed in a block. I understand that to confirm a transaction, you hash it with its associated transaction and then the associated hashes until ...
4
votes
1answer
847 views

Does the bitcoin testnet3 network support Segwit and OP_CSV?

As far as I know, Segregated Witness and OP_CHECKSEQUENCEVERIFY are the last features needed to be able to fully implement a trustless bi-directional payment channel, from start to finish. (...
4
votes
1answer
182 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 ...
2
votes
1answer
704 views

Is there an address format for P2WPKH or P2WSH?

Is there an address format for P2WPKH or P2WSH? If P2WPKH uses the same address format as P2PKH, how does a wallet know which one to use?
1
vote
2answers
106 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. ...
0
votes
0answers
21 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
4answers
1k views

Generating a segwit (bc1) address from a brain wallet?

Are there any brain wallet generators that can generate segwit (bc1) addresses yet?
1
vote
1answer
159 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 ...
7
votes
2answers
2k views

How do transaction costs compare between Bech32 addresses and legacy Bitcoin addresses?

Now that Electrum 3 supports Bech32 addresses for segwit, when sending coins to a legacy address are fees higher or cheaper?
1
vote
1answer
51 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
2answers
2k views

How to check if an address is valid in Bitcoin Cash?

A lot of users seem to be mistakenly sending Bitcoin Cash to Bitcoin addresses and vice versa. I understand Bitcoin Cash doesn't support SegWit and that if Bitcoin Cash is sent to a SegWit Bitcoin ...
1
vote
1answer
29 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?
0
votes
1answer
181 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 ...
1
vote
1answer
108 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 ...
1
vote
1answer
400 views

How much does the weight of 2-of-3 multisignature inputs change between P2SH and P2SH-P2WSH?

I'm trying to calculate the weight of a 2-of-3 multisignature P2SH-P2WSH input. I found the related question Predict multi signature transaction size, which I've calculated out with m=2, n=3 here: ...
3
votes
2answers
211 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.
1
vote
1answer
233 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
1answer
50 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
3answers
360 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 = ...
0
votes
2answers
125 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
1answer
167 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 ...
1
vote
1answer
51 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, ...
5
votes
2answers
311 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": ...
4
votes
2answers
1k views

P2WSH, witness_v0_scripthash: how to derive an address

Is there an address associated with P2WSH scripts? for testnet txid =6717c8971dccbf826790efc16fb357f1e225fed3448247b8556c9f13a6c0ce42, i get: "vout": [ { "value": 0.05994165, "n": 0, ...
2
votes
1answer
299 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.
4
votes
2answers
154 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?