1

I want to check if a given extrinsic is executed successfully or not from a light client inside the enclave (aka Intel SGX). I am importing new blocks, iterating over the extrinsics I am interested in, and taking actions based on that.

Extrinsics that fail are also included in that list, so what's the Substrate's equivalent of receipts in Ethereum?

Specifically, how to verify the events at a different point in time as we do in Ethereum

2
  • Can you clarify for the unfamiliar what receipts area link to more info?
    – Nuke
    Commented Apr 19, 2022 at 5:01
  • Looks like you already did :)
    – Gautham J
    Commented Apr 19, 2022 at 5:34

1 Answer 1

3

Practically speaking, events are what you are looking for. It is up to the pallet implementation to define and emit these in a way that is useful for end consumers, like for use case.

If there is information missing in events that you're needing from a pallet, best to raise an issue to get specific about requirements to get those events baked in.

6
  • I know about Events, but my question is how we can verify an event's existence when we import a block at a later point in time since Substrate removes Events from storage the next block. In Ethereum, the receipts are also stored and can be retrieved to verify the status of a txn present inside a given block.
    – Gautham J
    Commented Apr 19, 2022 at 5:32
  • 1
    There are trie_root and extrinsic_root in substrate header but no receipt_root which used as proof of event or logs as you mentioned. But we you can extend digest_item in header to add some proof which can be verified later
    – Ron
    Commented Apr 19, 2022 at 11:10
  • Are there any examples or references to this approach?
    – Gautham J
    Commented Apr 19, 2022 at 12:05
  • How can you store this: an indexer like substrate archive is typically used.
    – Nuke
    Commented Apr 19, 2022 at 14:19
  • See also substrate.stackexchange.com/questions/35/…
    – Nuke
    Commented Apr 19, 2022 at 14:19

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.