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

4
votes
2answers
58 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
36 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
79 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
45 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
39 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
58 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 ...
3
votes
1answer
742 views

Can Bitcoin Diamond be claimed on Segwit addresses?

I currently have my Bitcoin (BTC) on a Trezor hardware wallet with Segwit (Not in a "Legacy account"). Can I claim Bitcoin Diamond (BCD) with this or not? In general: Should I move my BTC to a ...
0
votes
2answers
479 views

Segwit Addressed from xpub key

How can i get the public key of my segwit address with my extended public key. when i import the xpub into electrum it automatically creates a legacy wallet for me. i'm not with my nano and won't be ...
2
votes
1answer
261 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
38 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? ...
0
votes
1answer
212 views

Pycoin: How to sign SegWit transaction via Pycoin?

My target is to make transaction with unspent transaction outputs(UTXOS). The information of UTXOs is as follow. [ { "pt_idx": 0, "subaccount": 37, "ga_asset_id": 1, "value": "...
1
vote
1answer
251 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
64 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?
9
votes
2answers
3k views

Bech32 conversion to legacy P2PKH?

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

What is a “serialized signed transaction”?

Shown in the gray area here, describing how to apply, I think, Segwit to a transaction (particularly a Bitcoin Cash tx). The last section is titled "serialized signed transaction" however it doesn't ...
6
votes
2answers
48 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 ...
5
votes
1answer
148 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: ...
5
votes
1answer
530 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
354 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
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
1
vote
2answers
341 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
32 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 ...
4
votes
1answer
317 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 ...
2
votes
2answers
160 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?
0
votes
1answer
58 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
121 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 ...
3
votes
1answer
788 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
140 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 ...
3
votes
1answer
607 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
95 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
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
66 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 ...
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
112 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
1k 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
41 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
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?
0
votes
1answer
538 views

Segwit Address Supporting Testnet Faucet

Looking for a good Segwit supporting testnet faucet and preferably one that supports P2WPKH addresses, however answers that allow only P2WSH are fine too.
0
votes
1answer
94 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
59 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
357 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: ...
2
votes
2answers
101 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
76 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?