[Bitcoin-segwit2x] Addressing Segwit's anyone-can-spend "issue" with the hard fork?

Troy Benjegerdes hozer at hozed.org
Tue Jul 11 22:45:00 UTC 2017


On Mon, Jul 10, 2017 at 12:32:47PM -0700, Jared Lee Richardson via Bitcoin-segwit2x wrote:
> Jameson Lopp and Dr. Back are correct, the anyone-can-spend isn't
> actually a problem, though a minority (but a non-trivial minority)
> have convinced themselves that it is a problem.  If only because it
> would quell the false claims, there might be some value in assigning
> segwit transactions a new unrelated type at the hardfork point.  It
> also might be difficult enough to not be worth doing since the only
> reason is appeasing confused protestors.

It's a huge problem, because it makes the code hard to read, hard
to maintain, and hard to talk about, as it looks like someone took
something that used to have a high-level object-oriented design and
then dumped assembly code in the middle.

This is a disaster waiting to happen:

            if (block.vtx[0]->vout[o].scriptPubKey.size() >= 38 && block.vtx[0]->vout[o].scriptPubKey[0] == OP_RETURN && block.vtx[0]->vout[o].scriptPubKey[1] == 0x24 && block.vtx[0]->vout[o].scriptPubKey[2] == 0xaa && block.vtx[0]->vout[o].scriptPubKey[3] == 0x21 && block.vtx[0]->vout[o].scriptPubKey[4] == 0xa9 && block.vtx[0]->vout[o].scriptPubKey[5] == 0xed) {
commitpos = o;

Really?? And no linewrapping?
First, it looks sloppy.
Second, it doesn't even show the whole thing on Github

https://github.com/btc1/bitcoin/blob/segwit2x/src/validation.cpp#L2953

If the last half changed in a malicious pull request,
we might not even see it.

Doesn't something like this seem a lot easier to read and maintain?

	if (tx.nVersion >= 3) {
		/* this is a segwit version 3 transaction */


 
> I think fixing the witness discount to actually target UTXO creation
> vs destruction without favoring bandwidth-heavy transactions would be
> a really good addition if anything were going to be changed at
> hardfork time.
> 
> Jared
> 
> On Mon, Jul 10, 2017 at 10:50 AM, Oliver Petruzel via Bitcoin-segwit2x
> <bitcoin-segwit2x at lists.linuxfoundation.org> wrote:
> > ALCON,
> > I'm not privy to discussions occurring in Slack or elsewhere, so I think
> > this list may be the most appropriate medium for the following question:
> >
> > Has any thought been given to addressing/fixing Segwit's anyone-can-spend
> > issue at the time of the SegWit2x hardfork?
> >
> > I'm not entirely familiar with the exact mechanisms of the code that create
> > the conditions for this issue, but it's been said by many that the issue is
> > a byproduct of the softfork implementation, and that it could be resolved if
> > SegWit were implemented as a hardfork instead.
> >
> > Is that true? Is it possible to rework the SegWit code such that the
> > anyone-can-spend issue is permanently resolved with the SegWit2x hardfork?
> >
> > I think doing so would go a very long way in garnering additional support
> > throughout the dev and user communities, so it's worth considering.
> >
> > Thoughts?
> >
> > V/r,
> > Oliver Petruzel
> > Owner, Procryptic Inc.
> >
> > _______________________________________________
> > Bitcoin-segwit2x mailing list
> > Bitcoin-segwit2x at lists.linuxfoundation.org
> > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-segwit2x
> >
> _______________________________________________
> Bitcoin-segwit2x mailing list
> Bitcoin-segwit2x at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-segwit2x


More information about the Bitcoin-segwit2x mailing list