indexer icon indicating copy to clipboard operation
indexer copied to clipboard

Consider rewards denial when closing allocations

Open fordN opened this issue 1 year ago • 0 comments

Background

Currently the indexer-agent does not consider whether a subgraph deployment has been denied rewards when closing an allocation. The agent does consider the deniedAt field when evaluating when a deployment is worth allocating towards, but does not consider it when closing. In most cases this behavior works well, but the subgraph availability oracle is not perfect and sometimes it denies rewards incorrectly. In those cases the indexer-agent should hold off on closing the allocation until the rewards are no longer denied.

Solution

Let's discuss what we think is the desired behavior. I'll present a few proposals to kick off discussion.

  1. Use requireSupported to decide whether to auto close or not; require manual intervention to close denied subgraphs with requireSupported = true. In the case of requireSupported = true and deniedAt is not null, the agent will log a warning and not add anything to the queue. In order to close the allocation the indexer will need to either: update requireSupported to false on the matching indexing rule, or manually queue an execute the action.

  2. Always add the action to the queue (instead of just logging in some cases like above), and use the requireSupported value and the allocation management mode value to decide how it gets added to the actions queue. These unallocate actions in the queue should be clearly marked in some way so indexer can see that they will not collect rewards if executed.

    requireSupported allocationManagement agent action
    true auto Add unallocate action to the queue with status = queued, clearly label action as not receiving indexing rewards
    true oversight Add unallocate action to the queue with status = queued, clearly label action as not receiving indexing rewards
    true manual Do not add action to the queue
    false auto Add unallocate action to the queue with status = approved
    false oversight Add unallocate action to the queue with status = queued
    false manual Do not add action to the queue

fordN avatar Feb 13 '24 19:02 fordN