A Comparison Of LN and Drivechain Security In The Presence Of 51% Attackers
5 messages, 24 to 27 Feb 2022. Started by ZmnSCPxj.
ZmnSCPxj (2), Paul Sztorc (2), Billy Tetrud
Good morning lightning-dev and bitcoin-dev,
Recently, some dumb idiot, desperate to prove that recursive covenants are somehow a Bad Thing (TM), [necromanced Drivechains][0], which actually caused Paul Sztorc to [revive][1] and make the following statement:
Quoted text (1 line)
> As is well known, it is easy for 51% hashrate to double-spend in the LN, by censoring 'justice transactions'. Moreover, miners seem likely to evade retribution if they do this, as they can restrain the scale, timing, victims, circumstances etc of the attack.
Let me state that, as a supposed expert developer of the Lightning Network (despite the fact that I probably spend more time ranting on the lists than actually doing something useful like improve C-Lightning or CLBOSS), the above statement is unequivocally ***true***.
However, I believe that the following important points must be raised:
* A 51% miner can only attack LN channels it is a participant in. * A 51% miner can simultaneously attack all Drivechain-based sidechains and steal all of their funds.
In order for "justice transactions" to come into play, an attacker has to have an old state of a channel. And only the channel participants have access to old state (modulo bugs and operator error on not being careful of toxic waste, but those are arguably as out of scope as operator error not keeping your privkey safe, or bugs that reveal your privkey).
If the 51% miner is not a participant on a channel, then it simply has no access to old state of the channel and cannot even *start* the above theft attack. If the first step fails, then the fact that the 51% miner can perform the second step is immaterial.
Now, this is not a perfect protection! We should note that miners are anonymous and it is possible that there is already a 51% miner, and that that 51% miner secretly owns almost all nodes on the LN. However, even this also means there is some probability that, if you picked a node at random to make a channel with, then there is some probability that it is *not* a 51% miner and you are *still* safe from the 51% miner.
Thus, LN usage is safer than Drivechain usage. On LN, if you make a channel to some LN node, there is a probability that you make a channel with a non-51%-miner, and if you luck into that, your funds are still safe from the above theft attack, because the 51% miner cannot *start* the attack by getting old state and publishing it onchain. On Drivechain, if you put your funds in *any* sidechain, a 51% miner has strong incentive to attack all sidechains and steal all the funds simultaneously.
On 2/24/2022 7:49 AM, ZmnSCPxj via bitcoin-dev wrote: ...
Quoted text (2 lines)
>> ... it is easy for 51% hashrate to double-spend in the LN ... > ... the above statement is unequivocally ***true***.
Both LN and Drivechain are vulnerable to miner-theft; and both use their design to deter theft.
Quoted text (4 lines)
> However, I believe that the following important points must be raised: > > * A 51% miner can only attack LN channels it is a participant in. > * A 51% miner can simultaneously attack all Drivechain-based sidechains and steal all of their funds.
In LN, the main obstacle is that your miner-coalition must first join the channel.
In DC, the main obstacle is that your miner-coalition must construct a txn obeying the Bip300 rules. Knowing that SPV proofs allow miner-theft, the Bip300 rules are designed specifically to try to thwart miner-theft.
***
I don't think I can stop people from being ignorant about Drivechain. But I can at least allow the Drivechain-knowledgable to identify each other.
So here below, I present a little "quiz". If you can answer all of these questions, then you basically understand Drivechain:
0. We could change DC to make miner-theft impossible, by making it a layer1 consensus rule that miners never steal. Why is this cure worse than the disease?
1. If 100% hashrate wanted to steal coins from a DC sidechain *as quickly as possible*, how long would this take (in blocks)?
2. Per sidechain per year (ie, per 52560 blocks), how many DC withdrawals can take place (maximum)? How many can be attempted?
(Ie, how does the 'train track metaphor' work, from ~1h5m in the "Overview and Misconceptions" video)?
3. Only two types of people should ever be using the DC withdrawal system at all.
3a. Which two?
3b. How is everyone else, expected to move their coins from chain to chain?
3c. (Obviously, this improves UX.) But why does it also improve security?Good morning Paul,
Quoted text (5 lines)
> I don't think I can stop people from being ignorant about Drivechain. But I can at least allow the Drivechain-knowledgable to identify each other. > > So here below, I present a little "quiz". If you can answer all of these questions, then you basically understand Drivechain: > > 0. We could change DC to make miner-theft impossible, by making it a layer1 consensus rule that miners never steal. Why is this cure worse than the disease?
Now miners are forced to look at all sideblocks, not optionally do so if it is profitable for them.
Quoted text (1 line)
> 1. If 100% hashrate wanted to steal coins from a DC sidechain *as quickly as possible*, how long would this take (in blocks)?
13,150 (I think this is how you changed it after feedback from this list, I think I remember it was ~3000 before or thereabouts.)
Quoted text (2 lines)
> 2. Per sidechain per year (ie, per 52560 blocks), how many DC withdrawals can take place (maximum)? How many can be attempted? > (Ie, how does the 'train track metaphor' work, from ~1h5m in the "Overview and Misconceptions" video)?
I hate watching videos, I can read faster than anyone can talk (except maybe Laolu, he speaks faster than I can process, never mind read).
~4 times (assuming 52560 block per year, which may vary due to new miners, hashrate drops, etc)
Quoted text (2 lines)
> 3. Only two types of people should ever be using the DC withdrawal system at all. > 3a. Which two?
a. Miners destroying the sidechain because the sidechain is no longer viable. b. Aggregators of sidechain-to-minechain transfers and large whales.
Quoted text (1 line)
> 3b. How is everyone else, expected to move their coins from chain to chain?
Cross-system atomic swaps. (I use "System" here since the same mechanism works for Lightning channels, and channels are not blockchains.)
Quoted text (1 line)
> 3c. (Obviously, this improves UX.) But why does it also improve security?
Drivechain-based pegged transfers are aggregates of many smaller transfers and thus every transfer out from the sidechain contributes its "fee" to the security of the peg.
Quoted text (2 lines)
> -- > 4. What do the parameters b and m stand for (in the DC security model)?
m is how much people want to kill a sidechain, 0 = everybody would be sad if it died and would rather burn all their BTC forever than continue living, 1 = do not care, > 1 people want to actively kill the sidechain.
b is how much profit a mainchain miner expects from supporting a sidechain (do not remember the unit though). Something like u = a + b where a is the mainchain, b is the sidechain, u is the total profit. Or fees? Something like that.
Quoted text (1 line)
> 5. How can m possibly be above 1? Give an example of a sidechain-attribute which may cause this situation to arise.
The sidechain is a total scam. A bug may be found in the sidechain that completely negates any security it might have, thus removing any desire to protect the sidechain and potentially make users want to destroy it completely rather than let it continue. People end up hating sidechains completely.
Quoted text (1 line)
> 6. For which range of m, is DC designed to deter sc-theft?
m <= 1
Quoted text (1 line)
> 7. If DC could be changed to magically deter theft across all ranges of m, why would that be bad for sidechain users in general?
Because the sidechain would already be part of mainchain consensus.
Quoted text (2 lines)
> -- > 8. If imminent victims of a DC-based theft, used a mainchain UASF to prohibit the future theft-withdrawal, then how would this affect non-DC users?
If the non-DC users do not care, then they are unaffected. If the non-DC users want to actively kill the sidechain, they will counterattack with an opposite UASF and we have a chainsplit and sadness and mutual destruction and death and a new subreddit.
Quoted text (1 line)
> 9. In what ways might the BTC network one day become uncompetitive? And how is this different from caring about a sidechain's m and b?
If it does not enable scaling technology fast enough to actually be able to enable hyperbitcoinization.
Sidechains are not a scaling solution, so caring about m and b is different because your focus is not on scaling.
Quoted text (2 lines)
> -- > 10. If DC were successful, Altcoin-investors would be harmed. Two Maximalist-groups would also be slightly harmed -- who are these?
Dunno!
Regards, ZmnSCPxj
Quoted text (1 line)
> m is how much people want to kill a sidechain, 0 = everybody would be sad
if it died and would rather burn all their BTC forever than continue living
Math is brutal
On Sat, Feb 26, 2022, 01:39 ZmnSCPxj via bitcoin-dev < bitcoin-dev@lists•linuxfoundation•org> wrote:
Quoted text (121 lines)
> > Good morning Paul, > > > > I don't think I can stop people from being ignorant about Drivechain. > But I can at least allow the Drivechain-knowledgable to identify each other. > > > > So here below, I present a little "quiz". If you can answer all of these > questions, then you basically understand Drivechain: > > > > 0. We could change DC to make miner-theft impossible, by making it a > layer1 consensus rule that miners never steal. Why is this cure worse than > the disease? > > Now miners are forced to look at all sideblocks, not optionally do so if > it is profitable for them. > > > 1. If 100% hashrate wanted to steal coins from a DC sidechain *as > quickly as possible*, how long would this take (in blocks)? > > 13,150 (I think this is how you changed it after feedback from this list, > I think I remember it was ~3000 before or thereabouts.) > > > 2. Per sidechain per year (ie, per 52560 blocks), how many DC > withdrawals can take place (maximum)? How many can be attempted? > > (Ie, how does the 'train track metaphor' work, from ~1h5m in the > "Overview and Misconceptions" video)? > > I hate watching videos, I can read faster than anyone can talk (except > maybe Laolu, he speaks faster than I can process, never mind read). > > ~4 times (assuming 52560 block per year, which may vary due to new miners, > hashrate drops, etc) > > > 3. Only two types of people should ever be using the DC withdrawal > system at all. > > 3a. Which two? > > a. Miners destroying the sidechain because the sidechain is no longer > viable. > b. Aggregators of sidechain-to-minechain transfers and large whales. > > > 3b. How is everyone else, expected to move their coins from chain to > chain? > > Cross-system atomic swaps. > (I use "System" here since the same mechanism works for Lightning > channels, and channels are not blockchains.) > > > 3c. (Obviously, this improves UX.) But why does it also improve > security? > > Drivechain-based pegged transfers are aggregates of many smaller transfers > and thus every transfer out from the sidechain contributes its "fee" to the > security of the peg. > > > -- > > 4. What do the parameters b and m stand for (in the DC security model)? > > m is how much people want to kill a sidechain, 0 = everybody would be sad > if it died and would rather burn all their BTC forever than continue > living, 1 = do not care, > 1 people want to actively kill the sidechain. > > b is how much profit a mainchain miner expects from supporting a sidechain > (do not remember the unit though). > Something like u = a + b where a is the mainchain, b is the sidechain, u > is the total profit. > Or fees? Something like that. > > > 5. How can m possibly be above 1? Give an example of a > sidechain-attribute which may cause this situation to arise. > > The sidechain is a total scam. > A bug may be found in the sidechain that completely negates any security > it might have, thus removing any desire to protect the sidechain and > potentially make users want to destroy it completely rather than let it > continue. > People end up hating sidechains completely. > > > 6. For which range of m, is DC designed to deter sc-theft? > > m <= 1 > > > 7. If DC could be changed to magically deter theft across all ranges of > m, why would that be bad for sidechain users in general? > > Because the sidechain would already be part of mainchain consensus. > > > -- > > 8. If imminent victims of a DC-based theft, used a mainchain UASF to > prohibit the future theft-withdrawal, then how would this affect non-DC > users? > > If the non-DC users do not care, then they are unaffected. > If the non-DC users want to actively kill the sidechain, they will > counterattack with an opposite UASF and we have a chainsplit and sadness > and mutual destruction and death and a new subreddit. > > > 9. In what ways might the BTC network one day become uncompetitive? And > how is this different from caring about a sidechain's m and b? > > If it does not enable scaling technology fast enough to actually be able > to enable hyperbitcoinization. > > Sidechains are not a scaling solution, so caring about m and b is > different because your focus is not on scaling. > > > -- > > 10. If DC were successful, Altcoin-investors would be harmed. Two > Maximalist-groups would also be slightly harmed -- who are these? > > Dunno! > > > Regards, > ZmnSCPxj > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists•linuxfoundation•org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev >
Not bad, but not particularly good either.
Definitely correct: 1 (plus extra credit, it was originally 1008+2016), 3a "whales" 3b (atomic swaps is the "official" answer, but otc trading is also acceptable, or just "trade" in general) 6 9 part one
Close, but not quite right: 2 (part one "~4" is correct, but you didn't answer part two) 3a "attacker- miners" is not the way I see it at all 3c true, but I was talking about withdrawal security, not hashrate, [this is related to the 3a "attacker miners" mis-answer] 4 ? you seem to have not very seriously answered this. The parameters are spelled out in the original Nov 2015 post
Some kind of miscommunication may have happened: 8 -- I was more thinking, what happens if the UASF fails (in thwarting miners) vs succeeds. (I take it for granted that non-DC users will prefer to do nothing, and prefer to be unaffected.)
Seems wrong to me: 0 seems like a pretty big misunderstanding happened here, or else you mistakenly typo'd the wrong word 5 (you started with m=1 examples, which is not what was requested; and finished with something not a sidechain attribute) 7 [related to the miss on #5] ; it is not a re-ask of question #0 9 part two is wrong 10 you did not answer
Paul
On 2/26/2022 2:39 AM, ZmnSCPxj wrote:
Quoted text (67 lines)
> Good morning Paul, > > >> I don't think I can stop people from being ignorant about Drivechain. But I can at least allow the Drivechain-knowledgable to identify each other. >> >> So here below, I present a little "quiz". If you can answer all of these questions, then you basically understand Drivechain: >> >> 0. We could change DC to make miner-theft impossible, by making it a layer1 consensus rule that miners never steal. Why is this cure worse than the disease? > Now miners are forced to look at all sideblocks, not optionally do so if it is profitable for them. > >> 1. If 100% hashrate wanted to steal coins from a DC sidechain *as quickly as possible*, how long would this take (in blocks)? > 13,150 (I think this is how you changed it after feedback from this list, I think I remember it was ~3000 before or thereabouts.) > >> 2. Per sidechain per year (ie, per 52560 blocks), how many DC withdrawals can take place (maximum)? How many can be attempted? >> (Ie, how does the 'train track metaphor' work, from ~1h5m in the "Overview and Misconceptions" video)? > I hate watching videos, I can read faster than anyone can talk (except maybe Laolu, he speaks faster than I can process, never mind read). > > ~4 times (assuming 52560 block per year, which may vary due to new miners, hashrate drops, etc) > >> 3. Only two types of people should ever be using the DC withdrawal system at all. >> 3a. Which two? > a. Miners destroying the sidechain because the sidechain is no longer viable. > b. Aggregators of sidechain-to-minechain transfers and large whales. > >> 3b. How is everyone else, expected to move their coins from chain to chain? > Cross-system atomic swaps. > (I use "System" here since the same mechanism works for Lightning channels, and channels are not blockchains.) > >> 3c. (Obviously, this improves UX.) But why does it also improve security? > Drivechain-based pegged transfers are aggregates of many smaller transfers and thus every transfer out from the sidechain contributes its "fee" to the security of the peg. > >> -- >> 4. What do the parameters b and m stand for (in the DC security model)? > m is how much people want to kill a sidechain, 0 = everybody would be sad if it died and would rather burn all their BTC forever than continue living, 1 = do not care, > 1 people want to actively kill the sidechain. > > b is how much profit a mainchain miner expects from supporting a sidechain (do not remember the unit though). > Something like u = a + b where a is the mainchain, b is the sidechain, u is the total profit. > Or fees? Something like that. > >> 5. How can m possibly be above 1? Give an example of a sidechain-attribute which may cause this situation to arise. > The sidechain is a total scam. > A bug may be found in the sidechain that completely negates any security it might have, thus removing any desire to protect the sidechain and potentially make users want to destroy it completely rather than let it continue. > People end up hating sidechains completely. > >> 6. For which range of m, is DC designed to deter sc-theft? > m <= 1 > >> 7. If DC could be changed to magically deter theft across all ranges of m, why would that be bad for sidechain users in general? > Because the sidechain would already be part of mainchain consensus. > >> -- >> 8. If imminent victims of a DC-based theft, used a mainchain UASF to prohibit the future theft-withdrawal, then how would this affect non-DC users? > If the non-DC users do not care, then they are unaffected. > If the non-DC users want to actively kill the sidechain, they will counterattack with an opposite UASF and we have a chainsplit and sadness and mutual destruction and death and a new subreddit. > >> 9. In what ways might the BTC network one day become uncompetitive? And how is this different from caring about a sidechain's m and b? > If it does not enable scaling technology fast enough to actually be able to enable hyperbitcoinization. > > Sidechains are not a scaling solution, so caring about m and b is different because your focus is not on scaling. > >> -- >> 10. If DC were successful, Altcoin-investors would be harmed. Two Maximalist-groups would also be slightly harmed -- who are these? > Dunno! > > > Regards, > ZmnSCPxj