31
votes
Accepted
Bitcoin Segwit was released in the summer of 2017 to reduce the blocksize congestion. Why is it still congested?
SegWit cannot, and was never designed to "resolve network congestion". It:
fixes the third-party malleability issue that Bitcoin has had since its creation, vastly simplifying many multi-transaction ...
29
votes
Accepted
Is SegWit a blocksize increase or more efficient use of blockspace?
Yes and no. It depends on how you frame the question.
It is a block size increase, because you can fit a larger number of
useful transactions into a block.
If you want to make a useful Bitcoin ...
29
votes
Accepted
How is segwit2x different from segwit?
SegWit2x is a combination of both SegWit and a 2MB hardfork (to activate three months after SegWit).
SegWit2x uses a different 'bit' for signaling (bit 4 instead of bit 1) than SegWit.
SegWit (...
25
votes
Is there a difference between bytes and virtual bytes (vbytes)?
Yes, bytes and vbytes are referring to two different metrics: size and virtual size (vsize).
The size in [bytes] of a transaction refers to the raw byte length of its serialized format. It is used to ...
21
votes
Accepted
Why include the Segregated Witness Merkle Root in the input field of the coinbase transaction?
Why a witness commitment is necessary at all: Enabling DoS prevention for validating nodes
Block validation is expensive. It requires hashing all data in a block, building Merkle trees, looking up ...
21
votes
Accepted
How do virtual size, stripped size and raw size compare between legacy address formats and native segwit?
Segwit introduced a new limit for blocks, the blockweight limit, superseding the previous blocksize limit. Under the segwit rules, witness data is counted at a lower weighting than non-witness data ...
17
votes
Accepted
What is "segregated witness" and how can it improve network scalability?
It's not a silver bullet solution, but it's a really good start.
As Gavin Andresen has said, Segregated Witness is a poor name. The 'segregated' part of the name is there to denote that there is ...
16
votes
Accepted
How does SegWit reduce transaction size, when the signature is simply moved to another part of the transaction?
TL;DR:
SegWit does not reduce the transaction size, if you're referring to the raw byte length of transactions. Instead it introduces block weight as a new metric that does not directly correspond to ...
15
votes
Accepted
How to generate SegWit address
How do I generate a SegWit address using Bitcoin Core CLI?
You can use addwitnessaddress addr, where addr is an existing P2PKH or P2SH address of yours. It will construct a P2SH-P2WPKH or P2SH-P2WSH ...
15
votes
Accepted
With 100% segwit transactions, what would be the max number of transaction confirmation possible on a block?
Very interesting question, let's see what the smallest transaction we can build is. For it to be minimal it has to be a single input and a single output. The non-segwit part would look something like ...
15
votes
Accepted
Why does Taproot require a new address format?
Background
P2TR addresses will be encoded using Bech32, although likely an amended version. In anticipation of Taproot getting merged, some proponents tested the behavior of various wallets and ...
14
votes
Accepted
How is SegWit a soft fork?
You're confusing transactions (the abstract object) and their serialization (the bytes on the wire in the P2P protocol or on disk).
Sure, SegWit introduces an extension to the P2P protocol (BIP144), ...
14
votes
Accepted
Why is witness data downloaded during IBD in prune mode?
Why do pruned nodes download (segregated) witness data during IBD if much of that data is marked as Assumevalid?
Good question, probably because nobody implemented it. Honestly, I had never ...
13
votes
Accepted
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).
That's correct. Even though the ...
13
votes
Accepted
Bech32 conversion to legacy P2PKH?
Is it safe to receive funds at this 1FJJd... address?
Kind of. Your wallet knows the private key that corresponds to that address as it is the same private key for the bech32 address. However it does ...
13
votes
Accepted
Follow-up to Segwit: Arbitrary data storage in witness?
Am I understanding this correctly?
Yes.
will this transaction have failed the normal rules in Bitcoin Core for relaying transactions
It's a P2TR (taproot) spend. Those spends have different policy ...
12
votes
Accepted
How would I explain SegWit to a non-technical friend?
The name itself is a good hint as to what it actually does.
What we have today is a "witness" (i.e signature scripts) included in every Bitcoin transaction in non-segwit compliant transactions. This ...
12
votes
Accepted
What does a segregated witness transaction look like?
From Bitcoin Core's primitive/transaction.h:
/**
* Basic transaction serialization format:
* - int32_t nVersion
* - std::vector<CTxIn> vin
* - std::vector<CTxOut> vout
* - uint32_t ...
12
votes
Accepted
What is the User Activated Softfork (UASF) proposal? How do its risks compare to hardforks?
What does the UASF proposal entail?
The UASF proposal is an extension of BIP9 that allows soft-forks to specify a mandatory activation time. If miners have not started signaling support by this ...
12
votes
Birthday attack on P2SH
Why does this document seem to imply that the birthday attack only works for multisig P2SH and then only for one of the signers?
The birthday attack (to the best of my knowledge) requires that the ...
12
votes
Accepted
SegWit transaction fee/byte
Say, my raw transaction is 500 bytes,100 bytes of which are witness data. Thus, 400 bytes are now competing for the place in 1 Mb block.
That's not correct.
SegWit replaces the concept of size and ...
12
votes
Accepted
How to verify if it's Segwit Transaction or not?
A transaction is a segwit tx if at least one of the inputs contain a witness. Or if you are inspecting the raw tx then you check the 5th byte (the input count) and if it is 0x00 then it is a segwit tx....
12
votes
Accepted
How to calculate segwit transaction fee in bytes?
That depends on what those inputs and outputs look like.
The formula, as specified in BIP141, is:
Call base_size the number of bytes needed to serialize the transaction in legacy format (which does ...
12
votes
Accepted
Are all three Bitcoin address types interoperable (legacy, segwit, native segwit)?
Absolutely!
Each address type handles transaction generation slightly differently but they all are interoperable with each other on the protocol level. If you run into an issue where one address type ...
12
votes
Accepted
What is the difference between "native segwit" and "bech32"?
TL;DR: Native segwit refers to segwit outputs without P2SH-wrapper. Bech32 is the address format used to represent native segwit-v0 locking scripts.
Wrapped segwit vs native segwit
When segwit ...
11
votes
Accepted
How many more transactions per second will be possible with SegWit?
Best estimates on effective blocksize with SegWit are 1.6-2.0 MB.
Current transactions/second possible are around 3 tx/s. Given that the effective increase is 1.6 - 2.0x, the transactions/second are ...
11
votes
Where is the Signature stored in a SegWit transaction?
That's not accurate. The witness is stored in the blockchain.
In the segwit format, the signature is part of the witness, the witness is part of the transaction and the transaction is written to the ...
11
votes
Accepted
Can I mix P2PKH and P2WPKH inputs in the same transaction?
Is it acceptable to mix P2PKH and P2WPKH inputs in the same transaction as described above?
Yes, absolutely. In the same way that you can mix multisig and P2SH and P2PK inputs in the same transaction....
11
votes
Accepted
Why would a miner put an OP_RETURN in a coinbase transaction?
Every segwit block has one such OP_RETURN in the coinbase transaction: It's the Merkle root of the witness tree.
When the segwit softfork was activated, this included a fix to the third-party ...
10
votes
Accepted
Which wallet libraries officially intend to use Bech32 addresses, and will the addresses generated by them be compatible?
Bech32 is an address format that was only recently proposed. While its design had input from multiple wallet authors, it is way too early to say anything about adoption.
It is important to realize ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
segregated-witness × 594bitcoin-core × 74
transactions × 74
bech32-address × 57
signature × 39
address × 33
witness-data × 29
p2sh × 28
segwit2x × 24
taproot × 23
p2wsh × 21
p2wpkh × 20
block-weight × 19
transaction-fees × 18
raw-transaction × 18
transaction-malleability × 18
script × 17
multi-signature × 15
bitcoin-cash × 15
blocksize × 15
bitcoind × 14
electrum × 14
wallet × 13
address-generation × 13
transaction-input × 13