Context
Raised as a blocker in discussion #150.
The DIN subgraph (PR #29 / #72) has 31 event handlers across all platform contracts. Five of those handlers are currently commented out because the events they listen to do not exist in the Solidity contracts yet:
| Missing event |
Should be emitted from |
Blocks subgraph handler |
LocalModelSubmitted |
DINTaskCoordinator.submitLocalModel() |
LMS submission indexing |
T1AggregationSubmitted |
DINTaskCoordinator.submitT1Aggregation() |
T1 aggregation indexing |
T2AggregationSubmitted |
DINTaskCoordinator.submitT2Aggregation() |
T2 aggregation indexing |
GIStateChanged |
DINTaskCoordinator — on GI phase transitions |
GI lifecycle indexing |
Without these events, the indexer cannot track the full GI lifecycle on-chain. Any query that relies on LMS or aggregation submission history — including the pending-requests endpoint in dindao.py — will fall back to slow RPC polling instead of the indexed GraphQL path.
What needs to change
Add emit LocalModelSubmitted(...), emit T1AggregationSubmitted(...), emit T2AggregationSubmitted(...), and emit GIStateChanged(...) at the appropriate points in DINTaskCoordinator, with matching event declarations in DINShared.sol. Event parameters should at minimum include the GI index, batch/tier identifiers, and the actor address so the subgraph can index per-validator history.
Once emitted, the five commented-out handlers in subgraph/src/ can be enabled and subgraph/subgraph.yaml updated to include them.
Acceptance criteria
- Events declared in
DINShared.sol with parameter signatures agreed with the subgraph team
- Events emitted at the correct points in
DINTaskCoordinator
- The five subgraph handlers re-enabled and mapping to the new events
- Existing Forge tests still pass; new tests cover the event emissions
Related
Context
Raised as a blocker in discussion #150.
The DIN subgraph (PR #29 / #72) has 31 event handlers across all platform contracts. Five of those handlers are currently commented out because the events they listen to do not exist in the Solidity contracts yet:
LocalModelSubmittedDINTaskCoordinator.submitLocalModel()T1AggregationSubmittedDINTaskCoordinator.submitT1Aggregation()T2AggregationSubmittedDINTaskCoordinator.submitT2Aggregation()GIStateChangedDINTaskCoordinator— on GI phase transitionsWithout these events, the indexer cannot track the full GI lifecycle on-chain. Any query that relies on LMS or aggregation submission history — including the pending-requests endpoint in
dindao.py— will fall back to slow RPC polling instead of the indexed GraphQL path.What needs to change
Add
emit LocalModelSubmitted(...),emit T1AggregationSubmitted(...),emit T2AggregationSubmitted(...), andemit GIStateChanged(...)at the appropriate points inDINTaskCoordinator, with matching event declarations inDINShared.sol. Event parameters should at minimum include the GI index, batch/tier identifiers, and the actor address so the subgraph can index per-validator history.Once emitted, the five commented-out handlers in
subgraph/src/can be enabled andsubgraph/subgraph.yamlupdated to include them.Acceptance criteria
DINShared.solwith parameter signatures agreed with the subgraph teamDINTaskCoordinatorRelated