1

We need to verify p256 signatures inside our parachain and after implementation we noticed that it's really slow inside WASM. It appears that one way to speed up this operation is to define a custom hosted function that would run it in native and we might be able to call it from inside runtime.

If we decided to go this route we know that we would need to upgrade all the nodes that are running our parachain to support that hosted function before updating the runtime that uses it.

My question is the following: To be compatible with Polkadot relay-chain (meaning relay chain being able to verify a block created by our para-chain) does all the relay-chain nodes also need to support that hosted function or upgrading all the nodes for our parachain is enough?

I'll appreciate any insights.

Thanks

1 Answer 1

1

If we decided to go this route we know that we would need to upgrade all the nodes that are running our parachain to support that hosted function before updating the runtime that uses it.

This is exactly correct, you'd have to update all nodes first. If you are a stand-alone chain, that is all you need to do. If you are a parachain, the Polkadot RC needs to support the host function, alongside your collator nodes.

My question is the following: To be compatible with Polkadot relay-chain (meaning relay chain being able to verify a block created by our para-chain) does all the relay-chain nodes also need to support that hosted function or upgrading all the nodes for our parachain is enough?

Unfortunately, there is no clear process now for Polkadot RC to add new custom host functions for specific parachains. You could imagine why: Once this host function is added, it is a slippery slope of any parachain requesting to add more and more host functions to the RC, only for their specific need.

That being said, there is nothing in the Polkadot community or specification preventing this either. I suggest opening an issue in https://github.com/polkadot-fellows/runtimes and seeing what the reaction is.

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.