Skip to content

Make Alice granting logic more resilient to potential TX failures/delays #2071

@cygnusv

Description

@cygnusv

Due to many factors, a TX may be initially reported as failed, but still be mined eventually. Such factors include gas prices, timeouts, etc.

Currently, our code deals with TX failures, but I'm not sure if it deals with TX that were initially failed, leading to a failure in the parent call, but end up succeeding in the background.
The following is a hypothetical example: Imagine that Alice uses grant(), creates a policy, sends the TX to PolicyManager, and after waiting for some time, we timeout and the call to grant() fails. It's not impossible, however, that the TX does succeed eventually. Is our grant() logic resilient to that? Would it be possible for Alice to recover the situation and resume the operation now that the TX exists? Or is she condemned to live with a zombie policy?

The case of Alice may be the most flagrant, but there are other places to where this can happen.

Related to #2070

Metadata

Metadata

Labels

Alice 👩Effects the "Alice" development areaBug 🐛Broken functionalityProtocolProtocol designUrsula 👩‍🚀Effects the "Ursula" development area

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions