Vote for an empowered agent
User Story
As a Crown governance system user, I want to be able to vote for an agent.
Requirements
(If you can - please define the requirements, if not - skip it).
Tasks
-
MVP Implement JSON RPC API call
agents vote
-
MVP Implement processing
ConnectBlock
3d - MVP Implement dynamic masternode threshold for approval
- Check for election code (right now only one election type is valid)
- Add protection against vote spamming (sending multiple valid votes by single mn in short timespan)
- Add protection against replay (sending a single vote over and over again)
-
MVP Implement processing
DisconnectBlock
1w -
MVP Implement special transaction handling in
CTxMemPool
1w - MVP Implement database storage for cached votes 3d
- MVP Add handling for the case when the vote database is missing 1w
- Make AgentRegistry utilize NotifyResultChange callback to only call CalculateResult() if something might have changed and cache result in between (optimization)
- MVP Unit-tests
- Refactor
- Code Review
- QA
Definition of done/Acceptance criteria
- Ready for production after QA check.
How to demo
- Open Crown wallet console
- Run
agents vote
. (To be defined by @vshamray).
Link/refs/notes/images
Should be finished in the next milestone (whole estimate: 28)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information