Skip to content

Commit e15b5c6

Browse files
committed
docs(reo): correct test-plan facts from full review
Cross-checked every test plan against the contracts and deployed addresses and fixed the confirmed inaccuracies: - SubgraphDenial: setDenied is onlySubgraphAvailabilityOracle (Governor cannot call it); identify the SAO via RewardsManager.subgraphAvailabilityOracle() (not Controller.getContractProxy), with a note that it is typically the SubgraphAvailabilityManager voting contract. - IssuanceAllocatorTestPlan: IssuanceAllocator is deployed on Sepolia (0x76a0d756...); fill mainnet RewardsManager/GraphToken addresses; mark mainnet IssuanceAllocator "Not yet deployed"; fix getTargetIssuancePerBlock signature to the 4-field struct return. - MainnetDetails: fill in the deployed RewardsEligibilityOracle address. - ReoTestPlan: clarify renewIndexerEligibility "count" is observable via IndexerEligibilityRenewed events, not cast send return values. - RewardsConditions/SubgraphDenial: point source refs at AllocationHandler.sol (where POI/condition handling lives). - TestnetDetails: drop incorrect chain=arbitrum-one from the Sepolia explorer link. README: drop stale "pending deployment". NotionTracker: SAO-only note.
1 parent 3779fd8 commit e15b5c6

9 files changed

Lines changed: 47 additions & 44 deletions

File tree

packages/issuance/docs/testing/reo/IndexerTestGuide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ cast call $REO "isEligible(address)(bool)" $INDEXER --rpc-url $RPC
401401

402402
## Mock REO Test Sets (2m - 4m)
403403

404-
These sets use the `RewardsEligibilityOracleMock` for direct eligibility control. The coordinator must have pointed RewardsManager at the mock. These replace Sets 2-4 when the mock is active.
404+
These sets use the `RewardsEligibilityOracleMock` for direct eligibility control. On Arbitrum Sepolia the RewardsManager the mock. These replace Sets 2-4 when the mock is active.
405405

406406
### 2m.1 Close allocation while eligible (mock)
407407

packages/issuance/docs/testing/reo/MainnetDetails.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ curl "https://gateway.thegraph.com/api/$GRAPH_API_KEY/subgraphs/id/DZz4kDTdmzWLW
2525

2626
## Contract Addresses
2727

28-
| Contract | Address |
29-
| ------------------------ | -------------------------------------------- |
30-
| RewardsEligibilityOracle | TBD |
31-
| RewardsManager | `0x971b9d3d0ae3eca029cab5ea1fb0f72c85e6a525` |
32-
| SubgraphService | `0xb2bb92d0de618878e438b55d5846cfecd9301105` |
33-
| GraphToken (L2) | `0x9623063377ad1b27544c965ccd7342f7ea7e88c7` |
34-
| Controller | `0x0a8491544221dd212964fbb96487467291b2c97e` |
28+
| Contract | Address |
29+
| ------------------------- | -------------------------------------------- |
30+
| RewardsEligibilityOracleA | `0x8ec2767a9d9ba02b4e09e8ff4fac2e14a340f304` |
31+
| RewardsManager | `0x971b9d3d0ae3eca029cab5ea1fb0f72c85e6a525` |
32+
| SubgraphService | `0xb2bb92d0de618878e438b55d5846cfecd9301105` |
33+
| GraphToken (L2) | `0x9623063377ad1b27544c965ccd7342f7ea7e88c7` |
34+
| Controller | `0x0a8491544221dd212964fbb96487467291b2c97e` |
3535

3636
---
3737

packages/issuance/docs/testing/reo/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Comprehensive test plans for validating The Graph Network after an upgrade. Thre
1010
4. **Subgraph denial tests**[SubgraphDenialTestPlan.md](SubgraphDenialTestPlan.md)
1111
5. **Reward conditions tests**[RewardsConditionsTestPlan.md](RewardsConditionsTestPlan.md)
1212

13-
**Mock REO available**: A `RewardsEligibilityOracleMock` at `0x69b0f3c6a19beaf1ba59405f7179e188c64b4e06` (Arbitrum Sepolia) provides instant eligibility control for integration testing. See the mock-based test paths in [ReoTestPlan](ReoTestPlan.md#mock-reo-quick-test-path) and [IndexerTestGuide](IndexerTestGuide.md#mock-reo-option).
13+
**Mock REO available**: A `RewardsEligibilityOracleMock` at `0x69b0f3c6a19beaf1ba59405f7179e188c64b4e06` (Arbitrum Sepolia) provides instant eligibility control for integration testing. See the mock-based test paths in [ReoTestPlan](ReoTestPlan.md#mock-reo-quick-test-path) and [IndexerTestGuide](IndexerTestGuide.md#mock-reo-default-path).
1414

1515
## Reading Order
1616

@@ -30,13 +30,13 @@ BaselineTestPlan (7 cycles, 22 tests)
3030
│ Cycle 2.3 opens allocations reused in Cycle 6
3131
│ Cycle 6m: mock REO path for fast integration testing
3232
33-
├──▶ RewardsConditionsTestPlan (7 cycles, 26 tests)
33+
├──▶ RewardsConditionsTestPlan (7 cycles, 25 tests)
3434
│ Covers: reclaim config, below-minimum signal, zero allocated tokens,
3535
│ POI paths (stale/zero/too-young), allocation resize/close, observability
3636
│ Depends on: Baseline Cycles 1-7 pass first
3737
│ Cycle 1 configures reclaim addresses used by all reclaim tests
3838
39-
├──▶ SubgraphDenialTestPlan (6 cycles, 18 tests)
39+
├──▶ SubgraphDenialTestPlan (6 cycles, 21 tests)
4040
│ Covers: deny/undeny state, accumulator freeze, allocation deferral,
4141
│ pre-denial reward recovery, edge cases
4242
│ Depends on: Baseline + RewardsConditionsTestPlan Cycle 1 (reclaim setup)
@@ -56,8 +56,8 @@ BaselineTestPlan (7 cycles, 22 tests)
5656
| ------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
5757
| [BaselineTestPlan.md](BaselineTestPlan.md) | Detailed baseline indexer operational tests (7 cycles, 22 tests) |
5858
| [ReoTestPlan.md](ReoTestPlan.md) | REO eligibility, oracle, and rewards integration (8 cycles + mock path, 36 tests) |
59-
| [RewardsConditionsTestPlan.md](RewardsConditionsTestPlan.md) | Reclaim system, signal conditions, POI paths, allocation lifecycle (7 cycles, 26 tests) |
60-
| [SubgraphDenialTestPlan.md](SubgraphDenialTestPlan.md) | Subgraph denial: accumulator freeze, deferral, recovery (6 cycles, 18 tests) |
59+
| [RewardsConditionsTestPlan.md](RewardsConditionsTestPlan.md) | Reclaim system, signal conditions, POI paths, allocation lifecycle (7 cycles, 25 tests) |
60+
| [SubgraphDenialTestPlan.md](SubgraphDenialTestPlan.md) | Subgraph denial: accumulator freeze, deferral, recovery (6 cycles, 21 tests) |
6161
| [IndexerTestGuide.md](IndexerTestGuide.md) | Condensed indexer eligibility tests (5 sets + 3 mock sets, 11 tests) |
6262

6363
## Test Coverage
@@ -139,7 +139,7 @@ BaselineTestPlan (7 cycles, 22 tests)
139139
5. **Edge Cases**
140140
- New allocation while denied, all-close-while-denied, rapid deny/undeny, denial vs eligibility precedence
141141

142-
See also: [IssuanceAllocatorTestPlan](support/IssuanceAllocatorTestPlan.md) (independent of REO, pending deployment)
142+
See also: [IssuanceAllocatorTestPlan](support/IssuanceAllocatorTestPlan.md) (independent of REO)
143143

144144
## Network Configuration
145145

packages/issuance/docs/testing/reo/ReoTestPlan.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ cast keccak $(cast code <IMPLEMENTATION_ADDRESS> --rpc-url <RPC>)
153153

154154
**Pass Criteria**:
155155

156-
- Implementation address matches address book (`0x4eb1de98440a39339817bdeeb3b3fff410b0b924` on Sepolia)
156+
- Implementation address matches address book (`0xd6f2acf352f655b72cc32a056edf7ca97ec3e9e4` on Sepolia)
157157
- Bytecode hash matches expected artifact hash
158158

159159
---
@@ -166,7 +166,7 @@ cast keccak $(cast code <IMPLEMENTATION_ADDRESS> --rpc-url <RPC>)
166166

167167
```bash
168168
# Role constants
169-
GOVERNOR_ROLE=0x0000... # DEFAULT_ADMIN_ROLE = 0x00
169+
GOVERNOR_ROLE=$(cast keccak "GOVERNOR_ROLE") # self-administered, not OZ DEFAULT_ADMIN (0x00)
170170
OPERATOR_ROLE=$(cast keccak "OPERATOR_ROLE")
171171
ORACLE_ROLE=$(cast keccak "ORACLE_ROLE")
172172
PAUSE_ROLE=$(cast keccak "PAUSE_ROLE")
@@ -223,7 +223,7 @@ cast call <REWARDS_MANAGER> "getProviderEligibilityOracle()(address)" --rpc-url
223223

224224
**Pass Criteria**:
225225

226-
- Returns the REO proxy address
226+
- Returns the configured eligibility oracle. On Arbitrum Sepolia the RewardsManager points at the mock (`0x69b0f3c6a19beaf1ba59405f7179e188c64b4e06`) by default; with the production REO wired in it returns the REO proxy (`0x6ba849fbd33257162552578b2a432d30784f2f80`).
227227

228228
---
229229

@@ -366,7 +366,7 @@ cast call <REO_PROXY> "getLastOracleUpdateTime()(uint256)" --rpc-url <RPC>
366366

367367
**Pass Criteria**:
368368

369-
- Transaction succeeds, returns count `1`
369+
- Transaction succeeds and updates 1 indexer (the `uint256` return value; observe it as one `IndexerEligibilityRenewed` event — `cast send` does not surface return values)
370370
- `getEligibilityRenewalTime` is approximately `block.timestamp` of the renewal tx
371371
- `lastOracleUpdateTime` updated to the same timestamp
372372
- Events emitted correctly
@@ -387,7 +387,7 @@ cast send <REO_PROXY> "renewIndexerEligibility(address[],bytes)" "[<INDEXER_1>,<
387387

388388
**Pass Criteria**:
389389

390-
- Transaction succeeds, returns count `3`
390+
- Transaction succeeds and updates 3 indexers (the `uint256` return; observe three `IndexerEligibilityRenewed` events)
391391
- All three indexers have updated renewal timestamps
392392
- One `IndexerEligibilityRenewed` event per indexer
393393

@@ -405,7 +405,7 @@ cast send <REO_PROXY> "renewIndexerEligibility(address[],bytes)" "[0x00000000000
405405

406406
**Pass Criteria**:
407407

408-
- Transaction succeeds, returns count `1` (not 2)
408+
- Transaction succeeds and updates 1 indexer, not 2 (the zero address is skipped)
409409
- Only the non-zero indexer has a `IndexerEligibilityRenewed` event
410410

411411
---
@@ -940,7 +940,7 @@ cast send <REO_PROXY> "unpause()" --rpc-url <RPC> --private-key <PAUSE_KEY>
940940

941941
- Pause succeeds, `paused()` = `true`
942942
- View functions (`isEligible`) still return results
943-
- Oracle write operations (`renewIndexerEligibility`) revert while paused
943+
- `paused()` is a status flag only — the REO has no pause-gated functions, so `renewIndexerEligibility` and other writes still succeed while paused (verify the flag flips, not that writes revert)
944944
- Unpause succeeds, `paused()` = `false`
945945

946946
---

packages/issuance/docs/testing/reo/RewardsConditionsTestPlan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,4 +778,4 @@ cast logs --from-block <TX_BLOCK> --to-block <TX_BLOCK> --address <REWARDS_MANAG
778778

779779
---
780780

781-
_Derived from issuance upgrade behavior changes. Source: [RewardsBehaviourChanges.md](/docs/RewardsBehaviourChanges.md), [RewardConditions.md](/docs/RewardConditions.md). Contracts: `packages/contracts/contracts/rewards/RewardsManager.sol`, `packages/subgraph-service/contracts/utilities/AllocationManager.sol`._
781+
_Derived from issuance upgrade behavior changes. Contracts: `packages/contracts/contracts/rewards/RewardsManager.sol`, `packages/subgraph-service/contracts/libraries/AllocationHandler.sol` (POI presentation / condition handling)._

packages/issuance/docs/testing/reo/SubgraphDenialTestPlan.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,25 @@ Tests for the subgraph denial behavior changes introduced in the issuance upgrad
5454
- [Baseline tests](BaselineTestPlan.md) Cycles 1-7 pass
5555
- [Reclaim system configured](RewardsConditionsTestPlan.md#cycle-1-reclaim-system-configuration) (Cycle 1 of RewardsConditionsTestPlan) — or configure inline during Cycle 1 below
5656
- At least two indexers with active allocations on rewarded subgraph deployments
57-
- Access to the Governor or SubgraphAvailabilityOracle (SAO) account that can call `setDenied()`
57+
- Access to the SubgraphAvailabilityOracle (SAO) account that can call `setDenied()`
5858
- Allocations must be mature (open for 2+ epochs) before denial tests
5959

6060
### Roles Needed
6161

62-
| Role | Needed For | Holder |
63-
| --------------- | --------------------------------------------- | -------------------------------- |
64-
| Governor or SAO | `setDenied()` calls | Check Controller configuration |
65-
| Governor | `setReclaimAddress()` (if not yet configured) | Council/NetworkOperator multisig |
62+
| Role | Needed For | Holder |
63+
| -------- | --------------------------------------------- | ---------------------------------------------- |
64+
| SAO | `setDenied()` calls | `subgraphAvailabilityOracle` on RewardsManager |
65+
| Governor | `setReclaimAddress()` (if not yet configured) | Council/NetworkOperator multisig |
6666

6767
### Identifying the SAO
6868

6969
```bash
70-
# The SAO is stored in the Controller as the subgraphAvailabilityOracle
71-
# Alternatively, check who can call setDenied on RewardsManager
72-
cast call <CONTROLLER> "getContractProxy(bytes32)(address)" $(cast keccak "SubgraphAvailabilityOracle") --rpc-url <RPC>
70+
# The SAO is a storage variable on RewardsManager (NOT a Controller-registered proxy).
71+
# Note: on a full deployment this is typically the SubgraphAvailabilityManager voting
72+
# contract, where oracles call vote()/voteMany() to reach the denial threshold rather
73+
# than calling setDenied() directly. The cast send steps below assume the SAO is an EOA
74+
# you control — confirm the returned address is an EOA before following them.
75+
cast call <REWARDS_MANAGER> "subgraphAvailabilityOracle()(address)" --rpc-url <RPC>
7376
```
7477

7578
---
@@ -93,7 +96,7 @@ cast call <CONTROLLER> "getContractProxy(bytes32)(address)" $(cast keccak "Subgr
9396
| Cycle | Area | Tests | Notes |
9497
| ----- | ------------------------------- | --------- | -------------------------------------------------- |
9598
| 1 | Reclaim Setup for Denial | 1.1 - 1.2 | Governor access needed; skip if already configured |
96-
| 2 | Denial State Management | 2.1 - 2.4 | SAO or Governor access needed |
99+
| 2 | Denial State Management | 2.1 - 2.4 | SAO access needed |
97100
| 3 | Accumulator Freeze Verification | 3.1 - 3.4 | Read-only after denial; wait for epochs |
98101
| 4 | Allocation-Level Deferral | 4.1 - 4.3 | Requires active allocations on denied subgraph |
99102
| 5 | Undeny and Reward Recovery | 5.1 - 5.4 | Full deny→undeny→claim lifecycle |
@@ -180,7 +183,7 @@ cast call <REWARDS_MANAGER> "getAccRewardsPerAllocatedToken(bytes32)(uint256,uin
180183
**Steps**:
181184

182185
```bash
183-
# Deny the subgraph (as SAO or Governor)
186+
# Deny the subgraph (as SAO)
184187
cast send <REWARDS_MANAGER> "setDenied(bytes32,bool)" <SUBGRAPH_DEPLOYMENT_ID> true --rpc-url <RPC> --private-key <SAO_KEY>
185188

186189
# Verify denial
@@ -226,7 +229,7 @@ cast call <REWARDS_MANAGER> "isDenied(bytes32)(bool)" <SUBGRAPH_DEPLOYMENT_ID> -
226229

227230
### 2.4 Unauthorized deny reverts
228231

229-
**Objective**: Only the SAO or Governor can deny subgraphs.
232+
**Objective**: Only the SAO can deny subgraphs (a Governor-keyed call also reverts).
230233

231234
**Steps**:
232235

@@ -677,4 +680,4 @@ cast call <REWARDS_MANAGER> "isDenied(bytes32)(bool)" <SUBGRAPH_DEPLOYMENT_ID> -
677680

678681
---
679682

680-
_Derived from issuance upgrade behavior changes. Source: [RewardsBehaviourChanges.md](/docs/RewardsBehaviourChanges.md), [RewardConditions.md](/docs/RewardConditions.md). Contract: `packages/contracts/contracts/rewards/RewardsManager.sol`, `packages/subgraph-service/contracts/utilities/AllocationManager.sol`._
683+
_Derived from issuance upgrade behavior changes. Contracts: `packages/contracts/contracts/rewards/RewardsManager.sol`, `packages/subgraph-service/contracts/libraries/AllocationHandler.sol` (POI deferral)._

packages/issuance/docs/testing/reo/TestnetDetails.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
## Network Subgraph
1717

18-
**Query via Graph Explorer**: [Graph Network Arbitrum Sepolia](https://thegraph.com/explorer/subgraphs/3xQHhMudr1oh69ut36G2mbzpYmYxwqCeU6wwqyCDCnqV?view=Query&chain=arbitrum-one)
18+
**Query via Graph Explorer**: [Graph Network Arbitrum Sepolia](https://thegraph.com/explorer/subgraphs/3xQHhMudr1oh69ut36G2mbzpYmYxwqCeU6wwqyCDCnqV?view=Query)
1919

2020
Or query directly:
2121

packages/issuance/docs/testing/reo/support/IssuanceAllocatorTestPlan.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
> **Navigation**: [← Back to REO Testing](../README.md)
44
5-
Separated from the REO test plan — IssuanceAllocator is independent of the Rewards Eligibility Oracle. Test when deployed.
6-
75
## Contract Addresses
86

9-
| Contract | Arbitrum Sepolia | Arbitrum One |
10-
| ------------------------- | -------------------------------------------- | ------------ |
11-
| IssuanceAllocator (proxy) | Not yet deployed | TBD |
12-
| RewardsManager (proxy) | `0x1f49cae7669086c8ba53cc35d1e9f80176d67e79` | TBD |
13-
| GraphToken (L2) | `0xf8c05dcf59e8b28bfd5eed176c562bebcfc7ac04` | TBD |
7+
| Contract | Arbitrum Sepolia | Arbitrum One |
8+
| ------------------------- | -------------------------------------------- | -------------------------------------------- |
9+
| IssuanceAllocator (proxy) | `0x76a0d75651d4db83f74ac502b86a0ae4e19ac38b` | Not yet deployed |
10+
| RewardsManager (proxy) | `0x1f49cae7669086c8ba53cc35d1e9f80176d67e79` | `0x971b9d3d0ae3eca029cab5ea1fb0f72c85e6a525` |
11+
| GraphToken (L2) | `0xf8c05dcf59e8b28bfd5eed176c562bebcfc7ac04` | `0x9623063377ad1b27544c965ccd7342f7ea7e88c7` |
1412

1513
---
1614

@@ -27,7 +25,9 @@ Separated from the REO test plan — IssuanceAllocator is independent of the Rew
2725
cast call <ISSUANCE_ALLOCATOR> "getIssuancePerBlock()(uint256)" --rpc-url <RPC>
2826

2927
# Check RewardsManager target allocation
30-
cast call <ISSUANCE_ALLOCATOR> "getTargetIssuancePerBlock(address)(uint256,uint256)" <REWARDS_MANAGER> --rpc-url <RPC>
28+
# Returns a TargetIssuancePerBlock struct:
29+
# (allocatorIssuanceRate, allocatorIssuanceBlockAppliedTo, selfIssuanceRate, selfIssuanceBlockAppliedTo)
30+
cast call <ISSUANCE_ALLOCATOR> "getTargetIssuancePerBlock(address)((uint256,uint256,uint256,uint256))" <REWARDS_MANAGER> --rpc-url <RPC>
3131

3232
# Check if IssuanceAllocator is minter
3333
cast call <GRAPH_TOKEN> "isMinter(address)(bool)" <ISSUANCE_ALLOCATOR> --rpc-url <RPC>

packages/issuance/docs/testing/reo/support/NotionTracker.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ E-5.1,Eligibility,Verify eligibility when validation is off,https://github.com/g
3232
D-1.1,Denial,Configure SUBGRAPH_DENIED reclaim address,https://github.com/graphprotocol/contracts/blob/reo-testing/packages/issuance/docs/testing/reo/SubgraphDenialTestPlan.md#11-configure-subgraph_denied-reclaim-address,,,,Not Started,Governor access needed
3333
D-1.2,Denial,Record reclaim address GRT balance,https://github.com/graphprotocol/contracts/blob/reo-testing/packages/issuance/docs/testing/reo/SubgraphDenialTestPlan.md#12-record-reclaim-address-grt-balance,,,,Not Started,
3434
D-2.1,Denial,Verify subgraph is not denied (pre-test),https://github.com/graphprotocol/contracts/blob/reo-testing/packages/issuance/docs/testing/reo/SubgraphDenialTestPlan.md#21-verify-subgraph-is-not-denied-pre-test,,,,Not Started,Record accumulator baseline
35-
D-2.2,Denial,Deny subgraph deployment,https://github.com/graphprotocol/contracts/blob/reo-testing/packages/issuance/docs/testing/reo/SubgraphDenialTestPlan.md#22-deny-subgraph-deployment,,,,Not Started,SAO or Governor access needed
35+
D-2.2,Denial,Deny subgraph deployment,https://github.com/graphprotocol/contracts/blob/reo-testing/packages/issuance/docs/testing/reo/SubgraphDenialTestPlan.md#22-deny-subgraph-deployment,,,,Not Started,SAO access needed
3636
D-2.3,Denial,Redundant deny is idempotent,https://github.com/graphprotocol/contracts/blob/reo-testing/packages/issuance/docs/testing/reo/SubgraphDenialTestPlan.md#23-redundant-deny-is-idempotent,,,,Not Started,
3737
D-2.4,Denial,Unauthorized deny reverts,https://github.com/graphprotocol/contracts/blob/reo-testing/packages/issuance/docs/testing/reo/SubgraphDenialTestPlan.md#24-unauthorized-deny-reverts,,,,Not Started,
3838
D-3.1,Denial,Accumulators freeze after denial,https://github.com/graphprotocol/contracts/blob/reo-testing/packages/issuance/docs/testing/reo/SubgraphDenialTestPlan.md#31-accumulators-freeze-after-denial,,,,Not Started,Wait 30+ min after denial

0 commit comments

Comments
 (0)