Bitcoin mining is NP-hard
freedom-to-tinker.com
freedom-to-tinker.com
The article talks about how choosing the optimal set of transactions to include in a block is NP-Hard, and the typical implementation uses a simple greedy approximation.
But I thought I was going to read about someone doing a security proof showing that a fast way to generate blocks and extend the chain would give us a polynomial algorithm for 3-SAT. Which would have been awesome.
Nothing like this has been proved (neither directly nor indirectly), and it seems very unlikely to happen in the foreseeable future.
In fact, none of the commonly used cryptographic primitives have NP-hardness proofs.
I fully recognize that the NP-Hard-ness of SHA256 is speculative, and I run a not-insignificant risk of being wrong. The strongest case for my correctness, so far, is that no one has found a polynomial attack against any of the SHA functions - this is far from conclusive, of course.
Accoringly most miners appear to just use really cheap heuristics.
Why is this good/important?
1. The seller can optionally soak the cost of the transaction fee. But this means less profit for them while the buyer sees no changes (until later when the seller finds this is unsustainable as fees increase).
2. The seller can raise prices by the fee amount (how sales tax works in the US, effectively). The buyer is then paying more and more over time as fee amounts increase.
3. Some combination, seller determines the amount they can afford to lose while keeping prices low enough to not lose too many customers.
In the end, all 3 options will create a drag on the economy. Either by reduced buying power or reduced profits resulting in reduced future growth.
We also see this with credit/debit card transaction processing. Sellers, per their agreements with CC companies, aren't supposed to have different prices between CC and cash transactions. This means they lose part of their profits on CC transactions, with some companies (AMEX) costing them more than others.
I will also google this question down later.
So it's funny that the author quotes knapsack as the possible true difficulty...