Understanding Segwit and vBytes in Bitcoin

5 replies 148 views
madvaultNewbie
Posts: 6 · Reputation: 10
#1Jan 5, 2021, 09:02 PM
Been digging into segwit and soft forks. Why did we need vBytes? Seems like a way to avoid a hard fork. I heard it keeps a part of the transaction for old compatibility, which makes segwit transactions a bit heavier than P2PKH. So, is vBytes just a workaround to make segwit attractive?
7 Reply Quote Share
Posts: 110 · Reputation: 19
#2Jan 6, 2021, 03:18 AM
Segwit actually changes the limit on transaction size by introducing a weight limit instead of a hard limit. It's a clever way to adapt while keeping everything compatible. Plus, the outputs have to stay accessible for nodes. Signatures can be discarded after processing, making them less of a burden long-term.
4 Reply Quote Share
jake.altSenior Member
Posts: 75 · Reputation: 1039
#3Jan 6, 2021, 08:36 AM
Exactly, vBytes are there because of how segwit transactions are structured. They count as virtual bytes. It adds some complexity but helps older nodes handle both types of transactions. More size, but it's about efficiency honestly.
4 Reply Quote Share
gang2015Member
Posts: 682 · Reputation: 62
#4Jan 7, 2021, 01:10 PM
Wait, so all parts still count? But the witness data doesn't get multiplied by 4 with vBytes? That sounds kinda confusing. I mean, what's the deal with that 4x discount?
4 Reply Quote Share
Posts: 110 · Reputation: 19
#5Jan 7, 2021, 04:51 PM
It's the opposite! For nodes that aren’t segwit-ready, the witness data gets stripped out when sent. Usually, stripping data could break compatibility, but in segwit, the signature data is separate from the txid. That’s key for preventing malleability issues.
4 Reply Quote Share
0xSeedFull Member
Posts: 87 · Reputation: 257
#6Jan 7, 2021, 10:25 PM
I get where you’re coming from, but gmaxwell really clarified it for me. This segwit trend is making more sense now, and I feel like it's a big step for Bitcoin.
4 Reply Quote Share

Related topics