Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 4.01 KB

README.md

File metadata and controls

40 lines (31 loc) · 4.01 KB

On Chain Voting for FIPs

This repo contains a complete copy of the on chain voting tool being developed by the Filecoin Foundation, in partnership with StorSwift, for use in the Filecoin Improvement Proposal (FIP) process. More information about FIPs can be found in the FIPs repo

If you'd like to try out a deployed version of the tool, you can check it out at vote.fil.org.

Please keep in mind, the tool is still under active development, and may not currently meet all the requirements of our community. If you find someplace where we are falling short (i.e. buggy code, clunky UI, unclear process), please submit an issue to this repo and bring it to our attention.

Specification

The specification for the on chain voting tool can be found in this Google Doc

Repo structure

The system at a high level is composed of a few core components, each listed in a separate folder:

  • docs: Documentation
  • power-oracle-contracts: Contains smart contracts for the Oracle contract functionality, which stores voter info, miner id mappings, and other shared state.
  • power-oracle-node: Contains the code for the Oracle nodes that power the Oracle contract
  • power-snapshot: Contains code for the snapshot service, used to take and store snapshots of key data for later use in calculating vote power.
  • power-voting: Contains the frontend dApp code that runs the UI, timelock encypts vote data, and stores proposals and ecnypted data in web3.storage.
  • powervoting-backend: The powervoting backend contains code necessary to sync proposals and votes, decode all votes once the timelock encryption has expired, and calculate the final result based on the power of each respective vote. Everything this service does should be independently verifiable using on chain data.
  • powervoting-contracts: Contains smart contracts used for the core Power Voting functionality, including managing FIP Editors, creating proposals, and casting votes.
  • ucan-utils: Contains utility functions for UCAN delegations, which is currently used for delegating voting rights, associated miner addresses, and associating github accounts with a wallet.

Testing

Each component of the overall system is tested using a go test suite (or forge, in the case of smart contracts). The test suite for each component is run by CI anytime the code in that subfolder changes. You can view test history on theGithub actions page: https://github.com/filecoin-project/on-chain-voting/actions

Community Code Review

“Given enough eyeballs, all bugs are shallow” - Linus’s Law

We are requesting the community help us to engage in a community code review of the current implementation. This is to make sure of a few things:

  • There are no errors with the specification
  • The current implementation (and associated tests) agree with the specification
  • The current test suite is testing the code correctly
  • There are no critical pathways that are not being tested)
  • The current tool is usable by all members of the community
  • The current tool is not biased towards any one particular part of the community

To share your feedback, please file an issue on this repository, or reach out to [email protected] directly with more substaintial questions.