2

I want to fetch information from some source via HTTP. I want to use the off-chain worker to do that after confirmation of transaction with details of the request. Then the response is received, I want to send an unsigned transaction with the result of the response and store that information on the blockchain level. It is similar to oracle flow. But in the future, I also want to do heavy computation work after getting the response.

My questions:

  • Is that possible to run that HTTP request from the parachain's validators nodes?
  • If yes, how can I verify that the unsigned transaction was sent by parachain's validator?

I see how I can implement that from the collator perspective. A can have a whitelist of collators who can post the response, and they can run that off-chain worker. But maybe it is possible to do from parachain's validators=)

1 Answer 1

4

By "parachain's validator" do you mean the relay chain validator allocated to the parachain? If that's the case, the answer is no. Relay chain validators only run the block validation and cannot be used for off-chain computation. This is necessary to prevent abuse of Polkadot validators. However, you can still verify some execution is being made by the collator in the block validation stage, as long as your off-chain submission is signed by the collator's session key.

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.