Closed pasqu4le closed 2 years ago
Since we have changed the proposal
to track voters instead of votes, this issue should instead track the number of voters, instead of votes.
It has been confirmed that a proposal that contain 1000 voters can continue to operate with out issues. After sending 1000 votes to the contract, each from a different voter address, It has been tested that the contract can successfully unpack the proposal in context (one with 1000 voters) and other operations like freeze.
To do this test, the contract was slightly modified temporarly to extend the potentioal voting period indefinitely, instead of restricting it to a very specific period, and the test was done on this modified contract (or else the period would pass when sending the 1000 separate votes).
The code for the test is preserved in branch sras/#271-stress-test-voters-do-not-merge
@sras to avoid changing the contract I think that here too we could instead use something more like this, which is to say to originate the contract with a large number of voters
in its initial storage instead.
It should be just as effective and much less painful, don't you think?
I'm closing this because #311 removed the limit in question, making this issue obsolete.
Clarification and motivation
Sibling issue to #68 (or rather its solution, but for
max_votes
.We currently suggest a number of
max_votes
of1000
, but in most cases that might be too small.However, a limit should be put, mainly because the number of votes affects the size of the
voters
field in aproposal
, which has to be de-serialized forflush
, which means it can get to be too large to fit in a single operation's gas cost and hit a constant failure.While this problem is not entirely catastrophic (such a proposal could be dropped) we should still verify that
1000
is a sensible value to suggest and if possible perhaps suggest an even higher number (and limit it in storage creation).Acceptance criteria
max_votes
x
that is a hard limit formax_votes
x
:defaults.mligo
to prohibit more thanx
(or even less, for safety) formax_votes
max_votes
that's closer tox/2