On 10/12/2017 08:15 PM, Manfred Karrer wrote:

>     > The chain blindness of BitcoinJ is another major concern not
>     addressed
>     > as far I know and will set BitcoinJ users at risk to spend their
>     Bitcoin
>     > on a chain which they don't want to support and/or get exposed to
>     replay
>     > attacks. Very concerning IMO!
> 
>     I would not say bitcoinj is blind to the chain. It always follows the
>     chain with most accumulated work, which is a very specific chain from a
>     users point of view.
> 
> 
> A big problem with that is, that if miners switch between chains (as we
> saw with BCH/BTC) the longest PoW chain might change as well, leading to
> security risks and potential losses. So if today I am following the BTC
> chain and sending you coins and tomorrow the longest PoW chain becomes
> B2X then BitcoinJ will not recognise that tx anymore.

At no point in time has the BCH chain accumulated more work than the
Bitcoin chain (except maybe the first one or two blocks).

> I am tired of those fork attacks and don’t assume they will succeed (as
> all the past attempts) but it consumes valuable dev time to prepare
> strategies how to deal with that menace…

Forks are an important democratic instrument. My personal opinion: We
should not do away with it, even if we could.

> Best would be if there would be some option in BitcoinJ to guarantee to
> stay on one chain

You can enable full verifying mode if you want that, and
implement/bugfix the rules you are concerned about. But anyway, it's
always only one chain.

> (Luke DashJr has recommended one solution a few months
> ago at the last fork attempt. Don’t remember the details but as far I
> remember it was not a huge change, just a small extra check when
> accepting blocks/nodes).

As far as I can remember, his idea is very specialized in that you could
stay with max 1M blocks but you could not use it to stay with max 2M blocks.

A more generalized approach would be to implement detection of a fork
and offer the user to continue to block X or Y ("block pinning"). The
big problem with this is if her decision is wrong, she will end up on a
dying chain and recovery is difficult and costly. I think Electrum has
this implemented recently, we'll see how it plays out.

-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bitcoinj+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to