1

I was playing around Substrate and I was wondering whether it is possible to integrate a 3rd party consensus library which I have compiled to WASM (Web Assembly) as a Pallet in substrate. I know it is possible to integrate smart contracts already compiled to WASM binaries into substrate runtime. My question was whether it is possible to integrate a different consensus pallet already compiled to WASM and how such an integration would interface with the Node (substrate node) RPC methods. Thanks in advance.

  • I think that would be difficult. You would need to merge that WASM with the rest of the runtime. Also consensus is one of the things that has parts both in the runtime as well as the node. So you would also need the corresponding parts in the node. – apopiak Jun 07 '21 at 09:44
  • Hello @apopiak can you please elaborate on how two parts of consensus (in node and in runtime) work? What are zones of responsibility for each of them? For example here is the information that AURA, GRANDPA are part of runtime (pallets) https://substrate.dev/docs/en/knowledgebase/runtime/frame And here https://substrate.dev/docs/en/knowledgebase/advanced/consensus it is said that "The simplest static consensus algorithms work entirely outside of the runtime" How to reconcile this information? – Ivan Oct 01 '21 at 10:47

0 Answers0