Search code examples
cryptographyp2pblockchainpeer

Peer to peer cluster for (ideally anonymous) threshold voting


As an introduction to peer to peer networking and/or blockchains, I want to make a little project, but I need to know the limitations of cryptography and what combinations of features are possible. Here's what the ideal (if it were backed by a traditional server) application would feature:

  1. A peer must be initially invited by another peer, with the exception of a seed peer.
  2. Peers are allowed to cast a vote for another peer at a specific rate, and a vote expires either when the peer casts another vote or after a configured (as in unchangeable) TTL.
  3. Votes are anonymous.
  4. If a peer reaches a threshold of "alive" votes, that threshold being a portion of peers that have connected in the past 30 days, it is granted a "point," which can be cryptographically proven to be valid (as in, proven to contain a certain number of valid votes and proven to meet the threshold). At the very least peers must come to a consensus as to the validity of the votes before the point is granted.
  5. Peers that have joined in the past are able to join the cluster without invitation, but points cannot be issued without the threshold.

Is this possible? If so, what technologies should I pursue? I took an initial look at Raft for a consensus protocol but the TTL and time based nature of the votes makes me doubtful a consensus algorithm will be more useful than a blockchain.


Solution

  • For time-locked crypto you can read more here: https://crypto.stackexchange.com/questions/606/time-capsule-cryptography

    When you understand it you will find out that you can limit things by number of calculations required only, which is somewhat a proxy for time required, and thus not guaranteed.

    You will have to build a peer-to-peer system with peers competing over to "solve" a vote to their competition and thus make it invalid. Although this wont ensure fixed '30days' it can ensure almost equal time to live for all votes in the network for a certain election round.