Nakamoto consensus pairs proof-of-work mining with the longest-chain rule. Learn how lotteries, difficulty and incentives secure Bitcoin.