-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
R4R: Distr-PR-5 Implement Distribution #2236
Conversation
Is this PR intended to contain both spec and implementation? (I'm confused by it changing the Lamborghini fee spec, which I thought we decided not to implement) |
@cwgoes it doesn't change the lamboragini spec, I just moved it's location (and then I moved it back for PR clarity, but for some reason it's still showing up in the git diff, I'll look into it before it's R4R) |
@cwgoes - mostly addressed your comments left a few "unresolved" if you care to comment further I'll check up / also - time for a final review! |
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.
Mostly minor changes req'd, testcases look comprehensive.
x/distribution/keeper/allocation.go
Outdated
// allocated rewards to proposer | ||
percentVotes := k.GetPercentPrecommitVotes(ctx) | ||
|
||
proposerMultiplier := sdk.NewDecWithPrec(1, 2).Add(sdk.NewDecWithPrec(4, 2).Mul(percentVotes)) |
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 4 should be moved to a constant / var. We can put it into the paramstore in a second PR. This line could also use a comment.
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.
as per previous discussions not sure we care to put this in the params store, if we don't expect to change often at-all - I wonder how that change would affect the performance though? This code does execute every block
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.
In my opinion, this seems like one of those things that governance should absolutely be able to control. It doesn't matter if we think it will change often.
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.
@ValarDragon governance can control it either way with hard upgrade so that shouldn't be the primary motive.. I reckon expected upgrade frequency does play a role if whether or not to add to the params store - as well as performance costs
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.
I don't think the performance costs are substantial at all, especially once we have inter-block caching.
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.
I really don't see why we'd want a hard upgrade for something that can be changed live. This is absolutely a negligible performance cost, especially since it can be stored as a decimal in a local cache.
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.
cool - thanks for the details - then agreed - I'll just update it now here, save opening another issue
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.
One tiny comment but doesn't need to block merge - utACK 🎈 💰
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.
Ah Houston, I think we may have a 🚀 💰 problem after all - the proposer is from the current block, but the percent-voting is from the last commit - that won't incentivize the proposer to include commits...
We might need to process fees for block n
in the beginblocker of n+1
Solution from slack:
|
utACK, looks like CI nondeterminism is causing |
Ran CI again twice... |
Closes #1671
Closes #583
Precursor PRs to merge before this one:
Related work which should be done in new separate PR's after this one
docs/
)PENDING.md
with issue #Files changed
in the github PR explorerFor Admin Use: