Measuring Decentralization is Hard, Lets Go Shopping

People get the general idea that, “if decentralization is the key property of the blockchain we ought to measure it, so we can compare decentralization across chains.”

You’ll see people try and measure decentralization in two ways:

Failed Attempt #1: People try to measure the number of full nodes running in a geographical area.

Another measure of decentralization is to determine what the node distribution is across countries for Bitcoin and Ethereum.

Balaji S. SrinivasanQuantifying Decentralization

The data shows that the Ethereum nodes are both in the latency space, and also geographically more distributed round the world. Ethereum nodes tend to come from all sorts of places, smaller networks, and homegrown entities, as opposed to Bitcoin nodes, which tend to be located in data centres.

Emin Gün SirerGenesis London Conference

There is no way to prove any node isn’t just a proxy to a single central one.

The number of nodes in the network don’t meaningfully add to network propagation or decentralization. The only full node that matters is your own. Even if the number of full nodes mattered, you can’t count them and you can’t prove where they’re running from.

Failed Attempt #2: People make ‘feel good’ pie charts to show how distributed the hashrate of any given network is.

You can’t prove who is really mining on what pool.

It’s true that centralization of hashrate can increase your risk of censorship on the blockchain. The problem with this is that all identifiable information that people use to measure hashrate on miners is self-reported and can easily be faked.

Decentralization may be the most important feature of Bitcoin, and there is no empirical way to measure it.

Yes, Decentralization Matters

The lack of trust required or the “trustlessness” of the blockchain is a common way to tell the story of Bitcoins architecture. People hear that there is “no trust required in Bitcoin” or that the “blockchain is redefining trust” and they freak out. And reasonably so, because trust is the basis of every business relationship. Trust itself is the currency of business. The concept of trust in this context is seriously misunderstood.

Decentralization is the property that allows you to use Bitcoin without having to trust a third party like banks or payment processors.

Removing the requirement of trust in favor of decentralization is the most dangerous feature of Bitcoin.

Heard this way, decentralization is “anti-social, stupid and immoral,” as Charlie Munger has said of Bitcoin.

Decentralized in a computer science term, meaning that the system can operate with the information from different points. Instead of framing the discussion in terms of trust, another way to frame decentralization is from the perspective of reliance or power.

Framed this way, decentralization is the removal of a central power. It’s the shift from relying on those in power to relying entirely on yourself. Centralization comes with censorship-risk, seize-ability, freeze-ability. These are all versions of a similar thing, the power to get in between you and your funds.

  • A decentralized currency is protected against inflation and seize-ability.
  • A decentralized payment platform is protected against censorship and payment freezes.

The value of Bitcoin is not in the decentralization itself, but in the emergent properties of decentralization.

  • In Bitcoin, the property of unseizeability is enforced with direct ownership of your private key.
  • The property of censorship-resistance is enforced with a decentralized distribution of hash power.

Bitcoin is a vehicle for your individual freedom.

In modern democratic governments the people these properties protects might be whistleblowers or foreign dissidents. In more totalitarian governments the users it protects might be sex workers, porn stars, or average citizens.

Historically, governments, corporations, or other large, faceless organizations have used their power to get in between users and access to their funds. The ability for third parties to seize assets guarantees that it will occur. Bitcoin is a tool for circumventing moralizing centralized powers, protecting individual privacy, and resisting censorship at large.

Bitcoin’s decentralization removes centralized power structures, by shifting the associated responsibilities on to the individual. Part of that responsibility are localized costs. Mining burns resources, running a full node costs money, and key management can be the users biggest burden. Decentralization makes people self-reliant, not anti-social.

Full Nodes as Your Seat in The Decentralized Empire

Your seat in The Decentralized Empire will not be tokenized on some cheap app.

Everyone whats to run and go do something ”blockchainy,” or live in a world of ÐApps. But how many of those people have run a full node?

Finder published that nearly 8% of Americans own Bitcoin. (The number seems high to me, but if its close..) With 327,000,000 Americans, that makes 26,200,000 Bitcoin users, and a high estimate of 8000 running full nodes, at most only 3% of Bitcoin users are running full nodes.

What is a node?

In computer science, a node is a basic unit used to represent a device, a personal computer, a phone, or generic machine that connects to the larger network. In Bitcoin, any computer that connects to the network is a node. Nodes that fully verify all of the rules of system are called full nodes.

When people are new to Bitcoin and looking to “join” the network in some way, the tenancy for them is to focus on mining. For the obvious reason that miners get paid to mine. People vastly underestimate the work involved in mining, and overestimate its profitability. The result is that most people who try at mining fail. Still the allure of mining overshadows running a full node, and most don’t even consider it a possibility.

Why don’t people run full nodes?

People don’t understand their power. They run after shiny objects like mining bitcoin or the “decentralized appstore” in other parts of the blockchainy industry.

A mistake even high profile experts make, is to think the number of nodes some how adds to decentralization, which is misguided for a number of reasons. Nodes don’t meaningfully contribute to the decentralization of Bitcoin or any other cryptocurrency. What people don’t understand is that nodes serve their operator more than the network.

Nodes are misrepresented in a number of ways. People believe that running a full node relies on altruistic do gooders, or that its too difficult for most people to do themselves. No one is expecting grandma to run a full node, but its not beyond the reach of anyone seriously interested in using Bitcoin to its full capacity.

You can look at nodes in two ways: how node serves the system, and how your node serves you.

Nodes as Consensus Validators and Payment Broadcasters

Full nodes are servers that propagate transactions through out the network and validate consensus rules. When a transaction is made from a node, it checks it against the rules of the network, chooses a subset of eight nodes its connected to and propagates the transaction throughout the network.

But instead of thinking about full nodes as consensus validators and payment broadcasters in the system you can think of them as your vehicle to validate and broadcast transactions yourself.

Full Nodes as Your Seat in The Decentralized Empire

Your full node is key to unlocking the properties of privacy and trustlessness within the system. Its a tool for you to seize a seat in the decentralized empire.

The unique property of full nodes are that if you run your own, Bitcoins properties of greater security and privacy are transferred to you directly. Build the blockchain up from the genesis block, validate transactions on your hardware, and live as an autonomous ruler in the decentralized empire.

Miners as the Decentralized Mint and Payment Processors

Miners are the shiny objects in the Bitcoin industry. The term “miners” is used as an analogy to explain the incentive alignment in Bitcoin. Miners find a block, secure the transactions within it, and are rewarded in bitcoin for the service. As long as miners get paid, the incentive for miners is to move forward on the blockchain and keep processing transactions.

Miners as the Decentralized Mint

It doesn’t exactly cost money to mine. More directly, it cost CPU power, hardware, and electricity. All of which are priced differently depending on your level of access. Hardware manufactures in China and entities with politically cheap or stolen power have a reduced financial cost and advantage in mining. The enforcement of a real-world cost to rewriting history on the blockchain is what secures the forward movement on the chain. Because the cost to reverse those transactions, and rewrite history, is not guaranteed and even more expensive than moving forward.

This process of incentivizing miners to convert real world resources for a digital reward brings new coins into circulation and functions as the decentralized mint.

The term “miner” is mentioned exactly once in the whitepaper:

  1. Incentive

    By convention, the first transaction in a block is a special transaction (called the “coinbase” transaction) that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.

Satoshi NakamotoBitcoin: A Peer-to-Peer Electronic Cash System

The problem with the term “miners,” is that without any further explanation, people assume that without the bitcoin reward, miners will stop mining and processing transactions entirely. With no one mining blocks, this would mean a freeze of transactions on the blockchain. But this isn’t the complete story. The incentive system that rewards miners with newly minted shiny bitcoins is just one function of miners.

When all the new coins have been minted the system will be deflationary and the miners primary function will be to process payments and the term “miners” won’t make much sense at all.

Miners are Also The Payment Processors

Explained from the perspective of miners getting a reward, people are led to believe that once the reward runs out miners won’t get paid. Some go as far to brand this as a security flaw in the system itself. The term “payment processors” conveys (if only slightly) that these nodes are providing a service and that they need to be paid to stay in the business of securing the network.

The truth is that Miners already exists as payment processors. Miners aren not only paid by the block reward but also by fees. Its only in the past several years that the price of fees have been been a significant factor.

The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation-free.

Satoshi NakamotoBitcoin: A Peer-to-Peer Electronic Cash System

If You Want to Incentivize Miners to Keep Processing Transactions, You Have Two Options:

  1. Perpetually inflate the currency to reward miners.
    • This requires that the currency has a value;
    • And simultaneously lessens the strength of bitcoin as a currency through increased inflation.
  2. Or Incentivize the miners with fees.
    • This also requires that the currency has value;
    • But it also increases the value of each bitcoin by limiting its supply;
    • While lessening the strength of bitcoin as a payment processor, because it potentially becomes more expensive to spend bitcoin as the cost of fees rise with the increasing network hashrate.

The Bitcoin network is designed to slowly diminish the miners’ reward over time and rely on fees because the block reward is more of a block subsidy.

The Block Reward is a Block Subsidy

The block reward will end.

Roughly every four years the reward is decreased by half until all the coins have been mined. You can see below how the inflation or supply of bitcoins has correlated with the price in dollars.

Halving Period Reward Price High
2009-2012 50.00 $0-$15
2012-2016 25.00 $15-$700
2016-2019 12.50 $700-$1900
2019-2024 6.25 ?

Bitcoins deflationary rule set, creates a currency with increasing scarcity, and increasing value over time.

Don’t take this distinction for granted.
Everyone forgets about the halving.

The number of people that have been using bitcoin for years, when it was at a relatively low value, with no fees, still clutch their pearls when fees are “introduced”. The truth is that the fees are not new, the cost of fees never had the opportunity to be high, since the value of bitcoin itself was low. How fees are calculated is the subject of another post entirely. Suffice it to say high fees on the Bitcoin network have been used to justify forking the currency, the creation of altcoins, and was once the core of the heated blocksize debate for a number of years.

Exactly how fees are calculated is worthy of its own full explanation. The important take away here is to understand why fees and inflation are tradeoffs. And why bitcoin shifts towards fees instead of inflation, and why that makes it a more useful currency than payment processor.

Is Bitcoin a Currency or a Payment Processor?

It’s both, but it is undeniably better at one than the other.

The role of miners is not just to shower themselves in newly minted bitcoins, but also to process transactions. When all the coins are mined, the role of miners will solely be to process payments for fees. When that time comes the value of bitcoin has to be high enough to make it possible for miners to process transactions profitably.

The fact that miners in the Bitcoin system are dedicated payment processors does not mean that the system is or should be optimized for payment processing. The system is optimized for its long term value as a decentralized currency. The fundamental trade-off between fees or no fees is the choice between Bitcoin as a currency or as payment platform. And the tilt towards a blockchain as a payment platform usually comes at the cost of continued inflation.

Fees are not ideal. But people pay them, and the value of bitcoin grows. Why? Because the value of a currency with real scarcity, and without a central authority is worth the price we pay for it.

The Blockchain as a Timechain

Bitcoin as a Blockchain

Visualizing the blockchain is straightforward.

You put some transactions in a block, then connect the blocks to make a chain.

At first glance, the blocks appear to be arbitrary groupings of transactions. The concept of a “block” in a blockchain tells you little about the actual purpose of blocks at all.

So why put transactions in blocks at all?

The most basic requirements of any ledger, blockchain or otherwise, is the ability to record inputs and outputs that occurred at some specific date and time. But when we take a closer look at the Bitcoin blockchain, we see that the transactions within a block don’t have individual timestamp.

How You Think a Transaction Should Look:

Timestamp / Input Value / Output Value

How You Think a Transaction Actually Looks:

Index / Input Value / Output Value

Instead, transactions are numbered with an index zero through ~10,000. More important than an exact time and date is transaction order. Transactions that occur within a small time window are grouped together and the timestamp is applied to the whole block instead of each transaction. But why?

It takes time for data to travel from a server in one part of the world, to a server in another part. In the Bitcoin network, these servers are called nodes. Nodes are independently run by bitcoin users all over the world. Every node validates each transaction independently, and each transaction must travel to every node in the network. This ability gives the blockchain its distributed quality.

A Bitcoin full node is a server that: propagates transactions in the network.

Every bitcoin transaction originates at one of the Bitcoin nodes in the network. If you’re using a mobile wallet you’re trusting the node they’re connecting you to. Or you can run your own, and use your full node as a wallet.

If a few people around the world make transactions at exactly the same time, nodes closer together see transactions originating from their local area before they see transactions that occurred at the opposite end of the world. This is generally true because it takes longer to travel farther distances, on intercontinental communications or via undersea cables. Transactions cannot be received by all nodes in the network at exactly the same time.

Each node eventually receives and validates a full record of each transaction, but each node does it at slightly different times. In a decentralized network we can’t reliably know the real world time each transaction occurred.

If A, B, and C on the map are nodes, and each node independently broadcasts a transaction at the same time, C and B will see the transactions from each other sooner than they’ll see the transaction from A. If transactions each had their own timestamp, B and C would order their transactions as having occurred before the transaction originating from A, because they’re closer together. You can see the problem with this.

In a decentralized network, data that is sent and received locally appears to have happened “first”. I could get into a rant about how Einsteins theory of relativity first made sense to me after I finally understood this about Bitcoin but I’ll spare you.

Instead here’s a breakdown of the apparent transaction order from the perspective of each node from the map:

Node A Node B Node C
Transaction 1 A → B B → A B → A
Transaction 2 B → A A → B A → B

We can’t know the exact order of transactions on the blockchain in real time because there is no exact order of transactions until the block of them has been confirmed by consensus (proof-of-work and the miners).

Because of network latency—transactions can never be processed by everyone in the network at exactly the same time. Decentralized ledgers require that transactions be grouped together in “blocks”. So the timestamp can be applied to transactions that occurred within the same general time frame rather than to each transaction individually.

Instead of seeing arbitrary blocks of transactions on the blockchain, now we can see how the blocks on the ledger are used to keep transaction order and time.

Bitcoin as a Timechain

The terms “blockchain” and “timechain” were never used in the Bitcoin whitepaper, although Satoshi does describe the blockchain as a timeserver that chains together timestamped transactions. But the term “timechain” is mentioned exactly once as a comment, in the original Bitcoin source code.

The idea of the timechain does not conjure up as clear a visual as a blockchain, but it does serve to highlight the more specific function of the Bitcoin system.

Why Bitcoin Needs an Internal Source of Time

1) New bitcoins need to be issued in a reasonably consistent time schedule.

2) Merchants need some guarantee that payments are valid within a time window.

3) And transactions need to be processed over time.

In order to do this trustlessly, without relying on a outside source of time, Bitcoin needs an internal source of time.

Creating a Decentralized Clock

The blockchains clock keeps time with blocks generated in a control loop in proof-of-work, by dynamically adjusting the difficulty set on mining.

Hashrate Creates the Control Loop:

The network hashrate is the total CPU power of all the miners in the network. The difficulty affects how much power is needed to find a solution to the block hash. The block time is average time it takes to find each block.

  • When the hashrate increases, the difficulty increases to slow down average block time.
  • When the hashrate decreases, the difficulty decreases to speed up average block time.

All three of these variables are dynamic. The total hashrate adjusts as miners enter or fall off the network. Based on that total hashrate the difficulty is adjusted by the nodes to hit the ten minute block time target.

When a new block is found, it’s time-stamped by the miner who found it. Each node calculates a network time from the average of the previous eleven blocks, rejecting any outdated block timestamped as older than network time, or more than two hours beyond the current network time. This averaging creates a self-enforcing upper and lower bound of acceptable timestamps for the validation of new blocks.

Each node independently calculates and resets the proof-of-work difficulty every 2,016 blocks, or about every two weeks. A security cap controls how far the difficulty can move in either direction.

  • If the difficulty sinks too low, blocks are found faster and the difficulty is readjusted within two weeks.
  • If the difficulty rises too high, blocks are on average found slower and the difficulty takes slightly longer to readjust.

Its this control loop that creates a decentralized clock. Right now, most Bitcoin node clocks are fairly accurate, but keeping time via blocks doesn’t necessarily reflect real-world time—because the system doesn’t require that the time be perfectly accurate. Only that blocks are set in a canonical order for Bitcoin transactions.

Bitcoins’ proof-of-work only provides a time relative to the previous blocks in its own chain that does not correspond to any real-world chronology of when the transactions occurred. The control loop protects against hyper inflation, it ensures coins are released on a reliable schedule, and that transactions are processed in roughly ten-minute blocks. The result is that blocks generated by proof-of-work create an internal source of time, a trustless timestamp server, with the blocks serving as the “tick” of a vast, decentralized clock.

If you learned something from this post, this is the first in a week long series about Bitcoin. Subscribe to follow along.

How to Use a Ledger Bitcoin Hardware Wallet

This is the minimum you really need to know before using the Ledger.

You have a Ledger hardware wallet that stores your bitcoins, a pin to access it, and a 12-24 word recovery seed to recover it. In the case that you lose access to the Ledger or forget the pin, no problem, you’ve stored your recovery seed.

If we sharpen our vision just a bit we can get a higher resolution view of what’s going on inside the hardware wallet, and maybe even understand how a series of words can work as a recovery device for digital money.

Continue Reading →

Power vs. Force by David R. Hawkins

Power serves others, whereas force is self-serving.

True statesmen serve the people; politicians exploit people to serve their own ambitions. Statesmen sacrifice themselves to serve others; politicians sacrifice others to serve themselves.

David HawkinsPower vs. Force

Power is the ability to act.

We all recognize politics as a fight for power, but power over what exactly?

Power to create and define reality.

Continue Reading →

Generating Private Keys with Bitcoin Dice

I 3D printed some hexadecimal dice so I could play around with rolling my own bitcoin private keys. With one 16-sided dice, labeled 0-9 and A-F, rolled 64 times you get some version of:


A bitcoin private key.

Put it through a series of hashes here and you get:


A private key WIF compressed

A few more hashes here and you get:


A segwit public address

The idea is that you can use physical dice to see how much entropy goes into generating a private key. Rolling your own private keys is for fun, not for serious storage of bitcoins. That being said it is a lot of fun, and I’ll make some metal ones available soon.

If you want to go deeper into the concepts of entropy and probabilistic security keep reading. If not I would run away now.

Continue Reading →