Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subgraph: Check each new block for new Proposal.votingState: String #8

Open
jtrein opened this issue Jun 28, 2021 · 1 comment
Open
Assignees

Comments

@jtrein
Copy link

jtrein commented Jun 28, 2021

Feature request for Subgraph

Upon the creation of each new block, would it be possible to set the Proposal.votingState: String, if it's changed? i.e. VotingState.GRACE_PERIOD , VotingState.TIE , VotingState.IN_PROGRESS, etc.

This way, we could use this information as part of the logic to track the proposal's status to transition between UI states, etc.

@sophiacodes
Copy link
Member

sophiacodes commented Jul 7, 2021

The Graph have a blockHandler https://thegraph.com/docs/define-a-subgraph#block-handlers that indexes data in the subgraph as new blocks are appended to the chain… but blockHandlers (as mentioned in The Graph discord “subgraph-development” channel) are really slow this will have a negative impact on the performance of the subgraph, particularly during syncing.

A filter: call can be applied to the blockHandler, this will only index on contract calls, but again this is slow and the contract values that are required to determine the voting state are not available via this handler. So, for the meantime as a workaround I’ll add a new function that will handle updating the voting state on proposal submissions, sponsoring and processing.

@sophiacodes sophiacodes transferred this issue from openlawteam/tribute-contracts Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants