[X] I could not find a solution in the existing issues, docs, nor discussions.
Suggestion
Currently, the endpoint /update-tally-ceremony is publishing the insert_ballots tasks that manage inserting the ballots into the correct immudb board. This can be problematic because it publishes one task for each contest. If there are 100 contests and publishing one task fails, at the moment the system won't recover from it.
Possible Implementation
Add a new tally session status: inserting ballots. It should go after "connected". There should be a new task insert_tally_ballots that
Tasks
# Tasks
- [ ] Add a new tally session status: inserting ballots. It should go after "connected".
- [ ] Create a new task `insert_tally_ballots` that publishes the `insert_ballots` tasks. `insert_tally_ballots` should be derived from the tally session state in the database and triggered from `process_board`.
- [ ] `insert_tally_ballots`should update the tally session logs.
- [ ] The `insert_ballots` tasks should use the lock mechanism used in `execute_tally_session`.
- [ ] The `insert_ballots` tasks should identify whether the ballots have already been inserted into the immudb board, by looking into the board.
- [ ] `insert_ballots`should update the tally session logs.
@Findeton shouldn't insert ballots be actually before connected? this way, trustees could know which ballots are being tallied when inserting their keys.
Preflight checklist
Suggestion
Currently, the endpoint
/update-tally-ceremony
is publishing theinsert_ballots
tasks that manage inserting the ballots into the correct immudb board. This can be problematic because it publishes one task for each contest. If there are 100 contests and publishing one task fails, at the moment the system won't recover from it.Possible Implementation
Add a new tally session status: inserting ballots. It should go after "connected". There should be a new task
insert_tally_ballots
thatTasks