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

18
votes
1answer
2k views

How is SegWit a soft fork?

Reading this section of BIP144, I noticed the followng statement: Parsers supporting this BIP will be able to distinguish between the old serialization format (without the witness) and this one. ...
10
votes
1answer
2k views

Is SegWit a blocksize increase or more efficient use of blockspace?

This question gets asked frequently on reddit, and I think it would be beneficial to have a canonical answer here: Is SegWit a blocksize increase or more efficient use of blockspace?
25
votes
1answer
13k views

How is segwit2x different from segwit?

Today everybody got the news about the potential segwit2x adoption. However, I am trying to understand: while both of them based on the same segwit principals how they are different? Is it about the ...
18
votes
1answer
956 views

What is “segregated witness” and how can it improve network scalability?

I've just heard about it, and it is claimed to be a "turning point" in the block-size debate. What is "segregated witness?" how does it work? How can it be used for improving network scalability? ...
16
votes
2answers
1k views

What is the User Activated Softfork (UASF) proposal? How do its risks compare to hardforks?

The Bitcoin community is abuzz with discussion about shaolinfry's proposal of a UASF to activate SegWit as an alternative to the Version Bits activation. I've seen frequent and extensive discussion of ...
5
votes
2answers
1k views

SegWit transaction fee/byte

For transaction not spending SegWit outputs it's straightforward: if I have 1000 Satoshi fee set for 500 byte raw transaction, I end up with 2 s/b fee. How about transaction containing witness data? ...
10
votes
2answers
2k views

How to get addresses from scriptPubKey in segwit transactions?

I'm running through raw transaction data, and I'd like to be able to gather addresses (where possible). So far, I've made this diagram to help me understand when it's possible to figure out addresses ...
15
votes
1answer
11k views

How to generate SegWit address

How do I generate a SegWit address using Bitcoin Core CLI? Also will I be able to redeem those outputs and send them to a "legacy" address? If so, will this second transaction be accepted by older, ...
6
votes
1answer
1k views

Will SegWit allow for m of n multisig with very large n and m?

By reading this answer, I understand that in m-of-n multisig addresses, m and n are limited by the maximum size allowed by the P2SH redeemScript (i.e. 520 bytes). However, in this section of BIP141, ...
6
votes
2answers
1k views

How does SegWit reduce transaction size, when the signature is simply moved to another part of the transaction?

This video explains that the signature is moved out of the input section and moved to the new one called the witness. From what I can tell, the witness signature is still contained in this transaction ...
5
votes
1answer
571 views

Why does BIP141 define both virtual transaction size and weight?

Why does BIP 141 (segwit) define both virtual transaction size and weight? Weight seems to be just four times virtual transaction size (or vice versa, depending on what you define first). Why are ...
4
votes
1answer
1k views

Generate paper wallet SegWit address

I am trying to generate SegWit paper wallet address from WIF: My WIF is L5mHKZsCLS27nSoGM3RdAwuxjvg7XhJdP25LgqdXe6zF11wpWdbT. I am converting WIF to compressed public key: Compressed public key: ...
2
votes
1answer
370 views

What was the number of the block in which SegWit got activated? And first transaction?

It was definitely on August 24th 2017, but not sure about the block number. Many sources reference block 481,822; but others state 481,824. Also, even if this was the first block to allow segwit ...
0
votes
1answer
1k views

How to get legacy address and private key from Segwit P2SH address?

I have a Segwit P2SH address (starting with 3...) with the corresponding private key and need to obtain the legacy address (starting with 1...) and the private key. Is this possible?
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?
4
votes
2answers
228 views

Is there a reason big Bitcoin companies wouldn't use only SegWit transactions?

As I understand, SegWit allows anyone to create a SegWit address where they can send their bitcoins and transact from that wallet just as easily as they would with a traditional address. The SegWit ...
3
votes
1answer
277 views

how to get address from transaction with empty ScriptSig?

look here https://blockchain.info/tx/d4223672c9043c17a2775abde858778fca38b53152e165757188ab747850770e why does address start with bc1q... ? Is it some standart? How can I derive this value from ...
2
votes
2answers
236 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
244 views

Has SegWit been activated yet?

Is SegWit activated and when exactly did that happen? I keep getting conflicting information, any help would be much appreciated!
9
votes
1answer
7k views

Difference between a SegWit address and a P2SH address

Let there be an address 3ABCDEFGHJKDJHDH.... How can I understand if it's a SegWit address or a MultiSig address?
5
votes
1answer
685 views

Redeem script for segwit addresses

How does one derive the Redeem Script for the new Pay-to-Witness Pubkey Hash addresses? With existing P2SH it's revealed after providing N number of Public Keys through a createmultisig function in ...
9
votes
1answer
3k views

With 100% segwit transactions, what would be the max number of transaction confirmation possible on a block?

With 100% segwit transactions, what would be the max number of transaction confirmation possible on a block? And, how many utxo can be updated by a block full of segwit transactions?
7
votes
1answer
647 views

Transaction verification by miner VS full node with & without SegWit

I'm trying to fill a few gaps in my understanding of transaction verification and would appreciate any insight. Without SegWit Miners broadcast new blocks which contain the signature(s) with every ...
16
votes
2answers
400 views

How thoroughly has Segregated Witness been tested?

I've encountered claims that Segregated Witness was "not really tested" and is being "rushed". It is my understanding that SegWit had been running on Elements for more than half a year already, and ...
4
votes
2answers
1k views

What is block weight and how is it different from block size?

While reading about BIP141, I have encountered the following options: Block creation options: -blockmaxweight=<n> Set maximum BIP141 block weight (default: 3000000) -blockmaxsize=<n> ...
3
votes
1answer
809 views

What does “NODE_WITNESS (12)” mean as it is shown in bitnodes.21.co?

I'm running a pruned full node of bitcoin core version 0.14.0 and checking on https://bitnodes.21.co/nodes/ I can see that my node was labelled "NODE_WITNESS (12)" unlike of the others nodes shown, ...
2
votes
3answers
2k views

Calculate Segwit address from public address

I would like to calculate the segwit address of a public address. First step: take the compressed public address: 1L88S26C5oyjL1gkXsBeYwHHjvGvCcidr9 do a sha256 on that address: ...
2
votes
2answers
202 views

Which kinds of transactions show quadratic signature-hashing scaling?

It has been stated: A major problem with simple approaches to increasing the Bitcoin blocksize is that for certain transactions, signature-hashing scales quadratically rather than linearly. https:/...
1
vote
1answer
260 views

Segregated witness soft fork: how is the funding Tx made “ANYONECANSPEND”

Reading the BIP: https://github.com/bitcoin/bips/blob/master/bip-0142.mediawiki I see that the scriptPubKey in a transaction that funds a segwit redemption is the same as a normal P2PKH but merely ...
9
votes
2answers
2k views

Where is the Signature stored in a SegWit transaction?

I understand that SegWit makes transaction blockdata smaller, by not storing the signature in the Block, so that can fit more transactions in 1MB. This is because the signature is not anymore stored ...
5
votes
2answers
270 views

Can unupgraded nodes that accept zero confirmation be fooled after SegWit?

Considering the following scenario: After deployment of SegWit, there remain two old clients (with software that is unaware of SegWit) A & B. A funds a transaction to pay B using a SegWit ...
2
votes
1answer
348 views

OP_RETURN in a coinbase transaction?

Hey looking at this transaction I'm confused why there are two outputs and why one of them is labelled with OP_RETURN
2
votes
0answers
528 views

Is there any testnet faucet site that sends out to bech32?

I am writing a wallet for the far future and I am planning to completely drop the support for receiving to P2PKH addresses. I don't want to add P2SH over P2WPKH either.
2
votes
1answer
325 views

Creating a new electrum 3 wallet file with an imported segwit private key

I have a segwit private key that I generated from another app. How can I create a new electrum wallet file with just this private key in there? I tried creating a new electrum 3 wallet with this ...
1
vote
1answer
662 views

How to generate a native Segwit address and P2SH Segwit address from a standard WIF?

Can I have the steps to generate a native Segwit address from a standard WIF? And the steps to generate a P2SH Segwit address from the same WIF? How do these two formats differ and why are there two?...
5
votes
1answer
500 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 ...
4
votes
2answers
325 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 ...
3
votes
1answer
234 views

What do I have to do after Segwit activates if I'm running Bitcoin Core 0.14.1?

I have my bitcoins on a Linux Server. It runs Bitcoin Core 0.14.1. What do I have to do after Segwit activates?
3
votes
1answer
328 views

How to compute double sha256 shown in examples of bip 143?

How do I compute the double sha256 shown in example of bip 143? The example in Native P2WPKH hashPrevouts: dSHA256(...
3
votes
1answer
598 views

After Segwit Activation, what is the largest block size possible?

The code says MAX_BLOCK_SERIALIZED_SIZE = 4000000, but that is actually not a actually consensus rule as stated here: https://github.com/bitcoin/bitcoin/issues/10289 The actual consensus rule is ...
3
votes
1answer
317 views

How does a non-upgraded node read a SegWit transaction? [duplicate]

I'm trying to understand how my node would interperet a SegWit transaction if I do not upgrade. Even if I do not upgrade, I should be ...
3
votes
1answer
379 views

Does Segwit mean easier government monitoring?

I have noticed a steady stream of PR articles talking ad nauseum of the dangers of a contentious hard fork and how miners refusing to signal segwit are screwing us all. Many are quite well written and ...
3
votes
1answer
488 views

Parsing a SegWit transaction - what is the size of witness data?

I'm parsing s SegWit transaction, I got it done until i reach the witness data. How big is the witness data?
1
vote
1answer
389 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”...
1
vote
1answer
590 views

How to sweep a segwit bech32 private key?

I'm testing segwit bech32 addresses and generated the following using bitcoinjs: address: bc1qc7u5njf4nf2rj3zys642mfc7nct6kdven8j4e9 private key: 5Kkzs8XrJNAmf9VQDFeGBfaRvSByAvPK6DbDXw5BVqswWaXSG2Y ...
1
vote
2answers
101 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 ...
1
vote
1answer
89 views

segwit is activated due to BIP91?

Segwit (BIP141) is active since block 481824 in 24th August. I wonder if it was the BIP91 that made the segwit happen? I mean lets say BIP91 never existed, would segwit be activated in 24th August ...
1
vote
1answer
396 views

How does Segwit achieve backwards compatibility in terms of the block size? [duplicate]

If SegWit results in production of blocks that are larger than 1MB, how do old nodes see them as valid, instead of rejecting them due to exceeding the maximal allowed size of 1MB?
1
vote
1answer
706 views

bech32 addresses for segwit support in mycellium and coinomi?

Does mycellium and coinomi for android support bech32 addresses for segwit? If they don't would it throw an error if you tried to send it there?
1
vote
1answer
414 views

What is ment by the “value of the output spent by this input” in BIP 143?

I'm looking into BIP 143 and I'm confused by item 6 in the specification of the transaction digest algorithm. It says: The item 6 is a 8-byte value of the amount of bitcoin spent in this input. I ...