When a proposal has ended the ballot information is empty. How do I grab historical ballot data for an ended SNS Proposal?
Thank you,
Rick
When a proposal has ended the ballot information is empty. How do I grab historical ballot data for an ended SNS Proposal?
Thank you,
Rick
Hi Rick,
The SNS governance canister (like the NNS governance canister) clears the ballot once the proposal has reached Settled state (i.e. voting rewards, if any, have been distributed). This is to stay within canister memory limits as storing ballots for every proposal becomes increasingly expensive. However, since ballots are openly available on the SNS, a dapp that wants to display SNS proposal related data can archive the ballots themselves.
A cool alternative idea is that an SNS DAO can add a dapp it controls that will archive all proposal data for the entire history of an SNS. This could be a useful add-on that doesn’t need to be part of the core SNS Canisters, but a selective add-on the DAO decides to add.
So the strategy would be to start polling the Proposal minutes/seconds before it ends to get the latest voting data for a Proposal to archive? Is there any grace period? What is settlement like for a SNS Proposal?
Thank you!
Rick
@rckprtr Apologies for the late reply.
Yes that would be the strategy as of now. The tally is never removed, but the ballots will be removed when a proposal settles. Proposals reach the ReadyToSettle
state after the voting deadline has been reached. The deadline is the inital_voting_period_seconds
+ any WaitForQuiet deadline increases. A proposal will then be Settled
once its been added to a RewardEvent, and rewards (if any) are distributed. A RewardEvent is created every round_duration_seconds
which is a NervousSystemParameter for each SNS.
So to answer the rest of your questions, there is no fixed grace period. Ballots will be available from the deadline and until the Proposal has settled. This can be worst case 0 seconds if the deadline is reached at the same time a RewardEvent is generated, and at best case round_duration_seconds
.
The NNS team has discussed how to archive proposal data like ballots for the NNS and the SNS, but there is currently no realized plan due to other priorities.
Hope this helps and happy new year
Daniel