Bitcoin and IPv6 – CoinGeek

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 on it. Although the video is worth watching for the many insights within, there are a couple of big points that I think are worth writing about.

You have no internet address, only someone else’s intranet address

Unless you are a business or an ISP, you don’t actually have an internet address. Not publicly anyway. Even companies that own public addresses keep them stored for the public side of their web servers, while computers inside the company make do with private intranet addresses. Well, most people don’t think much about it, but chances are you don’t have a public address either, instead you’re 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 other people’s public IP.

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

We already know that with IPv6 the address space is no longer a limiting 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 its use of multicast and anycast addresses. Multicast is a group address which is essentially an address that can route packets to more than one host, while an anycast address is an address shared by several different hosts. They can be thought of as the opposite, with multicast fan out or help messages get out to many recipientsand anycast being fan inso that many senders can reach the same group of recipients.

What is so important about these address types with respect to Bitcoin? Well, first of all, the operation of the network in Bitcoin was almost built specifically with IPv6 in mind, as spreading blocks through the network is a textbook use of multicast, as once a block is found, it is in the finning nodes’ best interest to publish the block to as many other block producers as possible. Every second wasted translates into potential lost profit. With public multicast addresses, block producers can all subscribe to the same group, and newly discovered blocks can be instantly propagated to all core nodes in the network. Large non-producing nodes (such as those operated by exchanges or companies) can then obtain the blocks after the primary node multicast group forwards them to the “level 2” groups, which in turn can forward them to further groups downstream. General categories of multicast broadcast groups on Bitcoin can be categorized in 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 for notification of blocks, they will fall into one of the above categories. This can be easily achieved by the possibility of multicast addresses that can be entered into a legacy work.

What about anycast? Well, anycast addresses allow a group of interfaces on different hosts to have the same address. Traffic routed to it will automatically reach the nearest host with the anycast address, as determined by the routing protocols in use. As multicast, this is handled by the routers that support IPv6 and happens at the network layer. Anycast addresses are perfect for publishing Bitcoin transactions. When any wallet software wants 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, fantastic foresight, or just plain good design, but using these address types on a Bitcoin network fully deployed on IPv6 could mean that each host is at most only four hops away from each other!

Sender->L1_Node->L1_Node->L2_Node->Recipient

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

For applications that do not 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 people have a mental model of the network resembling a sparse fabric or mesh of nodes, where transactions are relayed from relay node to node, before finally 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, since all those hops are at the network layer of IPv6, with the routers doing the relaying . When an app wants to generate a transaction, it sends it to an anycast address shared by many block producers (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 (third hop). Finally, the packet is received by the client from the multicast group to the L2 nodes, to which the receiver subscribes (4th hop). To the receiver, who subscribes to the multicast group, it appears that 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 chosen randomly from a field of 21122 addresses. It is much. It’s enough that they can’t be brute-forced just because it would take too long to search the address range. However, because multicast groups are accessible to everyone, they are open, while subscribers retain their privacy. Privacy advocates will like 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 across the internet, it would be impossible to censor your access to the Bitcoin network.

Wright then goes on to talk about possible blockchain applications that could be built using such a network topology: Distributed file storage, cars that can only be unlocked and driven while within a certain geographic area, cellphone-related records that can provably show that you were not in a specific area, without revealing where you actually was3, among many others. One thing is for sure, with the power of Bitcoin SV and IPv6, the future really looks set to be a Brave New World. Let’s make sure we do it well.

Jerry Chan
WallStreet technologist

[1] Currently, using IPv4, blocks and transactions are sent to generally eight other peers in the Bitcoin network, who then forward the data to eight more…etc. It’s more of a relay “gossip” network.
[2] More or less – there are some fields reserved for known addresses.
[3] This would be great for law enforcement, while protecting privacy.

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

width=”562″ height=”315″ frameborder=”0″ allowfullscreen=”allowfullscreen”>

New to Bitcoin? Check out CoinGeeks Bitcoin for beginners section, the ultimate resource guide for learning more about Bitcoin – originally envisioned by Satoshi Nakamoto – and blockchain.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *