I want to know if there is official advice or implementation on the number of channels to create for a relayer between two blockchains (for example custom-blockchain-a and cosmos hub). Is it enough with just one channel? What considerations should we have for creating or deleting channels?
Hey there,
Actually this is a point where there is a very very clear answer. You want a single canonical channel between any two chains.
That is because otherwise if you create additional channels, those tokens have different denominations, and even though say like we have a channel between the cosmos hub and osmosis but then we make a second channel between the cosmos hub and osmosis osmosis will not recognize the tokens from the cosmos hub, as the original denomination.
So the first part of your question has a very clear answer. You want a single and canonical channel, and that is worth working for. You want to create one and bless one and use that one more than any other and in fact you should discourage the creation of others.
Also, in our infrastructure provision work at Notional, we have had the opportunity to advise many parties on the maintenance of IBC channels, and how many relayers per channel. So let’s jump backwards for a second, you want a single chain, and ideally two or three separate relayers on that channel. The reason for this is that none of your relayers are going to be 100% effective.
I’ll just give you an example, as a relay operator. If I had to guess, notional achieves about 99% up time on our channels. I hope that we can put data behind this in the next 6 months, but the data capture task is really quite difficult. Anyhow, during that 1% of the time, what can happen is that transactions actually back up. So keep in mind that an IBC transaction always begins on chain a. To send tokens to chain b, you make a IBC send transaction that happens on chain a. A relayer, which is a separate piece of software typically operated by a few specialized groups in Cosmos but luckily more and more as the ecosystem grows, sees the transaction on chain a, and relays that transaction to chain b. This process actually takes several transactions, which are made by wallets owned by the relay software .
This is a bit complicated so please if you have any additional questions feel free to ask.