Methods and systems for a heterogeneous multi-chain framework
Present-day blockchain architectures suffer from several problems, including poor extensibility and scalability. This may stem from tying two parts of the consensus architecture, namely canonicality and validity, too closely together. The Polkadot architecture, which is a heterogeneous multi-chain, provides better extensibility and scalability by setting canonicality and validity apart. Compartmentalizing canonicality and validity and keeping overall functionality to a minimum of security and transport introduces practical core extensibility in situ. Scalability is addressed through a divide-and-conquer approach to canonicality and validity, scaling out of its bonded core through the incentivization of untrusted public nodes. The heterogeneity of this architecture enables many highly divergent types of consensus systems interoperating in a trustless, fully decentralized “federation,” allowing open and closed networks to have trust-free access to each other. This architecture is compatible with pre-existing networks, including Ethereum, and a useful component in a practical system for global-commerce scalability and privacy.
1 . A method, comprising:
receiving, at a validator node in a relay chain, a header and a state-transition proof associated with a candidate block from a collator node in a parachain, the parachain being one of a plurality of heterogeneous parachains;
validating, at the validator node, the header and the state-transition proof;
rebroadcasting the candidate block to at least one other validator node in the relay chain in response to validation of the header and the state-transition proof;
broadcasting a statement about validity and availability of the candidate block to the at least one other validator node in the relay chain; and
routing interchain transactions between the parachain and a destination parachain of the plurality of heterogeneous parachains based on a multi-phase routing process, wherein the multi-phase routing process comprises:
routing the interchain transactions along a single axis of a hypercube during each block of the relay chain, a number of dimensions equal to a routing exponent; and
routing the interchain transactions through one or more intermediate parachains of the plurality of heterogeneous parachains to reach the destination parachain,
wherein the multi-phase routing process comprises alternating an axis along which the interchain transactions are routed in a round-robin fashion across successive blocks of the relay chain.
2 . The method of claim 1 , wherein the multi-phase routing process comprises limiting, to a routing base, a number of bins in ingress queues and egress queues of each parachain in the plurality of heterogeneous parachains.
3 . The method of claim 2 , wherein each side of the hypercube has a number of possible locations equal to the routing base.
4 . The method of claim 2 , wherein a message volume of the interchain transactions grows based on the routing base and/or on the routing exponent.
5 . The method of claim 1 , wherein the multi-phase routing process is deterministic based on a current block number of the relay chain.
6 . The method of claim 1 , wherein the multi-phase routing process guarantees a worst-case delivery time of a number of blocks equal to the routing exponent.
7 . The method of claim 1 , wherein during the multi-phase routing process, at least one foreign-bound message in an ingress queue of each intermediate parachain of the one or more intermediate parachains is routed to an egress queue of that intermediate parachain based on a current block number of the relay chain.
8 . The method of claim 1 , wherein each parachain of the plurality of heterogeneous parachains includes an egress-trie-root in a header of a parachain block, the egress-trie-root being a root of a trie containing one or more egress queues.
9 . A decentralized computer network comprising:
computers connected in a peer-to-peer network and comprising respective processors and respective non-volatile memories storing instructions which, when executed by the respective processors, cause the computers to provide:
a plurality of heterogeneous parallelized blockchains (parachains);
a relay blockchain (relay chain) configured to provide security advancement and communication channels for the plurality of heterogeneous parachains;
a collator node in a parachain of the plurality of heterogeneous parachains, the collator node configured to provide a header and a state-transition proof associated with a candidate block; and
a validator node in the relay chain configured to:
receive the header and the state-transition proof from the collator node;
validate the header and the state-transition proof;
rebroadcast the candidate block to at least one other validator node in the relay chain in response to validation of the header and the state-transition proof; and
broadcast a statement about validity and availability of the candidate block to the at least one other validator node in the relay chain,
wherein the decentralized computer network is configured to route interchain transactions between the parachain and a destination parachain of the plurality of heterogeneous parachains based on a multi-phase routing process, wherein the multi- phase routing process comprises:
routing the interchain transactions along a single axis of a hypercube during each block of the relay chain, a number of dimensions equal to a routing exponent; and
routing the interchain transactions through one or more intermediate parachains of the plurality of heterogeneous parachains to reach the destination parachain,
wherein the multi-phase routing process comprises alternating an axis along which the interchain transactions are routed in a round-robin fashion across successive blocks of the relay chain.
10 . The decentralized computer network of claim 9 , wherein the multi-phase routing process comprises limiting, to a routing base, a number of bins in ingress queues and egress queues of each parachain in the plurality of heterogeneous parachains.
11 . The decentralized computer network of claim 10 , wherein each side of the hypercube has a number of possible locations equal to the routing base.
12 . The decentralized computer network of claim 9 , wherein the multi-phase routing process is deterministic based on a current block number of the relay chain.
13 . The decentralized computer network of claim 9 , wherein the multi-phase routing process guarantees a worst-case delivery time of a number of blocks equal to the routing exponent.
14 . The decentralized computer network of claim 9 , wherein each parachain of the plurality of heterogeneous parachains includes an egress-trie-root in a header of a parachain block, the egress-trie-root being a root of a trie containing one or more egress queues.