Skip to content

Commit

Permalink
Updating to reflect the latest updates to the design spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
Crypto2099 committed Sep 15, 2020
1 parent d3214a0 commit 72432ac
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 3 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,17 @@ The current SPOCRA Ballot Proposal can be found at [ballot_proposal.md](ballot_p

### Voter Ballot
To view the details of the SPOCRA Voter Ballot you can view [voter_ballot.md](voter_ballot.md)

### Voter Registration
Currently, we do not have a reliable method of identity verification on-chain. This predicates the need for an assigned
"Voter ID" in the case of a vote where we want to limit vote casting to one or more votes per entity.

To this end, currently the onus is on the voting authority to generate and issue a unique "Voter ID" for every voter in
a given vote proposal. The valid IDs eligible to vote should be submitted to the chain following the close of the voting
window to enable vote validation tools to confirm a voter's eligibility in the vote.

To view the details of the SPOCRA Voter Registration you can view [voter_registration.md](voter_registration.md)

## Requirements

Currently, [cardano-node-db-sync](https://github.com/input-output-hk/cardano-db-sync) seems to be the only block exploration method that supports fetching transaction metadata.
28 changes: 26 additions & 2 deletions ballot_proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ Submitting an official ballot proposal to the voting members should be done "on-
{
"type": "object",
"properties": {
"ObjectType": {
"type": "string",
"required": true,
"purpose": "Identify the type of object this is",
"example": "VoteProposal"
},
"ObjectVersion": {
"type": "string",
"required": false,
"purpose": "Specify the specification version of the object for future reference and parsing",
"example": "1.0.0"
},
"NetworkId": {
"type": "string",
"required": true,
Expand All @@ -19,7 +31,13 @@ Submitting an official ballot proposal to the voting members should be done "on-
"type": "string",
"required": true,
"purpose": "Unique identifier (hash?) identifying this particular proposal",
"example": "abc001ef"
"example": "52da18fb-64ec-4d00-9484-fdb0b67ef678"
},
"VoterHash": {
"type": "string",
"required": false,
"purpose": "This should be the sha1 hash of the ProposalId + a unique RegistrationId that will be submitted containing registered VoterIds following the close of the voting window.",
"example": "35184eba36aaa9ab8f96cba71ac65d4a54e0e59c"
},
"Title": {
"type": "string",
Expand Down Expand Up @@ -63,6 +81,12 @@ Submitting an official ballot proposal to the voting members should be done "on-
"purpose": "Define whether or not a voter may vote for the same candidate more than once in a multiple-choice vote",
"example": "<0|1>"
},
"VoteRanked": {
"type": "integer",
"required": false,
"purpose": "Define whether or not voters should rank their votes in order of preference",
"example": "<0|1>"
},
"VoteFee": {
"type": "integer",
"required": false,
Expand Down Expand Up @@ -106,7 +130,7 @@ Submitting an official ballot proposal to the voting members should be done "on-
"items": {
"type": "object",
"properties": {
"Id": {
"CandidateId": {
"type": "string",
"required": true,
"purpose": "A unique identifier to identify this vote option during vote casting.",
Expand Down
2 changes: 2 additions & 0 deletions examples/spocra_multiple_choice_ballot_proposal.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"1": {
"ObjectType": "VoteProposal",
"ObjectVersion": "1.0.0",
"NetworkId": "SPOCRA Test",
"ProposalId": "a223d901-9615-4082-8d7c-5f680961939d",
"Title": "SPOCRA Creation Committee Candidate Election",
Expand Down
3 changes: 2 additions & 1 deletion examples/spocra_multiple_choice_vote_ballot.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"1": {
"NetworkId": "SPOCRA Test",
"ObjectType": "VoteBallot",
"ObjectVersion": "1.0.0",
"ProposalId": "a223d901-9615-4082-8d7c-5f680961939d",
"VoterId": "80e7be95-4abb-417d-8c22-5e00511e4aa0",
"Choices": [
Expand Down
2 changes: 2 additions & 0 deletions examples/spocra_simple_ballot_proposal.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"1": {
"ObjectType": "VoteProposal",
"ObjectVersion": "1.0.0",
"NetworkId": "SPOCRA Test",
"ProposalId": "de6a3c6c-a351-44cb-a907-175128705f04",
"Title": "Buy Beers",
Expand Down
2 changes: 2 additions & 0 deletions examples/spocra_simple_vote_ballot.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"1": {
"ObjectType": "VoteBallot",
"ObjectVersion": "1.0.0",
"NetworkId": "SPOCRA Test",
"ProposalId": "de6a3c6c-a351-44cb-a907-175128705f04",
"VoterId": "7aab2f11-4e36-4c5f-bea1-2498d74f8733",
Expand Down
18 changes: 18 additions & 0 deletions voter_ballot.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ Individual "Voters" casting a vote in the election should submit a "ballot" JSON
{
"type": "object",
"properties": {
"ObjectType": {
"type": "string",
"required": true,
"purpose": "Identify the type of object this is",
"example": "VoteBallot"
},
"ObjectVersion": {
"type": "string",
"required": false,
"purpose": "Specify the specification version of the object for future reference and parsing",
"example": "1.0.0"
},
"NetworkId": {
"type": "string",
"required": true,
Expand Down Expand Up @@ -49,6 +61,12 @@ Individual "Voters" casting a vote in the election should submit a "ballot" JSON
"required": true,
"purpose": "Assign a 'vote weight' to this candidate based on the voter's selection, should default to 0 or 1 unless VoteMultiple is true in the Ballot Proposal",
"example": 1
},
"VoteRank": {
"type": "integer",
"required": false,
"purpose": "Assign a 'vote rank' to this candidate. Each 'rank' should only appear once in a given voter ballot except for '0' if the voter is not voting for this candidate. Only required for VoteMultiple and VoteRanked is true in the Ballot Proposal",
"example": 3
}
}
}
Expand Down
62 changes: 62 additions & 0 deletions voter_registration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# SPOCRA Voter Registration Specification
In situations where votes allowed in a proposal be limited to a specific number of votes per entity, the
voting authority should generate and define a unique VoterId for each eligible vote or voter and issue these
securely and discreetly to the voting entities.

Following the close of the voting window, a separate JSON file containing a simple list of "eligible Voter IDs"
should be submitted to the chain so that voting validators can confirm the eligibility of votes cast during the
voting window.

For additional security, the list of eligible voters shoud be submitted from the same address used to submit the
ballot proposal to the chain.

**NOTE:** There is a 64-character limit for all string entries.

```json
{
"type": "object",
"properties": {
"ObjectType": {
"type": "string",
"required": true,
"purpose": "Identify the type of object this is",
"example": "VoteRegistration"
},
"ObjectVersion": {
"type": "string",
"required": false,
"purpose": "Specify the specification version of the object for future reference and parsing",
"example": "1.0.0"
},
"NetworkId": {
"type": "string",
"required": true,
"purpose": "Identify the voting 'network' that this vote belongs to",
"example": "SPOCRA"
},
"ProposalId": {
"type": "string",
"required": true,
"purpose": "Unique identifier (hash?) identifying the particular proposal this vote is for",
"example": "52da18fb-64ec-4d00-9484-fdb0b67ef678"
},
"RegistrationId": {
"type": "string",
"required": true,
"purpose": "The sha1 hash of the ProposalId + RegistrationId should equal the value of the VoterHash submitted in the proposal",
"example": "a489201d-48a2-4775-a41d-4fbf5670a141"
},
"Voters": {
"type": "array",
"required": true,
"purpose": "List of eligible voter IDs in this ballot proposal.",
"items": {
"type": "string",
"required": true,
"purpose": "Unique VoterIds. For the sake of privacy, voter IDs should never contain sensitive or identifying information",
"example": "f493b4a1-8658-4e72-b317-37793a199ab3"
}
}
}
}
```

0 comments on commit 72432ac

Please sign in to comment.