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

Add a new event for invalidated votes #4633

Open
kderme opened this issue Sep 17, 2024 · 0 comments
Open

Add a new event for invalidated votes #4633

kderme opened this issue Sep 17, 2024 · 0 comments

Comments

@kderme
Copy link
Contributor

kderme commented Sep 17, 2024

A new vote can replace an older one if the voter and the action is the same. For tools like DBSync it would be very useful to have a way to mark invalidated votes, using a new event, which can look like
GovReplacedVote (TxId c) [(Voter c, GovActionId c)]

Votes are also removed when dreps are retired and actions are dropped. However these cases are more straight forward for db-sync to handle without events.

Initial requests IntersectMBO/cardano-db-sync#1798

Alternative attemps
db-sync could query its db, to verify that a vote is replaced. However this replicates the logic and forces disk queries for every vote. Using the event queries are necessary only for replacing votes. Using the ledger state without an event would be also hard, since db-sync doesn't have the state before each transaction.

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

1 participant