integritee-network / worker

Integritee off-chain worker and sidechain validateer
Apache License 2.0
90 stars 47 forks source link

Add option for client to choose until when an operation is being watched #207

Open haerdib opened 3 years ago

haerdib commented 3 years ago

A client submitting a trusted operation (top) should be able to choose until which status event (Submitted, InBlock, Finalized..) the top is being watched.

Additionally, only one answer should be returned, not multiple

haerdib commented 2 years ago

Pushing this issue a little in importance, because Ajuna keeps having problem with the current setup, which gives multiple answers for one call (Submitted + InBlock)

Maybe we could consider this issue in the next sprint?

darkfriend77 commented 2 years ago

That would be awesome, the more we can align with the usual RPC the more we can rely on libraries to make the client more resilient.

In the case of a TrustedCall, I suppose a good approach would be to get a an Id (or use the request id) and a call back of the client's method author_extrinsicUpdate (similar to substrate parity) with the updates (Submitted, InBlock, Finalized..).

In the case of a TrustedGetter, there is no need to send anything to watch, only one response I would assume.,