You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug: TallyResult ID Collision Across Multiple Polls
Current Behavior
The subgraph fails to process tally results from Poll 1 because it conflicts with existing tally result IDs from Poll 0. This happens because TallyResult uses only the index as its ID, which starts from 0 for each new poll.
Problem Details
When processing multiple polls sequentially:
Poll 0's tally results are stored with IDs 0, 1, 2, ...
When Poll 1 starts, its tally results also try to use IDs 0, 1, 2, ...
This causes ID collision in the subgraph since these IDs already exist
Bug: TallyResult ID Collision Across Multiple Polls
Current Behavior
The subgraph fails to process tally results from Poll 1 because it conflicts with existing tally result IDs from Poll 0. This happens because TallyResult uses only the index as its ID, which starts from 0 for each new poll.
Problem Details
When processing multiple polls sequentially:
Current Schema
Proposed Solution
Modify the
createOrLoadTallyResult
handler to create a composite ID by combining the tally address and index:This change:
Expected Result
After this change:
0xTallyAddress0-0
,0xTallyAddress0-1
, ...0xTallyAddress1-0
,0xTallyAddress1-1
, ...This ensures each tally result has a unique identifier while maintaining the existing schema structure.
The text was updated successfully, but these errors were encountered: