-
Notifications
You must be signed in to change notification settings - Fork 64
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
(Feature) Allow cancellation of a ballot in VotingToManageEmissionFunds
by its creator for 15 minutes after it's created
#168
Conversation
@varasev, perhaps this is the logic you are looking for in _finalize() of VotingToManageEmissionFunds.sol
However, is that desirable, could say Burn pass with 4:3:3 against Sent and Frozen? |
Sure. What's the expected value, i.e. on Sokol, of: Can you help with understand how the section starting line 189 works? |
There are
I'll try to explain it on the picture: So, we have different timestamps called Let's assume that the So, now is According to
we have
Therefore
will give us
i.e.
|
So, let me see if I understand the mechanics of this vote, as I could not glean all of it from the code. Starting on Oct 1st and for seven days thereafter, one of the Validators can introduce this type of a vote, and for 15 minutes after can cancel. Somehow, once this vote has been introduced (and not cancelled) no other Validator can introduce one of this type. Presumably, once cancelled it can be re-introduced. Presumably, once passed, this type of a vote cannot be re-introduced. The minimum number of votes necessary to pass is 4 (quorum) In order to pass, Burn or Payout need most votes (more than either one of the other two options, no tie). So, in case of Burn:Pay:Hold votes of 7:6:5, Burn would pass. |
That's right. Once passed, this type of a vote cannot be re-introduced until the next
No, for the current set of validators in Sokol (24 persons excluding MoC) the minimum number will be That's defined here: poa-network-consensus-contracts/contracts/VotingToManageEmissionFunds.sol Lines 293 to 295 in 6c2c779
Yes, 7 days is the maximum period of time when validators can give their votes, so called
We have no minimum limit of duration of this type of a ballot assuming that the
Yes, if time expired and quorum (or majority) not achieved, the
E.g., we have the next unit tests for those cases: poa-network-consensus-contracts/test/voting_to_manage_emission_funds_test.js Lines 754 to 812 in 6c2c779
Yes, right. A few cases for example:
|
At which point does the check for 13 votes kick in, please? |
It happens on the next line:
When we call
which sets
It calls The code of poa-network-consensus-contracts/contracts/VotingToManageEmissionFunds.sol Lines 293 to 295 in 6c2c779
I.e., it calls BallotsStorage.getProxyThreshold(): poa-network-consensus-contracts/contracts/BallotsStorage.sol Lines 131 to 133 in 6c2c779
|
@varasev, thanks hugely for the details. I'm impressed by how the system of smart contracts is layered and hangs together. |
Thank you.
Yes, right. |
@varasev, do I understand this correctly, in the scenario like this:
Also could you please provide the definitions for those options. UPD: also what happens in this case?
|
I think most Validators would expect minimum voting period to be 48 hours (as is case for other ballots). This would seem to be a minimum floor, particularly for subject of this type of ballot, and would hope this minimum would be added. |
Yes, you do, because there is no majority of votes:
In this case
You can see conditions here: poa-network-consensus-contracts/contracts/VotingToManageEmissionFunds.sol Lines 237 to 256 in 8acbbe1
|
@vbaranov Sure, I'll create one. |
Description of |
(Mandatory) Description
Solves the issue (Feature) VotingToManageEmissionFunds should allow canceling new ballot by its creator for 15 minutes after it's created #161.
(Mandatory) What is it: (Fix), (Feature), or (Refactor)
(Feature)