2

I have been experimenting with the substrate-relay application and successfully bridged Millau to Rialto following the standard example. Now, I am trying to bridge the substrate-template-node to Rialto.

My approach has been to substitute the Millau node with a substrate-template-node. Unfortunately, this has resulted in an issue.

When I try to establish this bridge, the relay fails to connect to the substrate-template-node and provides the following error message:

ERROR bridge Failed to connect to Millau node: RpcError(ParseError(Error("invalid length 64, expected a (both 0x-prefixed or not) hex string or byte array containing 64 bytes", line: 0, column: 0))).

I am wondering if it is necessary to implement additional code to enable the relay to connect to the chain I am aiming for? Any advice or insight on how to troubleshoot this issue would be much appreciated.

0

1 Answer 1

2

Millau uses a non-standard 64-bytes hash to demonstrate that the bridge (runtime and offchain relayer) can support chains that are using non-standard primitives. So if you're providing your (substrate-template-node based chain) chain endpoint where relayer expects to find Millau, you'll get this error.

We don't (yet) have a generic relayer that may connect to the chain, read its metadata and start relaying headers/messages. That's something we've planned for the future (and obviously this "generic" mechanism will never work with Millau-like chains, because metadata would never contain a code to compute some hash). Right now to add a relayer support for a new chain, you should:

  • define its basic (runtime-level) primitives (hash, block number, header, ...). Example: bp-rialto;
  • define its relayer-level primitives, used to sign transactions. Example: relay-rialto-client;
  • manually add support for your new chain to the relayer itself. Relayer has many subcommands, so you should decide what's to support. Example: init-bridge subcommand.

A more detailed example, which adds support for bridge between Kusama Bridge Hub and Polkadot Bridge Hub: https://github.com/paritytech/parity-bridges-common/pull/1982

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.