*  Add Threshold to Sample Generator

* + Add Sample Ballot Sets

* 🚀 Update PR and Release Workflow to generate sample data

* 🐛 Adjust PlaintextTally Output

Spoiled information must be output. Output plaintext tally instead of PublishedPlaintextTally. Add issue #148
This commit is contained in:
Keith Fung 2020-08-18 15:30:01 -04:00 коммит произвёл GitHub
Родитель 391d7b7b10
Коммит 94f3ddf3e4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
68 изменённых файлов: 84 добавлений и 20 удалений

2
.github/workflows/pull_request.yml поставляемый
Просмотреть файл

@ -49,6 +49,8 @@ jobs:
run: make install validate
- name: Full Test & Coverage
run: make coverage
- name: Generate Sample Data
run: make generate-sample-data
mac_check:
name: MacOS Check

2
.github/workflows/release.yml поставляемый
Просмотреть файл

@ -51,6 +51,8 @@ jobs:
run: make install validate
- name: Full Test & Coverage
run: make coverage
- name: Generate Sample Data
run: make generate-sample-data
mac_check:
name: MacOS Check

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1 @@
{"cofactor": 9019518416950528558373478086511232658951474842525520401496114928154304263969655687927867442562559311457926593510757267649063628681241064260953609180947464800958467390949485096429653122916928704841547265126247408167856620024815508684472819746384115369148322548696439327979752948311712506113890045287907335656308945630141969472484100558565879585476547782717283106837945923693806973017510492730838409381014701258202694245760602718602550739205297257940969992371799325870179746191672464736721424617639973324090288952006260483222894269928179970153634220390287255837625331668555933039199194619824375869291271098935000699785346405055160394688637074599519052655517388596327473273906029869030988064607361165803129718773877185415445291671089029845994683414682274353665003204293107284473196033588697845087556526514092678744031772226855409523354476737660407619436531080189837076164818131039104397776628128325247709678431023369197272126578394856752060591013812807437681624251867074769638052097737959472027002770963255207757153746376691827309573603635608169799503216990026029763868313819311401747718758606328306442737694783044330450178447543246397189503997649637375210794, "generator": 14245109091294741386751154342323521003543059865261911603340669522218159898070093327838595045175067897363301047764229640327930333001123401070596314469603183633790452807428416775717923182949583875381833912370889874572112086966300498607364501764494811956017881198827400327403252039184448888877644781610594801053753235453382508543906993571248387749420874609737451803650021788641249940534081464232937193671929586747339353451021712752406225276255010281004857233043241332527821911604413582442915993833774890228705495787357234006932755876972632840760599399514028393542345035433135159511099877773857622699742816228063106927776147867040336649025152771036361273329385354927395836330206311072577683892664475070720408447257635606891920123791602538518516524873664205034698194561673019535564273204744076336022130453963648114321050173994259620611015189498335966173440411967562175734606706258335095991140827763942280037063180207172918769921712003400007923888084296685269233298371143630883011213745082207405479978418089917768242592557172834921185990876960527013386693909961093302289646193295725135238595082039133488721800071459503353417574248679728577942863659802016004283193163470835709405666994892499382890912238098413819320185166580019604608311466, "large_prime": 1044388881413152506691752710716624382579964249047383780384233483283953907971553643537729993126875883902173634017777416360502926082946377942955704498542097614841825246773580689398386320439747911160897731551074903967243883427132918813748016269754522343505285898816777211761912392772914485521155521641049273446207578961939840619466145806859275053476560973295158703823395710210329314709715239251736552384080845836048778667318931418338422443891025911884723433084701207771901944593286624979917391350564662632723703007964229849154756196890615252286533089643184902706926081744149289517418249153634178342075381874131646013444796894582106870531535803666254579602632453103741452569793905551901541856173251385047414840392753585581909950158046256810542678368121278509960520957624737942914600310646609792665012858397381435755902851312071248102599442308951327039250818892493767423329663783709190716162023529669217300939783171415808233146823000766917789286154006042281423733706462905243774854543127239500245873582012663666430583862778167369547603016344242729592244544608279405999759391099775667746401633668308698186721172238255007962658564443858927634850415775348839052026675785694826386930175303143450046575460843879941791946313299322976993405829119, "small_prime": 115792089237316195423570985008687907853269984665640564039457584007913129639747}

Просмотреть файл

@ -0,0 +1 @@
{"crypto_base_hash": "56555664132233718510537335304746980632534648093895495226473423760181095413216", "crypto_extended_base_hash": "110155841855434326108556099467928216187617339230222683315045293984415451206875", "description_hash": "91549648100244301227528506386964437846500452622629927809058323381890763707420", "elgamal_public_key": "148933098490768690595988540116320337162739128874822404518435714011807409253476975366492198670239795584965619484225418798153306941182070158792995730044111419900334377171641860270999635958160705637565545872683239225830281183193868208018120763636340454754330890897258532261717113467490646881786156307421889083543533420242146976257473299825538301378167060389265899716486457898241948688845267140459532798952428464084665674232790393553505945832842832666513687274332990449223552782610220050928862496669787342656236093941329694478464297762924241178492088088242235644285544754590319178014640626948942967503558653668914129361700279756036577498505346608247025148002833507875885869906894562339444344191112980980432707017134667937132983112346411078645022674086135361079816019567109513615987434759001630889487840386698498719601964416081415709473396700844444929008759867362695040403673982562030396639770543245037583902486177757374365079697575692089500081879213803397554805065921935982236940617472336880131438965166666974147719261615330631455059061460097583904005981661626470498687519937161200729616905382971856687823510109699860927319813212257403135499391212899960171063185989794270842428751073064217934288375314876449983210085480453976945618667428", "number_of_guardians": 5, "quorum": 3}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1 @@
{"location": "polling-place-074c1cc2-dd9a-11ea-84b9-f45c89ba671b", "uuid": 268678284863259}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1 @@
{"ballot_style": "congress-district-5-harris", "contests": [{"ballot_selections": [{"is_placeholder_selection": false, "object_id": "barchi-hallaren-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "boone-lian-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "hildebrand-garritty-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "patterson-lariviere-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-president", "vote": "False"}], "object_id": "president-vice-president-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "harris-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "walace-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "alpern-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "sharp-althea-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "greher-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "alexander-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "mitchell-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "lee-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "kennedy-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "newman-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "callanann-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "chandler-selection", "vote": "False"}], "object_id": "ozark-governor"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "soliz-selection", "vote": "True"}], "object_id": "congress-district-5-contest"}], "object_id": "ballot-0a5573aa-dd9a-11ea-84b9-f45c89ba671b"}

Просмотреть файл

@ -0,0 +1 @@
{"ballot_style": "congress-district-7-hamilton-county", "contests": [{"ballot_selections": [{"is_placeholder_selection": false, "object_id": "barchi-hallaren-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "cramer-vuocolo-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "court-blumhardt-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "boone-lian-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "hildebrand-garritty-selection", "vote": "False"}], "object_id": "president-vice-president-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "franz-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "harris-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "abcock-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "sharp-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "walace-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "windbeck-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "sharp-althea-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "greher-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "mitchell-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "ward-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "york-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "chandler-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-governor", "vote": "False"}], "object_id": "ozark-governor"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "bainbridge-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "hennessey-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "savoy-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "tawa-selection", "vote": "False"}], "object_id": "congress-district-7-contest"}], "object_id": "ballot-0a558804-dd9a-11ea-84b9-f45c89ba671b"}

Просмотреть файл

@ -0,0 +1 @@
{"ballot_style": "congress-district-7-hamilton-county", "contests": [{"ballot_selections": [{"is_placeholder_selection": false, "object_id": "barchi-hallaren-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "cramer-vuocolo-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "court-blumhardt-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "boone-lian-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "hildebrand-garritty-selection", "vote": "False"}], "object_id": "president-vice-president-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "franz-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "harris-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "abcock-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "williams-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "alpern-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "lee-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "jackson-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "brown-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "teller-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "callanann-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "york-selection", "vote": "False"}], "object_id": "ozark-governor"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "bainbridge-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "hennessey-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "savoy-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "tawa-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "tawa-mary-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-us-congress-district-7", "vote": "False"}], "object_id": "congress-district-7-contest"}], "object_id": "ballot-0a559a2e-dd9a-11ea-84b9-f45c89ba671b"}

Просмотреть файл

@ -0,0 +1 @@
{"ballot_style": "congress-district-7-arlington", "contests": [{"ballot_selections": [{"is_placeholder_selection": false, "object_id": "barchi-hallaren-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "cramer-vuocolo-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "court-blumhardt-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "boone-lian-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "hildebrand-garritty-selection", "vote": "False"}], "object_id": "president-vice-president-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "bargmann-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "walace-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "williams-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "alpern-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "alexander-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "lee-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "ash-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "kennedy-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "murphy-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "callanann-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "york-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-governor", "vote": "False"}], "object_id": "ozark-governor"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "bainbridge-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "tawa-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "tawa-mary-selection", "vote": "False"}], "object_id": "congress-district-7-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "ozark-chief-justice-retain-demergue-affirmative-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "ozark-chief-justice-retain-demergue-negative-selection", "vote": "True"}], "object_id": "arlington-chief-justice-retain-demergue"}], "object_id": "ballot-0a55aa6e-dd9a-11ea-84b9-f45c89ba671b"}

Просмотреть файл

@ -0,0 +1 @@
{"ballot_style": "congress-district-5-arlington-somerset", "contests": [{"ballot_selections": [{"is_placeholder_selection": false, "object_id": "barchi-hallaren-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "court-blumhardt-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "boone-lian-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "hildebrand-garritty-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "patterson-lariviere-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-president", "vote": "False"}], "object_id": "president-vice-president-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "franz-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "bargmann-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "abcock-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "sharp-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "walace-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "alpern-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "windbeck-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "greher-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "mitchell-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "lee-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "kennedy-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "newman-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "chandler-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-governor", "vote": "False"}], "object_id": "ozark-governor"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "soliz-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "keller-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "argent-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-us-congress-district-5", "vote": "False"}], "object_id": "congress-district-5-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "summers-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "chase-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "osborne-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "rosenberg-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "head-selection", "vote": "False"}], "object_id": "somerset-school-board-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "ozark-chief-justice-retain-demergue-affirmative-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "ozark-chief-justice-retain-demergue-negative-selection", "vote": "False"}], "object_id": "arlington-chief-justice-retain-demergue"}], "object_id": "ballot-0a55c0b2-dd9a-11ea-84b9-f45c89ba671b"}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1 @@
{"cofactor": 9019518416950528558373478086511232658951474842525520401496114928154304263969655687927867442562559311457926593510757267649063628681241064260953609180947464800958467390949485096429653122916928704841547265126247408167856620024815508684472819746384115369148322548696439327979752948311712506113890045287907335656308945630141969472484100558565879585476547782717283106837945923693806973017510492730838409381014701258202694245760602718602550739205297257940969992371799325870179746191672464736721424617639973324090288952006260483222894269928179970153634220390287255837625331668555933039199194619824375869291271098935000699785346405055160394688637074599519052655517388596327473273906029869030988064607361165803129718773877185415445291671089029845994683414682274353665003204293107284473196033588697845087556526514092678744031772226855409523354476737660407619436531080189837076164818131039104397776628128325247709678431023369197272126578394856752060591013812807437681624251867074769638052097737959472027002770963255207757153746376691827309573603635608169799503216990026029763868313819311401747718758606328306442737694783044330450178447543246397189503997649637375210794, "generator": 14245109091294741386751154342323521003543059865261911603340669522218159898070093327838595045175067897363301047764229640327930333001123401070596314469603183633790452807428416775717923182949583875381833912370889874572112086966300498607364501764494811956017881198827400327403252039184448888877644781610594801053753235453382508543906993571248387749420874609737451803650021788641249940534081464232937193671929586747339353451021712752406225276255010281004857233043241332527821911604413582442915993833774890228705495787357234006932755876972632840760599399514028393542345035433135159511099877773857622699742816228063106927776147867040336649025152771036361273329385354927395836330206311072577683892664475070720408447257635606891920123791602538518516524873664205034698194561673019535564273204744076336022130453963648114321050173994259620611015189498335966173440411967562175734606706258335095991140827763942280037063180207172918769921712003400007923888084296685269233298371143630883011213745082207405479978418089917768242592557172834921185990876960527013386693909961093302289646193295725135238595082039133488721800071459503353417574248679728577942863659802016004283193163470835709405666994892499382890912238098413819320185166580019604608311466, "large_prime": 1044388881413152506691752710716624382579964249047383780384233483283953907971553643537729993126875883902173634017777416360502926082946377942955704498542097614841825246773580689398386320439747911160897731551074903967243883427132918813748016269754522343505285898816777211761912392772914485521155521641049273446207578961939840619466145806859275053476560973295158703823395710210329314709715239251736552384080845836048778667318931418338422443891025911884723433084701207771901944593286624979917391350564662632723703007964229849154756196890615252286533089643184902706926081744149289517418249153634178342075381874131646013444796894582106870531535803666254579602632453103741452569793905551901541856173251385047414840392753585581909950158046256810542678368121278509960520957624737942914600310646609792665012858397381435755902851312071248102599442308951327039250818892493767423329663783709190716162023529669217300939783171415808233146823000766917789286154006042281423733706462905243774854543127239500245873582012663666430583862778167369547603016344242729592244544608279405999759391099775667746401633668308698186721172238255007962658564443858927634850415775348839052026675785694826386930175303143450046575460843879941791946313299322976993405829119, "small_prime": 115792089237316195423570985008687907853269984665640564039457584007913129639747}

Просмотреть файл

@ -0,0 +1 @@
{"crypto_base_hash": "56555664132233718510537335304746980632534648093895495226473423760181095413216", "crypto_extended_base_hash": "94407508583365918652844526255537005233109854717624695016139506533473976517642", "description_hash": "91549648100244301227528506386964437846500452622629927809058323381890763707420", "elgamal_public_key": "603737452344813190886547947280232025211567623225761030756757964646220554666483888908163468306314805159396222296446125085927608460615769129164296770451542002170320998080420273438945560768729906012098879966259587558507431164728452519690299638778889615973420121468523199831541315593269593495814485368876074039188493993693217008503771219020619819541418251741149891895921443005749886447226828345970249031415117852009360837666212108291231948547409651292183929440263189819104509938478075938925945261847246126223754887678539609512527545393681973606905825602447210885807170121593484282515324912052372071279346653874754829511620575224931794327189953541778219148708926959569356940438425311853919134873578900640806662865759206071592834443866642523256783582711947750418694602264505340011240527806018814764572611358205827301034991245638087494051693136640338246560532757133004584760806698458620934207437545928344860787000518082521185154184045763555742892802790853415788113214906458761508844032152547871754264262485239311001585310330707785945923707366756649388568372386816858552140717735353689367563286632248032586369637015472859915830204071355350866645263654189462654447512604354672822170106222633778195639148802416233353216063783725834474902875032", "number_of_guardians": 5, "quorum": 3}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1 @@
{"location": "polling-place-45bcdfb4-dd9a-11ea-9107-f45c89ba671b", "uuid": 268678284863259}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1 @@
{"ballot_style": "congress-district-5-arlington-pismo-beach", "contests": [{"ballot_selections": [{"is_placeholder_selection": false, "object_id": "barchi-hallaren-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "cramer-vuocolo-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "boone-lian-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "hildebrand-garritty-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-president", "vote": "False"}], "object_id": "president-vice-president-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "franz-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "bargmann-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "abcock-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "steel-loy-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "sharp-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "walace-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "windbeck-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "mitchell-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "ash-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "kennedy-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "ward-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "newman-selection", "vote": "False"}], "object_id": "ozark-governor"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "soliz-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "rangel-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "argent-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-us-congress-district-5", "vote": "False"}], "object_id": "congress-district-5-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "moore-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "white-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "smallberries-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "norberg-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "parks-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-3-pismo-beach-school-board", "vote": "False"}], "object_id": "pismo-beach-school-board-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "ozark-chief-justice-retain-demergue-affirmative-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "ozark-chief-justice-retain-demergue-negative-selection", "vote": "False"}], "object_id": "arlington-chief-justice-retain-demergue"}], "object_id": "ballot-491a5b5a-dd9a-11ea-9107-f45c89ba671b"}

Просмотреть файл

@ -0,0 +1 @@
{"ballot_style": "congress-district-5-harris", "contests": [{"ballot_selections": [{"is_placeholder_selection": false, "object_id": "barchi-hallaren-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "cramer-vuocolo-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "court-blumhardt-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "boone-lian-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "hildebrand-garritty-selection", "vote": "False"}], "object_id": "president-vice-president-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "harris-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "sharp-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "walace-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "alexander-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "mitchell-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "ash-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "kennedy-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "jackson-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "ward-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "murphy-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "york-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-governor", "vote": "False"}], "object_id": "ozark-governor"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "soliz-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "keller-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "rangel-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "argent-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "witherspoon-smithson-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-us-congress-district-5", "vote": "True"}], "object_id": "congress-district-5-contest"}], "object_id": "ballot-491a7e5a-dd9a-11ea-9107-f45c89ba671b"}

Просмотреть файл

@ -0,0 +1 @@
{"ballot_style": "congress-district-5-arlington-pismo-beach", "contests": [{"ballot_selections": [{"is_placeholder_selection": false, "object_id": "barchi-hallaren-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "cramer-vuocolo-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "patterson-lariviere-selection", "vote": "False"}], "object_id": "president-vice-president-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "franz-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "harris-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "bargmann-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "steel-loy-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "walace-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "windbeck-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "sharp-althea-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "mitchell-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "jackson-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "brown-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "teller-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "ward-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "callanann-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "chandler-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-governor", "vote": "False"}], "object_id": "ozark-governor"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "soliz-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-us-congress-district-5", "vote": "False"}], "object_id": "congress-district-5-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "moore-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "white-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "smallberries-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "norberg-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "parks-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-2-pismo-beach-school-board", "vote": "False"}], "object_id": "pismo-beach-school-board-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "ozark-chief-justice-retain-demergue-affirmative-selection", "vote": "False"}], "object_id": "arlington-chief-justice-retain-demergue"}], "object_id": "ballot-491a900c-dd9a-11ea-9107-f45c89ba671b"}

Просмотреть файл

@ -0,0 +1 @@
{"ballot_style": "congress-district-7-lacroix-exeter", "contests": [{"ballot_selections": [{"is_placeholder_selection": false, "object_id": "barchi-hallaren-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "court-blumhardt-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-president", "vote": "False"}], "object_id": "president-vice-president-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "franz-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "harris-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "bargmann-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "abcock-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "walace-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "williams-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "alpern-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "greher-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "mitchell-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "kennedy-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "jackson-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "brown-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "teller-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "newman-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "chandler-selection", "vote": "False"}], "object_id": "ozark-governor"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "bainbridge-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "hennessey-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "tawa-selection", "vote": "True"}], "object_id": "congress-district-7-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "exeter-utility-district-referendum-affirmative-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "exeter-utility-district-referendum-selection", "vote": "True"}], "object_id": "exeter-utility-district-referendum-contest"}], "object_id": "ballot-491aac7c-dd9a-11ea-9107-f45c89ba671b"}

Просмотреть файл

@ -0,0 +1 @@
{"ballot_style": "congress-district-7-arlington", "contests": [{"ballot_selections": [{"is_placeholder_selection": false, "object_id": "barchi-hallaren-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "cramer-vuocolo-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "hildebrand-garritty-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "write-in-selection-president", "vote": "False"}], "object_id": "president-vice-president-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "franz-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "harris-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "steel-loy-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "sharp-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "walace-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "windbeck-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "sharp-althea-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "greher-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "ash-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "jackson-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "teller-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "callanann-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "york-selection", "vote": "False"}], "object_id": "ozark-governor"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "bainbridge-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "hennessey-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "savoy-selection", "vote": "True"}, {"is_placeholder_selection": false, "object_id": "tawa-mary-selection", "vote": "False"}], "object_id": "congress-district-7-contest"}, {"ballot_selections": [{"is_placeholder_selection": false, "object_id": "ozark-chief-justice-retain-demergue-affirmative-selection", "vote": "False"}, {"is_placeholder_selection": false, "object_id": "ozark-chief-justice-retain-demergue-negative-selection", "vote": "False"}], "object_id": "arlington-chief-justice-retain-demergue"}], "object_id": "ballot-491abe92-dd9a-11ea-9107-f45c89ba671b"}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -6,7 +6,7 @@ from .guardian import Guardian
from .election import CiphertextElectionContext, ElectionConstants, ElectionDescription
from .encrypt import EncryptionDevice
from .key_ceremony import CoefficientValidationSet
from .tally import PublishedPlaintextTally, PublishedCiphertextTally
from .tally import PlaintextTally, PublishedCiphertextTally
from .utils import make_directory
RESULTS_DIR = "results"
@ -31,7 +31,7 @@ BALLOT_PREFIX = "ballot_"
PLAINTEXT_BALLOT_PREFIX = "plaintext_ballot_"
GUARDIAN_PREFIX = "guardian_"
# TODO #148 Revert PlaintextTally to PublishedPlaintextTally after moving spoiled info
def publish(
description: ElectionDescription,
context: CiphertextElectionContext,
@ -40,7 +40,7 @@ def publish(
ciphertext_ballots: Iterable[CiphertextAcceptedBallot],
spoiled_ballots: Iterable[CiphertextAcceptedBallot],
ciphertext_tally: PublishedCiphertextTally,
plaintext_tally: PublishedPlaintextTally,
plaintext_tally: PlaintextTally,
coefficient_validation_sets: Iterable[CoefficientValidationSet] = None,
results_directory: str = RESULTS_DIR,
) -> None:

Просмотреть файл

@ -4,7 +4,7 @@ from shutil import rmtree
from typing import List
import uuid
from electionguardtest.election_factory import ElectionFactory
from electionguardtest.election_factory import ElectionFactory, QUORUM
from electionguardtest.ballot_factory import BallotFactory
from electionguard.ballot import (
@ -16,11 +16,12 @@ from electionguard.ballot_box import BallotBox
from electionguard.decryption_mediator import DecryptionMediator
from electionguard.encrypt import EncryptionDevice, EncryptionMediator
from electionguard.publish import publish, publish_private_data, RESULTS_DIR
from electionguard.tally import tally_ballots
from electionguard.tally import tally_ballots, publish_ciphertext_tally
from electionguard.utils import get_optional
DEFAULT_NUMBER_OF_BALLOTS = 100
CAST_SPOIL_RATIO = 10
DEFAULT_NUMBER_OF_BALLOTS = 5
CAST_SPOIL_RATIO = 50
THRESHOLD_ONLY = True
class ElectionSampleDataGenerator:
@ -92,8 +93,9 @@ class ElectionSampleDataGenerator:
public_data.metadata, public_data.context, ciphertext_tally
)
for guardian in private_data.guardians:
decrypter.announce(guardian)
for i, guardian in enumerate(private_data.guardians):
if i < QUORUM or not THRESHOLD_ONLY:
decrypter.announce(guardian)
plaintext_tally = get_optional(decrypter.get_plaintext_tally())
@ -105,7 +107,7 @@ class ElectionSampleDataGenerator:
[self.encryption_device],
accepted_ballots,
ciphertext_tally.spoiled_ballots.values(),
ciphertext_tally,
publish_ciphertext_tally(ciphertext_tally),
plaintext_tally,
public_data.guardians,
)

Просмотреть файл

@ -45,11 +45,10 @@ from electionguard.tally import (
tally_ballots,
CiphertextTally,
PublishedCiphertextTally,
PublishedPlaintextTally,
PlaintextTally,
publish_ciphertext_tally,
publish_plaintext_tally,
)
from electionguard.decryption_mediator import DecryptionMediator, PlaintextTally
from electionguard.decryption_mediator import DecryptionMediator
# Step 5 - Publish and Verify
from electionguard.publish import (
@ -428,7 +427,7 @@ class TestEndToEndElection(TestCase):
self.ballot_store.all(),
self.ciphertext_tally.spoiled_ballots.values(),
publish_ciphertext_tally(self.ciphertext_tally),
publish_plaintext_tally(self.plaintext_tally),
self.plaintext_tally,
self.coefficient_validation_sets,
)
self._assert_message(
@ -483,12 +482,10 @@ class TestEndToEndElection(TestCase):
publish_ciphertext_tally(self.ciphertext_tally), ciphertext_tally_from_file
)
plainttext_tally_from_file = PublishedPlaintextTally.from_json_file(
plainttext_tally_from_file = PlaintextTally.from_json_file(
TALLY_FILE_NAME, RESULTS_DIR
)
self.assertEqual(
publish_plaintext_tally(self.plaintext_tally), plainttext_tally_from_file
)
self.assertEqual(self.plaintext_tally, plainttext_tally_from_file)
coefficient_validation_sets: List[CoefficientValidationSet] = []
for coefficient_validation_set in self.coefficient_validation_sets:

Просмотреть файл

@ -20,7 +20,6 @@ from electionguard.publish import publish, publish_private_data, RESULTS_DIR
from electionguard.tally import (
CiphertextTally,
PlaintextTally,
publish_plaintext_tally,
publish_ciphertext_tally,
)
@ -38,7 +37,7 @@ class TestPublish(TestCase):
coefficients = [CoefficientValidationSet("", [], [])]
encrypted_ballots = []
spoiled_ballots = []
plaintext_tally = publish_plaintext_tally(PlaintextTally("", [], []))
plaintext_tally = PlaintextTally("", [], [])
ciphertext_tally = publish_ciphertext_tally(
CiphertextTally("", description, context)
)