-
Notifications
You must be signed in to change notification settings - Fork 9
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
consensus: Rename SiafundPool -> SiafundTaxRevenue #235
Conversation
4ee4b65
to
07eab45
Compare
The field name is fine, but I'm split on the tax change. On one hand, it's objectively more correct. On the other, it will require us to reset Anagami for minimal benefit 😓 I'm approving since there's nothing technically wrong and leave it up to you and Chris, but would advise caution on whether the tax change is worth it at this point in the hardfork. |
I suppose we could make a separate branch for changes that should wait until the testnet is reset 🤔 |
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.
We should probably discuss this on a call but my initial gut feeling it to not touch the tax code because
- generally speaking I'd like to draw the line at what we have right now and not introduce any new breaking changes. There will always be stuff to tweak.
- the benefits don't outweigh the risks imo
- the fact that changing this code didn't cause any tests to fail doesn't spark joy xD
Harumph. Ok, I'm fine leaving it out of this PR, but I do think we should accumulate any breaking changes in a separate branch. We'll almost certainly end up resetting Anagami once or twice before releasing the final v2 binaries; I think it'd be wasteful not to use those opportunities to deploy breaking changes. btw, the reason all these consensus changes are coming now is because I'm throwing myself into the new v2 documentation, and thoroughly documenting something has a way of revealing subtle errors and inspiring new ideas. So, the sooner I finish the docs, the better. 😅 |
07eab45
to
aea8a71
Compare
aea8a71
to
2cae9aa
Compare
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.
Would like to see a test that the pool is updated correctly and claiming works as expected.
"Pool" was always a bit of a misnomer, because making a siafund claim doesn't subtract value from the "pool." Its actual function is to record the total revenue at specific points in time, so that we can calculate the delta between two points and thereby determine the value of the dividend.
I also slightly tweaked how dividends are calculated in v2. Previously, all file contract taxes were rounded down to a multiple of 10,000 H, so that they would be evenly divisible by the number of siafunds. But this isn't actually necessary; you can just divide when you calculate the claim value, and the rounding will occur then. This is slightly more fair anyway: as an extreme example, if all contract taxes had a value of 9999 H, siafund holders would never receive any dividends, no matter how many contracts were formed.