Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: CanaryInTheMine on November 04, 2013, 03:11:14 AM



Title: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: CanaryInTheMine on November 04, 2013, 03:11:14 AM
Saw this on reddit first, reading paper, thought I should share:

http://arxiv.org/abs/1311.0243

http://www.reddit.com/r/Bitcoin/comments/1puk1a/arxiv_paper_majority_is_not_enough_bitcoin_mining/


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: frankenmint on November 04, 2013, 03:46:26 AM
Saw this on reddit first, reading paper, thought I should share:

http://arxiv.org/abs/1311.0243

http://www.reddit.com/r/Bitcoin/comments/1puk1a/arxiv_paper_majority_is_not_enough_bitcoin_mining/

Fascinating...reading still right now...but if I get this correct - the concept is that you're mining on something big like btcguild, and copying the entire block header onto your own private pool of work; at the same time, your miner is accepting work and not submitting valid shares to btcguild yet it submits them to the private duplicated pool. 

Anytime a Valid Share is found to have met minimum difficulty and discovers a block, it submits this from the private pool and broadcasts to the network?  Network accepts this and the private pool is fed the newly minted coins instead of btcguild?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: jl2012 on November 04, 2013, 03:59:10 AM
Saw this on reddit first, reading paper, thought I should share:

http://arxiv.org/abs/1311.0243

http://www.reddit.com/r/Bitcoin/comments/1puk1a/arxiv_paper_majority_is_not_enough_bitcoin_mining/

Fascinating...reading still right now...but if I get this correct - the concept is that you're mining on something big like btcguild, and copying the entire block header onto your own private pool of work; at the same time, your miner is accepting work and not submitting valid shares to btcguild yet it submits them to the private duplicated pool. 

Anytime a Valid Share is found to have met minimum difficulty and discovers a block, it submits this from the private pool and broadcasts to the network?  Network accepts this and the private pool is fed the newly minted coins instead of btcguild?

No, completely wrong. The article is talking something else, and at the same time your strategy does not work at all.

This is a very common noob misconception. Simply speaking, a "share" is bound to the destination of the reward so you can't direct the reward to other address.



Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: jl2012 on November 04, 2013, 04:09:26 AM
Saw this on reddit first, reading paper, thought I should share:

http://arxiv.org/abs/1311.0243

http://www.reddit.com/r/Bitcoin/comments/1puk1a/arxiv_paper_majority_is_not_enough_bitcoin_mining/

I didn't read the maths carefully but I think I read something similar before. I don't think it works in a very effective way as the reason stated in section 6.1. The sybil attack described is also not effective if there are many honest full-nodes. Also, I assume that big pools are connected directly to minimize the stale rate so again such sybil attack won't work.

There are also other solutions, such as forwarding unverified full difficulty block headers, or even partial difficulty headers.



Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gmaxwell on November 04, 2013, 06:11:37 AM
I'm short on time, and this was announced to the public without advanced notice to e.g. the bitcoin-security list. Making an informed response fast is hard.

Ideally I'd like to think about it carefully, read the paper a few times, and run some simulations before commenting, but I'll likely be tied up at the IETF all week and people are already panicking and pushing for hasty changes in response to this which may be ill-advised, so I'm going to offer some preliminary comments here.

We've (or, at least, I have, see also Bytecoin's analysis in 2010 (https://bitcointalk.org/index.php?topic=2227.msg30083#msg30083)) evaluated this general attack before but the simplest version of it just doesn't work out (in theory, or in simulation): Without significant hash-rate delaying your blocks ends up increasing the risk that you get orphaned since nodes prefer the first block they heard. The contribution of the paper (to my thinking, at least) is to assume that an attacker can also sybil attack the network, and in doing so can run nodes which will release blocks produced by the attacking miners in response to hearing a new block from the honest miners. So where the sybil attack is successful the delay does not confer a disadvantage and then the attack works (with increasing effectiveness the more effective the sybiling is and the more hashrate the attacker has).

Their proposed solution, which is offered without extensive analysis, is to relay all blocks, even late ones, and then choose the preferred block in ties at random. Ignoring collateral vulnerabilities which a hasty implementations of forward-all might create, I believe this proposal has a problem in that it creates a selfishness advantage even without any sybil attack at all, so long as the selfish miner has enough hashrate.  I believe this is a bad tradeoff because the degree of sybil vulnerability between mining nodes is likely much lower than assumed (many miners pin up connections to well known nodes and each other), and because we already have pools large enough to take advantage of the tradeoff vulnerability this creates.

Perhaps more importantly:  There are much worse vulnerabilities for us if attackers can perform successful large scale sybil attacks against miners.  In particular, if they're able to do that they could partition the network into two 50/50 hashrate groups and then drop blocks between them and hand conflicting transactions to each group and produce many-confirmed double-spends without having any hashrate at all.

As I've posted several times of Bitcointalk: beyond the cryptographic assumptions Bitcoin makes _two_ additional security assumptions: That an attacker doesn't control a majority of the hashrate and, quoting Satoshi, "the nature of information being easy to spread but hard to stifle", effectively— that an attacker can't substantially isolate or partition the honest participants.

With this in mind, rather than rushing in any changes in the consensus algorithm I recommend we take the following actions:

(0) Make a new concerted manual anti-sybil effort to ensure that all large miners are well connected to strong relaying nodes, including a mixture of public and non-public nodes (non-public for DOS resistance), in order to make partitioning miners infeasible.
(1) Evaluate our sybil resistance more generally and consider what measures and automation we could add to make sybil attacks harder (including supporting authenticated peering, or measures like including addr messages in coinbase txns to jam addr message manipulation).
(2) Build better stats collection for monitoring network wide orphaning.
(3) Improve node scalability (e.g. make it possible to support nodes with larger numbers of connections)

(Maybe it would also be useful to instrument miner software to detect block delaying, in the same way bfgminer will detect a pool issuing work that conflicts its own prior work)

It may ultimately make sense to change the consensus preference for _very_ near ties (e.g. ones which arrive with time differences comparable in scale to the difference in latency between your peers), but I think we need to be very careful that we don't trade a potentially irrelevant problem (because its either infeasible or if its not infeasible we have much worse problems) for a practically exploitable one.  Making our infrastructure stronger against sybils has many benefits and has been on and off the radar for a long time, and AFAICT if we prevent miner from being partitioned/intermediated by sybils we close the concerns here.

Thoughts?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: pera on November 04, 2013, 07:51:00 AM
Thoughts?
Point 0 is just a workaround right?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Gavin Andresen on November 04, 2013, 09:25:49 AM
Thoughts?
Point 0 is just a workaround right?

No; miners have a natural incentive to want to be closely connected to as many other miners as possible (to reduce orphan costs).

RE: Evaluating sybil resistance: I would still like to see blocks and transactions being broadcast over another completely different networking protocol, either peer-to-peer or not. More diversity so we're not relying on the one p2p network would be great, and, depending on how it was implemented, might automatically bring sybil resistance.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gaston909 on November 04, 2013, 09:54:12 AM
Saw this on reddit first, reading paper, thought I should share:

http://arxiv.org/abs/1311.0243

http://www.reddit.com/r/Bitcoin/comments/1puk1a/arxiv_paper_majority_is_not_enough_bitcoin_mining/

Beat me to it!


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Stephen Gornick on November 04, 2013, 10:29:01 AM
Vitalik Buterin's writeup on this on BitcoinMagazine.com

Selfish Mining: A 25% Attack Against the Bitcoin Network
 - http://bitcoinmagazine.com/7953/selfish-mining-a-25-attack-against-the-bitcoin-network


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: niniyo on November 04, 2013, 10:32:22 AM
I believe that the flaw with this system is that the success rate of your sybil attack has to be the inverse of your share of network hash rate.  For example, if you have 10% of network hash rate, you need your sybil attack to be successful >= 90% of the time in order to profit, otherwise you lose.

Consider:

's' = selfish pools share of network power (eg 0.1)
'o' = honest share of network power (eg. 0.9)
'a' = success rate for a sybil attack ('sybil attack' meaning you intercept an honest block, surpress its propogation, and propogate your own equal-length pre-mined chain which is seen by the mining majority).

The selfish pool will mine on the honest chain until it finds a block, at which point it withholds the block and begins mining on its own private chain.  The honest nodes will find the next block with probility 'o', which triggers a contest.  Eg. where the selfish pool has 10% hash rate, the selfish strategy will require them to execute their sybil attack on 90% of the blocks they mine.

Percentage of selfish pool blocks that will require sybil propogation = o.
Percentage of selfish pool work wasted from ineffective sybil attacks = o(1-a).
(Eg. with 10% hashrate and 50% sybil success rate, the selfish pool will waste 45% of their work.)

Percentage of honest workers blocks that suffer sybil attack = s.
Percentage of honest work wasted due to sybil attack = s*a.
(Eg. with 90% hashrate at 50% sybil success rate, the honest nodes will only waste 5% of their work.)

The reason why I compare the percentage of work wasted, is because that is the way to measure the relative return on hash rate invested.  If the selfish strategy wastes more % of work than the honest strategy, then it doesn't pay off to mine in the selfish pool.

Based on this formula, the selfish pool will only be at an advantage if 'a' (sybil success rate) is greater than 'o' (honest share of hashing power).  In other words, the sybil attack must be successful at a rate inverse to your mining power.

So, basically the main threat here is the sybil attack.

Can anyone spot any flaws in this analysis?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Stephen Gornick on November 04, 2013, 11:35:33 AM
Isn't the economic benefit to joining the selfish pool easy to extinguish?

The further ahead the selfish pool is, the greater the cost to them if they lose that race.   The only economic benefit to the selfish miner comes from the block reward subsidy + fees from future blocks on that chain.  But if it becomes known that a selfish pool is operating then an incentive for defecting from the selfish pool/cartel can be offered (in a way so that it is not available to the selfish pool as well).   If those incentives cause mining on the selfish pool to be less rewarding then the selfish pool strategy can be defeated.

Wouldn't it be easy to tell if a block seems to be coming from a selfish pool (as each new block will appear to be laggng since it has no recently arrived transactions)?  So if this lag can be detected then cannot an incentive to honest pools be offered?

A way to offer this incentive so that it is only available to the honest miners is to periodically send a type of marker transaction.  There is a promise to pay an incentive/reward for including the marker transaction within N seconds after it is broadcast.  So the selfish pool's previously mined block would not be able to include this marker transaction promptly, but honest miners are including recent transactions and thus would be able to include it.  And then when that "included within N seconds" condition is true, those offering the incentive then send the incentive payment to the Bitcoin address for the coinbase transaction for that block.

[Edited]


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Skybuck on November 04, 2013, 01:39:04 PM
Interesting document.

What seems to be missing is when multiple selfish-mining pools exist... what will happen then ? ;)

Maybe one would be a bit faster than the other... though humans tend to want to oppose each other so I am thinking there will always be groups of people trying to defeat the others.

Maybe they would also do it to try and keep the system in balance or so. Then again maybe not.

The change seems simple enough to implement.

(During my first scan/read of the document my system frooze up completely, then I installed a new update of acrobat reader, and no more problems... I did clean my system two days ago or so and it been running all night so could be an issue with that... kinda weird though.. so then I read it in full it's a very interesting document and a very easy attack).

I am glad somebody with more mathematical background and statistical reasoning figured this out... I've wondered for a long time now what kind of benefit keeping the found block secret/private would have and how to exploit it... this document does a fine job of explaining all possibilities, and under all possibilities it's a good/beneficial attack with high likelyhood of working/accepted under the current bitcoin system.

The most funny thing is the parallel nature/exponential nature of it... the more people/miners join it, the better it starts to work... which reminds me of the king and the grain on the checkerboard/chessboard... it starts out small but ends up big ;) :) How big I never knew but this document examines it more.

For this too work people would have to be convinced that they pay out on a selfish-mining-pool is greater than "honest" pools...

Also such data may fluctuate over time probably leading to multiple selfish mining pools... what happens then is unclear ;) probably one will win out over the other... or perhaps it's too close too call and both continue to grow bigger, honest nodes/miners would then loose out... I don't really see it as honest vs non-honest... it's just a different way to handle the blockchain and new blocks.

Also I would totally not be surprised if some mining pools already implemented this in one form or another... I would surely have tried to do something like this... so the likelyhood of this already existing in the wild is super high.

Sounds more like this is a document written by somebody that got sick of the cheaters and wants to ratt out on them... to try and prevent system take-over/collapse on the long run protecting it's wealth thereby ;) :) =D
(I read the document up to page 7, then skipped some of the state machine analysis and maths also read some page 12 about pool formation and page 13 fixing bitcoin).

Most fun document about bitcoin I have seen so far and it came out this week... lucky me... I just happened to come and see how bitcoin is doing or so ;) I guess I had a hunch something was going on I dont know or I just got lucky wiee ;) :)

Will be interesting to see how this plays out... even with the fix... it's going to remain problematic somewhat... apperently now 25% is enough for a selfish pool... but what if multiple selfish-pools exist ? hmmm

Maybe if multiple exists it won't be much of a problem. So that will be my next lookout... a document examining such a scenerio ;)

One question that also remains unanswered in my brain is the following:

How far back (how many blocks) is a client allowed to switch branches ? Only 1 block ? or multiple ? or a fixed number ? Maybe 2048 ? Me rusty on bitcoin...


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: hannesnaude on November 04, 2013, 01:59:42 PM
The contribution of the paper (to my thinking, at least) is to assume that an attacker can also sybil attack the network, and in doing so can run nodes which will release blocks produced by the attacking miners in response to hearing a new block from the honest miners. So where the sybil attack is successful the delay does not confer a disadvantage and then the attack works (with increasing effectiveness the more effective the sybiling is and the more hashrate the attacker has).

I think it is a little worse than that. An effective Sybil attack is necessary to make the attack viable for a small pool, but the larger the pool is,  the less effective the Sybil attack needs to be. For a pool larger than 33% of the network, no Sybil attack is required.

On the other hand, one mitigating factor that is not mentioned in the paper is that the attack buys you more revenue long term, but in the short term you will see a loss of revenue. You are not finding more blocks than before (in fact you are losing some of your blocks) so your income within a difficulty adjustment period will actually drop (but so will everyone else's). The increase in revenue comes later due to the fact that you caused others to lose blocks which makes the difficulty drop (or just rise less than it would have) which then nets you more blocks in the long run.

However, since
 a) The attack can easily be detected (sudden increase in orphaned blocks)
 b) The attack will negatively affect the bitcoin price.
the revenue impact of performing the attack is probably negative even in the long run.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Sergio_Demian_Lerner on November 04, 2013, 02:10:03 PM
I have no time to read carefully the paper but..

Some time ago I posted in http://bitslog.wordpress.com/2013/06/26/the-bitcoin-eternal-choice-for-the-dark-side-attack-ecdsa/ a solution to another attack that may also work to protect from this attack:

Quote
The additional protective measure would be that any chain reorg of n blocks is delayed n seconds.  During that wait period, if another better chain reorg is received, it is processed in the same way. After one period expires, the chain reorg is applied, and a new best chain is created. If a block that extends a waiting chain is received, then the waiting lapse is restarted from zero for that chain. ...

This protocol protects from the appearance of simultaneously competing blocks but also from other attacks that may based on hidden branches. So I'll refer the method as "hidden-branch-protection".

Does it help?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Skybuck on November 04, 2013, 02:32:23 PM
This document in super short is about:

Keeping found blocks secret, to perform calculations on them so that others cannot, thereby giving a racing adventage. They "secretivers" will have a head start.

When "publicers" announce their block quickly publish the "secret" block to create a tieing situation.

Currently the first block that arrives is picked by miners so the "secretives" have incencitive to "delay public blocks", an incentive to listen in on other mining pools "detect early public block announcement to quick react to it" and to try and inject/publish their secretive block as fast as possible towards other miners that have not yet received a new block.

If the random picking solution is implemented, 50% of "publicers" will choose the "publicer" block, 50% will choose the "secretivers" blocks, while 100% of the "secrectives" pick the "secritive" block. 150% will therefore try and continue on "secretive" block and only 50% on "publicer" block, increasing the likelyhood of "secrective" block to win out, thereby injecting the secretive block into the blockchain, either the next block will be found be a publicer or by a secretiver, the more secretivers there are the more likely it will be found by them especially because of the headstart, leading to an incentive for others to join the "secretivers" also known as "(a)head-starters" ;)  (actual percentages will depend on the size of the pools).

The conditions above describe the secretives being ahead 1 block.

The document continues with being 2 blocks ahead. (now it gets longer and fudgy for me at least):

I am not sure but I think in this case it will publish both secretive blocks if the publicers announce their block, immediatly invalidating their progress, this could also cause other self-ish miners to be in trouble, they could also publish their second block creating a new tie, or perhaps even a third.

These situations could be easy to detect, the second block would be announced immediatly ? perhaps the algorithm can be refined somewehat by introducing a believable delay of a few minutes, though risky if another selfish pool announces it sooner, though keeping the second block secret could also be an option and try and rely on tieing only. Though for many this would not be statisfactory and would probably try the third block strategy and so forth and thus keep immediatly publishing any found blocks immediatly to try and win over the main network.

This last line of thought is described in the last else statement.

If more than 2 blocks ahead, publish all of them to solidify the gains. If this is truely the longest chain then they'll win and be garantueed of the rewards, if this is not truely the longest chain then they will be superseeded/defeatede by another selfish mining pool... so I am in doubt that this last else statement is smart in case of multiple selfish mining pools.

Eventually they would be defeated by another selfish mining pool that may delay their +1 block to try and defeat the other selfish mining pool into wasting their processing time on their private blocks which they hope would be the new public chain... eventually the longer selfish mining pool may win out by delaying their publication of their found blocks.

So I do think the algorithm can be refined somewhat by building in delays to try and defeat other selfish mining pools. Thus if this does get implemented we'll be seeing some kind of time wars... publish to late and one may be superseeded, publish too soon and one may be superseeded, however in this case one would always be superseeded so it makes no sense, and thus always publishing beyond two makes sense... either you truely have most processing power or not, however this does not include luck and by chance...

Perhaps the document describes these lines of thoughts and explains how to handle it or maybe not... maybe it was too difficult to analyze how the algorithm would perform against itself.

For now I shall give it a rest until further notice ;) :)

Some points to sum up:

+ Find a block and keep it secret.
+ Find the next block for the secret block.
+ Publish the secret block if a public block is published.
+ Try to get the secret block published sooner.
+ Some honest nodes may work on the published secret block and if they find the next block the secret block wins.
+ Secret block has more chance of winning if random selection is implemented (this could be the true motive for the document, implementors of bitcoin beware ! ;)).
+ Currently fastest announced block seems to win.
+ Incentive to keep public blocks delayed.
+ Incentive to spy on other pools to detect early block announcement.
+ Incentive to detect traitors by selective announcing private blocks found by pool maintainer.
+ Spying on selfish pools is a potential counter-strategy if done in secret somehow.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gmaxwell on November 04, 2013, 04:25:56 PM
Currently the first block that arrives is picked by miners so the "secretives" have incencitive to "delay public blocks", an incentive to listen in on other mining pools "detect early public block announcement to quick react to it" and to try and inject/publish their secretive block as fast as possible towards other miners that have not yet received a new block.
Your analysis is pretty incomplete. Their success at winning that "fast as possible" race, along with their total hashrate, is essential. Otherwise a delay is a pure loss.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Waschtel on November 04, 2013, 04:41:51 PM
Excuse my naiveté, but I was under the impression that the software which coordinates the mining effort of a pool between the pool miners is NOT responsible for claiming the mining prize, but that each lowly pool miner - should he find the correct hash - claims the prize to an account belonging to the pool and immediately broadcasts his success. This way, immediate broadcasting of the new block is assured, and keeping stuff secret would never happen.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Meni Rosenfeld on November 04, 2013, 05:23:06 PM
I'd like to point out that a primitive version of this attack is 3 years old:

https://bitcointalk.org/index.php?topic=2227.msg30064#msg30064
https://bitcointalk.org/index.php?topic=2227.msg30083#msg30083

Excuse my naiveté, but I was under the impression that the software which coordinates the mining effort of a pool between the pool miners is NOT responsible for claiming the mining prize, but that each lowly pool miner - should he find the correct hash - claims the prize to an account belonging to the pool and immediately broadcasts his success. This way, immediate broadcasting of the new block is assured, and keeping stuff secret would never happen.
A miner in a traditional pool doesn't have the information needed to publish a block on his own. He has to submit the header w/ nonce to the pool, and then the pool broadcasts the block.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: bluemeanie1 on November 04, 2013, 05:50:15 PM
Even of more concern is that IBM has been circling around these areas recently.

IBM has access to enormous computing power.  While they may not aggressively attack Bitcoin per se, they certainly could start brokering privileged positions in the network.  Computing power on that level is very much in the reach of IBM, and they are perhaps the biggest player in high technology for Financial applications.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gmaxwell on November 04, 2013, 06:02:35 PM
A miner in a traditional pool doesn't have the information needed to publish a block on his own. He has to submit the header w/ nonce to the pool, and then the pool broadcasts the block.
They do in the GBT protocol supported by bitcoind, sadly the market chose to use the later stratum protocol over it primarily. :P  This, I think, is largely offtopic. There is no reason you wouldn't expect the hashers to be complicit in such a scheme: Even if delayed blocks can't be prevented with non-GBT mining protocols, they still can be trivially detected. (E.g. miners often issuing work with non-public prev, big orphan bursts)


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: RodeoX on November 04, 2013, 06:19:31 PM
If I'm reading this correctly, an attacker is more likely to loose value performing this attack than to profit from it. Is that right?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Peter Todd on November 04, 2013, 06:26:50 PM
I believe I have a simple and effective solution: http://www.mail-archive.com/bitcoin-development@lists.sourceforge.net/msg03137.html

Nope, that idea doesn't work: http://www.mail-archive.com/bitcoin-development@lists.sourceforge.net/msg03155.html


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: zvs on November 04, 2013, 06:50:16 PM
Makes it even easier when you have all these non-relaying nodes in the network and ppl falling behind several blocks.  Just add 70  more of those swiss nodes, gtg


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: lenny_ on November 04, 2013, 09:09:32 PM
@OP:

That's why p2pool should be a solution. To prevent such things from happening in the future.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Enochian on November 05, 2013, 01:28:19 AM
I just printed out the paper and read it.

Since the algorithm for "Selfish Mining" is now public, all miners have an opportunity to employ it if they feel it gives them an advantage.  So the notion that there is only a single pool of colluding miners growing as other miners join it to reap its advantages is moot.

Initially the colluding pool is a small fraction of total hashrate, and therefore has a vanishingly small probability of being able to mine consecutive blocks on its private chain.  So the only thing it can do is force other people to waste time by delaying publication when it mines a block, and some fraction of the time, its block wins over the public block, and people who have attempted to append to that block lose their work.

This seems to me to be such a small epsilon in the hashing activity that no one is really going to care, and no one is going to bother to do Selfish Mining.  The work to reward ratio here is pretty large.

So basically, "Nothing to See Here," and no modification to the Bitcoin protocol is needed.







Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Peter Todd on November 05, 2013, 01:57:26 AM
Since the algorithm for "Selfish Mining" is now public, all miners have an opportunity to employ it if they feel it gives them an advantage.  So the notion that there is only a single pool of colluding miners growing as other miners join it to reap its advantages is moot.

With multiple competing selfish miners the one with the lowest latency network wins. Or to be exact, some function of lowest latency per dollar spent. Not unlike the race in high-frequency trading to get ever lower latency network connections.

Sticking our collective heads in the sand and singing la-la-la doesn't lead to solutions, something we may need some time in the future as the profit margins in mining become lower. There's a lot of people who should know better who keep on saying that miners have proven to be altruistic and interested in the long-term success of Bitcoin, but Bitcoin is much stronger if we don't need that tenuous assumption.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: justusranvier on November 05, 2013, 02:01:07 AM
something we may need some time in the future as the profit margins in mining become lower.
Profit margins will go up when the transaction rate gets high enough to generate significant transaction fees compared to the block subsidy.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Peter Todd on November 05, 2013, 02:06:45 AM
something we may need some time in the future as the profit margins in mining become lower.
Profit margins will go up when the transaction rate gets high enough to generate significant transaction fees compared to the block subsidy.

a) mining is a zero-sum game

b) increased transaction rates mean more money spent on overhead, rather than the hashing power that keeps bitcoin secure


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: justusranvier on November 05, 2013, 02:09:39 AM
b) increased transaction rates mean more money spent on overhead, rather than the hashing power that keeps bitcoin secure
Yeah, well there's a huge amount of room for optimization there that currently isn't being done.

Either the transaction rate goes up high enough to pay for all this mining infrastructure or else Bitcoin dies.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: revans on November 05, 2013, 02:42:41 AM
b) increased transaction rates mean more money spent on overhead, rather than the hashing power that keeps bitcoin secure
Yeah, well there's a huge amount of room for optimization there that currently isn't being done.

Either the transaction rate goes up high enough to pay for all this mining infrastructure or else Bitcoin dies.


And if you'd read and understood the paper you would know it is the latter; maths and human nature= bye bye Bitcoin. But fear not cryptocurrency cultists there are already a few hundred alternative ponzi scheme for you to get involved in.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: revans on November 05, 2013, 02:46:13 AM
I just printed out the paper and read it.

Since the algorithm for "Selfish Mining" is now public, all miners have an opportunity to employ it if they feel it gives them an advantage.  So the notion that there is only a single pool of colluding miners growing as other miners join it to reap its advantages is moot.

Initially the colluding pool is a small fraction of total hashrate, and therefore has a vanishingly small probability of being able to mine consecutive blocks on its private chain.  So the only thing it can do is force other people to waste time by delaying publication when it mines a block, and some fraction of the time, its block wins over the public block, and people who have attempted to append to that block lose their work.

This seems to me to be such a small epsilon in the hashing activity that no one is really going to care, and no one is going to bother to do Selfish Mining.  The work to reward ratio here is pretty large.

So basically, "Nothing to See Here," and no modification to the Bitcoin protocol is needed.








Umm WTF are you talking about? Try reading it again, only this time whilst not high on Bitcrack. Maths + human nature= a selfish mining future and the end of Cultcoin. In a sense the popularity you so longed Bitcoin to have has destroyed it as peer review is demonstrating just how architecturally boken Bitcoin is.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Peter Todd on November 05, 2013, 03:03:45 AM
My ELI5 explanation that I posed to bitcoin-development might help people understand the attack:

Alice is a miner with some amount of hashing power. She has the ability to detect new blocks on the network extremely effectively because she has controls a lot of nodes with low-latency, high-bandwidth connections; in short she has unusually good knowledge of the state of the network. She is also very good at publishing her blocks and getting them to the majority of hashing power in very little time; she has unusually good connectivity to all miners. (again low-latency and high bandwidth)

She's so good at this that when she finds a new block, she keeps it a secret! She can get away with this because she knows that the moment any other miner, like Bob, finds a block, she can immediately broadcast it to the rest of the network before the other block propagates. Instead of building on Bob's blocks, almost everyone builds on Alice's block, having seen it first, depriving Bob of the revenue. Gradually Alice gets more and more miners because all the other pools don't pay out as much as Alice's pool does. This eventually leads to Alice having a majority of hashing power, or if not that due to social pressure, a majority of the mining revenue.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: eldentyrell on November 05, 2013, 03:10:35 AM
your blocks ends up increasing the risk that you get orphaned since nodes prefer the first block they heard.

I think this assumption of theirs is the flaw.

Successful pools do not build on the first block they hear; they build on the most difficult block they hear.

If you rerun their calculations under that assumption, the cost of losing the work done on their second block in the private two-block chain swamps out any possible benefit.

If the end-user bitcoin-qt client is using the "first block heard" rather than "most difficult block heard", then it's a bug, and one that is already fixed on the network nodes that matter most for security (the mining pools and large solo miners).

Here is where they acknowledge introducing this bug in their simulation:

Quote
In the case of two branches of the same length, we artificially divide the non-pool miners such that a ratio of γ of them mine on the pool’s branch and the rest mine on the other branch.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: dree12 on November 05, 2013, 03:11:58 AM
your blocks ends up increasing the risk that you get orphaned since nodes prefer the first block they heard.

I think this assumption of theirs is the flaw.

Successful pools do not build on the first block they hear; they build on the most difficult block they hear.

If you rerun their calculations under that assumption, the cost of losing the work done on their second block in the private two-block chain swamps out any possible benefit.

If the end-user bitcoin-qt client is using the "first block heard" rather than "most difficult block heard", then it's a bug, and one that is already fixed on the network nodes that matter most for security (the mining pools and large solo miners).


Blocks that are not near a difficulty change will always have the same difficulty.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: eldentyrell on November 05, 2013, 03:15:03 AM
Blocks that are not near a difficulty change will always have the same difficulty.

No, the difficulty of a block is binomially distributed.

The minimum difficulty required for a block to be valid is the thing that stays the same.  Within that 2016-block window the actual difficulty of various blocks varies above that threshold.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: justusranvier on November 05, 2013, 03:16:22 AM
Blocks that are not near a difficulty change will always have the same difficulty.

No, the difficulty of a block is binomially distributed.

The minimum difficulty required for a block to be valid is the thing that stays the same.  Within that 2016-block window the actual difficulty of various blocks varies above that threshold.
It would be less ambiguous if you said, "Successful pools do not build on the first block they hear; they build on the block with the highest work they hear."


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: eldentyrell on November 05, 2013, 03:20:56 AM
The minimum difficulty required for a block to be valid is the thing that stays the same.  Within that 2016-block window the actual difficulty of various blocks varies above that threshold.

It would be less ambiguous if you said, "Successful pools do not build on the first block they hear; they build on the block with the highest work they hear."

Well, we're splitting hairs here, but technically I might have gotten lucky and not worked very hard to find a block whose hash, in binary, ends with 250 zeroes in a row (outrageously high difficulty).  "Difficulty" and "target" are actual technical terms with precise definitions in the block protocol.

But yeah we're talking about the same thing.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Enochian on November 05, 2013, 03:21:08 AM
Umm WTF are you talking about? Try reading it again, only this time whilst not high on Bitcrack. Maths + human nature= a selfish mining future and the end of Cultcoin. In a sense the popularity you so longed Bitcoin to have has destroyed it as peer review is demonstrating just how architecturally boken Bitcoin is.

Do you have a specific criticism?

You are welcome to set up a selfish mining rig and prove me wrong.  Unless you have sufficient hash power to be mining blocks very frequently, no one is even going to notice you exist.

This is an academic exercise with very tiny practical implications, and in any case, a very small threat on the long list of threats.



Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: eldentyrell on November 05, 2013, 03:22:52 AM
This is an academic exercise

It isn't even that; arxiv is not peer reviewed.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: dree12 on November 05, 2013, 03:23:32 AM
The minimum difficulty required for a block to be valid is the thing that stays the same.  Within that 2016-block window the actual difficulty of various blocks varies above that threshold.

It would be less ambiguous if you said, "Successful pools do not build on the first block they hear; they build on the block with the highest work they hear."

Well, we're splitting hairs here, but technically I might have gotten lucky and not worked very hard to find a block whose hash, in binary, ends with 250 zeroes in a row (outrageously high difficulty).

But yeah we're talking about the same thing.

This is a statistical fallacy. Two blocks will always be equally difficult when they were mined with the same target.

What you mean to say is that clients prefer to choose the block with the least block hash. This is effectively a deterministic pseudo-random algorithm for choosing which block to build on. I do not remember this being the case, but it is possible this has changed recently.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: solex on November 05, 2013, 03:24:56 AM
Google news is showing a number of articles which amount to FUD, and are multiplying like gremlins.
Perhaps the Bitcoin Foundation should put up a short rebuttal / press release encapsulating some of the information in this thread. While the Eyal paper has some merit - it is certainly not a situation of "'Bitcoin Is Broken' And Could Collapse"

Bitcoin flaw could let group take control of currency
CNNMoney - ‎3 hours ago‎
The flaw is due to the nature of how bitcoins are created -- people "mine" them by solving a complex puzzle with their computers. If used correctly, the system is set up so that someone guesses correctly every 10 minutes, and the winner gets 25 bitcoins.
http://money.cnn.com/2013/11/04/technology/bitcoin-flaw/

Bitcoin Researchers: You Can Game the System
Mashable - ‎10 hours ago‎
Computer science researchers at Cornell University claim to have found a way to subvert the system driving production of the digital currency Bitcoin. The researchers call their technique “selfish mining,” through which individuals or groups of Bitcoin miners ...
http://mashable.com/2013/11/04/bitcoin-cornell-researchers/

Researchers Say 'Bitcoin Is Broken' And Could Collapse
Yahoo!7 News - ‎1 hour ago‎
The problem is with how people "mine" bitcoins. Mining is how bitcoins are created. Most people don't mine bitcoins anymore. They buy them or take them as payment. But some people are in the business of mining coins with special bitcoin-mining computers ...
http://au.finance.yahoo.com/news/researchers-bitcoin-broken-could-collapse-014448102.html

Cornell Researchers Found a Way to Game Bitcoin
RYOT - ‎2 hours ago‎
It's entirely likely and understandable, despite our better efforts to bombard you with Bitcoin stories recently, that you still don't know what Bitcoin is. (To be honest, 92 articles about it later we still don't fully grasp it.) But all you need to know is that it's digital ...
Bitcoin open to takeover, researchers discover with new algorithm
http://www.ryot.org/cornell-researchers-claim-able-game-bitcoin/456361

Science Daily (press release) - ‎58 minutes ago‎
Nov. 4, 2013 — A major flaw that has gone unrealized until now leaves the $1.5 billion Bitcoin market open to manipulation and a potential takeover, according to a new study by two Cornell University computer scientists.
http://www.sciencedaily.com/releases/2013/11/131104112234.htm


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: revans on November 05, 2013, 03:26:33 AM
Umm WTF are you talking about? Try reading it again, only this time whilst not high on Bitcrack. Maths + human nature= a selfish mining future and the end of Cultcoin. In a sense the popularity you so longed Bitcoin to have has destroyed it as peer review is demonstrating just how architecturally boken Bitcoin is.

Do you have a specific criticism?

You are welcome to set up a selfish mining rig and prove me wrong.  Unless you have sufficient hash power to be mining blocks very frequently, no one is even going to notice you exist.

This is an academic exercise with very tiny practical implications, and in any case, a very small threat on the long list of threats.




Umm, well apart from the fact that the cost for any rogue government or bank to bring down Bitcoin has now decreased dramatically, I think you are naive to think that selfish mining won't become the norm. For all the phoney idealism, allI see and hear from Bitcoin cultists is a desire to get rich quick, for easy money made riding a speculative bubble. All profess their sincere belief in Bitcoin as a currency, and yet strangely that nasty old state fiat they claim to hate is what they can;t wait to get their hands on.

In other words, your community is comprised of speculators and get rick quick wannabes, it is laughably naive to believe they won' game the system, if only because so many others will to refraim would be hugely disadvantageous.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Peter Todd on November 05, 2013, 03:29:38 AM
your blocks ends up increasing the risk that you get orphaned since nodes prefer the first block they heard.

I think this assumption of theirs is the flaw.

Successful pools do not build on the first block they hear; they build on the most difficult block they hear.

You're wrong: nobody does that and doing so puts the miner at a disadvantage because the block you hear about first is the one most likely to have propagated to a majority of the network. It is however a possible way to mitigate this attack and in an email to bitcoin-development one of the authors specifically stated they thought of that idea and left it out of their paper due to space constraints:

Quote
Here is a solution we did not put in the paper due to space constraints
that should alleviate your concern:

Instead of locally choosing a block at random, have a deterministic
pseudo-random mechanism for choosing between competing chains. E.g., take
the one whose last block hash is smaller. This way all miners choose the
same chain, and the guarantees of our solution hold.

I'm working on analyzing a stronger version of this solution that would make the choice to mine the smaller block hash be short-term economically rational for miners.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: justusranvier on November 05, 2013, 03:30:26 AM
"Difficulty" and "target" are actual technical terms with precise definitions in the block protocol.
That is true.

However, since virtually everyone says "difficulty" when they really mean "target", and since the wiki uses "work" to refer to difficulty, using the most common convention will prevent a lot of confusion.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: revans on November 05, 2013, 03:30:35 AM
Google news is showing a number of articles which amount to FUD, which are multiplying like gremlins.
Perhaps the Bitcoin Foundation should put up a short rebuttal / press release encapsulating some of the information in this thread. While the Eyal paper has some merit - it is certainly not a situation of "'Bitcoin Is Broken' And Could Collapse"

Bitcoin flaw could let group take control of currency
CNNMoney - ‎3 hours ago‎
The flaw is due to the nature of how bitcoins are created -- people "mine" them by solving a complex puzzle with their computers. If used correctly, the system is set up so that someone guesses correctly every 10 minutes, and the winner gets 25 bitcoins.
http://money.cnn.com/2013/11/04/technology/bitcoin-flaw/

Bitcoin Researchers: You Can Game the System
Mashable - ‎10 hours ago‎
Computer science researchers at Cornell University claim to have found a way to subvert the system driving production of the digital currency Bitcoin. The researchers call their technique “selfish mining,” through which individuals or groups of Bitcoin miners ...
http://mashable.com/2013/11/04/bitcoin-cornell-researchers/

Researchers Say 'Bitcoin Is Broken' And Could Collapse
Yahoo!7 News - ‎1 hour ago‎
The problem is with how people "mine" bitcoins. Mining is how bitcoins are created. Most people don't mine bitcoins anymore. They buy them or take them as payment. But some people are in the business of mining coins with special bitcoin-mining computers ...
http://au.finance.yahoo.com/news/researchers-bitcoin-broken-could-collapse-014448102.html

Cornell Researchers Found a Way to Game Bitcoin
RYOT - ‎2 hours ago‎
It's entirely likely and understandable, despite our better efforts to bombard you with Bitcoin stories recently, that you still don't know what Bitcoin is. (To be honest, 92 articles about it later we still don't fully grasp it.) But all you need to know is that it's digital ...
Bitcoin open to takeover, researchers discover with new algorithm
http://www.ryot.org/cornell-researchers-claim-able-game-bitcoin/456361

Science Daily (press release) - ‎58 minutes ago‎
Nov. 4, 2013 — A major flaw that has gone unrealized until now leaves the $1.5 billion Bitcoin market open to manipulation and a potential takeover, according to a new study by two Cornell University computer scientists.
http://www.sciencedaily.com/releases/2013/11/131104112234.htm




That is an accurate headline. Bitcoin is fundamentally broken per these findings, and significant exploitation of these findings (which given human nature and financial incentives is inevitable) Bitcoin will collapse. Bitcoiners can issue all the press releases attempting to debunk this reality as they like, it won't change a damn thing. The only question is how quickly this exploitation happens, and how rapidly it poisons the whole network


Fun times ahead.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: eldentyrell on November 05, 2013, 03:34:42 AM
This is a statistical fallacy. Two blocks will always be equally difficult when they were mined with the same target.

This is a definitional fallacy.


What you mean to say is that clients prefer to choose the block with the least block hash.

What you mean is the most difficulty, which is not the same as the numerical block hash.  The natural numbers less than 2^256 are a total order, but difficulty is a partial order on block hashes.

For any target, blocks with these two hashes both meet that target.  Therefore two blocks with these two hashes are of equal difficulty even though the first one has the numerically least block hash:

Code:
  0xffffffffffffffffffff0000
  0x000000000000000000000000000f0000


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Enochian on November 05, 2013, 03:37:15 AM
That is an accurate headline. Bitcoin is fundamentally broken per these findings, and significant exploitation of these findings (which given human nature and financial incentives is inevitable) Bitcoin will collapse. Bitcoiners can issue all the press releases attempting to debunk this reality as they like, it won't change a damn thing. The only question is how quickly this exploitation happens, and how rapidly it poisons the whole network

Fun times ahead.

You can't seriously think that a mining pool waiting to announce its blocks until they invalidate the maximum amount of other peoples' computation is going to significantly perturb the network unless that mining pool already has a non-trivial fraction of the total hashrate.

The network is hardly in any danger of being poisoned.

 


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: justusranvier on November 05, 2013, 03:38:50 AM
You can't seriously think
It's just trolling and market manipulation.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Peter Todd on November 05, 2013, 03:41:12 AM
That is an accurate headline. Bitcoin is fundamentally broken per these findings, and significant exploitation of these findings (which given human nature and financial incentives is inevitable) Bitcoin will collapse. Bitcoiners can issue all the press releases attempting to debunk this reality as they like, it won't change a damn thing. The only question is how quickly this exploitation happens, and how rapidly it poisons the whole network

Your view assumes Bitcoin is a static thing; Bitcoin can be changed in response to this attack

What the Bitcoin Foundation should be doing is releasing a press release welcoming the Cornell researchers competent analysis of the flaws in the system, while pointing out that one of the strengths of Bitcoin is that flaws can be corrected if a clear majority of Bitcoin users choose to change the software they run.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: eldentyrell on November 05, 2013, 03:43:21 AM
You're wrong: nobody does that

I think you mean you don't do that.



Quote
E.g., take
the one whose last block hash is smaller. This way all miners choose the
same chain, and the guarantees of our solution hold.

This is not a new idea at all.  As far as public postings, it's been on this page on the bitcoin wiki (https://en.bitcoin.it/wiki/Thin_Client_Security) for at least six months, and there was definitely a mention of it on bitcoin-dev about a year ago (I will post the reference when I find it).  And, as I've mentioned, it's pervasive in the modified clients used by large mining operations, although those are not public so you're welcome to shout "liar liar pants on fire" all you like and I won't get upset :)



I think the people who wrote this paper took Satoshi's original whitepaper too literally:

Quote
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof- of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.

Mining strategy has evolved and adapted, as it must in any incentive-driven system.  For example, Satoshi's whitepaper predicted that transaction fees would be a meaningful incentive, and it's pretty obvious it hasn't turned out that way.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: dree12 on November 05, 2013, 03:50:02 AM
This is a statistical fallacy. Two blocks will always be equally difficult when they were mined with the same target.

This is a definitional fallacy.


What you mean to say is that clients prefer to choose the block with the least block hash.

What you mean is the most difficulty, which is not the same as the numerical block hash.  The natural numbers less than 2^256 are a total order, but difficulty is a partial order on block hashes.

What are you talking about?

Let's say I have two hashes: 0xF000 and 0xEFFF. Target is 0xFF00. Then:
  • The two hashes have the same difficulty.
  • The second hash is numerically less than the first.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: revans on November 05, 2013, 03:57:29 AM
That is an accurate headline. Bitcoin is fundamentally broken per these findings, and significant exploitation of these findings (which given human nature and financial incentives is inevitable) Bitcoin will collapse. Bitcoiners can issue all the press releases attempting to debunk this reality as they like, it won't change a damn thing. The only question is how quickly this exploitation happens, and how rapidly it poisons the whole network

Fun times ahead.

You can't seriously think that a mining pool waiting to announce its blocks until they invalidate the maximum amount of other peoples' computation is going to significantly perturb the network unless that mining pool already has a non-trivial fraction of the total hashrate.

The network is hardly in any danger of being poisoned.

 


As things stand that is exactly what I think. Client patches can ameliorate the issue, but not fix it.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: eldentyrell on November 05, 2013, 03:59:06 AM
What you mean is the most difficulty, which is not the same as the numerical block hash.  The natural numbers less than 2^256 are a total order, but difficulty is a partial order on block hashes.

What are you talking about?

You deleted my example; that may be the source of your confusion…

Here, look at it in fixed-width font, with some emphasis:


  0xffffffffffffffffffffffffffff0000
  0x000000000000000000000000000f0000


See how they have the same number of trailing zeroes?  For any target you choose, either both will match it or neither will.  Yet these two numbers are not equal.  Therefore difficulty is creates a partial order (http://en.wikipedia.org/wiki/Partially_ordered_set) on block hashes.  On the other hand "less than" is a total order (https://www.google.com/search?client=safari&rls=en&q=total+order&ie=UTF-8&oe=UTF-8) on block hashes.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: revans on November 05, 2013, 03:59:57 AM
That is an accurate headline. Bitcoin is fundamentally broken per these findings, and significant exploitation of these findings (which given human nature and financial incentives is inevitable) Bitcoin will collapse. Bitcoiners can issue all the press releases attempting to debunk this reality as they like, it won't change a damn thing. The only question is how quickly this exploitation happens, and how rapidly it poisons the whole network

Your view assumes Bitcoin is a static thing; Bitcoin can be changed in response to this attack

What the Bitcoin Foundation should be doing is releasing a press release welcoming the Cornell researchers competent analysis of the flaws in the system, while pointing out that one of the strengths of Bitcoin is that flaws can be corrected if a clear majority of Bitcoin users choose to change the software they run.

Well so far the Bitcoin community of cultists have done little but accuse the researchers of being part of a government plot to destroy Bitcoin, and some idiot has even put a Bitcoin bounty on their heads.

As to changing client software, it will ameliorate the problem, but it cannot fix it.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: jl2012 on November 05, 2013, 04:11:29 AM
My ELI5 explanation that I posed to bitcoin-development might help people understand the attack:

Alice is a miner with some amount of hashing power. She has the ability to detect new blocks on the network extremely effectively because she has controls a lot of nodes with low-latency, high-bandwidth connections; in short she has unusually good knowledge of the state of the network. She is also very good at publishing her blocks and getting them to the majority of hashing power in very little time; she has unusually good connectivity to all miners. (again low-latency and high bandwidth)

She's so good at this that when she finds a new block, she keeps it a secret! She can get away with this because she knows that the moment any other miner, like Bob, finds a block, she can immediately broadcast it to the rest of the network before the other block propagates. Instead of building on Bob's blocks, almost everyone builds on Alice's block, having seen it first, depriving Bob of the revenue. Gradually Alice gets more and more miners because all the other pools don't pay out as much as Alice's pool does. This eventually leads to Alice having a majority of hashing power, or if not that due to social pressure, a majority of the mining revenue.

"low-latency and high bandwidth" is not free. Unless the extra revenue can cover the cost, it is still economically prohibitive to do this


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: acoindr on November 05, 2013, 04:28:55 AM
Google news is showing a number of articles which amount to FUD, and are multiplying like gremlins.
Perhaps the Bitcoin Foundation should put up a short rebuttal / press release encapsulating some of the information in this thread. While the Eyal paper has some merit - it is certainly not a situation of "'Bitcoin Is Broken' And Could Collapse"
...

I agree it would be nice for Bitcoin Foundation to try and get a boot on this.

This problem as I see it is nonexistent. As I've talked about before Mining Block References (MBRs) can tremendously reduce or eliminate latency which would squash this attack.

To conceptualize how this works imagine a group passing a glass of wine to share. It takes a while for the wine to "propagate" to each person's mouth because it's passed one by one. It would be more efficient to place the glass at front and connect several straws from it to every person. Propagation is then basically instant. All a (voluntary) MBR does is serve as a reference point for finding and informing about found blocks, which reduces latency tremendously.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Enochian on November 05, 2013, 04:33:48 AM
Well so far the Bitcoin community of cultists have done little but accuse the researchers of being part of a government plot to destroy Bitcoin, and some idiot has even put a Bitcoin bounty on their heads.

As to changing client software, it will ameliorate the problem, but it cannot fix it.

By now, the Bitcoin market has priced in this information.  Bitcoin is at $239 on Mt. Gox.  Bitcoin doesn't care, and neither should you.





Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: eldentyrell on November 05, 2013, 04:38:02 AM
By now, the Bitcoin market has priced in this information.  Bitcoin is at $239 on Mt. Gox.


^^ best post in thread


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: jl2012 on November 05, 2013, 04:41:39 AM
That is an accurate headline. Bitcoin is fundamentally broken per these findings, and significant exploitation of these findings (which given human nature and financial incentives is inevitable) Bitcoin will collapse. Bitcoiners can issue all the press releases attempting to debunk this reality as they like, it won't change a damn thing. The only question is how quickly this exploitation happens, and how rapidly it poisons the whole network

Your view assumes Bitcoin is a static thing; Bitcoin can be changed in response to this attack

What the Bitcoin Foundation should be doing is releasing a press release welcoming the Cornell researchers competent analysis of the flaws in the system, while pointing out that one of the strengths of Bitcoin is that flaws can be corrected if a clear majority of Bitcoin users choose to change the software they run.

We only need a majority of miners to change. Any fix would be completely transparent to users.

Selfish-mining won't be successful without a low latency connection and/or Sybil attack.

Low latency connection itself is expensive, and we can nullify its advantage by relaying unverified block headers. People will always assume a block header is valid unless it is proven otherwise, and always mine on top of the first seen header. (I think creating invalid block header is very expensive and no one is trying to do this. Any stats for this?)

On the other hand, we can make a Sybil attack expensive: non-p2p alternative block broadcasting channels, certified nodes and miners, full nodes on TPM, restricting number of peers from the same ip range or the same country

With all these optimizations, I don't think selfish-mining is profitable


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: justusranvier on November 05, 2013, 04:42:52 AM
This problem as I see it is non-existent. As I've talked about before Mining Block References (MBRs) can tremendously reduce latency which would squash this attack.
1) Make the nonce long enough that the extraNonce field is no longer needed in the coinbase transaction.

2) Now it's possible for miners to broadcast their Merkle tree as soon as they start hashing (10 minutes on average before they finish)

3) When they find a valid hash, now they only need to broadcast the block header because the rest of the network has (usually) already received and validated the Merkle tree.

4) Block header propagation is very fast and not dependent of the size of the blocks.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: chriswilmer on November 05, 2013, 04:45:17 AM
Hey guys,

Could one of you be so nice as to test my understanding of a nuance of the Selfish-Miner attack?

I THINK I understand how, if information about blocks isn't stifled, then the selfish mining strategy wouldn't work (because you couldn't reveal your privately found block quickly enough to orphan the block found by honest miners). However, and I am just asking out of intellectual curiosity... if you have already found TWO blocks privately (for whatever reason)... then it would ALWAYS be better to continue mining in private, right? Because as soon as the network finds one block, you can reveal your two... and if you find three, then you can keep going and only reveal your hand when the network finds n-1 blocks. Am I thinking correctly?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: dree12 on November 05, 2013, 04:50:19 AM
What you mean is the most difficulty, which is not the same as the numerical block hash.  The natural numbers less than 2^256 are a total order, but difficulty is a partial order on block hashes.

What are you talking about?

You deleted my example; that may be the source of your confusion…

Here, look at it in fixed-width font, with some emphasis:


  0xffffffffffffffffffffffffffff0000
  0x000000000000000000000000000f0000


See how they have the same number of trailing zeroes?  For any target you choose, either both will match it or neither will.  Yet these two numbers are not equal.  Therefore difficulty is creates a partial order (http://en.wikipedia.org/wiki/Partially_ordered_set) on block hashes.  On the other hand "less than" is a total order (https://www.google.com/search?client=safari&rls=en&q=total+order&ie=UTF-8&oe=UTF-8) on block hashes.

Your example would be easier to understand if you wrote it in big endian, but now I see your point.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Peter Todd on November 05, 2013, 04:50:53 AM
We only need a majority of miners to change. Any fix would be completely transparent to users.

Maybe, maybe not.

One of the fixes I'm looking into would require a hard-fork, but it may prove to be a more effective fix than any solution.

We'll see.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: jl2012 on November 05, 2013, 04:52:02 AM
1) Make the nonce long enough that the extraNonce field is no longer needed in the coinbase transaction.



All ASIC will be broken so basically no one will follow this hardfork.

This could be accomplished by the aux-block softfork I proposed earlier: https://bitcointalk.org/index.php?topic=283746.0


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: justusranvier on November 05, 2013, 04:53:43 AM
All ASIC will be broken so basically no one will follow this hardfork.
All ASICs get replaced after a few months anyway, so it would be no problem to define it 6-12 months in the future before implementing it.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: jl2012 on November 05, 2013, 04:58:13 AM
All ASIC will be broken so basically no one will follow this hardfork.
All ASICs get replaced after a few months anyway, so it would be no problem to define it 6-12 months in the future before implementing it.

The arm-race won't last indefinitely and it will eventually slow down. I don't see any chance to change the format of the 80bytes header unless absolutely needed, e.g. SHA256 weakened or timestamp overflow in the far future


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: dree12 on November 05, 2013, 05:05:02 AM
All ASIC will be broken so basically no one will follow this hardfork.
All ASICs get replaced after a few months anyway, so it would be no problem to define it 6-12 months in the future before implementing it.

The arm-race won't last indefinitely and it will eventually slow down. I don't see any chance to change the format of the 80bytes header unless absolutely needed, e.g. SHA256 weakened or timestamp overflow in the far future

A better solution is to allow both types of blocks for the next year, then force the new type of block. No ASIC is going to last a year.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: niniyo on November 05, 2013, 05:12:44 AM
if you have already found TWO blocks privately (for whatever reason)... then it would ALWAYS be better to continue mining in private, right? Because as soon as the network finds one block, you can reveal your two... and if you find three, then you can keep going and only reveal your hand when the network finds n-1 blocks. Am I thinking correctly?

That's right, which is included in the paper.  The problem of course is that to get 2 blocks ahead you have to first withhold your first block, and if you are a minority miner then you're going to get orphaned far more often than you would find 2 blocks in a row.  So the result is you end up losing a huge majority of your revenue trying to hit these streaks, and since you rarely hit these streaks, it has minimal impact on the rest of the miners.

The selfish strategy just simply does not work unless you can win these orphan contests nearly every time.  Even if the selfish miner becomes amazingly connected and has super low latency to many nodes in the network, what's to stop another miner doing the same?  So its a big stretch to just assume that a selfish miner can always win these races.  It needs to be demonstrated in practice for this to be a serious threat.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Enochian on November 05, 2013, 05:23:41 AM
Umm, well apart from the fact that the cost for any rogue government or bank to bring down Bitcoin has now decreased dramatically, I think you are naive to think that selfish mining won't become the norm.

Rogue governments and banks have deep pockets.  They could simply pay a small premium to their pool members, and get people to join their pool that way.  They hardly need to use the complicated strategy disclosed in the paper to improve their payout.

This probably won't happen.  If it did, it wouldn't happen overnight, and the developers would have ample time to make some new rules about maximum pool size and forking and push them out to everyone, before the evil pool reached any sort of critical mass.

So 99.9% chance the paper is forgotten in a week, and no one cares enough to implement it.  0.1% chance someone decides to run with it, it is instantly noticed, sticks out like a sore thumb, and in the unlikely event large numbers of people start climbing on, we probably have months to make a tweek before it becomes any sort of problem.

The blockchain fork between different versions of the client was a 100 times worse malfunction than this thing ever could be, and that was dealt with successfully in short order.





Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gmaxwell on November 05, 2013, 05:38:19 AM
I think this assumption of theirs is the flaw.
Sorry for confusing you there. Obviously any node prefers the highest total work— the protocol isn't convergent otherwise. This is about blocks which have equal work. Nodes prefer the first heard among those with otherwise equal work. The obvious alternative policies create issues like... incentives for large miners to delay their announcements. :)


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: justusranvier on November 05, 2013, 05:40:24 AM
Nodes prefer the first heard among those with otherwise equal work.
How often does it happen that two miners simultaneously find a block with exactly equal work values?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: dree12 on November 05, 2013, 05:54:33 AM
Nodes prefer the first heard among those with otherwise equal work.
How often does it happen that two miners simultaneously find a block with exactly equal work values?

The issue here is the definition of work. Work is based on the target, and not based on the block hash itself. It is a statistical fallacy to claim that a block with a lower hash required more work than another block mined with the same target.

When two blocks have the same target, the earliest-received is preferred.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: oakpacific on November 05, 2013, 07:18:34 AM
The problem with this paper, I think, is that it uses a much stronger assumption than Satoshi's, that it's a strictly one malicious miner vs a bunch of honest/profit maximize miners scenario, implying the malicious miner miraculously knows every other miner to be honest, profit-maximizing, yet they know hardly anything about him, while in Satoshi's assumption, you basically mine against a number of peers which are unknown to you.

This makes a big difference from the game theory perspective: how can the malicious miner be sure that no one else is going to copy his strategy, forming a even bigger mining coalition, and force him to become his own strategy's victim and lose everything? He will have to think hard to devise a way to guarantee his success, so that nobody can defeat him in his own game, and work out the amount of hashing power he needs to acquire for such guarantee, after several days of work, he is finally done! And congratulations, he has just rediscovered the old and true "51% attack".


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: overc on November 05, 2013, 07:32:00 AM
Ok, what about that problem:

Some guy with deep pocket (government?) establish a very stable mining pool with the best
protection agaisnt ddos and with the lowest network latency possible and welcomes everybody to mine with 0% (or even negative) fee.

So, eventually he will get 51% of hashing power, will not he?
And he even do not need to exploit the problem discussed in this thread, he can just be the honest mining pool.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: User705 on November 05, 2013, 07:55:12 AM
This is economically irrelevant to the total bitcoin and that's why markets didn't seem to care.  No extra bitcoins are created here.  It's more of an issue of one group trying to "steal" mining revenue.  But they already do that.  That's what the competition in solving and publishing blocks is all about.  If a pool holds back a solved block isn't it true that individual miners can see that they found a solution but it hasn't been published?  Couldn't they then hop to another pool and claim the reward there as well or perhaps try to publish directly themselves solo?  Basically I find out this "evil" pool exists and game it.  I mine in pps format and if I find a block I know this pool will hold it back and not publish so then I simply grab that solution and try to publish elsewhere and if I succeed then don't I get paid twice?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: trout on November 05, 2013, 08:52:51 AM
a slightly different question:

how would we detect if such an attack is taking place?

As far as I understand, the attacking miner would have a slightly higher
ratio of blocks broadcast in pairs. That is, normally if his block rate  is alpha
then  rate for pairs should be alpha^2,  but if he is running the attack this value would
be slightly but significantly higher, and depends on gamma (how successful he is with
his sybil attack). It'd take a long time to detect though


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: BitThink on November 05, 2013, 08:55:27 AM
Ok, what about that problem:

Some guy with deep pocket (government?) establish a very stable mining pool with the best
protection agaisnt ddos and with the lowest network latency possible and welcomes everybody to mine with 0% (or even negative) fee.

So, eventually he will get 51% of hashing power, will not he?
And he even do not need to exploit the problem discussed in this thread, he can just be the honest mining pool.

It only becomes a problem if this pool owner (eg. some governments) wants to destroy the bitcoin. Otherwise, they will voluntarily reduce the hash rate (just as BTCGuild already did) to avoid being close to 51%. They have to do this, because their business is based on the validity of BTC and once their hash rate is close to 51%, the market will crash and so does their business.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: BitThink on November 05, 2013, 08:59:48 AM
a slightly different question:

how would we detect if such an attack is taking place?

As far as I understand, the attacking miner would have a slightly higher
ratio of blocks broadcast in pairs. That is, normally if his block rate  is alpha
then  rate for pairs should be alpha^2,  but if he is running the attack this value would
be slightly but significantly higher, and depends on gamma (how successful he is with
his sybil attack). It'd take a long time to detect though

If many (or even most) blocks mined by this pool have corresponding orphan blocks, then we have enough reason to put it in the alert list.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Skybuck on November 05, 2013, 10:16:30 AM
Umm WTF are you talking about? Try reading it again, only this time whilst not high on Bitcrack. Maths + human nature= a selfish mining future and the end of Cultcoin. In a sense the popularity you so longed Bitcoin to have has destroyed it as peer review is demonstrating just how architecturally boken Bitcoin is.

Do you have a specific criticism?

You are welcome to set up a selfish mining rig and prove me wrong.  Unless you have sufficient hash power to be mining blocks very frequently, no one is even going to notice you exist.

This is an academic exercise with very tiny practical implications, and in any case, a very small threat on the long list of threats.



One problem with this logic of yours is that it does not include the possibility of an entire existing mining pool to switch software over to the new selfish-mining algorithm.

This will quickly change the bitcoin game ;) :)

However perhaps this is mosterd after the meal, perhaps it already happened a few years ago. What ever happened to deepbit mining pool ? Did it merge or did it disappear ? or rename ? Or was it eclisped by other mining pools, perhaps people left that pool and flocked to others ;)


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Skybuck on November 05, 2013, 11:15:03 AM
Currently the first block that arrives is picked by miners so the "secretives" have incencitive to "delay public blocks", an incentive to listen in on other mining pools "detect early public block announcement to quick react to it" and to try and inject/publish their secretive block as fast as possible towards other miners that have not yet received a new block.
Your analysis is pretty incomplete. Their success at winning that "fast as possible" race, along with their total hashrate, is essential. Otherwise a delay is a pure loss.

It's indeed a bit more complex than the article (who's link is now broken, apperently the pdf converter crashed... update: v1 seems to still be available, v1 is from 1 november, v2 seems to have crashed, v2 is from 4 november) seems to make out, at least from the algorithm, but later it examines the revenues at page 9, which is basically what my posting below is about, however their algorithm does not include my refinement below, I don't think their algorithm includes spreading/delaying techniques, sometimes sabotaging the enemy or sometimes helping the enemy when it's beneficial, ofcourse this needs to be formulated in code/extra lines but it shouldn't be too hard, my posting examines the friction between calculation speed versus spread speed and could help to make more clear decisions of what to do in certain cases:

Let's denote the attackers as the secretives: S
Let's denote the public as the publics: P

Working on blocks now has a few possibilities:

PSS
PSP
PPS
PPP

Both start working on the previous public block indicated by the first P.

PS   (Group S works on next block S based on block P)
PP   (Group P works on next block P based on block P)

Both find their block at the same time.

S wants to keep it secret to continue work on the next S.
P wants to publish their P.

Here it's clear that S wants to delay P as long as possible, so here a delay of the enemy/P is beneficial towards S, you agree with this so far ?

Now suppose P was late.

(the first P of the three letters is now ignored so:
SS
SP
PS
PP
are the possibilities)

S can now comfortable work on their next S.
P catches up and publishes their first P.

S now has to publish their first S and does so and hopes to win from P. Again here S has a incentive/benefit to delaying P.

However let's assume S is not too successfull at delaying the spread of block P.

And now both blocks arrive at miners, both blocks are now candidates to be included into the block chain.

Now a situation occurs where S has a benefit to help P spread their next block P as fast as possible but only if next block P was based/calculated on block S.

Otherwise again S has a benefit at delaying next block P. If next block P was not based on block S then block S loses their block and instead block P becomes the main chain followed by next block P.

Therefore for this selfish mining algorithm to work well blocks have to be analyzed.

Sometimes it's beneficial for S to sabotage/delay P and sometimes it's beneficial for S to help/speed up spread of P.

However this assumes that S cannot quickly enough calculate next block S, if they instead could then it would still not be wise to help P.

However it's more likely that next block P will spread before they can calculate next block S based on previous block S so it's seems clear to take the money and run... be statisfied with what you got so far.

However it's clear that there is some friction here.

Calculation speed of next block S based on block S versus spread of next block P based on block S.

S now has a choice:

1. Delay spread of next block P based on block S and thereby undermining it's own block S in the hopes of calculating next block S based on block S itself and thus getting a double reward.

versus

2. Acceptance of spread of next block P based on block S and thereby at least embedding block S into the main blockchain and throwing away calculations on next block S and starting over based on next block P and thus getting a single reward.

As long as calculation speed of next block S based on block S is slower than spread of next block P based on block S it seems to make sense to choose option 2.

In other words, the algorithm will need to be adaptive and determine if the spreading block of the opponent was based on a previous block from S or a previous block from P and take a decision on that and do what it thinks is best based on speeds, calculation speed versus spreading speed. Spreading speed seems to be in a few seconds, while calculation speed can be 10 minutes.

However other factors may influence this, denial of service attacks, network attacks, crashes etc.

(Also this posting only looks at S versus P, it does not include S versus S versus P ;))


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: HorseRider on November 05, 2013, 12:41:19 PM
This problem as I see it is non-existent. As I've talked about before Mining Block References (MBRs) can tremendously reduce latency which would squash this attack.
1) Make the nonce long enough that the extraNonce field is no longer needed in the coinbase transaction.

2) Now it's possible for miners to broadcast their Merkle tree as soon as they start hashing (10 minutes on average before they finish)

3) When they find a valid hash, now they only need to broadcast the block header because the rest of the network has (usually) already received and validated the Merkle tree.

4) Block header propagation is very fast and not dependent of the size of the blocks.

I feel that this post might be the solution to this 33% attack.

As a valid block must be pre-broadcasted in the step 2), earlier than a certain time period, and there is a single time system globally, the Selfish Miner's private block should not be seen as valid if it has no pre-broadcasted Merkle tree.

This precautions essentially makes everyone can announce a block no faster than a certain speed, so that we can constrain the centralization of Bitcoin mining power.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: mpfrank on November 05, 2013, 12:43:21 PM
...
You deleted my example; that may be the source of your confusion…

Here, look at it in fixed-width font, with some emphasis:


  0xffffffffffffffffffffffffffff0000
  0x000000000000000000000000000f0000


See how they have the same number of trailing zeroes?  For any target you choose, either both will match it or neither will.  Yet these two numbers are not equal.  Therefore difficulty is creates a partial order (http://en.wikipedia.org/wiki/Partially_ordered_set) on block hashes.  On the other hand "less than" is a total order (https://www.google.com/search?client=safari&rls=en&q=total+order&ie=UTF-8&oe=UTF-8) on block hashes.

I thought difficulty related to the number of LEADING zeros, not trailing zeros...


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: mpfrank on November 05, 2013, 01:20:13 PM
...
It's indeed a bit more complex than the article (who's link is now broken, apperently the pdf converter crashed... update: v1 seems to still be available, v1 is from 1 november, v2 seems to have crashed, v2 is from 4 november) seems to make out
...

Here, I compiled v2 of the paper from its TeX source.  There's some error producing the citations but you can still read the text.

https://dl.dropboxusercontent.com/u/3133557/Bitcoin/btcProc.pdf


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: justusranvier on November 05, 2013, 01:51:14 PM
I feel that this post might be the solution to this 33% attack.
I originally thought of it as a way of more efficiently scaling to very large block sizes, but it might have the added effect of making this attack more difficult too.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: HorseRider on November 05, 2013, 01:57:57 PM
I feel that this post might be the solution to this 33% attack.
I originally thought of it as a way of more efficiently scaling to very large block sizes, but it might have the added effect of making this attack more difficult too.

Yes, a crucial step in this SM attack is to release two blocks one after one immediately . This kind of behavior is not normal and meaningless. If we can stop this kind of behavior, we can prevent the SM attack.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: jl2012 on November 05, 2013, 01:58:57 PM
This problem as I see it is non-existent. As I've talked about before Mining Block References (MBRs) can tremendously reduce latency which would squash this attack.
1) Make the nonce long enough that the extraNonce field is no longer needed in the coinbase transaction.

2) Now it's possible for miners to broadcast their Merkle tree as soon as they start hashing (10 minutes on average before they finish)

3) When they find a valid hash, now they only need to broadcast the block header because the rest of the network has (usually) already received and validated the Merkle tree.

4) Block header propagation is very fast and not dependent of the size of the blocks.

I feel that this post might be the solution to this 33% attack.

As a valid block must be pre-broadcasted in the step 2), earlier than a certain time period, and there is a single time system globally, the Selfish Miner's private block should not be seen as valid if it has no pre-broadcasted Merkle tree.

This precautions essentially makes everyone can announce a block no faster than a certain speed, so that we can constrain the centralization of Bitcoin mining power.

Selfish Miner can also pre-broadcast his Merkle tree.

The interesting points of this solution are to minimize the advantage of the low latency connection of the selfish miner.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: justusranvier on November 05, 2013, 02:09:11 PM
The interesting points of this solution are to minimize the advantage of the low latency connection of the selfish miner.
When the part of a block that must be rapidly broadcast is reduced to less than 100 bytes (regardless of the actual size of the block), propagation times are going to be so low that selfish miner will have a more difficult time responding in time to pull off the attack.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Peter Todd on November 05, 2013, 02:11:04 PM
The interesting points of this solution are to minimize the advantage of the low latency connection of the selfish miner.
When the part of a block that must be rapidly broadcast is reduced to less than 100 bytes (regardless of the actual size of the block), propagation times are going to be so low that selfish miner will have a more difficult time responding in time to pull off the attack.

The high-frequency-trading industry begs to differ.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: justusranvier on November 05, 2013, 02:12:56 PM
The high-frequency-trading industry begs to differ.
The high frequency trading industry operates within a few mile radius, because what they do is sensitive to speed-of-light delays.

That doesn't work as effectively when mining is spread out all over the globe.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Sukrim on November 05, 2013, 02:33:03 PM
Will that be always the case? I doubt anyone runs a mining pol server from home - they are probably already quite close to each other in data centers...

Anyways, Merkle Trees are NOT static for 10 minutes, they usually change every time a pool sees a new transaction and decides to add it as well in the current block it is working on. While it might be really nice to broadcast them nevertheless, you might not want that amount of "spam" unless you are another miner.

Mining seems to be more and more to be a game of hash rate AND connectivity towards other players, instead of hash rate alone. If you add in trust (with special high capacity lines between selected pools, signed merkle trees...), you move away from the initial idea that anyone can have a nearly equal chance to take part in mining - further down the road, you will likely first have to deal with the large pools around unless you want a very high orphan rate. They don't even need to attack you, they just need to work in their own best interest and decide that they will host their servers only on Amazon in SF and Ireland, so they have faster connections between each other. Whoever does not take part in this, will be orphaned more often and have worse results, just because of latency and bandwidth.

This is also maybe a bit part of the block size discussion, but it could even happen with block headers in the future after all.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: HorseRider on November 05, 2013, 02:58:58 PM
I have done some financial analysis to see how fast an attacker can get benefit from this attack. Let's the total network hashing rate is stable. At the beginning of the attack, he will always loss some mining revenue as the diff is fixed and he will lose some blocks when he is trying to broadcasting his double blocks. And his attack will make the growth of blockchain slow.

If the attacker owns 30% of the network hashing power, according to the formula of on the paper ten, he will make the blockchain grows 1.8x slower than if not attacked. Assuming 50% of the block attacker broadcasts accepted,  The revenue speed of the attacker will be influenced. He will loss 40% of his revenue if he had not attack, which is to make other honest miner mine even less and more slower. If the attack continues to next diff period, the attacker start to enjoy the benefit. He will earn more than 9% if he had not attack.


The attack invest 1.8*14=25 days time and 40% of the mining revenue (3600*25*30%*40%=10800 BTC, assuming still 25 btc per block), and he can earn more than 100BTC everyday, which earns investment in 111 days, during which time the whole community finds out his naughty behavior and make a hard-fork.

So, not a very wisdom attacker.

Please check whether my logic is right or wrong by independent calculation. Assuming the total net work hashrate is stable to make analysis simpler. First the attacker has to invest time and losing mining revenue to slow down other people, however the diff is fixed during the time, he is losing money to attack the network. The chain will grow extremely slower during the attack. The attacker suffers with other honest miner together, much longer than 14 days. If he is wealth enough and willing enough, Diff lowers, and he starts to harvest the benefit.  However, the time to make his investment back is very long, and before he can earn back his investment, the community will have already make a hard-fork.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Desolator on November 05, 2013, 03:27:41 PM
I just saw this news story on Slashdot and it makes no logical sense to me.  Let's say you have 33% of all mining at your pool. You have a 1 in 3 chance of finding a valid block solution before anyone else. So, you win it and do the exploit they say.  You hold it and secretly work on a 2nd block since blocks are based on the data before them. Now you happen to find a 2nd block that works before anyone else does since you got a "head start" (only probability-wise, no progressively). Finding one valid solution is unlikely but finding two before anyone else finds one is exponentially harder. Then they expect them to find 3? It would happen less than 1% of the time.

Now the other problem is they claim "as soon as another pool is about to find a valid block, you release yours." That's impossible. As soon as another pool broadcasts that it found a solution, the others check it, and it's already too late. Work is non-progressive so you can't tell if another pool is "getting close." So then it'd be a gambling thing. If you find a solution and start working on a second one without telling anyone and claiming your 25 BTC reward, you're more likely to lose to another pool before you find a 2nd valid block value. So you'd be holding it, holding it, holding it, oops you lost it and got 0 BTC.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Roy Badami on November 05, 2013, 03:53:14 PM
Their proposed solution, which is offered without extensive analysis, is to relay all blocks, even late ones, and then choose the preferred block in ties at random. Ignoring collateral vulnerabilities which a hasty implementations of forward-all might create, I believe this proposal has a problem in that it creates a selfishness advantage even without any sybil attack at all, so long as the selfish miner has enough hashrate.

But even without their fix, and assuming gamma=0 (i.e. the selfish pool never wins a block propagation race) then if I'm reading it right the authors' result purports to show that a pool with enough hash rate (more than a third of the total hash power) still has a selfishess advantage, which gets quite substantial as the size of the pool grows larger than that.

(Not that I'm particularly supporting their change - just questioning the implication that could be drawn from your post that with the protocol as it stands today it's not possible to gain a selfishness advantage without mounting a sybil attack.)

roy


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 05, 2013, 03:55:42 PM
This paper is game theory fail.

Fail A
1) The benefit from selfish mining comes from future reductions in difficulty.
2) Until the reduction in difficulty happens, the selfish miner (like other miners) incurs losses.
3) Once difficulty falls, the lower difficulty is open to all. Some other selfish pool could step in and reap all the benefits. Socialized gains; private losses (and socialized losses). Doesn't seem rational unless you have some reason to believe that you can beat pools that copy the strategy. If you try to do the strategy and succeed in lowering difficulty, but ultimately some other pool comes out on top, then you will take losses.

Fail B
Some pools offer PPS. As long as these pools commit to keep up their PPS scheme, miners will migrate to these pools in the event of the attack. This causes the attack to fail. Sure the PPS pools bleed coin in the beginning, but in the end they end up with more miners and the attack gets resolved. If you put this in a economic model with switching costs [i.e. people stay at a pool unless there is a significant benefit from switching], the attack is a probably a net win for the honest PPS pools.
To retain miners, the attacker would need to switch to a PPS system as well. But then he is essentially creating bad luck and insuring people against it simultaneously. This attack is a surefire way to bleed coin. Combine this with Fail A and you can see that the entire paper is fail.

Note: This doesn't mean that bitcoin mining is incentive compatible. It isn't. It's just that this paper has not identified a relevant issue.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Peter Todd on November 05, 2013, 04:05:36 PM
The high-frequency-trading industry begs to differ.
The high frequency trading industry operates within a few mile radius, because what they do is sensitive to speed-of-light delays.

That doesn't work as effectively when mining is spread out all over the globe.

Wrong: the high-frequency-trading industry is building dedicated low-latency networks all around the globe, using the minimum distance routes possible to run dedicated oceanic fiber lines for the industry. They're even making use of point-to-point microwave and laser connections because the speed of light in glass fiber is significantly slower than the speed of light in air. They're also making use of oceanic datacenters to reduce latencies when trading between two points; currently only in existing oil rigs and similar facilities, but there are plans for purpose built facilities as well.

I pointed out on IRC how anyone who already had access to such a network would be able to also use it for Bitcoin mining for little additional cost given the low overall bandwidth requirements of mining - implementing the selfish mining protocol and using it for actual mining for profit would be an excellent training exercise for a junior team that needed real world experience, with real but affordable consequences, prior to being set loose on the full-scale trading environment where mistakes can be disastrous.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gmaxwell on November 05, 2013, 04:56:59 PM
1) Make the nonce long enough that the extraNonce field is no longer needed in the coinbase transaction.
2) Now it's possible for miners to broadcast their Merkle tree as soon as they start hashing (10 minutes on average before they finish)
3) When they find a valid hash, now they only need to broadcast the block header because the rest of the network has (usually) already received and validated the Merkle tree.
4) Block header propagation is very fast and not dependent of the size of the blocks.
Changing the header is absolutely not required to pre-forward the block. You simply pre-forward it along with a pointer to where the extra nonce goes, and when you solve it you send the resulting timestamp,nonce,extra nonce for substitution— even less data than the header in the most efficient case.  P2Pool already implements block pre-forwarding (though not that aggressively: rather than deny the ability to add transactions, it preforwards transactions and then sends the Merkle tree+header+extranonce) .

However, "10 minutes on average before they finish" isn't right... the whole network produces a block in that time, not each miner. Sending data only once every block per miner, instead of incrementally, would also massively delay transactions— the delays is not something we should encourage. Preforwarding also uses a LOT of extra bandwidth, because each non-successful miner is constantly broadcasting block data too.

In any case, I think making block propagation faster is useful generally— but you don't need to change _anything_ about Bitcoin to do it. You just need to make a little fast-block-daemon which runs its own protocol to relay blocks and that could be run in parallel to the current p2p network.

It's almost a bit orthogonal though, since a better positioned miner still has a _latency_ advantage. Making the data smaller doesn't beat the speed of light.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gmaxwell on November 05, 2013, 05:02:08 PM
3) Once difficulty falls, the lower difficulty is open to all.
I believe thats missing the point. The honest miners are being orphaned much more often than the selfish one. The new difficulty isn't "open" to you when you're being disproportionally orphaned.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Roy Badami on November 05, 2013, 05:36:17 PM
Would I be right in thinking that this attack is made easier by Bitcoin's rather relaxed approach to timestamps?

What would happen if we were to:
  • Use NTP-synchronized local clocks (most cryptographic protocols require this, after all)
  • In the event of two new blocks received within, say, 10 seconds, prefer the block with the best timestamp (where a timestamp is better the closer it is the the local clock, except that timestamps more than, say, 2 seconds in the future are always regarded as worse than timestamps that are not)
  • (Possibly) Refuse to relay blocks with a timestamp more than 2 seconds in the future

This would make it very hard for the attacker the win the race - essentially it means mining for immediate broadcast gives you an advantage in the race.

roy

ETA: Obviously the 2 and 10 are arbitrary, and not necessarily the best values.  The '2' is a future fuzz value.  Clearly you should never see anything from the future, but you want to make allowance for (small) clock errors, even if you are synchonising clocks (although NTP should synchronize within a few tens of milliseconds at worst).  The 10 second value is related to the network propagation time - it needs to be long enough that you will always have seen both blocks in the attack scenario.  But you don't want to make it too long as during this window someone can mine a new block and force you discard an existing, valid one.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: mmeijeri on November 05, 2013, 05:52:45 PM
Would incorporating the lexicographical ordering of all timestamps help when choosing between chains?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gmaxwell on November 05, 2013, 05:54:56 PM
Would I be right in thinking that this attack is made easier by Bitcoin's rather relaxed approach to timestamps?
No. Timestamps don't come into this at all. (And most suggestions to tighten timestamps result in (usually minor) vulnerabilities)


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: revans on November 05, 2013, 05:58:50 PM
Would incorporating the lexicographical ordering of all timestamps help when choosing between chains?

Not in the slightest.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Roy Badami on November 05, 2013, 06:01:37 PM
Would I be right in thinking that this attack is made easier by Bitcoin's rather relaxed approach to timestamps?
No. Timestamps don't come into this at all. (And most suggestions to tighten timestamps result in (usually minor) vulnerabilities)

Ok, in the general case no.... And maybe the third bullet point was ill-advised.

But favouring blocks with an accurate timestamp in the event of a near tie in block arrival time.... surely that makes premining hard - since if you're premining you don't know the time you will want to publish the block.

ETA: It's not a complete fix, of course.  It's an attempt to set gamma close to zero - meaning you can't get any advantage from selfish mining without 33% of the hash rate.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: mmeijeri on November 05, 2013, 06:19:43 PM
Not in the slightest.

Why not? It penalises those who hold back blocks. I'm not saying this doesn't lead to other problems, but simply saying "not in the slightest" without elaborating isn't very helpful.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: revans on November 05, 2013, 06:28:23 PM
Not in the slightest.

Why not? It penalises those who hold back blocks. I'm not saying this doesn't lead to other problems, but simply saying "not in the slightest" without elaborating isn't very helpful.


1. You solve a problem and create several others which are significantly more intractable. Bad engineering.

2. What happens if the client issued by Bitcoin's defacto central bank is supplanted by a War Mining client?




Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 05, 2013, 06:29:18 PM
3) Once difficulty falls, the lower difficulty is open to all.
I believe thats missing the point. The honest miners are being orphaned much more often than the selfish one. The new difficulty isn't "open" to you when you're being disproportionally orphaned.
Harm done to others is irrelevant. Th attacker loses blocks too. They forgo blocks now to invest in lower difficulty later.

This is a dynamic game, but the authors analyze it as a static game. They lack a solid background in game theory. Otherwise they would not have made such an elementary mistake.

Whatever though. Continue to get yourselves worked up about an erroneous result.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: mmeijeri on November 05, 2013, 06:30:41 PM
1. You solve a problem and create several others which are significantly more intractable. Bad engineering.

What other problems would it create and why are they more intractable?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: justusranvier on November 05, 2013, 06:34:47 PM
1) Make the nonce long enough that the extraNonce field is no longer needed in the coinbase transaction.
2) Now it's possible for miners to broadcast their Merkle tree as soon as they start hashing (10 minutes on average before they finish)
3) When they find a valid hash, now they only need to broadcast the block header because the rest of the network has (usually) already received and validated the Merkle tree.
4) Block header propagation is very fast and not dependent of the size of the blocks.
Changing the header is absolutely not required to pre-forward the block. You simply pre-forward it along with a pointer to where the extra nonce goes, and when you solve it you send the resulting timestamp,nonce,extra nonce for substitution— even less data than the header in the most efficient case.  P2Pool already implements block pre-forwarding (though not that aggressively: rather than deny the ability to add transactions, it preforwards transactions and then sends the Merkle tree+header+extranonce) .

However, "10 minutes on average before they finish" isn't right... the whole network produces a block in that time, not each miner. Sending data only once every block per miner, instead of incrementally, would also massively delay transactions— the delays is not something we should encourage. Preforwarding also uses a LOT of extra bandwidth, because each non-successful miner is constantly broadcasting block data too.

In any case, I think making block propagation faster is useful generally— but you don't need to change _anything_ about Bitcoin to do it. You just need to make a little fast-block-daemon which runs its own protocol to relay blocks and that could be run in parallel to the current p2p network.

It's almost a bit orthogonal though, since a better positioned miner still has a _latency_ advantage. Making the data smaller doesn't beat the speed of light.
I have a reply that I'll as to the thread as son as the electricity comes back on and I'm not limited to my phone.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: revans on November 05, 2013, 06:39:58 PM
1. You solve a problem and create several others which are significantly more intractable. Bad engineering.

What other problems would it create and why are they more intractable?


Because you'd harm a lot of people not War Mining, and this only works if the Bitcoin central bank's client remains the standard.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: socrates1024 on November 05, 2013, 07:16:18 PM
I wrote the following email to someone asking about this paper, and I feel like publishing it in this thread. I don't have any insight to add about the substance of the paper itself, but I want to suggest how to put it in context. This paper is far from unique in pointing out ways that Bitcoin is not incentive compatible. We DO need to try to find and fix these economic glitches - they are REAL problems - but they also aren't immediate life-or-death urgent, because the network at the moment consists of a large number of well meaning and responsive participants. We can expect that more problems like these are coming. The larger and more mainstream Bitcoin's userbase gets, the more important it will be to design incentives to predict and steer participation.

I was annoyed at first about the sensationalistic headlines, but I've gotten over it. We're used to these by now, from the press and everyone else. A tweet from the author convinced me that his interests are in the right place: ":-) but we're all good guys. The BTC community deserves a strong, robust currency. Identifying potential attacks is critical" (https://twitter.com/el33th4xor/status/397554496579989504). This is true, and we really need more distributed systems experts and theoreticians working at this. I think the net effect of this event is that Bitcoin becomes more popular/attractive as an academic research topic, and that can only help.

Quote
Despite the overhyped headline, this paper is important. It's part of a (long past due) movement towards modeling "rational participation" in Bitcoin. We are (surprisingly?) in a blind spot here as far as theoretical foundations go (the 30+ years of research in distributed systems, game theory, etc., have not looked at anything resembling Bitcoin). We do not yet have a sound way to argue that "Bitcoin (or X variant thereof) surely works," nor any impossibility results saying "nothing resembling Bitcoin can ever work."
 
Main points:
- Bitcoin is clearly *intended* to be incentive-compatible and encourage correct behavior. However the whitepaper only gives a proof for the "51% honest" model, which is unrealistic/trivial (if we just assume everyone's honest, there's no need for rewards in the first place). Even in this easy model, Bitcoin is novel among byzantine consensus protocols. Academics *should* have worked on this twenty years ago, but missed it! (except for this 2005 tech report (http://www.cs.yale.edu/research/techreports/tr1332.pdf))
- Practically speaking, we still seem to have a while to figure this stuff out before any systemic economic collapse will manifest. Even the mining pools still run bitcoind, not RationalMiner software. For the time being, majority honest is a reasonable approximation.
- Even if a 51% majority has limited ability to profit or attack, a systematic trend towards enabling 51% attacks would be a design flaw and existential threat. So we really need to find and fix things like this.
 
This paper fits neatly into a class of papers/posts that point out a particular way in which Bitcoin is not incentive-compatible (to call it an *attack* is just cyberhype), yet a simple fix (typically just to the messaging layer) is often at hand.
- Bitcoin and Red Balloons (https://research.microsoft.com/pubs/156072/bitcoin.pdf). There's no incentive for peers to relay transactions. Solution: bribe your peer conditional on the transaction getting accepted, now it's their problem too.
- This paper: If a mining pool is confident in its ability to detect and out-propagate competing blocks, then it can profit by witholding blocks until the last minute, making everyone else waste work. Solution: relay faster so no peer can get this advantage, or use random tie-breaking so this attack can't be pulled off consistently (the following two examples are me plugging my own posts). Regardless of propagation, a miner with more than 33% of the network's hashpower can profit disproportionately by witholding one block at a time. [edited, due to author pointing out this was oversimplified].
- https://gist.github.com/amiller/cf9af3fbc23a629d3084 An anomalously large single transaction fee would encourage miners to fight over the previous block, rather than building on each other's work. Solution: remove the 100-block coinbase maturity rule, which actually prevents a simple cooperative equilibrium where you take a cut of the huge fee for yourself and leave the rest for the next miners to fight over.
- https://bitcointalk.org/index.php?topic=309073.0 Natural economies of scale mean that "outsourced hosted mining" will be more cost effective and might drive out other participants, leading to more centralized control of resources, susceptible to coercion etc. Solution: a modified puzzle using (efficient) zero-knowledge proofs would make hosted mining (and mining pools, incidentally) impractical.
 
There are other similar "attacks" along the lines of "this may be a problem when people eventually run RationalMiner rather than HonestSatoshiReferenceClient", but for which the solutions are less obvious...
- Feather forking: https://bitcointalk.org/index.php?topic=312668.0  a small cartel of miners that want to enforce a transaction black-list could easily make it so that rational participants indifferent to the blacklist would rather appease the cartel than resist it. Possible solution: Adam Back is thinking very hard about how to make miners verify the correctness of transactions without learning anything else about them.
- Kroll. et al (http://www.weis2013.econinfosec.org/papers/KrollDaveyFeltenWEIS2013.pdf): Following *any* of the rules is at best a *focal point*, and slight rule tweaks like inflating the 21 million limit (just by a little bit) are probably a lot more plausible and easier to pull off than most people think. Possible solution: no idea
 
But we're still just scratching the surface of incentive-alignment glitches like this. Bitcoin will overcome the problems with easy fixes. I hope (but am skeptical) that if there's a bigger fix required, we can work it out and adopt it without waiting until it's too late and having to restart from scratch.
 
Above all, I wish we had a strong theoretical model we could use to knock out entire classes of problems rather than pointing them out and patching them one at a time. By analogy, the academic cryptography community did such a great job of moving from ad hoc ciphers to "provable security" that the mainstream security mantra is "don't roll your own crypto" unless you've proved a theorem first. Maybe someday they'll say the same thing about rolling your own incentive-consensus protocols. But the work hasn't been done yet, and we're currently still in the dark ages.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: acoindr on November 05, 2013, 07:47:03 PM
...
Low latency connection itself is expensive, and we can nullify its advantage by relaying unverified block headers. People will always assume a block header is valid unless it is proven otherwise, and always mine on top of the first seen header. (I think creating invalid block header is very expensive and no one is trying to do this. Any stats for this?)
...

This problem as I see it is non-existent. As I've talked about before Mining Block References (MBRs) can tremendously reduce latency which would squash this attack.
1) Make the nonce long enough that the extraNonce field is no longer needed in the coinbase transaction.

2) Now it's possible for miners to broadcast their Merkle tree as soon as they start hashing (10 minutes on average before they finish)

3) When they find a valid hash, now they only need to broadcast the block header because the rest of the network has (usually) already received and validated the Merkle tree.

4) Block header propagation is very fast and not dependent of the size of the blocks.

Broadcasting block headers either before or after the final set of transactions doesn't help because miners are never sure what block to mine on top of until they know the winning block. In the case of the header arriving prior to transactions, now trolling the network is easy for anyone with any size hash capacity but no worry about block reward. In the case of the header arriving after transaction information, as gmaxwell points out, large amounts of useless data eat up your bandwidth until you learn the correct header.

This issue has made me think through my concept for MBRs and I've reached interesting conclusions which I'll post about when I get time.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gmaxwell on November 05, 2013, 07:51:25 PM
Whatever though. Continue to get yourselves worked up about an erroneous result.
what part of my post indicated that I was "worked up"?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 05, 2013, 07:57:13 PM
Whatever though. Continue to get yourselves worked up about an erroneous result.
what part of my post indicated that I was "worked up"?
Wasn't referring to you specifically. But clearly some people somewhere are worked up about some paper that
a) isn't correct (uses improper methodology)
b) isn't novel
c) wouldn't be noteworthy even if it were correct and novel. (game theory indicates many ways that bitcoin is not incentive compatible, it is not clear why we should care if one more way is added to the list)

Maybe I'm disappointed that you were not adequately dismissive. Bitcoin has real issues. This is not one of them. These jackasses do not deserve the time of day.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: User705 on November 05, 2013, 08:00:14 PM
So this is more of a miners issue right?  How are orphan block rewards handled now?  What I mean is if I solve a block and get the reward and go gamble it at satoshi dice immediately does this "attack" somehow nullify that block reward afterwards and basically I succeeded at a double spend?  Or the block never hits the blockchain and the "attack" is designed for me to waste my hashing power?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: briguy37 on November 05, 2013, 08:08:46 PM
The paper does not consider multiple selfish mining pools fighting against one another.  For example, in Section 4.4, they say:

  "Note that the pool is only at risk when it holds exactly one block secret"

This is not true. 

For example, Selfish pool A has 2 private blocks and Selfish pool B has 3 private blocks.  When Honest pool C finds a block and publishes it, A publishes their 2 "safe" blocks, only to lose them when B publishes their 3 private blocks. 

Furthermore, if everybody was selfish then blocks would never get published.  When an honest block eventually did get published, there would be a mass publish event of all private blockchains where all but the longest selfish block-chain(s) would be worthless.  If there was a tie there would be a fork-fight to determine whose blocks were eventually kept. 

Long story short, if you DO decide to be a selfish pool, be certain that you are the biggest selfish pool in the world.  Furthermore, even if you are the biggest, know that the smaller selfish pools will cut into your "safe" profits every time they get more private blocks than you do.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Roy Badami on November 05, 2013, 08:42:35 PM
The paper does not consider multiple selfish mining pools fighting against one another.

They do say, in section 3.2:

Quote
For simplicity, and without loss of generality, we assume that miners are divided into two groups, a colluding minority pool that follows the selfi sh mining strategy, and a majority that follows the honest mining strategy (others).

It's not immediately obvious to me how such an analysis could be without loss of generality, though.

roy


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Luke-Jr on November 05, 2013, 09:25:49 PM
It's not possible for pools to do this without miner cooperation - for example, by them using the stratum protocol. As long as miners are taking advantage of the GBT protocol (https://en.bitcoin.it/wiki/Getblocktemplate), this attack is not possible since the miner finding the block will announce it to the network themselves.

For BFGMiner, you need to configure it to failover to solo mining:
Code:
bfgminer ...put your real GBT-based pools first... -o http://localhost:8332#allblocks -u username -p password


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: revans on November 05, 2013, 09:30:07 PM
It's not possible for pools to do this without miner cooperation - for example, by them using the stratum protocol. As long as miners are taking advantage of the GBT protocol (https://en.bitcoin.it/wiki/Getblocktemplate), this attack is not possible since the miner finding the block will announce it to the network themselves.

Which is fine so long as Bitcoin's central bank's client remains the defacto standard. As other mining strategies are discovered there will be ore and more clients available running forked mining code.



Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Luke-Jr on November 05, 2013, 09:32:40 PM
It's not possible for pools to do this without miner cooperation - for example, by them using the stratum protocol. As long as miners are taking advantage of the GBT protocol (https://en.bitcoin.it/wiki/Getblocktemplate), this attack is not possible since the miner finding the block will announce it to the network themselves.
Which is fine so long as Bitcoin's central bank's client remains the defacto standard. As other mining strategies are discovered there will be ore and more clients available running forked mining code.
Huh? You don't need any forked mining code for this...


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gmaxwell on November 05, 2013, 09:38:14 PM
Which is fine so long as Bitcoin's central bank's client
Huh?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: revans on November 05, 2013, 09:40:25 PM
Which is fine so long as Bitcoin's central bank's client
Huh?
You are surely aware that the organisation that controls (writes and maintains) the Bitcoin client used by the majority basically controls Bitcoin.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: solex on November 05, 2013, 09:40:46 PM
obvious troll is obvious guys


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gmaxwell on November 05, 2013, 09:44:06 PM
You are surely aware that the organisation that controls (writes and maintains) the Bitcoin client used by the majority basically controls Bitcoin.
I am an organization now (http://bitcoin.org/en/development)? Awesome. Do I get to have a charter?

What does this have to do with Luke's comment?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Luke-Jr on November 05, 2013, 09:44:12 PM
Which is fine so long as Bitcoin's central bank's client
Huh?
You are surely aware that the organisation that controls (writes and maintains) the Bitcoin client used by the majority basically controls Bitcoin.
Only if you let/make us.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: CanaryInTheMine on November 05, 2013, 10:51:37 PM
Which is fine so long as Bitcoin's central bank's client
Huh?
You are surely aware that the organisation that controls (writes and maintains) the Bitcoin client used by the majority basically controls Bitcoin.

I don't know how to comment without being rude... So I won't... Ugggg


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gyverlb on November 05, 2013, 11:35:28 PM
I'm surprised you don't have this guy ignored already. Typical "everything about bitcoin is bad but I'm not going to understand what I am talking about" troll.

Now back to something interesting, like GBT. I didn't know you could use it to also push the block to the network yourself. Genius.

p2pool has a similar approach with a nice tweak. A node finding a block obviously pushes it to the network as expected from a distributed pool. The nice tweak is that the protocol between p2pool nodes speeds up the distribution of blocks between them and each p2pool node relays the block to the Bitcoin network : p2pool is essentially broadcasting its blocks from all miners in a very short delay.

I've always wondered if p2pool has the fastest publishing method of all pools (I'm optimist but it depends on the actual node finding the block and each node connectivity obviously). If you look at the number of addresses mining on p2pool you can have a rough estimation of the number of active nodes (many use the standard "one node <-> one address" setting) and the number of p2pool block distribution points.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Meni Rosenfeld on November 05, 2013, 11:36:03 PM
My thoughts on the matter:
http://fieryspinningsword.com/2013/11/06/hashrate-amplification-attacks/


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: niniyo on November 05, 2013, 11:43:17 PM
Would it be possible to reduce the centralised power from large pools through the following method?

- The pool simply provides the miner with the pool's payout address
- The miner can build whatever block they want, so long as it contains a coinbase output which pays the pool with amount (BLOCK_REWARD - MINER_BONUS).
- The miner bonus is a second output added to the coinbase transaction which the miner can pay to him/herself.  It could be 1% of the block reward or something like that.  This gives the miner a direct financial incentive to publish blocks they find immediately.
- The pool accepts the work from the miner so long as it contains the coinbase transaction that pays the pool.

* Possibly there could be some variation on this protocol so that the miner doesn't have to track transactions and build their own merkle tree.  Eg. the pool operator could provide a suggested merkle tree to the miner, and the miner just has to communicate any desired changes back to the pool operator, which reduces the bandwidth required.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Luke-Jr on November 05, 2013, 11:54:53 PM
Would it be possible to reduce the centralised power from large pools through the following method?

- The pool simply provides the miner with the pool's payout address
- The miner can build whatever block they want, so long as it contains a coinbase output which pays the pool with amount (BLOCK_REWARD - MINER_BONUS).
- The miner bonus is a second output added to the coinbase transaction which the miner can pay to him/herself.  It could be 1% of the block reward or something like that.  This gives the miner a direct financial incentive to publish blocks they find immediately.
- The pool accepts the work from the miner so long as it contains the coinbase transaction that pays the pool.

* Possibly there could be some variation on this protocol so that the miner doesn't have to track transactions and build their own merkle tree.  Eg. the pool operator could provide a suggested merkle tree to the miner, and the miner just has to communicate any desired changes back to the pool operator, which reduces the bandwidth required.
This is essentially what GBT aims to do.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: niniyo on November 06, 2013, 12:06:54 AM
This is essentially what GBT aims to do.

Oh, I just read https://en.bitcoin.it/wiki/Getblocktemplate in more detail and I see what you mean.  At first I thought it only gave miners a read-only view of the pool's block.

This is would be fantastic to roll out.  I suppose a miner bonus scheme would not be enough to attract people to new GBT-based pools because your expected returns would be the same in the long run, in fact it just adds more unwanted variance, but there are other advantages like the small chance of mining one of your own (or your friends') transactions with 0 fees if you somehow integrated your wallet with your mining rig.

I hope miners make a sensible decision and require GBT with full ability to modify the merkle tree + miner bonus to incentivise immediate publishing of blocks.


Title: Researchers Blog About Their Amazing Discoveries
Post by: Enochian on November 06, 2013, 01:35:23 AM
http://hackingdistributed.com/2013/11/04/bitcoin-is-broken/


Posted on Monday November 04, 2013 at 03:10 PM by Ittay Eyal and Emin Gün Sirer

Bitcoin is broken. And not just superficially so, but fundamentally, at the core protocol level. We're not talking about a simple buffer overflow here, or even a badly designed API that can be easily patched; instead, the problem is intrinsic to the entire way Bitcoin works. All other cryptocurrencies and schemes based on the same Bitcoin idea, including Litecoin, Namecoin, and any of the other few dozen Bitcoin-inspired currencies, are broken as well.


I wonder if they've already added "broke Bitcoin" to their resumes.



Title: Re: Researchers Blog About Their Amazing Discoveries
Post by: bee7 on November 06, 2013, 02:03:32 AM
http://hackingdistributed.com/2013/11/04/bitcoin-is-broken/

Quote
From your perspective, if the Bitcoin community does not buy your bug fix,

you would be incentivized to selfish mine yourself and reap the benefits.

Do that and prove that Bitcoin is fragile. If it really is, then a newer, better one will appear.

If you do not do it, it means you're a fraud.

+1


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Gavin Andresen on November 06, 2013, 04:53:47 AM
I have done some financial analysis to see how fast an attacker can get benefit from this attack. Let's the total network hashing rate is stable. At the beginning of the attack, he will always loss some mining revenue as the diff is fixed and he will lose some blocks when he is trying to broadcasting his double blocks. And his attack will make the growth of blockchain slow.

If the attacker owns 30% of the network hashing power, according to the formula of on the paper ten, he will make the blockchain grows 1.8x slower than if not attacked. Assuming 50% of the block attacker broadcasts accepted,  The revenue speed of the attacker will be influenced. He will loss 40% of his revenue if he had not attack, which is to make other honest miner mine even less and more slower. If the attack continues to next diff period, the attacker start to enjoy the benefit. He will earn more than 9% if he had not attack.


The attack invest 1.8*14=25 days time and 40% of the mining revenue (3600*25*30%*40%=10800 BTC, assuming still 25 btc per block), and he can earn more than 100BTC everyday, which earns investment in 111 days, during which time the whole community finds out his naughty behavior and make a hard-fork.

So, not a very wisdom attacker.

Please check whether my logic is right or wrong by independent calculation. Assuming the total net work hashrate is stable to make analysis simpler. First the attacker has to invest time and losing mining revenue to slow down other people, however the diff is fixed during the time, he is losing money to attack the network. The chain will grow extremely slower during the attack. The attacker suffers with other honest miner together, much longer than 14 days. If he is wealth enough and willing enough, Diff lowers, and he starts to harvest the benefit.  However, the time to make his investment back is very long, and before he can earn back his investment, the community will have already make a hard-fork.
+1

This is the kind of analysis that I think we need more of before jumping to the conclusion that there is actually a problem that needs to be fixed. I'm not claiming that HorseRider is correct, but his logic looks plausible and I tend to listen harder to reasonable people who say things like "please check whether my logic is right".


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: kjj on November 06, 2013, 04:58:27 AM
Ideally I'd like to think about it carefully, read the paper a few times, and run some simulations before commenting, but I'll likely be tied up at the IETF all week and people are already panicking and pushing for hasty changes in response to this which may be ill-advised, so I'm going to offer some preliminary comments here.

Please do run your simulations.  When you do, make sure that you faithfully simulate a network with latency.  The word latency exists in their paper exactly one time, as a casual aside in the solution section, which should immediately set alarm bells ringing in all of our heads.  In addition, they seem to suffer from the strange notion that work in bitcoin can be wasted.  Despite the fancy pedigree of the email address in the page footer, I suspect that their paper has more to do with hubris, ignorance of physics and a serious lack of understanding of how bitcoin really works.

Let me start with latency.  As far as I can tell from the paper, their "simulation" (and here you should imagine me doing very sarcastic air quotes) involves a network where the evil miners have magically found a way to detect the competing block in the honest miner's memory, before it has begins to spread on the network.  Gamma seems to play some sort of role here, but the meaning of it seems to change from page to page.  Or at the very least between pages 8 and 11.  Can anyone give me a good justification for abusing this poor variable in this way?

The charts are very illuminating.  In figure 2, each of the simulation points is exactly on the calculated line.  This is a dead giveaway.  The only way that can happen is if their model is fully deterministic except for mining function.  Amusingly, in a universe without latency in any form, which is the only universe where this model is meaningful, their solution is unnecessary, and actually counterproductive (since it causes the problem they aim to solve).

The real gold of this paper comes on page 13.  On page 13 they handwave over the latency issue by pointing out that an attacker could insert itself between every other node on the network.  Let me just sum up a few years of discussion on this topic:  We Know.  If an attacker is able to isolate a single node, they can fuck with that node.  If an attacker is able to isolate every node (lol), they can fuck with every node.  Note to researchers:  If anyone can control the spread of information across the entire network, they don't need whatever crazy scheme you've cooked up; they can already do much worse things.  In particular, if an attacker is capable of creating the conditions necessary for this garbage to work, they can just not forward any blocks but their own, and they multiply whatever skimpy hashing power they have by infinity and they gain total control over all mining.

Of course, everyone instantly sees how silly that is, so they had to dress it up in pseudo-scientific gibberish so that people would click on their crappy website and check out the douchebag's glamour shot.

Sigh.  Is there even any point in addressing point two now?  Work is not cumulative.  Publishing a block does not make the rest of the network "start over".


Title: Re: Researchers Blog About Their Amazing Discoveries
Post by: Enochian on November 06, 2013, 05:05:58 AM


Quote
From your perspective, if the Bitcoin community does not buy your bug fix,

you would be incentivized to selfish mine yourself and reap the benefits.

Do that and prove that Bitcoin is fragile. If it really is, then a newer, better one will appear.

If you do not do it, it means you're a fraud.

+1

The researchers just did a massive delete of critical comments from their blog posts.  At this point, they are really embarrassing their institution by overstating their results, and refusing to listen to reason.

It reminds me of the guy at HP, Vinay Deolalikar,  who "proved" NP!=P in August 2010, and then totally closed his mind to any suggestions that his chain of reasoning had some missing links.  His Web page still claims the result.

Some people.



Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 06, 2013, 05:16:59 AM
I have done some financial analysis to see how fast an attacker can get benefit from this attack. Let's the total network hashing rate is stable. At the beginning of the attack, he will always loss some mining revenue as the diff is fixed and he will lose some blocks when he is trying to broadcasting his double blocks. And his attack will make the growth of blockchain slow.

If the attacker owns 30% of the network hashing power, according to the formula of on the paper ten, he will make the blockchain grows 1.8x slower than if not attacked. Assuming 50% of the block attacker broadcasts accepted,  The revenue speed of the attacker will be influenced. He will loss 40% of his revenue if he had not attack, which is to make other honest miner mine even less and more slower. If the attack continues to next diff period, the attacker start to enjoy the benefit. He will earn more than 9% if he had not attack.


The attack invest 1.8*14=25 days time and 40% of the mining revenue (3600*25*30%*40%=10800 BTC, assuming still 25 btc per block), and he can earn more than 100BTC everyday, which earns investment in 111 days, during which time the whole community finds out his naughty behavior and make a hard-fork.

So, not a very wisdom attacker.

Please check whether my logic is right or wrong by independent calculation. Assuming the total net work hashrate is stable to make analysis simpler. First the attacker has to invest time and losing mining revenue to slow down other people, however the diff is fixed during the time, he is losing money to attack the network. The chain will grow extremely slower during the attack. The attacker suffers with other honest miner together, much longer than 14 days. If he is wealth enough and willing enough, Diff lowers, and he starts to harvest the benefit.  However, the time to make his investment back is very long, and before he can earn back his investment, the community will have already make a hard-fork.
+1

This is the kind of analysis that I think we need more of before jumping to the conclusion that there is actually a problem that needs to be fixed. I'm not claiming that HorseRider is correct, but his logic looks plausible and I tend to listen harder to reasonable people who say things like "please check whether my logic is right".


Check, HorseRider is correct.

I would add that there is no guarantee that the selfish pool which invests to lower difficulty is the same selfish pool that reaps the reward from lower difficulty.

Once you treat the game as dynamic (which it is in reality), the attacker faces a free-rider problem.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Luke-Jr on November 06, 2013, 05:20:27 AM
Fresh coindesk article summarizing the situation

http://www.coindesk.com/bitcoin-mining-network-vulnerability/
Unfortunately, it seems to get many facts wrong too...

  • The timestamp in the block header is entirely ignored, and the block-discovered-first isn't reported at all (nodes know which they saw first, and that's all they care about)
  • No mention of the fact that there are many better sybil attacks should sybil-ing be possible.
  • The proposed solution doesn't limit pools to 25% (this isn't even theoretically possible).


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: btcdrak on November 06, 2013, 08:47:52 AM
Fresh coindesk article summarizing the situation

http://www.coindesk.com/bitcoin-mining-network-vulnerability/
Unfortunately, it seems to get many facts wrong too...

  • The timestamp in the block header is entirely ignored, and the block-discovered-first isn't reported at all (nodes know which they saw first, and that's all they care about)
  • No mention of the fact that there are many better sybil attacks should sybil-ing be possible.
  • The proposed solution doesn't limit pools to 25% (this isn't even theoretically possible).

Sounds like someone needs to tell coindesk how badly wrong they got this...


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: hannesnaude on November 06, 2013, 09:06:06 AM
This paper is game theory fail.

Fail A
1) The benefit from selfish mining comes from future reductions in difficulty.
2) Until the reduction in difficulty happens, the selfish miner (like other miners) incurs losses.
3) Once difficulty falls, the lower difficulty is open to all. Some other selfish pool could step in and reap all the benefits. Socialized gains; private losses (and socialized losses). Doesn't seem rational unless you have some reason to believe that you can beat pools that copy the strategy. If you try to do the strategy and succeed in lowering difficulty, but ultimately some other pool comes out on top, then you will take losses.

Don't quite agree with you here.
1)  Agreed
2)  Agreed. But it is important to note that the selfish pool suffers smaller losses than the others. Therefore rational wealth maximising agents who denominate their wealth in BTC would join this pool (were it not for your observation under Fail B which I will get to next).
3) The lower difficulty is open to all, but the other pools are still underperforming relative to the selfish pool. Rational miners still join the selfish pool. It is entirely possible that another selfish pool starts up, but far from being a threat to initial selfish pool operator, it is actually the best thing that could happen to him. Since the gains grow superlinearly both pools will mine more coins by joining forces than they would have otherwise. This process runs away and leads any pool  that starts with >33% to end up with >50%, at which point the classic 51% attack becomes possible.

Fail B
Some pools offer PPS. As long as these pools commit to keep up their PPS scheme, miners will migrate to these pools in the event of the attack. This causes the attack to fail. Sure the PPS pools bleed coin in the beginning, but in the end they end up with more miners and the attack gets resolved. If you put this in a economic model with switching costs [i.e. people stay at a pool unless there is a significant benefit from switching], the attack is a probably a net win for the honest PPS pools.
To retain miners, the attacker would need to switch to a PPS system as well. But then he is essentially creating bad luck and insuring people against it simultaneously. This attack is a surefire way to bleed coin.

THIS is a critical observation, which I have not thought of or seen mentioned elsewhere.  Essentially PPS can invalidate the entire attack, since a rational miner would rather join a PPS pool, where he will earn even more income than from joining the selfish pool. One can reason that the PPS operator, (who takes the hit for all of the orphaned blocks) will cancel the service or put the price up enough to compensate. But this means that the attacker first needs to keep the attack up for long enough to drive all PPS operators out of business. Only when this is complete will rational miners flock to join the selfish pool. This makes PPS operators vulnerable to this attack, but it is not very different from the well known block-withholding attack that they have always been vulnerable to, in fact it is a little less serious since it can easily be detected. Also, if someone with deep pockets (Bitcoin Foundation? BTC guild?) publicly commits to keep at least one PPS operation afloat for the duration of any such attack, then the selfish pool attack suddenly becomes very unattractive indeed, since you need to incur a sustained loss (relative to what you could have earned with the same hashing power at a PPS pool), and only if you can sustain this loss for longer than the PPS operators can sustain the loss you are inflicting on them can the attack actually start recruiting other rational miners to help you. This is somewhat analogous to trying to enter a new market against an entrenched competitor who is committed to a strategy of predatory pricing i.e. they will sell their products at a loss until you eventually go bust or leave the market.

Combine this with Fail A and you can see that the entire paper is fail.

I actually think the paper is quite good. The attack is quite unlikely to work in practice, but the theory is incredibly important. The result  is counterintuitive, but undeniably correct. I've done my own calculations and simulations and arrive at the same results as they do. Some claim that the attack was known before, but I am afraid none of the rather vague hand-waving explanations of a mining cartel attack has managed to convince me that this is possible. The fairly basic math used in the paper convinced me in less than an hour.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: jl2012 on November 06, 2013, 09:11:45 AM
This process runs away and leads any pool  that starts with >33% to end up with >50%, at which point the classic 51% attack becomes possible.


So that's the 51% attack mentioned in Satoshi's paper. I can't see any originality here


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 06, 2013, 10:22:49 AM
You need to model this as a dynamic game with entry and exit. They do not do this. The methodology is inappropriate to the problem at hand. They are not qualified for this. This is an industrial organization problem, not a computer science problem.
Done appropriately you would almost certiainly end up with multiple equilibria and sensitivity to assumptions about entry costs for pools and switching costs for individual miners. Game theory tells you very little of use for these types of problems.

In any case, this is all artificial since there are ways of achieving the same aim without any upfront cost. It is hard to sensibly analyze a costly attack approach when cost-free attack approaches that achieve the same aim are available.

Consider a loyalty program where you record each worker's cumulative contribution to the pool. In the event the pool acquires 51%, you divide the 50% of surplus attack revenue according to some function of current hashing power and historical contributions. The loyalty program has no upfront cost at all. As long as the attack has a nonzero chance of succeeeing, the dominant strategy is to always join the pool. The more people join the more attractive joining becomes.

Why would you pursue a risky convoluted attack strategy that requires upfront investment and only works under arbitrary assumptions about barriers to entry. The strategy I suggest is essentially risk free. No upfront investment needed. Since there is no cost to attempt the loyalty program attack, it is worth attempting even if it has a miniscule chance of succeeding.





Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: hannesnaude on November 06, 2013, 11:23:10 AM
Ideally I'd like to think about it carefully, read the paper a few times, and run some simulations before commenting, but I'll likely be tied up at the IETF all week and people are already panicking and pushing for hasty changes in response to this which may be ill-advised, so I'm going to offer some preliminary comments here.

Please do run your simulations.  When you do, make sure that you faithfully simulate a network with latency.  The word latency exists in their paper exactly one time, as a casual aside in the solution section, which should immediately set alarm bells ringing in all of our heads.  In addition, they seem to suffer from the strange notion that work in bitcoin can be wasted. 

If I boot up my multi TH mining rig and start mining blocks from the genesis block onward, is my work not wasted? Does it contribute to network security? Will I earn any block rewards for the blocks I mine? As far as the rest of the network is concerned, I might as well not exist.

Let me start with latency.  As far as I can tell from the paper, their "simulation" (and here you should imagine me doing very sarcastic air quotes) involves a network where the evil miners have magically found a way to detect the competing block in the honest miner's memory, before it has begins to spread on the network.  Gamma seems to play some sort of role here, but the meaning of it seems to change from page to page.  Or at the very least between pages 8 and 11.  Can anyone give me a good justification for abusing this poor variable in this way?

I have taken a look and cannot for the life of me understand what is confusing you. Gamma is defined quite clearly:"We denote by gamma
the ratio of honest miners that choose to mine on the [selfish] pool's block, and the other (1-gamma) of the non-pool miners mine on the other branch." The variable is consistently used with this meaning. And your assertion that "the evil miners have magically found a way to detect the competing block in the honest miner's memory, before it has begins to spread on the network." is plainly false. The situation that you describe would correspond to a gamma of 0 (the worst case). But even when gamma is 1 (i.e. "the honest miners have magically found a way to always work on the honest block in the case of a tie") the attack works for an attacker with >33% of network hash power. I find the researchers' claim that a gamma of 1 is attainable by an attacker in the current bitcoin network to be tenuous at best, but this is not that important, since the attack works even for the best case where gamma=0.

The charts are very illuminating.  In figure 2, each of the simulation points is exactly on the calculated line.  This is a dead giveaway.  The only way that can happen is if their model is fully deterministic except for mining function.


BS I replicated this result and I can guarantee you that the mining function is not deterministic. Besides, your premise is laughable. How accurately can you really read that chart? Enough to say that the simulated results are within 1% of the predicted values? 0.1%? You can easily get simulation results accurate to a fraction of that in a modest amount of time on a dated single core machine. I know because I tried.

The real gold of this paper comes on page 13.  On page 13 they handwave over the latency issue by pointing out that an attacker could insert itself between every other node on the network.  Let me just sum up a few years of discussion on this topic...


Strawman. Nowhere on page 13 do they suggest that or anything that I can interpret as being equivalent to an attacker being required to "insert itself between every other node on the network". If you disagree please post the relevant quote. As stated earlier, I find their assertion that gamma close to 1 is attainable to be tenuous, but this is just a misrepresentation of their position.

Of course, everyone instantly sees how silly that is, so they had to dress it up in pseudo-scientific gibberish so that people would click on their crappy website and check out the douchebag's glamour shot.

Real mature. This is peer-review, is it?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: hannesnaude on November 06, 2013, 11:27:48 AM
This process runs away and leads any pool  that starts with >33% to end up with >50%, at which point the classic 51% attack becomes possible.


So that's the 51% attack mentioned in Satoshi's paper. I can't see any originality here

No, you don't need to get to 51%. IF you do then you can control the network. But even if you just have 40% of the hashing power, you can make outsize profits and push other miners into loss making territory, which very likely gets you to 50%. But recruiting/buying 33% of the network hash power and relying on economies of scale to get you to 50% is very different from simply recruiting/buying 50% of network hashpower.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: hannesnaude on November 06, 2013, 11:45:09 AM
You need to model this as a dynamic game with entry and exit. They do not do this. The methodology is inappropriate to the problem at hand. They are not qualified for this. This is an industrial organization problem, not a computer science problem.
Done appropriately you would almost certiainly end up with multiple equilibria and sensitivity to assumptions about entry costs for pools and switching costs for individual miners. Game theory tells you very little of use for these types of problems.

It may indeed be possible to build a better mathematical model of this than they did. It may indeed be a much better use of the time of someone who is "qualified for it", than bashing the model that they put forth. But the model that they put on the table is vastly better than what we had before to describe this strategy, namely some hand-waving. Disagree? Was the 33% figure known before?

You need to model this as a dynamic game with entry and exit. They do not do this. The methodology is inappropriate tIn any case, this is all artificial since there are ways of achieving the same aim without any upfront cost. It is hard to sensibly analyze a costly attack approach when cost-free attack approaches that achieve the same aim are available.

Consider a loyalty program where you record each worker's cumulative contribution to the pool. In the event the pool acquires 51%, you divide the 50% of surplus attack revenue according to some function of current hashing power and historical contributions. The loyalty program has no upfront cost at all. As long as the attack has a nonzero chance of succeeeing, the dominant strategy is to always join the pool. The more people join the more attractive joining becomes.

And if the pool doesn't reach 51%? The selfish mining pool provides larger payouts from day 1 (or at least from the first time that 33% is exceeded. So there is no need to trust the operator for anything beyond your next payment. And what exactly are the upfront costs of the selfish mining strategy that you refer to? BTC-Guild could implement this today with a few lines of code. To be clear, I don't think it would work. If they tried that it would probably destroy their business. But I don't see the up-front cost.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 06, 2013, 11:51:02 AM
If it were an interesing problem, yes. But it is not an interesting or relevant problem.

The upfront cost comes from yielding fewer blocks than average and either driving rational miners to PPS pools (and thus losing revenue as an honest pool operaror and failing as an attacker) or subsidizing miners by offering PPS yourself. Even if no PPS pool exists, people would create one. It would not be difficult to coordinate movement to such a pool. Coordination is almost costless in this setting. It is not reasonable to assume that everyone will be stuck receiving substandard block reward and just accept that. It is such a simple problem to fix.

The real and relevant problem is the 51% attack itself. This attack immediately doubles revenue for participants.

About what if the attack fails or you don't trust the pool op, etc. This is irrelevant.  The pool payouts are identical to a standard pool except in the case that the pool accumulates 51%. If you trust the pool with nonzero probability and believe the pool's attack has a nonzero probability of succeeding, then the strictly dominant strategy is to join the attacking pool.

These are extremely weak conditions. Basically, except in the edge case where everyone is 100% sure that an attack will never occur the unique equilibrium is a successful 51% attack. Even in the edge case a successful 100% attack is still an equilibrium. There is just also an unstable non attack equilibrium in this instance.

 This sybil attack, on the other hand, requires a whole host of assumptions about entry and switching costs in order for it to be a legitimate nash equilibrium. It is never going to be a robust prediction and would never be worth wasting money on experimenting with.

Let's put it this way: the attackers are currently armed with handgunds. The researcher is investigated harm that attackers could do if they chose to use knives instead of handguns. Such research is a waste of time.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: hannesnaude on November 06, 2013, 12:16:43 PM
If it were an interesing problem, yes. But it is not an interesting or relevant problem.
::).Yeah, I feel the same about NP!=P. I could probably solve it in an afternoon if I put my mind to it. ;)

The upfront cost comes from yielding fewer blocks than average and either driving rational miners to PPS pools (and thus failing) or subsidizing miners by offering PPS yourself. 

As stated earlier, I agree that the existence of PPS pools makes this attack much less viable. But the existence of (reasonably priced) PPS pools is an assumption. Nothing in the protocol requires or guarantees it.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 06, 2013, 12:23:57 PM
Quote from: hannesnaude link=topic=324413.msg3498091#msg3498091
As stated earlier, I agree that the existence of PPS pools makes this attack much less viable. But the existence of (reasonably priced) PPS pools is an assumption. Nothing in the protocol requires or guarantees it.
It is allowed by the protocol. That is all that is needed. I don't understand the use of game theory in computer science. It is always an attacker vs. A bunch of honest chaps who sit by and let themselves get fleeced. If someone can pop up and say "hey, honest chaps, let's take shelter in that cave. We will be better off and safe if we all go together." Then it's reasonable to guess that this is actually what will happen.

The problem is when there is an attack with no effective countermeasures. As in the true 51% attack. You know, the one that is actually a real problem.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Meni Rosenfeld on November 06, 2013, 12:39:47 PM
Lear, who has independently done much higher-quality research on the same issue, has posted a sample of his results:
https://bitcointalk.org/index.php?topic=325824

I recommend staying tuned for his complete work, which can serve as a more fertile ground for further discussion on the topic.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: hannesnaude on November 06, 2013, 12:43:48 PM
Quote from: hannesnaude link=topic=324413.msg3498091#msg3498091
As stated earlier, I agree that the existence of PPS pools makes this attack much less viable. But the existence of (reasonably priced) PPS pools is an assumption. Nothing in the protocol requires or guarantees it.
It is allowed by the protocol. That is all that is needed. I don't understand the use of game theory in computer science. It is always an attacker vs. A bunch of honest chaps who sit by and let themselves get fleeced. If someone can pop up and say "hey, honest chaps, let's take shelter in that cave. We will be better off and safe if we all go together." Then it's reasonable to guess that this is actually what will happen.

The problem is when there is an attack with no effective countermeasures. As in the true 51% attack. You know, the one that is actually a real problem.

And the "cave" or the countermeasure in this case is that one or more of the honest guys should bleed money operating a PPS pool at a loss until the attacker goes away. Errrm, yes that sounds like it will work. ::)


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: kjj on November 06, 2013, 01:10:37 PM
Ideally I'd like to think about it carefully, read the paper a few times, and run some simulations before commenting, but I'll likely be tied up at the IETF all week and people are already panicking and pushing for hasty changes in response to this which may be ill-advised, so I'm going to offer some preliminary comments here.

Please do run your simulations.  When you do, make sure that you faithfully simulate a network with latency.  The word latency exists in their paper exactly one time, as a casual aside in the solution section, which should immediately set alarm bells ringing in all of our heads.  In addition, they seem to suffer from the strange notion that work in bitcoin can be wasted. 

If I boot up my multi TH mining rig and start mining blocks from the genesis block onward, is my work not wasted? Does it contribute to network security? Will I earn any block rewards for the blocks I mine? As far as the rest of the network is concerned, I might as well not exist.

Well done, you got me.  Work can be wasted if done at the wrong end of the chain.  If you read on to the end though, I clarify that expression.

Let me start with latency.  As far as I can tell from the paper, their "simulation" (and here you should imagine me doing very sarcastic air quotes) involves a network where the evil miners have magically found a way to detect the competing block in the honest miner's memory, before it has begins to spread on the network.  Gamma seems to play some sort of role here, but the meaning of it seems to change from page to page.  Or at the very least between pages 8 and 11.  Can anyone give me a good justification for abusing this poor variable in this way?

I have taken a look and cannot for the life of me understand what is confusing you. Gamma is defined quite clearly:"We denote by gamma the ratio of honest miners that choose to mine on the [selfish] pool's block, and the other (1-gamma) of the non-pool miners mine on the other branch." The variable is consistently used with this meaning. And your assertion that "the evil miners have magically found a way to detect the competing block in the honest miner's memory, before it has begins to spread on the network." is plainly false. The situation that you describe would correspond to a gamma of 0 (the worst case). But even when gamma is 1 (i.e. "the honest miners have magically found a way to always work on the honest block in the case of a tie") the attack works for an attacker with >33% of network hash power. I find the researchers' claim that a gamma of 1 is attainable by an attacker in the current bitcoin network to be tenuous at best, but this is not that important, since the attack works even for the best case where gamma=0.

What may have tripped me up was the way they describe gamma on the various pages.  When I was reading the paper, I was struggling to find a unifying theme for all of the ways they use gamma.  It seems to be a choice on one page, and then an expression of the natural race between competing blocks on the next.

In regards to latency, you seem to be missing a very important aspect of reality on the bitcoin network.  If you are sitting on a block, waiting for the rest of the network to find one so that you can publish yours, the signal that you need to act is also the signal that you have already lost.  Don't feel bad, this entire paper was written because of the same misunderstanding.  You can not win races by waiting for the rest of the network to pass you.

The charts are very illuminating.  In figure 2, each of the simulation points is exactly on the calculated line.  This is a dead giveaway.  The only way that can happen is if their model is fully deterministic except for mining function.


BS I replicated this result and I can guarantee you that the mining function is not deterministic. Besides, your premise is laughable. How accurately can you really read that chart? Enough to say that the simulated results are within 1% of the predicted values? 0.1%? You can easily get simulation results accurate to a fraction of that in a modest amount of time on a dated single core machine. I know because I tried.

I agree with you so much that I traveled back in time to do it.  What is fully deterministic in their model is everything else.  When a new block is found, gamma of the network switches to it, while 1-gamma switches to the attack block.  This is not reality.

The real gold of this paper comes on page 13.  On page 13 they handwave over the latency issue by pointing out that an attacker could insert itself between every other node on the network.  Let me just sum up a few years of discussion on this topic...


Strawman. Nowhere on page 13 do they suggest that or anything that I can interpret as being equivalent to an attacker being required to "insert itself between every other node on the network". If you disagree please post the relevant quote. As stated earlier, I find their assertion that gamma close to 1 is attainable to be tenuous, but this is just a misrepresentation of their position.

Quote
But a savvy pool operator can perform a sybil attack on honest miners by adding
a signi cant number of zero-power miners to the Bitcoin miner network. These
virtual miners act as advance sensors by participating in data dissemination,
but do not mine new blocks.

"every other node" was hyperbole, but not far off from what it would really take.  If the bitcoin network was laid out like an efficient mesh on a flat sheet, you wouldn't need many sensors.  But the bitcoin network is tangled up like a wad of Christmas lights.

Of course, everyone instantly sees how silly that is, so they had to dress it up in pseudo-scientific gibberish so that people would click on their crappy website and check out the douchebag's glamour shot.

Real mature. This is peer-review, is it?

When you run to the press, you tell the world that you are no longer interested in civil peer review.  :)


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 06, 2013, 01:24:51 PM
Lear, who has independently done much higher-quality research on the same issue, has posted a sample of his results:
https://bitcointalk.org/index.php?topic=325824

I recommend staying tuned for his complete work, which can serve as a more fertile ground for further discussion on the topic.

Thanks for pointing this out Meni. Based on the post, it looks like he is taking a more thoughtful approach to the topic.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: hannesnaude on November 06, 2013, 01:43:33 PM
Well done, you got me.  Work can be wasted if done at the wrong end of the chain.  If you read on to the end though, I clarify that expression.

Work can be wasted whenever orphan blocks are produced. Orphan blocks do not contribute to network security, they do not pay their creators, and they are not relayed to the rest of the network.


What may have tripped me up was the way they describe gamma on the various pages.  When I was reading the paper, I was struggling to find a unifying theme for all of the ways they use gamma.  It seems to be a choice on one page, and then an expression of the natural race between competing blocks on the next.

In regards to latency, you seem to be missing a very important aspect of reality on the bitcoin network.  If you are sitting on a block, waiting for the rest of the network to find one so that you can publish yours, the signal that you need to act is also the signal that you have already lost.  Don't feel bad, this entire paper was written because of the same misunderstanding.  You can not win races by waiting for the rest of the network to pass you.

If you are trying to achieve gamma=1 then yes, the signal that you need to act is also the signal that you have already lost. But unless I am the VERY LAST node on the network to receive this block, it may be possible for me to get my block to other nodes that have not yet seen the honest block and in this way recruit at least some of the honest miners to work on my chain. Even if you do not agree with this seemingly obvious statement, it DOESN'T MATTER. Because as I am getting tired of pointing out, the attack still works for gamma=0. This is the case where we assume that I was indeed the very last node to receive the block and not a single honest node will compute a single hash on my block in the case of a tie. In this magical case I need 33% of network hash-power to earn excess rewards.

The charts are very illuminating.  In figure 2, each of the simulation points is exactly on the calculated line.  This is a dead giveaway.  The only way that can happen is if their model is fully deterministic except for mining function.


BS I replicated this result and I can guarantee you that the mining function is not deterministic. Besides, your premise is laughable. How accurately can you really read that chart? Enough to say that the simulated results are within 1% of the predicted values? 0.1%? You can easily get simulation results accurate to a fraction of that in a modest amount of time on a dated single core machine. I know because I tried.

I agree with you so much that I traveled back in time to do it.  What is fully deterministic in their model is everything else.  When a new block is found, gamma of the network switches to it, while 1-gamma switches to the attack block.  This is not reality.

Nope still wrong. In my simulation, nodes get allocated to mine on one block or the other with a probability of gamma of being assigned to the attacking block (you've got the logic of gamma reversed by the way) and I replicated their results perfectly. What is more, for the interesting cases gamma=0 and gamma=1, the two approaches are exactly the same.

"every other node" was hyperbole, but not far off from what it would really take.  If the bitcoin network was laid out like an efficient mesh on a flat sheet, you wouldn't need many sensors.  But the bitcoin network is tangled up like a wad of Christmas lights.
I don't really want to argue this point. As I have repeatedly stated I think that gamma->1 is extremely pessimistic and probably not achievable in the current network. But that is a red herring. The fact is that gamma->0 is extremely optimistic and even under those circumstances, the attack works. No Sybil attack is needed, so I wish we could stop discussing whether the Sybil attack is possible.






Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: runeks on November 06, 2013, 02:43:34 PM
And the "cave" or the countermeasure in this case is that one or more of the honest guys should bleed money operating a PPS pool at a loss until the attacker goes away. Errrm, yes that sounds like it will work. ::)
I'm not convinced by the PPS pool-argument either. As far as I can see - given that the selfish mining thing actually works - a PPS pool operator has two choices:

1. Investing in something that can, in a best case scenario, give him zero profit (an honest mining pool), and in a worst case scenario make him lose money (if the selfish pool wins)

2. Creating a selfish mining pool that can actually earn a positive profit, but also make him lose money

Which will he choose?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: David Rabahy on November 06, 2013, 03:47:42 PM
What can I do to help?  I've tried to understand the topic.  To me it seems like there's a pretty small window (if any?) through which delayed block announcing can gain any advantage.  Clearly delaying too long is nonsense.  When is the block chain considered fixed?  Is 6 blocks the number of blocks required to be considered immutable?  Even with 100% of the hashing power no one can go back and rewrite the chain before some point, right?  If a new very fast miner comes along and picks some historic point in the chain and computes a longer fork, i.e. they catch up to the rest of the miners (an impressive amount of computing power), are the rest of us obliged to accept it?

What I do see is the need for a reliable and vigorous development community to respond/handle each and every threat.  How can we ensure that community is and remains reliable and isn't compromised?  I am willing to run a variant of the client if it would help secure Bitcoin against delayed block announcing.  Or I will ignore the threat if the consensus of the development community points in that direction.  How can we be sure what the consensus is?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 06, 2013, 03:48:35 PM
And the "cave" or the countermeasure in this case is that one or more of the honest guys should bleed money operating a PPS pool at a loss until the attacker goes away. Errrm, yes that sounds like it will work. ::)
I'm not convinced by the PPS pool-argument either. As far as I can see - given that the selfish mining thing actually works - a PPS pool operator has two choices:

1. Investing in something that can, in a best case scenario, give him zero profit (an honest mining pool), and in a worst case scenario make him lose money (if the selfish pool wins)

2. Creating a selfish mining pool that can actually earn a positive profit, but also make him lose money

Which will he choose?

Ehh, if an honest mining pool earns zero profit, then there is free entry in the creation of mining pools and miners switch between pools readily. In this case the selfish pool can't earn a profit either. Someone else can just establish another selfish pool that offers a slightly better deal to miners. Miners will all migrate to the new selfish pool. Repeat until profits reach zero.

The selfish pool would have to undercut PPS pools' margins to enter in the beginning (otherwise it couldn't attract any miners). Since the selfish pool has lower mining output, this requires an upfront investment. The selfish pool has to take a loss to begin with. If there are no profits to be had and you have to take a loss upfront, then you would never see a selfish pool in practice. It is just money down the drain.

If an honest mining pool earns positive profit, then there are some barriers to entry and that probably means miners are more reluctant to switch between pools. In this case, you have a lock-in affect. Just having an event that causes everyone to switch to your pool is a substantial gain for the PPS pool operator. It is worth taking a loss to establish yourself as the dominant pool. If you were the dominant pool to begin with, it is also worth taking a loss to defend this position. I do not think such a lock-in would apply to the selfish pool (the lock-in is probably mostly about trust and people would quite reasonably distrust this entity)

Finally, there is no reason to assume that the honest mining pool plays honest. The PPS pool could also just perform a 51% attack on the selfish mining pool. I think a temporary retaliation would be accepted by the community. Such a tit-for-tat sets a good precedent. In this case, the PPS pool can earn large profits from conducting the attack. These could be split between the PPS miners and everyone else.

The real problem is if someone malicious does a 51% attack, but this has always been a problem and it has nothing to do with selfish mining. There have always been ways of using pools to create a 51% mass of hashing power to execute such an attack (see the loyalty program discussed above). The selfish pool business is an irrelevant non-issue. If you are not concerned about the loyalty program (which is a dominant strategy under extremely general assumptions), then you should definitely not be concern about the sibyl attack (which would cost the attacker money upfront and probably fail in practice)


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: kjj on November 06, 2013, 04:02:30 PM
I'm calling for (and have pledged a bounty for) a network simulator with latency.

I don't believe for a minute that this is economically efficient based on the output of an iterated finite state machine.  Gamma is not a property of the network, it emerges unpredictably during each race from the chaos of the network.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: revans on November 06, 2013, 04:13:31 PM
I'm calling for (and have pledged a bounty for) a network simulator with latency.

I don't believe for a minute that this is economically efficient based on the output of an iterated finite state machine.  Gamma is not a property of the network, it emerges unpredictably during each race from the chaos of the network.


Surely it would be simpler and more empirical to simply create a selfish miner and let it loose and see what happens


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: kjj on November 06, 2013, 04:22:35 PM
I'm calling for (and have pledged a bounty for) a network simulator with latency.

I don't believe for a minute that this is economically efficient based on the output of an iterated finite state machine.  Gamma is not a property of the network, it emerges unpredictably during each race from the chaos of the network.

Surely it would be simpler and more empirical to simply create a selfish miner and let it loose and see what happens

Agreed.  The image that comes to mind is the guy selling his method for beating the stock market.  If it worked, he wouldn't need to sell it.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gyverlb on November 06, 2013, 04:31:51 PM
What can I do to help?  I've tried to understand the topic.  To me it seems like there's a pretty small window (if any?) through which delayed block announcing can gain any advantage.  Clearly delaying too long is nonsense.

Time isn't really an issue, the only condition behind the decision in withholding an alternate chain is the difference in block height. See below for checkpoints but they don't change this much.

  When is the block chain considered fixed?  Is 6 blocks the number of blocks required to be considered immutable?

No: Bitcoin nodes accept to rewind the chain by any length if the replacement chain is longer.
That said the official Bitcoin client has checkpoints to avoid arbitrary long rewrites: you can't rewind past the last checkpoint. New versions of the official Bitcoin client often come with new, more recent checkpoints.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: runeks on November 06, 2013, 05:15:58 PM
The selfish pool would have to undercut PPS pools' margins to enter in the beginning (otherwise it couldn't attract any miners). Since the selfish pool has lower mining output, this requires an upfront investment. The selfish pool has to take a loss to begin with. If there are no profits to be had and you have to take a loss upfront, then you would never see a selfish pool in practice. It is just money down the drain.
I'm not sure I follow. Yes, the selfish mining pool needs an upfront investment. But - again, if we assume this attack is valid - it has the prospect of earning more than it pays to its miners, because it's using the selfish approach.

The most any mining pool can pay per share is block_rewards/num_shares, which would mean it's paying out all its income to the miners - zero profit. If a selfish mining pool can earn 50% of the block rewards while only needing 40% of the network hashrate (which the paper claims), it can afford to pay more per share than an honest mining pool (which only gets 40% of the block rewards with 40% of the network hashrate).

As far as I can see, an honest PPS pool somehow "fighting" selfish mining pools by paying out more than it earns, only means that the selfish pool needs to wait until the honest pool has no more money.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 06, 2013, 06:07:12 PM
The selfish pool would have to undercut PPS pools' margins to enter in the beginning (otherwise it couldn't attract any miners). Since the selfish pool has lower mining output, this requires an upfront investment. The selfish pool has to take a loss to begin with. If there are no profits to be had and you have to take a loss upfront, then you would never see a selfish pool in practice. It is just money down the drain.
I'm not sure I follow. Yes, the selfish mining pool needs an upfront investment. But - again, if we assume this attack is valid - it has the prospect of earning more than it pays to its miners, because it's using the selfish approach.


As far as I can see, an honest PPS pool somehow "fighting" selfish mining pools by paying out more than it earns, only means that the selfish pool needs to wait until the honest pool has no more money.

The selfish mining pool makes an upfront investment and gets what exactly for this? Is there some state authority protecting the selfish pool from competition?

If you pay money to do X and I can not pay money and still capture the benefit from X, then you will never pay money to do X. The existence of the PPS pools implies that the selfish pool has to front some cash at the outset to retain miners.

If you are going to tell me that other selfish pools cannot enter and steal miners from selfish pool (1), then I am going to tell you that this implies that it is worth operating an honest PPS pool to fight a selfish mining pool by paying out more than it earns. You are essentially saying that the game is dynamic and that it is valuable to retain miners and carry them into the next period. If so, it can be worthwhile to do so at a loss.


Honestly, though I think the free entry into pools scenario is more realistic.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: acoindr on November 06, 2013, 07:02:17 PM
Mined Block Reference Nodes

Latency. A thousand curses to latency! It's the reason this thread exists, a questionable attack vector. It's the source of orphaned blocks and lost revenue. Need I mention the continuing block size problem is due to -- you got it -- latency.

If we could get rid of latency the above problems would vanish! What a relief that would be. It may be possible.

When I conceived Mined Block Reference Nodes (MBRNs) in answer to people questioning Litecoin's reduced block time I thought they might come to exist with any blockchain of continued success. I hadn't worked out the details but the prospect seemed promising. This latest issue caused me to think more carefully.

A MBRN does not require a protocol change. They are not an integral part of the network. Whether they exist or not provides incremental, but not critical improvement overall, like hashrate variance.

A MBRN offers miners two key things: the quickest indication of a new valid block, and the largest list of nodes having it.

How to Build a Mined Block Reference Node

The incentive for building a MBRN, and there can be many, is probably altruistic but can include profit. I see this as a web app over http which I think has benefits, like easy use of DNS which can be useful as I'll describe.

An administrator starts with a tipping wallet address. Just as miners expect users to tip fees for valuable service, a MBRN expects this of miners. Reducing orphaned blocks and increasing network performance means the same level hashrate security with less revenue due power companies, a direct savings.

There can be different configurations but a simple dedicated hosted server is probably fine. The app may serve thousands of requests per second, but isn't function or computation complex.

The admin publishes rules of good behavior and keeps a couple whitelists. There are three (high demand) interactions with a node: query for new block, push new block, and query node list; plus the threat of DDOS so whitelists are needed. Querying for a new block may be limited to once say per 5-10 seconds, and returns the highest block number known.

When accepting a pushed block the node screens and prioritizes by whitelist -- IP addresses that provided a valid block prior -- as this is bandwidth and resource significant. Considering the effects miners will desire to stay within the good graces of a MBRN, and bad actors will be quickly identified.

When new blocks are recognized the height number is updated and the MBRN directly serves maybe the last 2 or 3 blocks on a first come first served basis. For each querying node served the MBRN keeps a constantly growing list of known nodes having the block, starting with itself. Every node calls back to the MBRN when they receive the block; they have incentive to do so because they have started mining on top of it and don't want it orphaned. In this way the knowledge about and dissemination of any new block spreads quickly and exponentially, while not requiring significant bandwidth up or down from the MBRN.

Multiple MBRNs may communicate with each other in the spirit of altruism; and tipping for good service provides a market check and balance for weeding out bad actors.

DDOS

Bitcoin ecosystem websites have already been victims of DDOS and a MBRN would be a target too. As I said in an argument with DeathAndTaxes on this subject that attack's strain on a website usually occurs with the database -- often the same fault under legitimate higher than expected traffic. However, the difficulties in dealing with DDOS as a website will be different than for a MBRN. A website can't predict user behavior and usually has multiple pages of various process complexity to serve reliably. Neither of those are true for a MBRN. Normal websites also can't predict which IP addresses to expect on a regular basis. Here again a MBRN has an advantage. I believe a MBRN can defend well against DDOS for these reasons, but also by being nimble.

Bitcoin websites are finding ways to mitigate DDOS. I'm increasingly seeing use of Cloudflare, for example, which works by sitting at DNS level and handling attacks from there. This is a strategy MBRNs can use too as Cloudflare compiles all the bad actor IP addresses it sees naturally. Their DDOS protection starts at around $200 per month. Take that with the cost of a dedicated server and you have only a few hundred dollars per month expense to run a MBRN, while probably at least that in tips. There are other anti-DDOS configurations I've thought about too, some also involving DNS management, say with EasyDNS.com (situated well globally), to load balance across multiple hosts if desired, because the app is so simple. This is in consideration of what DeathAndTaxes mentioned about severe bandwith impacting DDOS. The answer to that is distribution, and is easily managed with DNS for example, or a CDN like Akamai as I mentioned prior and which MTGox now subscribes to.

Block Size

A final consideration is block size. If this model works in practice imagine how it impacts block size. A key argument against raising the block size limit is it results in the best connected, ie the best funded, eventually dominating won blocks which is supposedly random. This puts far less pressure on network connection for even the smallest miner.

I think that covers it.


Title: "Bitcoin is Broken" - Day Four - Where We Stand
Post by: Enochian on November 06, 2013, 08:40:26 PM
So these two guys at Cornell University, an associate professor and a post-doc, publish a paper on Arxiv about what they believe to be a flaw in Bitcoin.

Rather than quietly and tastefully wait for some feedback on their ideas, the professor immediately Tweets "You heard it here first: now is a good time to sell your Bitcoins."  He then proceeds to blog "Bitcoin is Broken."  News outlets, seeing no reason to believe two guys with PhDs employed by prestigious Cornell University are spraying FUD with a large diameter hose, run with the story that a fatal flaw has been discovered in Bitcoin, and its collapse is iminent.

The central thesis of his paper is that you can make mining slightly more profitable by picking when to make public blocks you have mined, and that this will cause miners to join your pool until it increases to a size which threatens the decentralized nature of the Bitcoin cryptocurrency.

Now we've discussed the threat posed by large mining pools for years, and it makes little difference whether they attract clients by gaming the mining protocol, paying a premium for shares, promising a share of the windfall profits that result when they reach 51%, or giving away free toasters.

It is generally accepted that such shenanigans would be noticed by the community before any harm was done, and appropriate policies adopted.  Therefore, it is unlikely people will make the investment to try such things, only to have them nipped in the bud forthwith.

The professor reacts to skepticism about his attack by saying that all rebuttals must "include math" to be seriously considered, and goes on and on about the great burden he endures by having to put up with the stupid.

He deletes critical blog comments claiming they contain "profanity," which apparently includes the word "fraud" and Will Rogers quotes.  After a few days of being slow-roasted on the spit of Bitcoin community displeasure, he defiantly declares" I used to think that money brought out the worst in people, until I saw Bitcoin."

The reaction of the developers to the idea that this attack poses some serious real threat to Bitcoin has been somewhere between "yawn" and "snooze."

Now the paper is interesting, and it has resulted in some serious discussions about how such an attack might play out, although there are some questions whether the methodology is a perfect fit to the problem being described.  Had it simply been released without the accompanying egregious self-promotion and predictions of Bitcoin demise, it probably would have been warmly received, and constructive feedback cheerfully provided.

This whole scenario is like a guy walking up to show everyone a marvelous anti-gravity car he has invented.  He describes the engine in detail with complicated fluid dynamic equations and state diagrams, and refuses to entertain any rebuttals of his design methodology which don't use these tools.  Meanwhile, a less technical crowd has gathered, and noticed there is no hose connecting the engine to the fuel tank.



 


Title: Re: "Bitcoin is Broken" - Day Four - Where We Stand
Post by: justusranvier on November 06, 2013, 08:45:03 PM
Rather than quietly and tastefully wait for some feedback on their ideas, the professor immediately Tweets "You heard it here first: now is a good time to sell your Bitcoins."  He then proceeds to blog "Bitcoin is Broken."  News outlets, seeing no reason to believe two guys with PhDs employed by prestigious Cornell University are spraying FUD with a large diameter hose, run with the story that a fatal flaw has been discovered in Bitcoin, and its collapse is iminent.
Based on his behaviour over the last few days, I give him an 8/10 for douchebag.

He's eligible for a perfect score if it turns out he posts on this forum as "revans" and if he's in any way related to the DDoS attempts on the exchanges and charting sites yesterday.


Title: Re: "Bitcoin is Broken" - Day Four - Where We Stand
Post by: bee7 on November 06, 2013, 08:52:41 PM
Rather than quietly and tastefully wait for some feedback on their ideas, the professor immediately Tweets "You heard it here first: now is a good time to sell your Bitcoins."  He then proceeds to blog "Bitcoin is Broken."  News outlets, seeing no reason to believe two guys with PhDs employed by prestigious Cornell University are spraying FUD with a large diameter hose, run with the story that a fatal flaw has been discovered in Bitcoin, and its collapse is iminent.
Based on his behaviour over the last few days, I give him an 8/10 for douchebag.

He's eligible for a perfect score if it turns out he posts on this forum as "revans" and if he's in any way related to the DDoS attempts on the exchanges and charting sites yesterday.

So, how long before these idiots make a public apology/resign?

They will not. What for?


Title: Re: "Bitcoin is Broken" - Day Four - Where We Stand
Post by: RodeoX on November 06, 2013, 08:55:11 PM
Rather than quietly and tastefully wait for some feedback on their ideas, the professor immediately Tweets "You heard it here first: now is a good time to sell your Bitcoins."  He then proceeds to blog "Bitcoin is Broken."  News outlets, seeing no reason to believe two guys with PhDs employed by prestigious Cornell University are spraying FUD with a large diameter hose, run with the story that a fatal flaw has been discovered in Bitcoin, and its collapse is iminent.
Based on his behaviour over the last few days, I give him an 8/10 for douchebag.

He's eligible for a perfect score if it turns out he posts on this forum as "revans" and if he's in any way related to the DDoS attempts on the exchanges and charting sites yesterday.
I hope he sold all his coins before publishing in an attempt to buy back during some kind of crash. I don't doubt the credentials of the guys who discovered this exploit, but the way they released the information in sensational terms is suspect.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: donut on November 06, 2013, 09:08:36 PM
Rather than quietly and tastefully wait for some feedback on their ideas, the professor immediately Tweets "You heard it here first: now is a good time to sell your Bitcoins."  He then proceeds to blog "Bitcoin is Broken."  News outlets, seeing no reason to believe two guys with PhDs employed by prestigious Cornell University are spraying FUD with a large diameter hose, run with the story that a fatal flaw has been discovered in Bitcoin, and its collapse is iminent.
Based on his behaviour over the last few days, I give him an 8/10 for douchebag.

He's eligible for a perfect score if it turns out he posts on this forum as "revans" and if he's in any way related to the DDoS attempts on the exchanges and charting sites yesterday.
I hope he sold all his coins before publishing in an attempt to buy back during some kind of crash. I don't doubt the credentials of the guys who discovered this exploit, but the way they released the information in sensational terms is suspect.

The "exploit" he "discovered" has been discussed in 2010 on these very forums.


Title: Re: "Bitcoin is Broken" - Day Four - Where We Stand
Post by: revans on November 06, 2013, 09:14:53 PM
Rather than quietly and tastefully wait for some feedback on their ideas, the professor immediately Tweets "You heard it here first: now is a good time to sell your Bitcoins."  He then proceeds to blog "Bitcoin is Broken."  News outlets, seeing no reason to believe two guys with PhDs employed by prestigious Cornell University are spraying FUD with a large diameter hose, run with the story that a fatal flaw has been discovered in Bitcoin, and its collapse is iminent.
Based on his behaviour over the last few days, I give him an 8/10 for douchebag.

He's eligible for a perfect score if it turns out he posts on this forum as "revans" and if he's in any way related to the DDoS attempts on the exchanges and charting sites yesterday.


You are an idiot.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: RodeoX on November 06, 2013, 09:18:02 PM
The "exploit" he "discovered" has been discussed in 2010 on these very forums.
Indeed, apparently Satoshi also considered it. And, if I'm not mistaken, it is a modified "Sybil" attack. Which is also known.


Title: Re: "Bitcoin is Broken" - Day Four - Where We Stand
Post by: gyverlb on November 06, 2013, 10:34:27 PM
So these two guys at Cornell University, an associate professor and a post-doc, publish a paper on Arxiv about what they believe to be a flaw in Bitcoin.

Rather than quietly and tastefully wait for some feedback on their ideas, the professor immediately Tweets "You heard it here first: now is a good time to sell your Bitcoins."  He then proceeds to blog "Bitcoin is Broken."

Wow, I didn't know about the "sell" tweet. I had to check on Twitter to believe it (and found lots of damage control and whining in the process).

After publishing a supposed security flaw without contacting the devs first which is already amateurish at best, the "sell" tweet now makes the professor suspect of having an agenda.
Even if his intentions weren't dishonest his public life is now checked under the microscope by hordes of people with various motivations. I wouldn't want to be in his position right now especially if he has anything to hide. Go easy on him people: with the way he is currently handling his paper he begins his career with quite an handicap already...


Title: Re: "Bitcoin is Broken" - Day Four - Where We Stand
Post by: cunicula on November 07, 2013, 01:05:25 AM
So these two guys at Cornell University, an associate professor and a post-doc, publish a paper on Arxiv about what they believe to be a flaw in Bitcoin.

Rather than quietly and tastefully wait for some feedback on their ideas, the professor immediately Tweets "You heard it here first: now is a good time to sell your Bitcoins."  He then proceeds to blog "Bitcoin is Broken."  News outlets, seeing no reason to believe two guys with PhDs employed by prestigious Cornell University are spraying FUD with a large diameter hose, run with the story that a fatal flaw has been discovered in Bitcoin, and its collapse is iminent.

The central thesis of his paper is that you can make mining slightly more profitable by picking when to make public blocks you have mined, and that this will cause miners to join your pool until it increases to a size which threatens the decentralized nature of the Bitcoin cryptocurrency.

Now we've discussed the threat posed by large mining pools for years, and it makes little difference whether they attract clients by gaming the mining protocol, paying a premium for shares, promising a share of the windfall profits that result when they reach 51%, or giving away free toasters.

It is generally accepted that such shenanigans would be noticed by the community before any harm was done, and appropriate policies adopted.  Therefore, it is unlikely people will make the investment to try such things, only to have them nipped in the bud forthwith.

The professor reacts to skepticism about his attack by saying that all rebuttals must "include math" to be seriously considered, and goes on and on about the great burden he endures by having to put up with the stupid.

He deletes critical blog comments claiming they contain "profanity," which apparently includes the word "fraud" and Will Rogers quotes.  After a few days of being slow-roasted on the spit of Bitcoin community displeasure, he defiantly declares" I used to think that money brought out the worst in people, until I saw Bitcoin."

The reaction of the developers to the idea that this attack poses some serious real threat to Bitcoin has been somewhere between "yawn" and "snooze."

Now the paper is interesting, and it has resulted in some serious discussions about how such an attack might play out, although there are some questions whether the methodology is a perfect fit to the problem being described.  Had it simply been released without the accompanying egregious self-promotion and predictions of Bitcoin demise, it probably would have been warmly received, and constructive feedback cheerfully provided.

This whole scenario is like a guy walking up to show everyone a marvelous anti-gravity car he has invented.  He describes the engine in detail with complicated fluid dynamic equations and state diagrams, and refuses to entertain any rebuttals of his design methodology which don't use these tools.  Meanwhile, a less technical crowd has gathered, and noticed there is no hose connecting the engine to the fuel tank.



 

This sums it up nicely, particularly the paragraph in bold.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Meni Rosenfeld on November 07, 2013, 04:31:49 AM
Here is the tweet about selling bitcoins: https://twitter.com/el33th4xor/status/397219415025934336

They are not acting in good faith. Apparently they don't see a problem with their behavior.

They can't even get their stories straight - https://twitter.com/el33th4xor/status/397827176759697408


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: chriswilmer on November 07, 2013, 05:18:57 AM
Here is the tweet about selling bitcoins: https://twitter.com/el33th4xor/status/397219415025934336

It is clear now they are not acting in good faith. Apparently they have no idea at all there's something wrong with their extreme arrogance and spreading factual lies and FUD.

They can't even get their lies straight between the two of them - https://twitter.com/el33th4xor/status/397827176759697408

Wow. I really liked the paper when I first skimmed through it and I even sent a nice note to the authors... but that was all before the Business Insider press releases and this. I am an academic myself and I think telling people to sell their bitcoins definitely crosses a line when it comes to intellectual discourse.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: justusranvier on November 07, 2013, 05:29:42 AM
I am an academic myself and I think telling people to sell their bitcoins definitely crosses a line when it comes to intellectual discourse.
I wonder if Cornell professors are accountable for lapses in ethical academic behaviour?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: solex on November 07, 2013, 05:38:32 AM
I am an academic myself and I think telling people to sell their bitcoins definitely crosses a line when it comes to intellectual discourse.
I wonder if Cornell professors are accountable for lapses in ethical academic behaviour?

Call me old fashioned but I thought a research paper normally involves research (here: discourse with core dev), and also involves peer review before publishing. Or has Cornell abandoned such archaic practices?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gmaxwell on November 07, 2013, 09:26:16 AM
Call me old fashioned but I thought a research paper normally involves research (here: discourse with core dev), and also involves peer review before publishing. Or has Cornell abandoned such archaic practices?
On the subject of Bitcoin fairly few academics have bothered to communicate with the experts in "industry" (e.g. core devs, folks here posting with books-badges, etc). It's a shame: the failure has resulted in a lot of really confused papers which could have been very easily improve a lot with some expert pointers.

But there are a lot of broken things out there— e.g. no ethical review on experimentation, etc. (I loved one paper I saw that said something like there was no ethical concerns with their live fire privacy attacks on the unwitting public "because anyone else could have performed the same attacks").


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: TooDumbForBitcoin on November 07, 2013, 03:11:24 PM
Quote
I wonder if Cornell professors are accountable for lapses in ethical academic behaviour?

Take away five CS scholarships and ban them from College Bowl for two years. 


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: MicroGuy on November 07, 2013, 03:12:43 PM
Even though it's a little taboo to mention, the truth is: Bitcoin's developer abandoned the project years ago and disappeared into thin air. If he was still around he would be actively evolving the coin and addressing issues like this one in a clever manner. Bitcoin without Satoshi is like Apple without Jobs.

To my understanding, the only coin actively developing a 51% defense is Goldcoin whose developer is actively building upon Satoshi's unfinished work.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gyverlb on November 07, 2013, 04:00:23 PM
Even though it's a little taboo to mention, the truth is: Bitcoin's developer abandoned the project years ago and disappeared into thin air. If he was still around he would be actively evolving the coin and addressing issues like this one in a clever manner. Bitcoin without Satoshi is like Apple without Jobs.

To my understanding, the only coin actively developing a 51% defense is Goldcoin whose developer is actively building upon Satoshi's unfinished work.

You mean one of the coins that I blacklisted in my scrypt miners because my up-to-date node was on a forked branch? You have some balls to come advertise Goldcoin in this thread!


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Luke-Jr on November 07, 2013, 04:45:17 PM
Even though it's a little taboo to mention, the truth is: Bitcoin's developer abandoned the project years ago and disappeared into thin air. If he was still around he would be actively evolving the coin and addressing issues like this one in a clever manner. Bitcoin without Satoshi is like Apple without Jobs.
This is nonsense. Bitcoin still has numerous developers working on it.

To my understanding, the only coin actively developing a 51% defense is Goldcoin whose developer is actively building upon Satoshi's unfinished work.
"51% defence" is nonsensical. As long as you're entrusting decisions to majority hashpower, someone with a majority is making that decision. If you're not doing that, then you're throwing out the entire innovation that Satoshi solved with Bitcoin, and your solution has nothing at all to do with Satoshi.

I'm not saying it's a bad idea to try to solve double spending some other way, just that it's not where Satoshi was going with Bitcoin.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: acoindr on November 07, 2013, 05:16:12 PM
Another thing about those MBRNs (https://bitcointalk.org/index.php?topic=324413.msg3501331#msg3501331)...

Earlier in this tread in response to this quote:

...
Low latency connection itself is expensive, and we can nullify its advantage by relaying unverified block headers. People will always assume a block header is valid unless it is proven otherwise, and always mine on top of the first seen header. (I think creating invalid block header is very expensive and no one is trying to do this. Any stats for this?)
...

I said that broadcasting headers before the final set of transactions doesn't help because miners are never sure what block to mine on top of until they know the winning block. Trolling the network is possible by anyone with any size hash capacity and no worry about block reward.

That's still true, but a MBRN can add trust into the equation. When hearing of a block header from any random node one isn't sure of the rest of the block. Hearing of a block header from a MBRN is different since it's acting as a known source of good, verified information. It's worth the risk mining on top of only a block header then since a header which doesn't match up with the transactions sinks any credibility the MBRN has built up. As justusranvier points out propagation of block headers can be very fast, near instantaneous.

The real value of a MBRN is in the most effective use of hash-rate. It's almost always directed at the most profitable block, near zero waste. This appears to me to completely nullify the Sybil attack dynamic the paper counts as valuable to an attacker.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gyverlb on November 07, 2013, 06:57:14 PM
This is nonsense. Bitcoin still has numerous developers working on it.

Let's just hope it's not the same developers responsible for keeping this forum running. J/K :P

So you admit not knowing who the Bitcoin developers and the forum admin are and state that Bitcoin is "abandoned" a few posts apart?

Obvious troll is obvious. Its ignore link color may change.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 07, 2013, 07:28:26 PM
I wasted enough insomnia time on this that I thought it deserved its own thread.

https://bitcointalk.org/index.php?topic=327292.0

This is a mathematical explanation of why the article uses incorrect methodology.
I use the appropriate methodology (where a miner cares about the future value of his mining hardware) and show that their conclusion no longer holds.

Note: You may want to refer to the following wikipedia articles to help with understanding my argument.

http://en.wikipedia.org/wiki/Dynamic_programming
http://en.wikipedia.org/wiki/Subgame_perfect_equilibrium
http://en.wikipedia.org/wiki/Dynamic_game
http://en.wikipedia.org/wiki/Folk_theorem_(game_theory)

Well, to give you a flavor. Here is the single most relevant slice of the wikipedia articles.
Quote
For example, in the Prisoner's Dilemma, both players cooperating is not a Nash equilibrium. The only Nash equilibrium is given by both players defecting, which is also a mutual minmax profile. The folk theorem says that, in the infinitely repeated version of the game, provided players are sufficiently patient, there is a Nash equilibrium such that both players cooperate on the equilibrium path.

What does this mean? It means that as long as bitcoin mining is a continuous process rather than a one time thing, then cooperating is the rational thing for miners to do (regardless of selfish mining and other such nonsense).

Why is bitcoin mining a continuous process? Because miners own hardware and will be stuck with paperweights if bitcoin collapses. This ownership of hardware underpins the bitcoin incentive system. The hardware is essentially a proxy for proof-of-stake. I don't think people adequately understand this.  '

Note: An important takeaway message here is the deficiency of standard computer science approaches in analysis of bitcoin incentives. Typically, computer scientists will ignore things like incentives to maintain the value of hardware. This just doesn't seem like part of the problem to them. For economists (e.g. me), effects of behavior on asset prices is a standard part of the problem. You cannot analyze one part of the system in isolation from the other and expect to obtain a reasonable model of human behavior. It is quite shocking to me how much credibility this theory has obtained despite its obvious deficiency.

 


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 07, 2013, 10:27:59 PM
What does this mean? It means that as long as bitcoin mining is a continuous process rather than a one time thing, then cooperating is the rational thing for miners to do (regardless of selfish mining and other such nonsense).

Thank you for your analysis. That's what I felt from the beginning about that "strategy". Miners do not care (so much) about the number of coins they get than about the number of stuff they can buy with them.

However, does it apply to someone who wants to destroy Bitcoin ?
Is it easier with this strategy than with a traditional "51% attack" ?
Probably. But it was never very difficult to begin with. Moreover there are other ways of destroying bitcoin that make much more sense.

Say I'm the US gov't out to destroy bitcoin.

Step 1) Make it illegal and start rounding people up. Watch price plummet.
Step 2) Buy up hardware and conduct 51% attack on the cheap to neutralize remaining participants. [Once price plummets the used ASIC devices will be very, very cheap.]

In my opinion, bitcoin cannot survive if the US gov't decides to take the ax to it. I don't think this is going to happen. I also don't think that it will make sense for a private actor to do this. (many different guys will benefit from burying bitcoin, but they are not going to be able to coordinate an attack aside from lobbying gov't. Going it alone and destroying bitcoin is not going to be sufficiently profitable to any one company to make it worthwhile.)

The bigger danger is the falling block reward. If this is not addressed, it will cause problems in the long term (i.e. say starting 10 or 20 years from now).



Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: mmeijeri on November 07, 2013, 11:03:16 PM
In my opinion, bitcoin cannot survive if the US gov't decides to take the ax to it.

Don't you think that also depends on what the EU, Russia and China do?


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 08, 2013, 03:08:05 AM
In my opinion, bitcoin cannot survive if the US gov't decides to take the ax to it.

Don't you think that also depends on what the EU, Russia and China do?
I dunno. I guess I expect the EU to go along with whatever the US says.
I expect China to ban bitcoin if/once it gets really big regardless of what happens elsewhere.
I don't fell informed enough to speculate about the rest of the world.

Just to be clear i don't think the us will ban bitcoin. Say what you like i still believe that the us provides the world's leading environment for innovation. They are not so stupid as to fuck this up.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: MicroGuy on November 08, 2013, 03:37:21 AM
So you admit not knowing who the Bitcoin developers and the forum admin are and state that Bitcoin is "abandoned" a few posts apart?

What I said was, "Bitcoin's developer abandoned the project years ago and disappeared into thin air". I think this is a well-established fact.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: revans on November 08, 2013, 03:40:58 AM
So you admit not knowing who the Bitcoin developers and the forum admin are and state that Bitcoin is "abandoned" a few posts apart?

What I said was, "Bitcoin's developer abandoned the project years ago and disappeared into thin air". I think this is a well-established fact.
[/quote

And his replacement went running straight to the CIA


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: mmeijeri on November 09, 2013, 02:19:15 PM
I dunno. I guess I expect the EU to go along with whatever the US says.
I expect China to ban bitcoin if/once it gets really big regardless of what happens elsewhere.
I don't fell informed enough to speculate about the rest of the world.

I would expect any government to be uncomfortable with a currency they can't control, but then again this is happening in the eurozone, where national governments only control their joint currency collectively. And a small country like Montenegro has unilaterally adopted the euro as its official currency. China really wants to break the dollar's hegemony. They might prefer a currency no one can control to one controlled by the US government. Especially if that currency isn't going away anyway.

Quote
Just to be clear i don't think the us will ban bitcoin. Say what you like i still believe that the us provides the world's leading environment for innovation. They are not so stupid as to fuck this up.

Understood. I'm not saying it either, just speculating about what might happen even if the USG did try to ban bitcoin.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: dwdoc on November 09, 2013, 02:46:27 PM
What does this mean? It means that as long as bitcoin mining is a continuous process rather than a one time thing, then cooperating is the rational thing for miners to do (regardless of selfish mining and other such nonsense).

Thank you for your analysis. That's what I felt from the beginning about that "strategy". Miners do not care (so much) about the number of coins they get than about the number of stuff they can buy with them.

However, does it apply to someone who wants to destroy Bitcoin ?
Is it easier with this strategy than with a traditional "51% attack" ?
Probably. But it was never very difficult to begin with. Moreover there are other ways of destroying bitcoin that make much more sense.

Say I'm the US gov't out to destroy bitcoin.

Step 1) Make it illegal and start rounding people up. Watch price plummet.
Step 2) Buy up hardware and conduct 51% attack on the cheap to neutralize remaining participants. [Once price plummets the used ASIC devices will be very, very cheap.]

In my opinion, bitcoin cannot survive if the US gov't decides to take the ax to it. I don't think this is going to happen. I also don't think that it will make sense for a private actor to do this. (many different guys will benefit from burying bitcoin, but they are not going to be able to coordinate an attack aside from lobbying gov't. Going it alone and destroying bitcoin is not going to be sufficiently profitable to any one company to make it worthwhile.)

The bigger danger is the falling block reward. If this is not addressed, it will cause problems in the long term (i.e. say starting 10 or 20 years from now).



Ironically in the future when the diminished block reward and transaction fees no longer provide enough incentive to ensure the integrity and security of the blockchain it may need to be the government that assumes the responsibility.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 09, 2013, 03:18:47 PM
I'd like to think that people will agree to proof of stake before surrendering bitcoin to government or corporate management, but you may be right. People are extremely stubborn and consensus is a damned hard thing to obtain.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: gmaxwell on November 09, 2013, 04:35:41 PM
I'd like to think that people will agree to proof of stake before surrendering bitcoin to government or corporate management, but you may be right. People are extremely stubborn and consensus is a damned hard thing to obtain.
Proof of stake has thus far proven unworkable.

The main problem with Proof of Stake appears to be that is that there is nothing at stake:  In PoW systems you burn energy to mine, and that mining is only worth while if the chain your mining on survives long term, so you are generally incentive mine the chain most likely to survive. In PoS the rational strategy is to mine all possible forks constantly, because doing so costs you nothing.

Last I checked the, headline, best known PoS altcoin has controlled centralized signatures being announced to lock in every block.  I think it would be awesome if PoS could be shown workable, and there was a time when I was very excited and hopeful about it... but its beginning to seem unsalvageable. You can keep pumping the idea until your ignore throbby burns the color of the sun, but that doesn't solve things.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 09, 2013, 04:44:06 PM
I'd like to think that people will agree to proof of stake before surrendering bitcoin to government or corporate management, but you may be right. People are extremely stubborn and consensus is a damned hard thing to obtain.
Proof of stake has thus far proven unworkable.

The main problem with Proof of Stake appears to be that is that there is nothing at stake:  In PoW systems you burn energy to mine, and that mining is only worth while if the chain your mining on survives long term, so you are generally incentive mine the chain most likely to survive. In PoS the rational strategy is to mine all possible forks constantly, because doing so costs you nothing.

Oh, this again. Don't you have any integrity at all? [As in you know the above to be false, yet that does not prevent you from repeating it time and time again.]

I suggest you add some color to my ignore button because I fail to see value in discussion with you. This is not because you are stupid, but because interactions with clever and dishonest people are rarely rewarding. You lie when it suits you, see below. You also don't understand incentives, see below. If you were right here, then my analysis in the pdf would be wrong...



Could you comment on the incentives to maintain full nodes described here: https://en.bitcoin.it/wiki/Proof_of_Stake (https://en.bitcoin.it/wiki/Proof_of_Stake)

That page is pretty embarrassing.   There is absolutely no mention of the fundamental flaw in PoS consensus which none of your proposals have addressed:  As of yet none of the proof of stake proposals are workable because there is nothing at stake!   If someone is PoS mining it is in their best interest to attempt to concurrently build an honest chain as well as all possible attack forks just in case one of them happens to win.  Under most schemes this is the profit maximizing move, in all I've seen so far its at least neutral.  Mining an attack under PoW actually involves _spending_ something and taking the risk other miners will extend it. PoW works because your work is at stake so even a very small amount of honest miners make mercenary rational miners behave honestly too.

Moreover, I don't see why you argue here that it better aligns incentives. Parties can't mine PoW without having a validating node (or face the extreme risk other miners will toss them off on forks).  All it does is redistribute control, which might be useful— if not for the fact that it makes attacking more attractive for selfish participants.   I was hopeful of these techniques but as of yet I don't see how any can be workable.



Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: User705 on November 09, 2013, 09:52:29 PM
What does this mean? It means that as long as bitcoin mining is a continuous process rather than a one time thing, then cooperating is the rational thing for miners to do (regardless of selfish mining and other such nonsense).

Thank you for your analysis. That's what I felt from the beginning about that "strategy". Miners do not care (so much) about the number of coins they get than about the number of stuff they can buy with them.

However, does it apply to someone who wants to destroy Bitcoin ?
Is it easier with this strategy than with a traditional "51% attack" ?
Probably. But it was never very difficult to begin with. Moreover there are other ways of destroying bitcoin that make much more sense.

Say I'm the US gov't out to destroy bitcoin.

Step 1) Make it illegal and start rounding people up. Watch price plummet.
Step 2) Buy up hardware and conduct 51% attack on the cheap to neutralize remaining participants. [Once price plummets the used ASIC devices will be very, very cheap.]

In my opinion, bitcoin cannot survive if the US gov't decides to take the ax to it. I don't think this is going to happen. I also don't think that it will make sense for a private actor to do this. (many different guys will benefit from burying bitcoin, but they are not going to be able to coordinate an attack aside from lobbying gov't. Going it alone and destroying bitcoin is not going to be sufficiently profitable to any one company to make it worthwhile.)

The bigger danger is the falling block reward. If this is not addressed, it will cause problems in the long term (i.e. say starting 10 or 20 years from now).


I think this would only work as a coordinated multi government attack.  The higher the exchange rate the more mining devices are out there the harder and more expensive it is to accumulate 51%.  Also at these price levels bitcoin is a rounding error on a government expense report.  When it is big enough to challenge government it is will be so distributed that if one country tries to ban it alone it wouldn't do anything but make bitcoin smuggling into it profitable.  Examples are gold smuggling in india and switzerland, and black market dollar exchanges in argentina, venezuela and other similar countries.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Meni Rosenfeld on November 10, 2013, 07:42:48 AM
I'd like to think that people will agree to proof of stake before surrendering bitcoin to government or corporate management, but you may be right. People are extremely stubborn and consensus is a damned hard thing to obtain.
Proof of stake has thus far proven unworkable.

The main problem with Proof of Stake appears to be that is that there is nothing at stake:  In PoW systems you burn energy to mine, and that mining is only worth while if the chain your mining on survives long term, so you are generally incentive mine the chain most likely to survive. In PoS the rational strategy is to mine all possible forks constantly, because doing so costs you nothing.
My proposal very clearly and explicitly penalizes stakeholders who try to sign conflicting blocks. This line has been there for 1.5 years - "If an address signs two conflicting blocks, its weight is reset to 0. This is to limit the power of malicious stakeholders. "

I'm not saying this will work perfectly, but to claim that no consideration has been made to this issue is, as cunicula says, dishonest.

Research into PoS methods is still ongoing.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: RoadTrain on November 10, 2013, 08:28:32 AM
I'd like to think that people will agree to proof of stake before surrendering bitcoin to government or corporate management, but you may be right. People are extremely stubborn and consensus is a damned hard thing to obtain.
Proof of stake has thus far proven unworkable.

The main problem with Proof of Stake appears to be that is that there is nothing at stake:  In PoW systems you burn energy to mine, and that mining is only worth while if the chain your mining on survives long term, so you are generally incentive mine the chain most likely to survive. In PoS the rational strategy is to mine all possible forks constantly, because doing so costs you nothing.
My proposal very clearly and explicitly penalizes stakeholders who try to sign conflicting blocks. This line has been there for 1.5 years - "If an address signs two conflicting blocks, its weight is reset to 0. This is to limit the power of malicious stakeholders. "

I'm not saying this will work perfectly, but to claim that no consideration has been made to this issue is, as cunicula says, dishonest.

Research into PoS methods is still ongoing.
I understand how the weight is reset to 0. But I can't understand how signature fees will be distributed.
If there's a thread discussing it, please point it to me. Thanks.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: cunicula on November 10, 2013, 09:27:33 AM
http://www.reddit.com/r/Bitcoin/comments/1qarhr/how_i_learned_to_stop_worrying_and_love_the/

Posted this on reddit. I tried to give a simple explanation of why the research gets it all wrong.

Any help with editing is appreciated. Here is the reddit post:
Quote
Recently, a dire prediction came out from a couple of computer science researchers about bitcoin's security. Game theory says  'We're all Doomed' or so they claim.

This is eerily similar to what happened when game theory was first applied to the study of nuclear war. Early researchers modeled nuclear war as a winner take all game. In this story, once a nuke drops, one of players is erased from the map. Game over for them. If you face certain and immediate obliteration, the only workable strategy turns out to be a pre-emptive strike. The CIA found this quite alarming!

Later, as the study of games became more advanced, the model was tweaked to add a bit of realism. Instead of obliterating the enemy, the nuke just harms them and they have an opportunity to strike back in the next round. With this simple twist, the game becomes like "Groundhog Day"; there is never any end to it.

When we play a game over and over again new kinds of strategies emerge. The most familiar one is tit for tat retaliation. "If I got nuked last year, I'll nuke back this year. If I didn't get nuked, then I won't nuke back this year."
This strategy is both familiar in everyday life and famous in theory. That's because it works. Under tit for tat, you can avoid getting nuked by maintaining an arsenal, but never using it.

Okay, so what about bitcoin. The authors of "Majority is not enough..." analyze bitcoin as a static one-off game just like early researchers considering nuclear war. Unsurprisingly, they issue dire predictions. In their one-off world, there is never any way of retaliating against bad actors. Players just pick between "attack" and "honest." It should be no surprise that the unconditional pacifist strategy is never successful. Indeed, always attack is the only possible equilibrium in a one-off setting.
Most people can see this intuitively, even if they have never studied game theory.

Let's add in some realism. In particular, let's think about mining every day instead of just as a one-off event. This allows for retaliation. Suppose instead we play, "if some anonymous guy fucked us by playing selfish yesterday, then we will also play selfish because it makes no sense to keep getting fucked." and "if no one played selfish yesterday, then we will play honest."

This strategy (where we condition actions on previous play) is an incentive compatible subgame perfect nash equilibrium. Yes, you heard it, the authors' claimed key contribution is erroneous and stems from a fundamental and elementary misunderstanding of game theory. Cooperation is sustainable as long as we retaliate against the bad guys.

Now, wait you say, we don't know who the bad guys are. How can we retaliate? This is the magic point. We don't need to know who the bad guys are to hurt them. If 25% of hashing power is doing selfish mining, we may not know who the bad guys are, but we do know that they own an ASIC (unless you think 25% of ASICs can be simultaneously liquidated within a single day at fair market value). The ASIC they own is valuable. When we play selfish, we turn into a paperweight. And that is how retaliation works. Players respond to selfish play by turning selfish and this causes all ASIC owners to take capital losses. The market value of their equipment depreciates with bitcoin prices. Ownership of ASICs means that miners cannot help but have a permanent stake in the system. 

Now, wait you say, this will also hurt innocent players who were not involved in the attack. Even though retaliation harms innocent people, it is still the best option for people who have been attacked. War hurts innocent people. But fighting back is the only possible equilibrium response after an attack occurs (one can set a threshold for a response, but there's always a tipping point where rational people have had enough and choose to fight back.)

Okay, so let's review and make things more concrete. Let's see. Say there is some consensus threshold for a 'successful attack.' You can ask Gavin exactly what the threshold is. Maybe we'd allow him to determine this. I would guess it is around the level that makes a short-term attack earn positive profit.

Consider a miner's options:

If I join an attack and the attack succeeds, tomorrow and the day after that and possibly for all days following we will have selfish mining. Should I care? Yes, today, my ASIC is expensive. Not worth a day of profits, if tomorrow all I have left are a day's worth of selfish mining income in USD and a brand new paperweight.

If I join an attack and the attack fails, then tomorrow we will still have happy days, but I will not have gained any short-term profit from participation. In fact I will have lost revenue. So clearly this is also a no go.

That leaves us with the last option: honest mining. Assume that everyone else approached the problem like me. You can see by reading most comments that they do (even if they don't formally understand why).

If I do not join an attack, then I will earn a fair profit and, as long as everyone else has approached the problem rationally, then tomorrow we will have more happy days of honest mining. And the next day too and the day after...

So what's my dominant strategy? Be honest until someone attacks me and then retaliate as necessary. There are many different sustainable ways of organizing retaliation besides tit for tat. Norms on how to retaliate vary across societies. I trust that the community, and Gavin in particular, could make reasonable judgements on this front. And that is all we need to succeed.

tl;dr bitcoin only has to worry about terrorists; rational miners will never attack, ever*. *(as long as there is modest mining reward)

If you'd like to see some math on this topic, then check out:

http://www.scribd.com/doc/182399858/Cunicula-s-game-theory-primer-pdf

PS. I could use help on the authors' site, 
hackingdistributed.com

The author is aware of my critique, but is refusing to respond. In fact, he deleted the link to my pdf the first time I posted it. As a community, I'd appreciate help in demanding a response from him. Go to the blog and ask questions about how repeated play and retaliation affect his results. When you see these questions, upvote them.

If the community will not help, then I will have to go the long route of posting a formal academic comment on arxiv. This is time consuming. Because I am an economist, arxiv has no positive benefits for my reputation or career. I'm asking for some help so that we can get this addressed in the media and blogosphere without a prolonged academic back and forth.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Meni Rosenfeld on November 10, 2013, 09:33:01 AM
I'd like to think that people will agree to proof of stake before surrendering bitcoin to government or corporate management, but you may be right. People are extremely stubborn and consensus is a damned hard thing to obtain.
Proof of stake has thus far proven unworkable.

The main problem with Proof of Stake appears to be that is that there is nothing at stake:  In PoW systems you burn energy to mine, and that mining is only worth while if the chain your mining on survives long term, so you are generally incentive mine the chain most likely to survive. In PoS the rational strategy is to mine all possible forks constantly, because doing so costs you nothing.
My proposal very clearly and explicitly penalizes stakeholders who try to sign conflicting blocks. This line has been there for 1.5 years - "If an address signs two conflicting blocks, its weight is reset to 0. This is to limit the power of malicious stakeholders. "

I'm not saying this will work perfectly, but to claim that no consideration has been made to this issue is, as cunicula says, dishonest.

Research into PoS methods is still ongoing.
I understand how the weight is reset to 0. But I can't understand how signature fees will be distributed.
If there's a thread discussing it, please point it to me. Thanks.
One possibility is to have a special sig fee transaction in every signature block, paying out based on a determinstic calculation of signers of the previous signature block, with evidence of double-signing included.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: onedeveloper on November 10, 2013, 07:45:51 PM
After reading almost all of the posts (well, 75% and the last ones, to be honest), I think I've got the gist of this. I will make this short analogy:

- Imagine that the WWII ended with the German coalition (the Axis) winning it over the Allies. What will have happened?

...

Easy! We all be German speakers and we will be trying to discuss "what happens if Allies win the war?".

Even if Bitcoin suffers a 51% attack, there will STILL be Bitcoins. Maybe not so attractive to newcomers in the initial stages, but ... What's the incentive for the winners of the 51% attack now that they dictate the laws and that they have all the BTC? Use a "cart full of BTC" to buy just a bread bar?

After the attack (any attack) is successful, Bitcoin will prevail because they will need to profit from their attack. Take into account someone has paid for the equipment and the electricity, network, and other mining-related costs...

The main problem is the BTC loosers, the people that had a sizeable amount of BTC stored and that now have nothing. It will then be time to steal it or to sell them anything for BTC or to retaliate somehow. So no, Bitcoin mining is not vulnerable. Bitcoins are a risky investment.

What Bitcoin needs is to be a de-facto currency in the real world. This way nobody will attack it more than they try to steal a bank in the real world.

This is my humble opinion, of course, and I can be flat-out wrong so criticism is welcome :)


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Meni Rosenfeld on November 10, 2013, 08:11:14 PM
The main problem is the BTC loosers, the people that had a sizeable amount of BTC stored and that now have nothing. It will then be time to steal it or to sell them anything for BTC or to retaliate somehow. So no, Bitcoin mining is not vulnerable. Bitcoins are a risky investment.
I don't think even the authors claim this attack can be used to take bitcoins away from those who already have them.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: onedeveloper on November 10, 2013, 08:32:22 PM
The main problem is the BTC loosers, the people that had a sizeable amount of BTC stored and that now have nothing. It will then be time to steal it or to sell them anything for BTC or to retaliate somehow. So no, Bitcoin mining is not vulnerable. Bitcoins are a risky investment.
I don't think even the authors claim this attack can be used to take bitcoins away from those who already have them.

Then it's even less of a problem!  ;D


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: tacotime on November 11, 2013, 04:48:12 PM
You're wrong: nobody does that

I think you mean you don't do that.



Quote
E.g., take
the one whose last block hash is smaller. This way all miners choose the
same chain, and the guarantees of our solution hold.

This is not a new idea at all.  As far as public postings, it's been on this page on the bitcoin wiki (https://en.bitcoin.it/wiki/Thin_Client_Security) for at least six months, and there was definitely a mention of it on bitcoin-dev about a year ago (I will post the reference when I find it).  And, as I've mentioned, it's pervasive in the modified clients used by large mining operations, although those are not public so you're welcome to shout "liar liar pants on fire" all you like and I won't get upset :)



I think the people who wrote this paper took Satoshi's original whitepaper too literally:

Quote
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof- of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.

Mining strategy has evolved and adapted, as it must in any incentive-driven system.  For example, Satoshi's whitepaper predicted that transaction fees would be a meaningful incentive, and it's pretty obvious it hasn't turned out that way.

This has been proposed for MC2 for a very long time too.. when you have a hybrid PoW/PoS system there needs to be strongly deterministic means of blockchain selection, but I guess this now benefits the chain in a different way.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: David Rabahy on December 22, 2013, 04:07:08 PM
So this is more of a miners issue right?  How are orphan block rewards handled now?  What I mean is if I solve a block and get the reward and go gamble it at satoshi dice immediately does this "attack" somehow nullify that block reward afterwards and basically I succeeded at a double spend?  Or the block never hits the blockchain and the "attack" is designed for me to waste my hashing power?
As I understand it, the block reward cannot be spent right away.  There have to be a certain number of blocks built upon it, 6?, before it can be spent.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: kjj on December 24, 2013, 06:08:33 AM
As I understand it, the block reward cannot be spent right away.  There have to be a certain number of blocks built upon it, 6?, before it can be spent.

100 by protocol.  120 by convention.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: johoe on July 05, 2015, 06:34:37 AM
1: If the solution were to randomize what chain to work on in a tie, why wouldn't the selfish pool
try to create multiple chains by having subpools work on finding hashes for separate blocks?

Doesn't work.  They need double the hashing power.  If they have that, the selfish mining strategy would work much better with one chain.    Basically, the subpools would attack each other.

2: In general, holding on to a block for some period after finding it, looks like a potential advantage
is working on the next block.  Why not have all the nodes do this as normal operation?

Holding one block for some period is not good for a miner.  Selfish miners lose some blocks by doing this.   What makes selfish mining profitable is that as soon as they get two blocks ahead they will always win and can wait until the remaining network catches up to kill all the blocks that the honest miners produced.

A selfish mining attack is clearly visible.  You get forks that are several blocks long.  Bitcoin users can no longer trust confirmed transactions. A miner with enough hashing power to make such an attack should hopefully realize that the damage to Bitcoin and the resulting price drop will make him earn less and make his huge investment in mining hardware almost worthless.  Even if they just rented the equipment and would try to monetize their profit fast, it wouldn't work.  They only profit after two weeks when the difficulty is adjusted.  Before that, they would only lose a lot.


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: dbeberman on July 06, 2015, 05:30:08 PM
Thanks for the response.
Clears it up very well.

Cheers


Title: Re: Majority is not Enough: Bitcoin Mining is Vulnerable
Post by: Skybuck on June 20, 2018, 05:18:22 AM
Fun to bring this thread back alive !

The story continues with a new paper:

https://webusers.imj-prg.fr/~ricardo.perez-marco/publications/articles/OnSelfishMining20.pdf

This one examines the profiteability of selfish-mining and seems to come to the conclusion that the difficulty calculation is a bit broken and could be fixed :)

Haven't read the paper (yet) but did read this where I found it:

https://btcmanager.com/researchers-propose-a-solution-for-selfish-mining-attacks/

Read it... somewhat interesting.

It uses Poisson Process to model it:

http://www.randomservices.org/random/poisson/index.html

https://www.probabilitycourse.com/chapter11/11_1_2_basic_concepts_of_the_poisson_process.php

(Haven't seen this in a while ! :) ^ Statistics ^ :))

And something I have not seen before or forgot about :)

Doob’s theorem

In short this paper describes what I already suspected long ago... selfish-mining becomes profiteable after a difficulty adjustment.... which is pretty logical, since some hashing power is kept secret ;) so difficulity is a bit lower... but how it exactly works... well you'll have to read and understand the paper for that... amazing though that apperently now there is some proof for this... there was some doubt though ;)

Another topic was trying to dominate blockchain with 33% hash power or something, but I don't think that was related to these documents ? Can't remember clearly (thought it was though) and maybe it is ;) :)

Ok read that reddit link on page 1 from this thread... it was indeed about this 33% attack ;) :) funny stuff ! =D