How different hyperchains with custom settings work together without causing issues

Since hyperchains let enterprises customize their chain params, how do they maintain network stability when multiple hyperchains with different configs interact? Like if one chain is optimized for speed and another for privacy, what prevents performance issues?

4 Likes

Great question!

Each hyperchain is a totally independent blockchain from all other hyperchains. The only interaction a hyperchain has with another blockchain is with its “pinning chain.”

How hyperchains and pinning chains interact

A hyperchain uses the pinning chain for 2 purposes:

  • As a source of entropy. The hyperchain uses a hash of the latest block of the pinning chain (or parent chain) as a random number generator. The random number is necessary so that the randomness of the leader election cannot be predicted.

  • For security, i.e., to “pin” a hash of the hyperchain state. This prevents a bad actor from taking over the hyperchain and changing previous blocks as the hash for the new malicious chain would not be the same as the real hashes pinned on the pinning chain. A bad actor would therefore have to compromise both the PoS hyperchain AND the PoW pinning chain in order to compromise any blocks before the last pinned hash.

Note: the pinning chain does not know the hyperchain exists. It simply functions as per normal and the pinning transactions from the hyperchain are posted as normal transactions. Likewise, the æternity blockchain or Bitcoin network will not know that one of its blocks is being hashed and used for something on a hyperchain.

Geeking out on entropy

Leader elections determine which validator will produce a block during a certain epoch. At any given moment, there are 5 election cycles happening in parallel each consisting of 5 epochs.

The hyperchain uses the hash of a block on the pinning chain at a predefined height, for example, block 100. Then the hyperchain waits until that block + N (configurable variable) where N equals the number of blocks that is the longest fork one would expect on the parent chain. For using Aeternity as the pinning chain we have a default of N = 5 blocks.

If a bad actor could predict the leader selections, they could determine how much to stake in order to be first or last or any other position in the cycle and use that knowledge to produce blocks with fraudulent transactions or disrupt the network somehow with bad or missing blocks in order to manipulate rewards and penalties.

To prevent these kinds of exploits, staking is done during epoch 1 of the staking cycle when there is no way of knowing what that entropy hash will be. Then epoch 2 and 3 are spent ensuring that the pinning chain has reached block 100 + N before epoch 4 in the cycle starts. Leader elections take place during epoch 4 according to the staking amounts from epoch 1 and selected using a weighted random algorithm using the entropy from the parent chain block 100. Validators are rewarded (or penalized!) at epoch 5 after it can be determined that block producers behaved well.

Interactions with other chains

Since one’s hyperchain is an independent blockchain from other hyperchains and other chains (other than its pinning chain), one will need to integrate connections with other chains. Hyperchains are 100% compatible with æternity. So they use the same smart contracting language, virtual machine, etc.

In the coming weeks and months, support for hyperchains will come to other parts of the æternity ecosystem so that your hyperchain can communicate with services on the æternity chain such as the EVM bridge and DEX. The æternity network will always serve as a common platform where hyperchains can easily interact with each other in a stable and compatible environment. Anything that works on æternity can also be implemented on your hyperchain as well, so all hyperchains users will be able to benefit from new features and partnerships developed in the future.

2 Likes

As with the current Uniswap, where all trades involve tokens and transaction data is recorded and settled on Ethereum, I can’t quite imagine how a Hyperchain, being an independent blockchain, could facilitate trading on Aeternity’s DEX. Could it be that Hyperchains can optionally configure cross-chain bridges to connect to Aeternity? Then, Aeternity would handle the ledger recording and enable trading of assets from Hyperchains on the DEX, possibly through generating wrapped tokens or other mechanisms?

2 Likes

You nailed it. Cross-chain bridges and wrapped assets would make it possible for hyperchains to move value from one hyperchain to another. Using æternity as the common chain would avoid a situation where there is an exponentially large number of wrapped assets unique to each chain.

Some future updates to the core protocol will also make it easier to embed interoperability features beteween æternity and hyperchains. That’s still a bit out in the future, but part of the medium-term plan.

Of course, this is what we have in mind now. I think we will also see some innovation on this front as people use hyperchains and identify new needs and opportunities. That’s why we are releasing this early so that users can begin experimenting and discovering what new tools can be developed to make the most of hyperchains.

3 Likes

什么时候上线呢?月底到月初现在又到什么时候