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

verifiability of vote counters requires one vat per question? #3907

Closed
dckc opened this issue Sep 29, 2021 · 13 comments
Closed

verifiability of vote counters requires one vat per question? #3907

dckc opened this issue Sep 29, 2021 · 13 comments
Labels
bug Something isn't working Governance Governance needs-design v1_triaged DO NOT USE

Comments

@dckc
Copy link
Member

dckc commented Sep 29, 2021

Describe the bug

In the internal demo (#3869), it seemed awkward / expensive that each call to Registrar.addQuestion() instantiates a vote counter contract in its own vat.

For reference: as of the demo, the execution cost was around 5 RUN, which was occasionally a practical issue. (or perhaps that was to instantiate the registrar contract, but the amounts were similar.)

To Reproduce

Steps to reproduce the behavior:

  1. Visit the demo; make a committee.
  2. As registrar, try to add a question with less than 5 RUN in your Zoe fee purse
  3. bzzt. you lose. (I forget what the diagnostic was)

Expected behavior

Good question. Maybe this is as good as it gets? Does asking a question need to cost substantially less than 5 RUN? With "zygotes" (#2268), perhaps contract instantiation will be substantially cheaper.

Additional context

the context was an internal demo (#3869), using a branch of the governance contracts from #3448 .

cc @Chris-Hibbert @katelynsills @dtribble @rowgraus

@dckc dckc added bug Something isn't working Governance Governance labels Sep 29, 2021
@Tartuffo
Copy link
Contributor

@dckc This was an overlooked New Issue. Do we need this for Mainnet 1?

@dckc
Copy link
Member Author

dckc commented Jan 25, 2022

I opened this on behalf of @dtribble . I'm assigning him in the customer role.

@dckc
Copy link
Member Author

dckc commented Jan 25, 2022

p.s. since the provisional Zoe fees went away, the 5 RUN charge is no longer.

@Tartuffo Tartuffo assigned Chris-Hibbert and unassigned dtribble Feb 4, 2022
@Tartuffo
Copy link
Contributor

Tartuffo commented Feb 4, 2022

Resolve the design for MN-1, and then determine if we need to do anything from MN-1.

@Chris-Hibbert
Copy link
Contributor

I don't know of a requirement to reduce the usage of vats for MN-1.

@dtribble, @rowgraus ?

@Tartuffo
Copy link
Contributor

@dtribble Is this really needed for MN-1?

@dckc
Copy link
Member Author

dckc commented Oct 10, 2022

@warner and I did some testing today using the fact that each question results in a new vat to reach the maxVatsOnline threshold so that vats get paged out. Paging back in worked pretty much as expected, but it did remind us about this cost.

@warner
Copy link
Member

warner commented Oct 11, 2022

One vat per vote is one kind of expensive, but never terminating that vat is a bigger kind of expensive.

@dckc
Copy link
Member Author

dckc commented Dec 16, 2022

@Chris-Hibbert I think I have heard you say that it's straightforward to have one contract count votes for multiple questions. If so, that reduces the scope of this issue from a design question to an enhancement to make it so, yes?

@Chris-Hibbert
Copy link
Contributor

The remaining design question is how to satisfy the governance requirements about legibility and such. I'm pretty sure there's a straightforward answer, but it'll require a more complex validation approach to assure all participants that the dependencies are addressed.

@Chris-Hibbert
Copy link
Contributor

Another approach came up in conversation with @warner. One of the objectives of this ticket is reducing the cost to the chain of using one eternal vat per vote. If the voteCounter records its outcome to vstorage in a place that can be reliably located, the vat doesn't have to stick around. I haven't spent any time looking at the details, but my instincts say that the outcome could be indexed by the electorate, and that would cover the long-term dependencies. According to Brian, single-use vats that go away after use are much less expensive than ones that can't be deleted.

If this becomes a priority to address, I'd recommend a redesign that presumed that concurrent users could get the vote outcome via a promise, and later clients would expect to access it via vstore. Then the voteCounter vat could resolve its outstanding promises, wait for quiescence, and then exit, and that would serve all the durability and legibility needs of Governance.

@aj-agoric
Copy link

THis issue came up in today's Kernal meeting. Looking to move this into coming work to help with performance.

@dckc
Copy link
Member Author

dckc commented May 22, 2024

for follow-up, see:

@dckc dckc closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Governance Governance needs-design v1_triaged DO NOT USE
Projects
None yet
Development

No branches or pull requests

7 participants