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

More granular vote delegation #216

Open
EgidioRomano opened this issue Nov 18, 2021 · 10 comments
Open

More granular vote delegation #216

EgidioRomano opened this issue Nov 18, 2021 · 10 comments
Labels
feature Adding a new feature or function.

Comments

@EgidioRomano
Copy link

What is the user story?
Users should be able to delegate their vote for a single topic, permanently (i.e. until withdrawn) in one or a few categories, or permanently (i.e. until withdrawn) in all topics.

What is the requested feature?
Vote delegation currently works on a per-vote basis. Give to the user the possibility to delegate their vote not only on a single topic, but permanently in one or some categories, or in all categories, until they decide to withdraw the delegatoin.

@EgidioRomano EgidioRomano added the feature Adding a new feature or function. label Nov 18, 2021
@anettlinno
Copy link
Collaborator

I´m copying here @loorm´s three possible options about vote delegation:

_What we have in mind are these options when delegating

  • delegate decisionmaking for a single issue / in a single group
  • delegate decisionmaking permanently (i.e. until withdrawn) in one or a few categories (for example, delegating decisionmaking in all environmental topics)
  • delegate decisionmaking permanently (i.e. until withdrawn) in all issues_

Times ago we had one request from user where a group of people wanted to allow vote delegation with an option to delegate decision making in different categories to different people for certain time. As this was a member-led organization, they would have wanted to have the statistics about who gets the most vote delegations in certain time period (let´s say in one year). This information would have been an input to nominate these people as the board members of their organization because they were seen as trusted experts by their members.

Let it be said that in our system vote can only be delegated to a person who is being invited to the topic or group, so people should know to whom they want to delegate their vote. There are some questions that we need to think through. Where and in which phase should user decide who, in which categories and for how long she wants to delegate her vote? In the voting window? Under the Topic´s or Group´s general information? Elsewhere...?

@ilmartyrk @tiblu what are the technical possibilities here? :)

@tiblu
Copy link
Member

tiblu commented Nov 19, 2021

@EgidioRomano Thanks for the input!

@anettlinno Everything is possible, we need to figure out the UX and then the technical implementation and the cost and the priority.

From implementation side delegation is relatively straightforward BUT things to consider:

  • Cyclic delegation is NOT OK - Ex: A -> B -> C ->A. Now if we add category delegation, group delegation etc the chain validation becomes costly.
  • Vote counting becomes gets more complicated. The delegation chain needs to be inspected at the point when voting has ended and final votes are counted as this is where delegation as also been locked. ALSO, as with new delegation options, we need to improve the logging of vote counting for debugging and verification of vote results. We MUST be able to prove that the votes were counted correctly.

I would THINK currently this is a quite low priority because:

  • We have 1.3 developers.
  • Delegation, at least based on our deployment, is a feature that is hardly ever used.

BUT, all that said - I do think it's an interesting and useful feature have. Need to promote delegation more.

We are also open to all pull requests (PR)!

@tiblu tiblu closed this as completed Nov 19, 2021
@tiblu tiblu reopened this Nov 19, 2021
@EgidioRomano
Copy link
Author

@tiblu

  • With regards to "Cyclic delegation", I do not see a real problem here. I think checking the user has already delegated someone in one or more categories should be enough to prevent "Cyclic delegation": In your example, when "C" wants to delegate "A", just make sure "A" hasn't already delegated someone. Don't you think this is enough to prevent the issue? Am I missing something?

  • With regards to vote counting becoming more complicated, I do partially agree. Of course we must be able to prove that the votes were counted correctly. However, I don't see the need to inspect the delegation chain when voting has ended: isn't easier to count the votes along the way during the voting? This should reduce the cost of the chain validation, just count the votes a little at a time, once they occur.

I realize in my mind the idea is quite simple and straightforward, but translating this into Node.js code is not simple for me - unfortunately I'm not a developer. But I'm quite familiar with JS apps, and I'll try my best trying to make pull requests (PR) about this feature.

@tiblu
Copy link
Member

tiblu commented Nov 25, 2021

@EgidioRomano Thanks for thinking along! Sorry for the long response, being part time, I'm not always available.

My vision - here is an example delegation chain: A->B->C->D->F.

  • The delegation chain can be of infinite depth. When F votes, F-s option MUST BE counted 5 times in the final result.
  • Anyone create or modify delegation to ANY person at ANY given time BY either:
    • Delegating to another person (directly or indirectly). NOTE: If vote has ended, MUST NOT modify the vote results. BUT, when vote is in progress, it MUST modify the results.
    • Having a delegation, BUT still voting personally. When C votes, it OVERRIDES delegation. That is, C-s option is counted 3 times (A->B->C). F-s vote is counted 2 times - D->F.
    • Deleting an account. C can delete account at any time. In such case I see the chain splitting to A->B and D->F.
  • We MUST NOT allow for D to delegate to A - cyclic delegation. How would you count votes? Also, if A has decided NOT to vote by delegating, anyone who delegates to A is basically throwing away their vote IF A does not actually override its own delefation and still vote.
  • Once categories come along, we have the issue of delegation hierarchy - that is, if C delefates a whole category "wildlife" to A, BUT decides delegate a specific vote to F OR votes himself. So we need to have a priority order.

Given the weird cases that MAY modify the vote results, I find it more reliable to count votes when the vote results are read, NOT try to pre-calculate. We MAY consider mixed soluton, but as long as we have decent performance recalcualting on every read, I would use that - no caching, no pre-calculation.

NOTE: Using MUST, MAY.. etc in caps for ease of reading, like standards do.

@EgidioRomano
Copy link
Author

@tiblu thanks for your thorough explanation! I think you're right, maybe it's better to count votes when the vote results are read and/or at the end of the vote. On the other hand I believe that caching them could only improve performance, don't you think that?

@tiblu
Copy link
Member

tiblu commented Nov 26, 2021

"There are only two hard things in Computer Science: cache invalidation and naming things" - Phil Karlton

I agree that caching improves performance, BUT at the cost of system complexity. In my head it's always better to use caching after all other optimizations are not helping as cache invalidation will be the difficult one.

@loorm
Copy link
Member

loorm commented Nov 29, 2021

  • Also, if A has decided NOT to vote by delegating, anyone who delegates to A is basically throwing away their vote IF A does not actually override its own delegation and still vote.

Never thought of this before, but true. In the physical world, when you delegate your vote, it's almost always with the understanding, that the person you delegate to, will actually partake in the vote. Only if some accident or other circumstance prevents the person with the votes from participating, are the votes actually lost. In Citizen OS, because we do not let anyone know, that votes have been delegated to them, we exacerbate the issue. There are good reasons for not letting people know, that votes have been delegated to them, but it increases the risk, that the person with all the votes may end up not participating in voting...

@EgidioRomano
Copy link
Author

I've been thinking about another potential problem: since a topic can have up to 3 categories, how should we handle those cases where I have delegated user A for category X and user B for category Y but the topic includes both categories X and Y?

@EgidioRomano
Copy link
Author

Maybe it's better to follow the KISS (Keep It Simple, Stupid!) philosophy and opt to implement only permanent delegation (i.e. until withdrawn) in all topics/categories?

@loorm
Copy link
Member

loorm commented Dec 7, 2021

Maybe it's better to follow the KISS (Keep It Simple, Stupid!) philosophy and opt to implement only permanent delegation (i.e. until withdrawn) in all topics/categories?

Yup, probably easier for now to keep the single issue vote delegation as we have it and then add "total delegation", where someone can vote for me in all issues, until I revoke delegations. Category-based delegation (even though it makes real world sense) needs some more thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding a new feature or function.
Projects
Status: Backlog - Later
Development

No branches or pull requests

4 participants