THE BLOCKCHAIN ROUTER: ARCHITECTURE FOR A DECENTRALIZED INTERNET

The Blocknet unveils its “blockchain router,” a fundamental component for the inter-blockchain era and the future of decentralized internet services. (Watch the live reveal and a short demo further down the page.)

New York, 16 May — The Blocknet has made public a component with far-reaching implications for the blockchain industry: XRouter, an inter-blockchain SPV client (or “light wallet”) backend, enabling the verification of blockchain records from theoretically any blockchain without requiring users to download the blockchain in question. This empowers lightweight dapps to harness contracts and protocols from other blockchains, laying a foundation-stone for the decentralization of the API ecosystem.

As the inter-blockchain era emerges, dapps, smart contracts, and protocols will increasingly consume services on other blockchains. A dapp for decentralized file storage, for example, would perhaps involve three services: payment in multiple coins, the authentication of its users without resorting to any central solution for managing personal information, and the storage of encrypted fragments of files across a peer-to-peer network. If this dapp were to be built the way mobile apps or websites are built today, development would essentially be a simple matter of coding the business logic to orchestrate pre-existing APIs for the above three services, making development fast and cheap. Yet, at present, dapps are coded from scratch, adding vastly to cost and time of development, and significantly increasing the risk of security issues. The Blocknet enables the technologies on any blockchain to become available via decentralized APIs, creating a paradigm shift from monolithic architecture development to microservice architectures.

XRouter plays a critical role in enabling the secure consumption of this new generation of digital services — that of enabling consumers to verify the truthfulness of the data provided to them independently of the claims of the service provider. On a public peer-to-peer network, this is essential, since no peer may safely be assumed to act honestly. Furthermore, such proofs preserve the “trustless” property of crypto, from which much of its disruptive power is derived: after all, if you can safely do business with a counterparty regardless of their intentions, then radical new business opportunities arise. Thus XRouter, together with the Blocknet’s core services, are infrastructure for a “token ecosystem” poised to revolutionize dapp development in the manner that the API ecosystem did for websites and apps.

Verify records on any blockchain

With XRouter, it is now possible to verify blockchain records on theoretically any blockchain without downloading even a single chain. Blockchains tend to be large: Bitcoin’s, for example, is well over 100GB in size, and few users have the capacity to download and maintain a blockchain on their PC’s, let alone on mobile devices. However, Satoshi Nakomoto, in the original Bitcoin whitepaper, describes “simplified payment verification,” or “SPV,” by which a dapp may ascertain the truth of a record on a blockchain using only the transaction of interest, a merkle branch, and the block headers (~1/500th of the size of a blockchain). The result is wallets that can be mobile-friendly, fast to set up, and vastly reduce the burden upon users of maintaining an entire blockchain.

Yet an SPV wallet on its own would not enable the inter-chain verification of blockchain records. What is required in addition is an inter-chain peer-to-peer network for nodes on different blockchains to communicate, and a community of users running nodes on very many blockchains in order to achieve workable liveness. The Blocknet has both: XBridge (its inter-chain network overlay) and its Service Nodes are the required infrastructure to support SPV proofs for an arbitrary number of blockchains. The latter is achieved via Service Nodes’ “XWallets” feature, which enables the passing of blockchain data from its native P2P network to XBridge, while informing the Blocknet network of which chains’ data a given Service Node can provide.

Dapps running XRouter: a trader on a decentralized exchange, and a user of a “light” multiwallet, use XRouter to route requests to Service Nodes running full nodes on the blockchains of interest.

Build upon the API

XRouter is inter-chain infrastructure. As such, it is available via API, enabling developers to harness its power to build next-generation dapps. Being decentralized, there are no servers to be trusted; instead should be integrated into a dapp and invoked over localhost.

For the initial release, the following API calls will be supported:

Atomic operations

getblockcount

getblockhash <number>

getblock <hash>

gettransaction <hash>

sendtransaction <tr> (should be signed on client side)

Composite operations

getallblocks <number>

→ returns all blocks starting from a given index.

→ for i in [number, getblockcount], returns getblock(getblockhash(i))

→ as an initial rate-limiting measure, holding 500 BLOCK is required. This may be replaced in due course by use of the decentralized exchange to swap data for a BLOCK micropayment.

getalltransactions <address> <number>

→ returns all transactions involving a given address found in blocks starting from <number> (<number> can be null) for a block in getallblocks(number)

getbalance <address>

→ calls getalltransactions for the same parameters and adds up the amounts

updatebalance <address> <number>

→ calls getalltransactions for the same parameters and adds up the amounts. This will amount to the change of balance since block <number>

Upcoming operations

xrGetTransactionsBloomFilter <chain> <number> <accounts>

xrGetTransactionsBloomFilter <chain> <number> <filter>

→ returns all transactions fitting the given bloom filter or the bloom filter generated from the given addresses, starting from block <number>

xrGetPaymentAddress

→ auxiliary call to get the address to pay a service node. With this it will be possible to monetize resource-intensive calls, if necessary.

Developers wanted

XRouter and the rest of the Blocknet’s technology stack is in continuous development, and the project has a high demand for talented developers. Other methods of blockchain-free proof remain to be implemented, components are yet to mature and be abstracted optimally, several new blockchains’ APIs remain to be integrated too, and many novel features are in the pipeline. Developers are invited to contact the blocknet and to contribute to its open source repositories.

Watch the live reveal from the Blocknet team at Consensus 2018 and a short demo below!

Live reveal
Demo

Find inter-chain services with “blockchain DNS”

XRouter enables a protocol analogous to DNS (the domain name service) for the traditional internet, that is, the efficient routing of data between peers. In itself though, it functions rather like the layer-2 Border Gateway Protocol (BGP), upon which “blockchain DNS” may be built (at layer 4 in the TCP/IP paradigm). In the manner that BGP provides a way of maintaining an up-to-date list of peers to connect to, XRouter provides a list of currently connected blockchains — the protocol for which may usefully be named “Blocknet XRouter Protocol” (BXP) in future internet standards. Yet XRouter employs a decentralized design pattern, replacing a hub-and-spoke model with a peer-to-peer network.

XRouter is intended to open up a marketplace for registry services, that is, repositories of data about inter-chain services and the blockchains upon which they are built. After all, without a form of “blockchain DNS,” a router would lack a source of data to determine where to route a request. As such, XRouter will make provision for the invoking of any number of registry services, which may compete on a cost basis and on the degree of truthfulness of the data they offer. Registry service design is documented in the Blocknet whitepaper, but in brief, what is required is, firstly, a method of committing data to a blockchain in a provably truthful way (that is, in the same way that proof-of-work prevents double-spends of coins, invalid transactions, etc.). Secondly, before data is consumed, its users must be able to prove to themselves that the supplied data is truthful. In fact, these two requirements are common to almost all inter-chain services. As such, XRouter equips dapps with inter-chain SPV proofs, empowering not just registry services but potentially any blockchain service to scale its reach across blockchains. The result will be a new and decentralized API ecosystem with a “trustless” security model and the ability to intrinsically monetize APIs using the tokens native to any blockchain. XRouter may be found on GitHub here, and will be usable initially as part of the Blocknet wallet here.

blocknet.co

— — — —

Website / Protocol Website / Discord / Twitter/ Medium / Telegram / Reddit / Steemit / Newsletter / Facebook / YouTube / Instagram / Minds / BitcoinTalk / Proposal Forum