Hacker News new | ask | show | jobs
by elmar 3244 days ago
they are two diferent ways to solve the same scalability problem, Btc doubles the current number of transactions by increasing the block from 1mb to 2mb and adds a new service the segregated witnesses that allows off-the-chain private transactions, Bcc simply increases the block to 8mb for roughly 8x times more transactions.
4 comments

It's a quite a bit more complicated than just increasing the block size to 8mb, actually, and in reality Bitcoin Cash ended up using one of SegWit's key changes in modified form.

The default Bitcoin signature algorithm has quadratic performance due to repeated hashing and if the block size is increased above 1MB an attacker can use this in a fairly nasty DoS attack that, worst case, might be able to fork the blockchain. The BTC/SegWit side fixes this by creating a new transaction type that moves the signatures outside the main block into a separate "witness" and uses more efficient signature hashing. The new transactions appear to older nodes as though they simply didn't require signatures, so existing software keeps working. This also fixes an annoying issue called "transaction malleability" which allows attackers to change the transaction IDs of other people's transactions; all of the data hashed to compute the transaction ID is now signed. It's apparently this malleability fix that makes off-chain payments easier.

BCH essentially replaces the original signature hashing algorithm with the SegWit one but keeps the signatures in the block. Bitcoin also has a hard cap on the number of expensive CHECKSIG operations that can be carried out to prevent DoS attacks and both sides take different approaches to raising that, neither of which is straightforward.

Just to test my understanding: Segwit essentially moves the signature in a transaction (and changes what is being signed). This fixes most "transaction malleability" problems. Transaction malleability means that one of the nodes in the bitcoin network can change some of the information in the transaction. It can't change where the money is coming from, where the money is going, or how much the transaction is for, but it can change some of the other information in the transaction.

It also appears that there were some proposals related to SegWit that advocated putting the signatures in a separate block, but the actual implemented SegWit does not do this. Instead it simply moves the signature to the end of the transaction (which allows them to fix most of the malleability issues).

There are many proposals for scaling bitcoin. One of the proposals is to increase the size of the blocks. Segwit also does this by changing how much the signature "counts" as part of the block size. This will allow blocks to be roughly 2mb in size.

Most other scaling techniques can't currently be implemented because they rely on the transaction not being malleable. If SegWit is successful, then these other scaling techniques could be used (but they don't have to be).

It appears that one of the things some people don't like about SegWit is that it was introduced as a "soft fork". This means that it won't be activated in the client unless 95% of the clients support it. Some people feel that this will never happen because some miners are against SegWit. There are also other proposals for fixing the malleability issues and so there isn't a complete consensus about how it should be done (some people appear to complain that the implementation of SegWit is too complicated).

So instead on waiting for other scaling techniques, BCH has advocated a hard fork which increases the block size, but that does not address the transaction malleability problem. Some people have suggested that increasing the block size is the only thing necessary for scaling bitcoin and that other scaling techniques are unwanted.

My understanding is that SegWit will not, in itself, solve the scaling issue other than making a small increase in the block size (effectively doubling it), but that it paves the way for other techniques later (none of which have been decided on yet, but there are working implementations of several).

Is that accurate?

More or less, except that the reason Bitcoin Cash happened is that SegWit seems almost certain to be activated at this point as a result of interesting political wranglings. The other subtle detail is that older nodes see a stripped version of SegWit blocks with the "witness" parts of the transactions removed, and it's this block that they apply the 1MB limit to. So while the signatures technically aren't part of a seperate block, they're not part of the main block either. This is why the non-witness part of transactions has to count as being more expensive.
Ah. I see! Thank you for that. It makes complete sense now. I was wondering why they had such a convoluted method for calculating the block size.
personally I think on a technical level Bcc it's a more elegant simple solution, at the moment I am completely against the Segregated Witnesses funcionality my view is that all transactions should be on the blockchain.

The good part is that the market as two options and anything could happen.

Segregated witness is nothing to do with off chain transactions. SegWit just moves some signatures around in the block so more transactions can be fitted in each block.

This does have some benefits for off chain transaction networks because it changes what parts of the block are signed and need to be verified. Off chain transaction networks can still work fine with or without segwit though.

It is related in that it addresses transaction malleability. It is not the only possible solution to that problem.
Off the chain transactions ? Then what's the point of a blockchain ? Hmmm
Blockchain remains, but it's will only contain hash of transaction script. Actual transaction script body which is heavy and take most of space in blockchain will go into separate extended block. This reduces size of transactions in main chain.

You might want to check this 5 minute segregated witness explained video:

https://youtu.be/OFfBRzh9HmU

Or this 50 minute presentation from actual Bitcoin developer and initiator of segwit:

https://youtu.be/NOYNZB5BCHM

The 5 minute video is extremely misinformed if not outright wrong. There is no such thing as an "extended block" in the current form of Segwit[0].

I've linked to a better explanation down below. It does run 12 minutes but you only need to watch the first 3 minutes for a technical answer.

https://www.youtube.com/watch?v=DzBAG2Jp4bg

[0]:https://www.reddit.com/r/Bitcoin/comments/65uriv/a_simplifie...