the-canonizer / canonizer.2.0

The Canonizer 2.0 system built on a PHP / MySQL( Laravel Framework 5.4 )
MIT License
5 stars 4 forks source link

2 Ether Canonizers (from live blockchain data) #538

Open BrentAllsop opened 5 years ago

BrentAllsop commented 5 years ago

We need to implement a Canonizer algorithm that works similar to the way this tennagraph system works: https://tennagraph.com/eip/1057

Tenna graph is an open source python project that runs in docker. https://github.com/TennaGraph/TennaGraph We need to use as much of this code as possible, including the same Ether smart contracts.

We need to have these Algorithms: Ether: (1 eth = 1 vote) measured down to the wei. Quadratic Ether: (sqrt(eth) = vote)

We will not show the values for each individual in the support tree. Just the total vote for the camp, to maintain privacy.

Each day a person has eather, we will take a snapshot of an individual's total ether held at that time. Store a record for that person for "As of" history purposes, until a change in total ether occurs, then enter a new record for that person.

gautamv16 commented 4 years ago

@akuks still working on this.....

BrentAllsop commented 4 years ago

Remaining issues:

  1. But name changes:

    • The first button says "enable metamask" this need to change to "Login to metamask"
    • once you log into or enable metamask, the "Enable Metamask" button is still showing, some times. But it doesn't seem to do anything, once I re login to metamask and such. This happens if your metamask login times out.
      • A second button currently says "login with metamast" but should say: "Add verified address".
    • The current comment: "Please login with metamask credentials to get the details." needs to change to: "The address currently active in Metamask will be verified and added to this table."
  2. No single ether address can be active at the same time.

    • otherwise we'll have lots of sock puppets.
    • If there is already an active record with that address for this user, an error should pop up that says: "This address is already in this table."
    • If this address is already active with another user it should say:
      • "This address has been verified and is still active for another user."
  3. We need to be able to specify a "Minimum\nAggregation" (\n is EOL so second word unter the first to save column space) in a column for each address record.

    • It's default value will be 10.
    • This would mean that a canonized score would not include the ether in that address, unless there were 10 people with ether included in that aggregate canonized value.
    • The user may have address A with 2 ether and address B with 1000 Ether.
    • If they set the "Minimum aggregation" for A to 1. These 2 ether can be indicated in his personal canonized score, since there is no others contributing to personal canonized scored.
    • He could set Address B to 10. In this case, that 1000 Ether would not be included in any canonized score, unless there were more than 10 people with ether aggregated in that score.
    • In other words, once you get to a super camp that includes enough supporters with ether in the Aggregate camp scores, that 1000 Ether will finally be counted. Nobody will no which user, or which sub camp that ether could be from. When we are recursively totalling aggregate ether values, we will need to track a value for how many users are included in each value. And we will need to include a list of values, and their Minimum Aggregated values that are not yet included, and only move them from the not included list, to the included value with new aggregate totals, once the minimum aggregation value is met for each record.
  4. We also need a second "Quadratic Ether" algorithm. Same as Ether but do a square root on the number of ether for the canonized score.

  5. We need to add a description of this algorithm in the canonizer algorithms descriptions topic:

  6. Need a way to delete address records.

    • The current "Edit" button should change to a "Delete" button.
    • There needs to be a pencil icon by the name field and the Minimum aggregation field.
    • Address records will be a 4h asof record (like topic, camp and statement) which has begin and end times. These records will be immutable, and can only be replaced.
    • Deleting will just set the stop time on the record.
    • If you want to re-enter that address, then you will do the same verification, again, through metamask.
    • There will be multiple records with the same ether address, just only one record, at most, active at any point in time.
  7. The terminology should be "Ether Address Record" which represents the entire row in the table.

    • The address in each record should be a etherscan.io link like this:
    • Instead of just "Success! Ether Address saved successfully."
      • it should be "Success! Ether address record saved.
      • Ether address record deleted.
      • The Balance value should be live (as of page display) like the canonized values.
  8. Unrelated to this, but the label on the "Account Settings" page is currently "Profile"

    • This should be changed to "Account Settings" so terminology is consistent.
  9. On the "Account Settings" page there is a "MataMaks" tab.

    • The name of this tab should be "Ether Ownership".
  10. We need to verify that this works if they have MyEther Wallet instead of Metamask.

BrentAllsop commented 4 years ago

I think this is ready for release, as is. It's not yet ready to close this issue, but I'm adding the "ready to release" flag for this.

BrentAllsop commented 4 years ago

https://github.com/the-canonizer/canonizer.2.0/issues/609 is still open, so we don't need both this and that one to remain open. So I'm going to close this one.

BrentAllsop commented 4 years ago

Sorry, I shouldn't have closed this. This is the one for the meta mask linking. We need to be able to link more than one address. And addresses, once verified, should stay linked (even without metamask)

And we need to be able to use other wallets besides metamask.

gautamv16 commented 3 years ago

@rupalichavan9860 , @BrentAllsop It is implemented pls test

BrentAllsop commented 3 years ago

@rupalichavan9860, I tested the cases I am aware of, and everything is working. If it looks OK to you, you can close this.

rupalichavan9860 commented 3 years ago

@gautamv16 @BrentAllsop Tested and verified. I don't see any issues in this, so closing this issue

BrentAllsop commented 3 years ago

Some stuff still needs to be fixed. I will add a list of things soon.

BrentAllsop commented 3 years ago

There are still problems with the ether address verification system.

  1. Currently, the score shown on the Account Settings pages shows the value from MetaMask. It should be from the API to get it directly from the blockchain. If you set metamask to point to a test network, it gets the ether value from the test network, not the real blockchain.
  2. I just compared staging to live, and it looks like the ether value is saved in the DB. So if you have MetaMask set to a test network, (Like I did in production) it will get the test network value saved in the DB, not the right value.
  3. The Ether score for the canonizer algorithm on the live system isn’t working. I had metamask set to a test network, so it shows the value of ether in that address on the personal setting page, on the test network, which is different than the same address on the live network. On staging, it does show my canonized ether score on the camps I support, but on the live system, it just shows zero. I'd think it should at least show the same value as on the personal settings page, or correctly, the value on the real blockchain for that address - not zero.
  4. We need to have the ability to remove addresses from our account.
  5. We need to have the ability to add multiple addresses.
  6. If you already have MetaMask wallet open (and logged in) it still says: “Log in to metamask” But when you click it, it doesn’t go to login, it goes directly to the sign the proof page. So when MetaMask is open, the button should say: “Verify Address” (Or plura addressesl, if multiple addresses are possible.
  7. We need to test to see if this works with at least on other wallet, besides MetaMask.