Skip to content

Add missing task-level Solidity events to unblock 5 subgraph handlers #153

Description

@robertocarlous

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions