Supposing I have a transaction (A) = a call (B) + other storage operations (C). Executing A, beeing a transaction, I have to pay the gasUsed by B and C. Beeing B an expensive call and since I need the result of B to verify if is possible to exectue C, is there a way to split A in B and C (call + transaction) with the result of B automatically triggering the execution of C?

  • Currently the only option to not pay for B execution is to compute B off-chain. You can send a proof of B execution to C, then C validates the proof an executes the requested operation. – Ismael Jul 14 '18 at 22:33
  • Is there any tutorial for this? – Stefano Angieri Jul 16 '18 at 9:11
  • Sorry, I don't know of a tutorial for that task. Depending on B you can try using state channels for off-chain verification. There are more complex protocols like truebit. – Ismael Jul 16 '18 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.