DemocracyEarth / old_dapp

Liquid democracy smart contract implementation
32 stars 13 forks source link

54 delegation voting #75

Closed aecc closed 6 years ago

aecc commented 6 years ago

Fixes (2) in #54

Graph is visualized correctly.

Some restrictions:

  1. There is still a single universal ballot (no support for voting in multiple ballots has been added)
  2. A ballot needs to be created before voting/delegation
  3. Any action on any ballot (including pre-created ones) will affect the single ballot existent
  4. Given the restriciton of #71 If you need to change voters (register a new voter after another one), you are required to remove local storage on the chrome settings or using localStorage.clear() in JS console
  5. In order for this PR to work correctly #74 needs to be merged first
  6. After delegating/voting, you need to go back and forward (refresh) to display the result

We probably need to have some discussions about the data models. To allow multiple ballots to work correctly and efficiently

Current screenshot:

image

medied commented 6 years ago

@aecc @LucasIsasmendi can someone provide me with more context on LiquidDemocracy.json and Migrations.json (both under /dApp-Srv-Exp/contracts)?

I see that they're basically the ABI but want to understand how they fit into code structure under dApp-Srv-Exp and root /contracts overall.

In PRs like this one the diffs are huge (+11,777 −8,139) because of the json files, assuming they can't be added to .gitignore

LucasIsasmendi commented 6 years ago

Yes, we are adding that files to .gitignore, in the future all local runs should compile the contract

LucasIsasmendi commented 6 years ago

Also we should improve ipfs files, they are more than 3MB each, is a lot for a min file.

aecc commented 6 years ago

@LucasIsasmendi the old ipfs js it's not used anymore. However I recommend not to remove it if we are going for a local + remote approach on IPFS nodes.

aecc commented 6 years ago

@medied I think @LucasIsasmendi already mentioned most of it. But something to add: json files are compiled .sol contracts (using truffle) meant to be understood by web3 (web3 will take care of api calls to the blockchain using the APIs compiled in the jsons). Also, because of limitations/bugs in truffle we need to copy them from /contracs/build/ to /dApp-Srv-Exp/contracts. /contracs/build/ is ignored, but /dApp-Srv-Exp/contracts not. Basically because I wanted to have the "deployed" contracts somewhere saved. But because there is no way to redeploy a contract without changing it. It's probably just better to store it in the place where we deploy it from (like heroku)

medied commented 6 years ago

Okay this is useful context, thank you!