-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Fix] Avoid remove vote when the account transfer all the neo #3720
base: master
Are you sure you want to change the base?
Conversation
This reverts commit 1f646e3.
Hi @shargon , |
You paid for this storage when you vote |
Yes, but my concern is that this value will stay there forever. I was just wondering if there was a better option since it doesn't make sense to keep the candidate stored while the user has no votes. |
For me it's totally different, i vote you, and when I have balance I earn gas, but when not, i don't earn nothing, imagine change all your receipts if your bank account is zero, what's the sense? Or we duplicate the keys and we store them in different places, or we need this information although without balance. Different things that cause unexpected results during voting. I can vote with 0 balance, but my voting power is zero. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will clutter our storage with useless entries, I do not agree it's a problem (and we had this behavior for 3+ years), long-term these stale entries are a bigger problem.
Is not useless, you vote for it. If a problem appears after 3 years, that's not means that is not a problem... we can separate the values in different keys, I'm sure it will be worst because the duplicate key |
Well, let's get some statistics then:
With 6M+ blocks this can be somewhat representative. But I really think that current behavior is fair, no NEO --- no voting, nothing to store. And I expect many accounts to be used temporarily, so they come, get NEO, vote, spend NEO and never return. Maybe this assumption is wrong. But it looks to me that we're trying to solve the problem three people have while adding overhead for the whole network. |
Bottomline they paid for the storage. It should stay or refund should be issued. |
another valid solution is fault if you left 0 neo and vote for something, if you want to transfer it you should vote for null |
{ | ||
if (engine.IsHardforkEnabled(Hardfork.HF_Echidna)) | ||
{ | ||
if (state.VoteTo != null) return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (state.VoteTo != null) return false; | |
if (state.VoteTo != null) | |
{ | |
throw new UncatcheableException("You need to vote for null if you want to transfer all your neos"); | |
} |
something like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat, but then people will complain that "Neo forces us to make two transactions instead of one".
Description
Fix #3721
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: