Skip to content

Commit c7dd692

Browse files
MoonBoi9001claudetmigone
authored
feat(actions): add PRESENT_POI and RESIZE action types for Horizon allocations (#1162)
Signed-off-by: Tomás Migone <tomas@edgeandnode.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Tomás Migone <tomas@edgeandnode.com>
1 parent 6490e90 commit c7dd692

30 files changed

Lines changed: 2608 additions & 902 deletions

File tree

README.md

Lines changed: 124 additions & 336 deletions
Large diffs are not rendered by default.

docs/action-queue.md

Lines changed: 0 additions & 262 deletions
This file was deleted.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Allocation Management
2+
3+
There are three ways to manage allocations, ranging from fully automated to fully manual:
4+
5+
| Method | How it works | When to use |
6+
|--------|--------------|-------------|
7+
| **[Indexing Rules](./rules.md)** | Set rules, let the agent decide | Automated or semi automated management in AUTO/OVERSIGHT mode |
8+
| **[Action Queue](./action-queue.md)** | Queue actions, approve, execute | Batching, 3rd party tools |
9+
| **[Direct Commands](./direct.md)** | Execute immediately on-chain | One-off operations, debugging, immediate control |
10+
11+
## Indexing Rules
12+
13+
You define rules that specify which deployments to allocate to and how much stake to use. The agent's [reconciliation loop](../operation-modes.md) evaluates these rules and queues the necessary actions automatically using the [action queue](./action-queue.md).
14+
15+
```bash
16+
graph indexer rules set QmXYZ... decisionBasis always allocationAmount 10000
17+
```
18+
19+
**Best for:** Hands-off operation where you want the agent to manage allocations based on criteria like signal, stake thresholds, or explicit deployment lists.
20+
21+
**Requires:** AUTO or OVERSIGHT mode. In MANUAL mode, the reconciliation loop is skipped and rules have no effect.
22+
23+
[Full documentation](./rules.md)
24+
25+
## Action Queue
26+
27+
Actions are queued, reviewed, approved, and then executed by a background worker. This gives you oversight and control over what gets executed on-chain.
28+
29+
```bash
30+
graph indexer actions queue allocate QmXYZ... 10000
31+
graph indexer actions approve 1
32+
```
33+
34+
**Best for:**
35+
- Reviewing actions before execution (especially in OVERSIGHT mode)
36+
- Batching multiple operations
37+
- Integrating with 3rd party allocation optimizers
38+
- Maintaining a history of all allocation actions
39+
40+
**Works in all modes.** In AUTO/OVERSIGHT, the agent also queues actions here. In MANUAL, you queue everything yourself.
41+
42+
[Full documentation](./action-queue.md)
43+
44+
## Direct Commands
45+
46+
Execute allocation operations immediately on the blockchain, bypassing the action queue entirely.
47+
48+
```bash
49+
graph indexer allocations create QmXYZ... 10000 --network arbitrum-one
50+
```
51+
52+
**Best for:** One-off operations, debugging, or when you need immediate execution without waiting for the queue cycle.
53+
54+
**Works in all modes.** These commands always execute immediately regardless of operation mode.
55+
56+
[Full documentation](./direct.md)
57+
58+
---
59+
60+
## Automatic Rule Updates
61+
62+
When allocation actions execute, via manually queuing actions or running direct commands, indexing rules are automatically updated to keep the agent in sync:
63+
64+
| Action | Rule Update |
65+
|--------|-------------|
66+
| `allocate` | Sets `decisionBasis: ALWAYS` |
67+
| `unallocate` | Sets `decisionBasis: OFFCHAIN` |
68+
| `reallocate` | Sets `decisionBasis: ALWAYS` |
69+
| `resize` | Sets `decisionBasis: ALWAYS` |
70+
| `present-poi` | No change |
71+
72+
This prevents the agent from fighting your manual changes in AUTO/OVERSIGHT mode.

0 commit comments

Comments
 (0)