IPv6 Internet Protocol on server room background.

Bitcoin and IPv6

In the recently released Part 1 of The Bitcoin Masterclasses by Craig Wright, he discusses the possibilities of Bitcoin IPv6 and the potential revolutionary applications that can be built upon it. While the video is worth watching for many insights within, there are a couple of big points I believe are worth writing about.

You don’t have an internet address, just somebody else’s intranet address

Unless you are a business or an ISP, you actually don’t have an internet address. Not a public one, anyway. Even companies that own public addresses keep them saved for the public-facing side of their web servers, while computers inside the company make do with private intranet addresses. Well, most people don’t give it much thought, but chances are, you don’t have a public address either, instead borrowing an internal address from your ISP. This is because IPv4 addresses ran out in 2012, and as a result, everyone uses NAT or network address translation to more or less get by with someone else’s public IP.

But this has had a large effect on how the internet has developed. Gone are the days when everyone could run their own NNTP, gopher, or IRC service. Without a public address, you cannot run any persistent service with which people can initiate communication, and are restricted only to outbound connections.

We already know that with IPv6, the address space is no longer a constraining factor. In fact, there are enough addresses to give every grain of sand on earth its own IP address. But the more significant feature of IPv6 is the use of multicast and anycast addresses. Multicast is a group address that essentially is an address that can route packets to more than one host, while an anycast address is one that multiple different hosts are sharing. They can be thought of as opposite, with multicast being fan-out or helping messages get out to many recipients, and anycast being fan-in, allowing many senders to get to the same group of recipients.

What is so significant about these address types with respect to Bitcoin? Well, first off, the operation of the network in Bitcoin was almost built specifically with IPv6 in mind, as the dissemination of blocks through the network is a textbook use case for multicast, as once a block is found, it is in the finding nodes’ best interest to publish the block out to as many other block producers as possible. Every second that is wasted translates into potential lost profits. With public multicast addresses, block producers can all subscribe to the same group, and newly found blocks can be immediately propagated to all core nodes of the network. Large non-producing nodes (such as those run by exchanges or businesses) could then get the blocks after the primary node multicast group forwards them onto the ‘level 2’ groups, which then, in turn, could forward them onto further groups downstream. General categories of multicast broadcast groups on Bitcoin could be categorized into the amount of delay that the user is sensitive to:

§ Level 1 – Block Producers ~1-4s
§ Level 2 – Exchanges, businesses ~10-60s
§ Level 3 – Wallets, end-users ~10min

Depending on the time sensitivity of the host to notification of blocks, they would fall into one of the above categories. This can be easily achieved by the ability for multicast addresses to be layered into a heirarchy.

What about anycast? Well, anycast addresses allow for a group of interfaces on different hosts to have the same address. Traffic directed to it will automatically reach the closest host with the anycast address, as determined by the routing protocols in use. Like multicast, this is handled by the routers which support IPv6 and happens at the network layer. Anycast addresses are perfect for Bitcoin transaction publishing. When any wallet software wishes to publish a transaction to the nodes, they can use well-known anycast addresses of a block producer, which will automatically go to the host closest to the sender on the network.

Call it provenance, amazing foresight, or just plain good design, but using these address types on a Bitcoin network fully deployed on IPv6 could mean that every host is, at most, only four hops away from every other!


And this is only for transactions that require an entry to be written on the blockchain.

For applications that don’t involve the blockchain, everyone can communicate directly with each other in a true IP2IP fashion.

This is a big departure from what most people think of when they think of the Bitcoin network. Most have a mental model with the network resembling a sparse fabric or mesh of nodes, where transactions are relayed from relay node to node, before eventually finding their way to a block-producing node. Similarly, the same number of hops would be required for a block to propagate back.

But in the future, with IPv6, every host on the Bitcoin network is only four hops away from any other host, and importantly, the Bitcoin software wouldn’t even need to relay, as all these hops are on the network layer of IPv6, with the routers doing the relaying. When an app wants to generate a transaction, they send it to an anycast address that many block producers share (1st hop). This transaction is then competitively mined into the next block, which is immediately sent in 1 IP packet out to the L1 multicast group of other block producers (2nd hop). The packet is then forwarded to the multicast group of L2 nodes (3rd hop). Finally, the pack is received by the client from the multicast group of the L2 nodes, which the recipient subscribes to (4th hop). To the recipient, who subscribes to the multicast group, it looks like the block was sent to them directly from the block producer, having traveled only over IP routers, and not having to bounce off other Bitcoin nodes1.

Multicast groups also provide a strong level of privacy. Group addresses can be randomly selected from a field of 21122 addresses. That’s a lot. That’s enough that they can’t be brute forced simply because it would take too long to search the address space. But because multicast groups are joinable by anyone, they are open, while the subscribers keep their privacy. Privacy proponents will be glad to know that because multicast groups are managed by routers (the network layer), unless an attacker is willing to hack and take over most of the BGP backbone routers on the whole internet, it would be impossible to censor your access to the Bitcoin network.

Wright then goes on to speak about possible blockchain applications that could be built using such a network topology: Distributed file storage, cars that can be unlocked and driven only while within a certain geographical area, mobile phone linked registries able to provably show that you were not in a certain area, without revealing where you actually were3, among many others. One thing is for sure, with the power of Bitcoin SV and IPv6, the future is really looking to be a Brave New World. Let’s make sure we make it a good one.

Jerry Chan

[1] Currently, with IPv4 blocks and transactions are sent to generally eight other peers in the Bitcoin network, who then relay the data to eight more…etc. It is more of a relay ‘gossip’ network.
[2] More or less—there are some fields that are reserved for well-known addresses.
[3] This would be big for law enforcement while at the same time preserving privacy.

Watch: Bitcoin Masterclass 2 with Craig Wright on Multicast & IP2IP

YouTube video

New to blockchain? Check out CoinGeek’s Blockchain for Beginners section, the ultimate resource guide to learn more about blockchain technology.