Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider rewards denial when closing allocations #857

Open
fordN opened this issue Feb 13, 2024 · 0 comments
Open

Consider rewards denial when closing allocations #857

fordN opened this issue Feb 13, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request indexer-agent

Comments

@fordN
Copy link
Contributor

fordN commented Feb 13, 2024

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 fordN self-assigned this Feb 13, 2024
@fordN fordN added enhancement New feature or request indexer-agent labels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request indexer-agent
Projects
None yet
Development

No branches or pull requests

1 participant