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

[DAO] Exclude inactive stakers from votings #745

Merged
merged 8 commits into from
Nov 10, 2020

Conversation

aguycalled
Copy link
Member

This PR proposes a consensus change signaled by version bit 28 to allow excluding stakers from the DAO votings.

Nodes (like users who do not want to participate in the votings or exchanges which activate staking) will be able to exclude their staked blocks from the quorum by indicating the option -excludevote=1, preventing a scenario where a big enough amount of staking coins not engaging in the governance process could make impossible to reach the acceptance/rejection thresholds.

Additionally, a node will label automatically their blocks to be excluded even if -excludevote=1 is no specified, whenever the staker hasn't been active voting in any of the last 10 voting cycles which had an active vote. This is reverted whenever the staker casts a vote.

Blocks are labeled to be excluded by activating the right-most bit of their nOnce parameter.

@mxaddict
Copy link
Contributor

mxaddict commented Oct 12, 2020

untested ACK

@navbuilder
Copy link

A new build of f8ff873 has completed succesfully!
Binaries available at https://build.nav.community/binaries/exclude

@navbuilder
Copy link

A new build of 737812d has completed succesfully!
Binaries available at https://build.nav.community/binaries/blsct

@chasingkirkjufell
Copy link
Contributor

737812d is a blsct commit. the build bot posted to the wrong thread.

@chasingkirkjufell
Copy link
Contributor

The text for showing voting status is not accurate. In this example, I have generate 5 blocks with "excludevote" node so the voting cycle block count should is 5. I voted1yes with 4 blocks remaining. Wallet thinks that it already passes both the quorum and amount of yes votes needed. The bug is not impactful due to the fact as voting continues, the wallet will eventually update to correct quorum and behavior.
image

@aguycalled
Copy link
Member Author

should be fixed now. i also added a rpc command setexclude to change on the fly the node exclude status

@navbuilder
Copy link

A new build of a6ac923 has completed succesfully!
Binaries available at https://build.nav.community/binaries/exclude

@chasingkirkjufell
Copy link
Contributor

I couldn't get the node to switch to exclude mode even after 10 cycles of inactivity. Is there a way to check if the mode has entered exclude mode?

@aguycalled
Copy link
Member Author

were votes happening during those 10 cycles?

@chasingkirkjufell
Copy link
Contributor

Does other nodes need to be voting? ie. if the proposal is not getting any votes, will it be counted into the exclude cycle?

@aguycalled
Copy link
Member Author

Does other nodes need to be voting? ie. if the proposal is not getting any votes, will it be counted into the exclude cycle?

if no one votes on a cycle, then this cycle does not count in the auto exclude counter

@navbuilder
Copy link

A new build of 8489cee has completed succesfully!
Binaries available at https://build.nav.community/binaries/exclude

Copy link
Contributor

@chasingkirkjufell chasingkirkjufell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested local build on Ubuntu 20.04

  • Wallet launches with -excludevote=1
  • Votes are not counted when wallet is launched with excludevote=1 for proposal consultations, and consensus changes
  • Proposal and consultation quorum is reduced when blocks are mined by excludevote nodes
  • Wallet enters excludevote mode after 10 cycles of inactivity

@mxaddict
Copy link
Contributor

@aguycalled @chasingkirkjufell how do I know if a node has entered into excludevote mode?

@chasingkirkjufell
Copy link
Contributor

i don't believe you can @mxaddict

@chasingkirkjufell
Copy link
Contributor

i verified it by generating blocks and seeing that quorum has dropped with another node voting.

@mxaddict
Copy link
Contributor

mxaddict commented Oct 28, 2020 via email

@aguycalled
Copy link
Member Author

the mined blocks would have nonce==1

@navbuilder
Copy link

A new build of ae49b2e has completed succesfully!
Binaries available at https://build.nav.community/binaries/exclude

@mxaddict
Copy link
Contributor

@aguycalled can you explain a bit more about the changes to the tests? I noticed that the status checks have all been updated to just check == "pending" in most of the test scenarios.

@mxaddict
Copy link
Contributor

I assume this change is only for tests that were expecting a variant of *waiting for end of voting period.

@aguycalled
Copy link
Member Author

yes, you are right

@mxaddict
Copy link
Contributor

yes, you are right

Ok, cool.

I just checked the source that was generating the text and now it makes sense.

@aguycalled aguycalled merged commit 017ddea into navcoin:master Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants