Friday, October 11, 2019

Hints about what may come with the segwit bug on BTC-Core, and its connection to P2SH, which is being fixed and sunsetted on BSV.

Many have been wondering and speculating about the possible segwit bug that Craig Wright has been warning about.
Well the truth is even Core devs like Peter Todd and Gregory Maxwell have admitted problems with segwit. For example the validationless mining issue is enhanced and becomes a big problem under segwit. Peter Todd wrote about the issue on the Bitcoin dev mailing list. Here is what he says about a possible nightmare scenario under segwit:

The nightmare scenario - never tested code ~never works

The obvious implementation of highly optimised mining with segregated witnesses will have the main codepath that creates blocks do no validation at all; if the current ecosystem's validationless mining is any indication the actual code doing this will be proprietary codebases written on a budget with little testing, and lots of bugs. At best the codepaths that actually do validation will be rarely, if ever, tested in production.

Secondly, as the UTXO set can be updated without the witness data, it would not be surprising if at least some of the wallet ecosystem skips witness validation.

With that in mind, what happens in the event of a validation failure? Mining could continue indefinitely on an invalid chain, producing blocks that in isolation appear totally normal and contain apparently valid transactions. It's easy to imagine this happening from an engineering perspective: a simple implementation would be to have the main mining codepaths be a separate, not-validating, process that receives "invalid block" notifications from another process containing a validating implementation of the Bitcoin protocol. If a bug/exploit is found that causes that validation process to crash, what's to guarantee that the block creation codepath will even notice? Quite likely it will continue creating blocks unabated - the invalid block notification codepath is never tested in production.

Basically it means over time, segwit could enable and cause bugs that allow invalid data to go unnoticed until it is buried deep in the chain. Once this happens what will miners do, will they abandon all their work and get rid of the invalid chain, or just allow the invalid chain to continue? This is a true nightmare scenario.

Now remember Craig and others were screaming from rooftops warning people of this before segwit was activated. This was the main reason we even split off with Bitcoin Cash to preserve the ledger and the true Bitcoin, and protect it from segwit.

Now lets talk about P2SH, which was activated in Core several years ago before segwit activated. P2SH sands for pay-to-script-hash. P2SH "allow transactions to be sent to a script hash (address starting with 3) instead of a public key hash (addresses starting with 1)". There can be many use cases for P2SH, but multi-sig is the most common use. This is sad because multi-sig could have been easily enabled on legacy type 1 addresses using known schemes like Shamir Secret Sharing inistead. When sending to an address beginning with a 3 as many exchanges and services give, you are likely sending to a multi-sig P2SH address or a segwit address. So as you can imagine, P2SH has spread and grown significantly, like a cancer on every Bitcoin ledger, including BSV. So why is this a problem? Because P2SH is not Bitcoin, its basically just segwit-lite. Andreas Antonopoulos for example tried to discredit Craig Wright's criticisms of segwit by saying the same thing would apply to P2SH:

"I disagree with Craig Wright about Segwit. The exact same risk could be said to exist with P2SH. Neither can be exploited with a 51% attack"

The truth of the matter is that P2SH and segwit are vulnerable to the same issues. However segwit makes them much much worse. This could also be why Craig is delaying the revelation of the segwit bug, because it needs to first be fixed on BSV with P2SH. BSV is planning to sunset P2SH altogether, to get rid of this cancer from the ledger. Craig even says in this video that certain things will be fixed in BitCoin and as we fixed them in BitCoin you're going to learn why they are a major problem in segwitcoin" @1:28:52 mark.

Just thinking logically, it seems he is hinting at P2SH and how it is being fixed and sunsetted in BSV. So for those doubting Craig's claims that there could be a flaw in segwit, this information may make you think twice. Segwit is not Bitcoin, P2SH is not Bitcoin, BSV is Bitcoin as Satoshi intended and soon the ledger and Core's mistakes are going to be finally fixed and we can finally start to scale worldwide.


No comments:

Post a Comment