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

๐Ÿ›๏ธ [EPIC] : Catalyst Gateway Voting #35

Open
12 of 35 tasks
stevenj opened this issue Oct 5, 2023 · 0 comments
Open
12 of 35 tasks

๐Ÿ›๏ธ [EPIC] : Catalyst Gateway Voting #35

stevenj opened this issue Oct 5, 2023 · 0 comments
Assignees
Labels
epic A high-level feature or collection of related user stories/tasks that span multiple issues.

Comments

@stevenj
Copy link
Collaborator

stevenj commented Oct 5, 2023

Summary

First phase of an improved vote storage solution for catalyst voices

JIRA Epic

https://input-output.atlassian.net/browse/NPG-8295

Description

Vote storage solution for Catalyst Voices.

The Catalyst gateway will become an improved vote storage mechanism for Catalyst and the staging ground for work on fully decentralizing vote storage which will only be fully realized in the Hermes/Athena projects.

Todo

Phase 0 - Prepare Voting Libraries and Algorithms

Phase 1 - API Setup

In this phase, API endpoints will be created, with no functionality, that answer the same API calls as the existing jormungandr node.
These APIs are interim and allow us to have backwards compatibility, so even though we are implementing them new, they are to be marked as deprecated to signal our intent to obsolete them.

This Phase does not create any implementation beyond setting up the endpoints themselves, and setting up the data structures associated with the requests and responses. The OpenAPI documentation must be fully complete for each endpoint to be Done.

We ONLY need to implement endpoints that are used by:

  1. The Mobile voting app
  2. The Web based voting app GVC (Which can be assumed to be identical to the Mobile voting app for this process).
  3. Produce results from tally, or are involved in the tally.
  4. Other endpoints inside jormungandr are NOT to be implemented.
  5. The behavior of any and all CLI tools regarding these APIs is out of scope and backward compatibility with them is also out of scope. No work will be done to support backwards compatibility with CLI tools, either for Voting or operational purposes.

Even if an endpoint is listed in these tasks, it must be validated if it fits the above criteria before work commenced.
Any endpoints that fit the above criteria, but are not listed, needs to be raised with engineering management BEFORE being added to the list.
Any endpoint to do with the operation of voting, such as fragment logs are out of scope and that data will be reported by alternative means.
Endpoints also only need to be implemented as far as the response is used by an in-scope application. This needs to be validated.
For example, if an endpoint return 35 fields, but the app only uses 2 of them and ignores the rest, then response needs to be reduced to the set of data the app needs to operate correctly and all other data excluded.

Do not rely solely on the existing API documentation validate against both:

  1. Jormungandr code
  2. Norns voting app

See: https://github.com/input-output-hk/catalyst-core/blob/f1553974f6bd531508107e1f973c734080b386e6/book/src/07_web_api/openapi/core_ledger_v0.yaml#L720 for OpenAPI Schema of these endpoints, for reference.

Phase 2 - DB Setup

Votes will be stored into the cassandra type db, pending archival into an indelible voting ledger.
All valid votes logged to the DB will be assumed to be also in the voting ledger for this phase.

Unlike Jormungandr, we should be able to pre-configure all the fund information including cryptographic keys and vote plans well in advance of voting commencing, and even in advance of the final snapshot.

We do not need to create a block0 as it is known in Jormungandr just prior to voting, as we can directly query the registration data as a source of truth, both during voting and during tally as a validation.

Phase 3 - Endpoint Implementation

This phase adds the implementation to the endpoints created in Phase 1 with the data.

At this stage there should be no caching of votes, all vote storage and retrieval is directly on the DB. There is no mempool of any description. The endpoints which cast votes should be done before the endpoints which return statuses.

Phase 4 - Tally and Results

  • Product and Engineering to collaborate on defining the necessary functional requirements for tallying and results generation.

Phase 5 - Persistent tamper proof voting ledger storage.

  • Design a tamper proof and persistent voting ledger storage mechanism.

Phase 6 - Initial Decentralization of voting ledger.

  • Design a decentralized real-time distribution mechanism for the tamper proof voting ledger storage.
@stevenj stevenj added the epic A high-level feature or collection of related user stories/tasks that span multiple issues. label Oct 5, 2023
@stevenj stevenj added this to the M4: Voting & Delegation milestone Oct 5, 2023
@stevenj stevenj moved this to ๐Ÿ†• New in Catalyst Oct 5, 2023
@stevenj stevenj moved this from ๐Ÿ†• New to ๐Ÿ— In progress in Catalyst Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic A high-level feature or collection of related user stories/tasks that span multiple issues.
Projects
Status: ๐Ÿ— In progress
Development

No branches or pull requests

1 participant