convex
convex copied to clipboard
Result reporting for scheduled operations
Scheduled transactions / operations should have some form of result reporting. A scheduled transaction technically produces a result like a regular transaction at a later timestamp.
Technical notes / considerations:
- Unlikely to be an immediate report to client, since may occur at a much later time
- Peers may offer a service to allow clients to query scheduled results
- Possible to log the fact of event scheduling against current transaction (this could include time and sequential position)
Looking at the problem differently, reporting the result does not matter. If the transaction can run to completion, users can decide how and where to store any meaningful result.
Hypotheses:
- What matters is knowing that the transaction failed
- Exceptions are not CVM types and should probably never be ; hence they cannot be reported on-chain
- Maybe reporting a simple boolean is enough (
truein case of success) - Then scheduling could imply: providing a correlation id + prepaying the storage of a boolean for that correlation id ; maybe in the user's holdings or something similar
Good ideas. I think that in general result reporting should be off-chain (responsibility of peer or anyone else who wants to validate at a later time). This consistent with transactions and in general I think it would be good if scheduled transactions are reported in pretty much the same way as regular transactions (result value and/or error code). Presence of an error code gives the boolean "did it fail?" semantics.