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

Why do we need revoke_list and index_party_list? #4

Open
JhChoy opened this issue May 2, 2018 · 2 comments
Open

Why do we need revoke_list and index_party_list? #4

JhChoy opened this issue May 2, 2018 · 2 comments
Assignees
Labels
dev Something about implementations enhancement New feature or request

Comments

@JhChoy
Copy link
Member

JhChoy commented May 2, 2018

  1. revoke function
    I don't think it's necessary. We designed voters to make cancel and re-vote easily.

  2. index_party_list
    we can omit it by using address[] party_list instead of mapping(uint=>address) party_list

Also, we should separate functions of developers(or lockedTokens) and normal voters. Actually developers(and lockedTokens) can't vote via normal vote function because they are locked in one contract(VestingTokens.sol).
Then, we can separate party_list to locked_party_list and public_party_list. This process doesn't need isDeveloper check process of _snapshot function.
Above dividing process could reduce gas prices of _snapshot function

@JhChoy JhChoy added enhancement New feature or request dev Something about implementations labels May 2, 2018
@jw-pyo
Copy link
Member

jw-pyo commented May 2, 2018

  1. revoke function
    Yeah, revoke() is withholded because of necessity. Then, we make a getBack() function on vote contract instead of revoke().

You mean mapping(address=>vote_receipt) party_dict? If we use only address[] party_list , we should bear a huge operation when deletion of some addresses. Because in the middle of account is eliminated, it is necessary to pull up all accounts behind eliminated account. But if we use mapping(address=>vote_receipt) party_dict, we don't need any additional operation(because we mask the boolean as false/true) and also get the personal information such as voting power.

And, I agree that separating party list into two groups.

@JhChoy
Copy link
Member Author

JhChoy commented May 2, 2018

Agree with that point.
Sry for latest commit. Please check party_list I've changed it to address[]. And please do the splitting party_dict process together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Something about implementations enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants