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

added range Chaum-Pedersen proofs and eliminated placeholders #761

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
145be58
added range Chaum-Pedersen proofs and basic unit tests
eionblanc Jul 1, 2022
2c91edc
added default limit value 1 for range proofs; added remaining unit tests
eionblanc Jul 1, 2022
0e73286
Merge branch 'microsoft:main' into main
eionblanc Jul 1, 2022
650c74a
temporarily remove outdated make sample-data
eionblanc Jul 1, 2022
3f65bf8
resolved slight typing issues and fixed black formatting
eionblanc Jul 1, 2022
f333c7e
fixed typos
eionblanc Jul 1, 2022
435e6ad
changed commitment type to OrderedDict from tuple to prepare for seri…
eionblanc Jul 1, 2022
bd0d33f
replaced disjunctive CP proofs with range versions in property tests
eionblanc Jul 5, 2022
313eeda
amended data type of range proof commitments from list of (ordered) d…
eionblanc Jul 5, 2022
4bd695a
tweaked description referring to range proofs instead of disjunctive
eionblanc Jul 5, 2022
8cd4f8a
Corrected and improved ProofUsage enum
eionblanc Jul 5, 2022
988c34f
better distinguish the types of Chaum-Pedersen proofs, explicitly ref…
eionblanc Jul 5, 2022
6fe4101
refactored Chaum-Pedersen proofs to unify parameter organization; rem…
eionblanc Jul 6, 2022
ed9e8d3
removed unnecessary calls 0-power of group generator in range Chaum-P…
eionblanc Jul 6, 2022
a151996
cherry-pick ed9e8d3 from no-placeholders branch
eionblanc Jul 6, 2022
af77730
enabled cumulative voting; refactored and corrected number_elected an…
eionblanc Jul 7, 2022
b228c61
added end-to-end integration testing for cumulative voting
eionblanc Jul 7, 2022
5ba4aaf
Merge branch 'microsoft:main' into main
eionblanc Jul 8, 2022
14d9087
Merge branch 'microsoft:main' into cumulative-voting
eionblanc Jul 8, 2022
a47423d
Merge branch 'microsoft:main' into cumulative-voting
eionblanc Jul 11, 2022
745b9b6
Merge branch 'microsoft:main' into main
eionblanc Jul 11, 2022
d124b76
Merge branch 'microsoft:main' into main
eionblanc Jul 12, 2022
050e9da
Merge branch 'microsoft:main' into cumulative-voting
eionblanc Jul 12, 2022
33969bd
Merge branch 'microsoft:main' into main
eionblanc Jul 18, 2022
ac262bd
Merge branch 'microsoft:main' into main
eionblanc Jul 18, 2022
5c8ac41
removed placeholders; rebased from old branch
eionblanc Jul 18, 2022
59305bd
added cumulative voting system; rebased from old branch
eionblanc Jul 18, 2022
567a9e8
Merge branch 'cumulative-voting' of https://github.com/eionblanc/elec…
eionblanc Jul 19, 2022
95b0894
Merge branch 'no-placeholders' of https://github.com/eionblanc/electi…
eionblanc Jul 19, 2022
427d471
removed selection_limit attribute from PlaintextBallotContest
eionblanc Aug 18, 2022
c415965
added comment clarifying role of selection limit in ballot property test
eionblanc Aug 18, 2022
1be22a0
Merge branch 'microsoft:main' into main
eionblanc Aug 19, 2022
6c7a9a4
better distinguish the types of Chaum-Pedersen proofs, explicitly ref…
eionblanc Jul 5, 2022
b4020bb
refactored Chaum-Pedersen proofs to unify parameter organization; rem…
eionblanc Jul 6, 2022
ef151b7
removed placeholders; rebased from old branch
eionblanc Jul 18, 2022
ce0fd29
fixed merge errors
eionblanc Aug 19, 2022
337f177
enabled cumulative voting; refactored and corrected number_elected an…
eionblanc Jul 7, 2022
6cb349d
added end-to-end integration testing for cumulative voting
eionblanc Jul 7, 2022
f55bfd9
added cumulative voting system; rebased from old branch
eionblanc Jul 18, 2022
a7af350
removed selection_limit attribute from PlaintextBallotContest
eionblanc Aug 18, 2022
e8e0a98
added comment clarifying role of selection limit in ballot property test
eionblanc Aug 18, 2022
0c9b714
resolved merge conflict issues
eionblanc Aug 19, 2022
af357d9
fixed merge conflicts
eionblanc Aug 19, 2022
81b16ee
fixed merge conflicts
eionblanc Aug 19, 2022
0257f95
removed selection_limit attribute from PlaintextBallotContest
eionblanc Aug 18, 2022
64d3168
fixed merge conflicts
eionblanc Aug 19, 2022
7c8019d
amended merge conflict errors; make runs properly now
eionblanc Aug 19, 2022
90d148e
Merge branch 'microsoft:main' into cumulative-voting
eionblanc Aug 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ environment:
poetry config virtualenvs.in-project true
poetry install
@echo 🚨 Be sure to add poetry to PATH
make fetch-sample-data
# make fetch-sample-data

install:
@echo 🔧 INSTALL
Expand Down
57 changes: 55 additions & 2 deletions data/election_manifest_simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@
"vote_variation": "n_of_m",
"electoral_district_id": "jefferson-county",
"name": "Justice of the Supreme Court",
"number_elected": 2,
"votes_allowed": 2
},
{
Expand Down Expand Up @@ -304,8 +303,62 @@
"vote_variation": "one_of_m",
"electoral_district_id": "harrison-township",
"name": "The Pineapple Question",
"number_elected": 1,
"votes_allowed": 1
},
{
"object_id": "official-bagel-style",
"sequence_order": 3,
"ballot_selections": [
{
"object_id": "new-york-style-selection",
"sequence_order": 1,
"candidate_id": "new-york-style"
},
{
"object_id": "montreal-style-selection",
"sequence_order": 2,
"candidate_id": "montreal-style"
},
{
"object_id": "st-louis-style-selection",
"sequence_order": 3,
"candidate_id": "st-louis-style"
},
{
"object_id": "write-in-style-selection",
"sequence_order": 4,
"candidate_id": "write-in-style"
}
],
"ballot_title": {
"text": [
{
"value": "Harrison official bagel style",
"language": "en"
},
{
"value": "Estilo bagel oficial de Harrison",
"language": "es"
}
]
},
"ballot_subtitle": {
"text": [
{
"value": "Please allot up to three points",
"language": "en"
},
{
"value": "Por favor asigne hasta tres puntos",
"language": "es"
}
]
},
"vote_variation": "cumulative",
"electoral_district_id": "harrison-township",
"name": "The Bagel Question",
"votes_allowed": 3,
"votes_allowed_per_selection": 3
}
],
"ballot_styles": [
Expand Down
8 changes: 0 additions & 8 deletions data/manifest-hamilton-general.json
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,6 @@
"sequence_order": 0,
"electoral_district_id": "hamilton-county",
"vote_variation": "one_of_m",
"number_elected": 1,
"votes_allowed": 1,
"name": "President and Vice President of the United States",
"ballot_selections": [
Expand Down Expand Up @@ -1302,7 +1301,6 @@
"sequence_order": 1,
"electoral_district_id": "hamilton-county",
"vote_variation": "one_of_m",
"number_elected": 1,
"votes_allowed": 1,
"name": "Governor of the Commonwealth of Ozark",
"ballot_selections": [
Expand Down Expand Up @@ -1472,7 +1470,6 @@
"sequence_order": 2,
"electoral_district_id": "congress-district-5",
"vote_variation": "one_of_m",
"number_elected": 1,
"votes_allowed": 1,
"name": "Congressional District 5",
"ballot_selections": [
Expand Down Expand Up @@ -1537,7 +1534,6 @@
"sequence_order": 3,
"electoral_district_id": "congress-district-7",
"vote_variation": "one_of_m",
"number_elected": 1,
"votes_allowed": 1,
"name": "Congressional District 7",
"ballot_selections": [
Expand Down Expand Up @@ -1602,7 +1598,6 @@
"sequence_order": 4,
"electoral_district_id": "pismo-beach-school-district-precinct-1",
"vote_variation": "n_of_m",
"number_elected": 3,
"votes_allowed": 3,
"name": "Pismo Beach School Board",
"ballot_selections": [
Expand Down Expand Up @@ -1687,7 +1682,6 @@
"sequence_order": 5,
"electoral_district_id": "somerset-school-district-precinct-1",
"vote_variation": "n_of_m",
"number_elected": 2,
"votes_allowed": 2,
"name": "Somerset School Board",
"ballot_selections": [
Expand Down Expand Up @@ -1762,7 +1756,6 @@
"sequence_order": 6,
"electoral_district_id": "arlington-township-precinct-1",
"vote_variation": "one_of_m",
"number_elected": 1,
"votes_allowed": 1,
"name": "Retain Robert Demergue as Chief Justice?",
"ballot_selections": [
Expand Down Expand Up @@ -1807,7 +1800,6 @@
"sequence_order": 7,
"electoral_district_id": "lacroix-exeter-utility-district",
"vote_variation": "one_of_m",
"number_elected": 1,
"votes_allowed": 1,
"name": "Capital Projects Levy",
"ballot_selections": [
Expand Down
67 changes: 67 additions & 0 deletions data/manifest-min.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"spec_version": "v0.95",
"election_scope_id": "franklin-minimal-referendum-manifest",
"type": "general",
"geopolitical_units": [
{
"object_id": "franklin-county",
"name": "Franklin County",
"type": "municipality"
}
],
"parties": [
{
"object_id": "N/A"
}
],
"candidates": [
{
"object_id": "referendum-pineapple-affirmative"
},
{
"object_id": "referendum-pineapple-negative"
}
],
"contests": [
{
"object_id": "referendum-pineapple",
"name": "Referendum for Banning Pineapple on Pizza",
"sequence_order": 0,
"vote_variation": "one_of_m",
"electoral_district_id": "franklin-county",
"votes_allowed": 1,
"ballot_selections": [
{
"object_id": "referendum-pineapple-affirmative-selection",
"sequence_order": 0,
"candidate_id": "referendum-pineapple-affirmative"
},
{
"object_id": "referendum-pineapple-negative-selection",
"sequence_order": 1,
"candidate_id": "referendum-pineapple-negative"
}
]
}
],
"ballot_styles": [
{
"object_id": "ballot-style-01",
"geopolitical_unit_ids": ["franklin-county"]
}
],
"name": {
"text": [
{
"language": "en",
"value": "Franklin County Minimal General Election March 2020"
},
{
"language": "es",
"value": "Elecciones generales mínimas del condado de Franklin marzo de 2020"
}
]
},
"start_date": "2020-03-01T08:00:00-05:00",
"end_date": "2020-03-03T19:00:00-05:00"
}
95 changes: 94 additions & 1 deletion data/manifest-minimal.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,100 @@
"sequence_order": 0,
"electoral_district_id": "franklin-county",
"vote_variation": "one_of_m",
"number_elected": 1,
"votes_allowed": 1,
"name": "Referendum for Banning Pineapple on Pizza",
"ballot_selections": [
{
"object_id": "referendum-pineapple-affirmative-selection",
"sequence_order": 0,
"candidate_id": "referendum-pineapple-affirmative"
},
{
"object_id": "referendum-pineapple-negative-selection",
"sequence_order": 1,
"candidate_id": "referendum-pineapple-negative"
}
],
"ballot_title": null,
"ballot_subtitle": null
}
],
"ballot_styles": [
{
"object_id": "ballot-style-01",
"geopolitical_unit_ids": [
"franklin-county"
],
"party_ids": null,
"image_uri": null
}
],
"name": {
"text": [
{
"value": "Franklin County Minimal General Election March 2020",
"language": "en"
},
{
"value": "Elecciones generales m\u00ednimas del condado de Franklin marzo de 2020",
"language": "es"
}
]
},
"contact_information": null
}
=======
{
"election_scope_id": "franklin-minimal-referendum-manifest",
"spec_version": "1.0",
"type": "general",
"start_date": "2020-03-01T08:00:00-05:00",
"end_date": "2020-03-03T19:00:00-05:00",
"geopolitical_units": [
{
"object_id": "franklin-county",
"name": "Franklin County",
"type": "municipality",
"contact_information": null
}
],
"parties": [
{
"object_id": "N/A",
"name": {
"text": []
},
"abbreviation": null,
"color": null,
"logo_uri": null
}
],
"candidates": [
{
"object_id": "referendum-pineapple-affirmative",
"name": {
"text": []
},
"party_id": null,
"image_uri": null,
"is_write_in": null
},
{
"object_id": "referendum-pineapple-negative",
"name": {
"text": []
},
"party_id": null,
"image_uri": null,
"is_write_in": null
}
],
"contests": [
{
"object_id": "referendum-pineapple",
"sequence_order": 0,
"electoral_district_id": "franklin-county",
"vote_variation": "one_of_m",
"votes_allowed": 1,
"name": "Referendum for Banning Pineapple on Pizza",
"ballot_selections": [
Expand Down
3 changes: 0 additions & 3 deletions data/manifest-small.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
"sequence_order": 0,
"electoral_district_id": "franklin-county",
"vote_variation": "one_of_m",
"number_elected": 1,
"votes_allowed": 1,
"name": "Representative to US Congress",
"ballot_selections": [
Expand Down Expand Up @@ -155,7 +154,6 @@
"sequence_order": 1,
"electoral_district_id": "franklin-county",
"vote_variation": "one_of_m",
"number_elected": 1,
"votes_allowed": 1,
"name": "The Pineapple Question",
"ballot_selections": [
Expand All @@ -178,7 +176,6 @@
"sequence_order": 2,
"electoral_district_id": "ozark-school-district",
"vote_variation": "n_of_m",
"number_elected": 2,
"votes_allowed": 2,
"name": "Ozark School Board",
"ballot_selections": [
Expand Down
26 changes: 26 additions & 0 deletions data/plaintext_ballots_simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,19 @@
"vote": 1
}
]
},
{
"object_id": "official-bagel-style",
"ballot_selections": [
{
"object_id": "new-york-style-selection",
"vote": 2
},
{
"object_id": "st-louis-style-selection",
"vote": 1
}
]
}
]
},
Expand Down Expand Up @@ -140,6 +153,19 @@
"vote": 1
}
]
},
{
"object_id": "official-bagel-style",
"ballot_selections": [
{
"object_id": "new-york-style-selection",
"vote": 1
},
{
"object_id": "montreal-style-selection",
"vote": 0
}
]
}
]
}
Expand Down
Loading