fix: distinguish explicit vs implicit delegation permission revocation for Intents#2661
Conversation
| /// Block number when the permission was/will be EFFECTIVELY revoked, taking into consideration the overall provider delegation revocation. | ||
| pub revoked_at: BlockNumber, | ||
| /// Block number the permission was/will be explicitly revoked (i.e., not implicitly revoked by a top-level revocation) (0 = not revoked) | ||
| pub explicit_revoked_at: BlockNumber, |
There was a problem hiding this comment.
Opted to add new explicit_revoked_at instead of effective_revoked_at, because revoked_at in this context has historically ALWAYS meant the effective revocation block.
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
shannonwells
left a comment
There was a problem hiding this comment.
Looks good, ship it!
aramikm
left a comment
There was a problem hiding this comment.
Approving, added a few comment just to make sure.
…ot just the list of delegated schemas
shannonwells
left a comment
There was a problem hiding this comment.
Approving, though reading through the tests to understand what you did, is making me rethink creating a bunch of setup at the very top of a long test file since I completely lose context in a diff, especially for a test file I'm unfamiliar with. Anyway, not for this PR, but food for thought.
Description
This PR does the following:
revoked_atblock number to the overallDelegationResponse, indicating the revocation of the overall Provider relationship, rather than individual Intent(s)explicit_revoked_atblock number toDelegationResponsefor each delegated Intent; the existingrevoked_atmaintains its original meaning of the earlier of the Intent or overall Delegation revocation block.get_granted_intents_by_msa_idtoget_delegation_for_msa_and_provider, to provide a stable method for obtaining an entire delegation rather than just the list of delegated intents. Previously getting the entire delegation would have required a direct storage query, or retrieving ALL delegations. As this was a recently-added API method, the only downstream effect is internal, as it had not been deployed yet.Goal
Closes #2660
Checklist