-
Notifications
You must be signed in to change notification settings - Fork 608
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
feat: speedup epoch distribution, superfluid component (backport #2214) #2262
Conversation
* Speedup epoch distribution, superfluid component * changelog entries * lint Co-authored-by: Dev Ojha <[email protected]> (cherry picked from commit 3cdfbcc) # Conflicts: # CHANGELOG.md # x/incentives/keeper/distribute.go
e235ca2
to
7b53339
Compare
@@ -228,64 +228,37 @@ func (k Keeper) doDistributionSends(ctx sdk.Context, distrs *distributionInfo) e | |||
func (k Keeper) distributeSyntheticInternal( | |||
ctx sdk.Context, gauge types.Gauge, locks []lockuptypes.PeriodLock, distrInfo *distributionInfo, | |||
) (sdk.Coins, error) { | |||
totalDistrCoins := sdk.NewCoins() | |||
denom := gauge.DistributeTo.Denom | |||
qualifiedLocks := k.lk.GetLocksLongerThanDurationDenom(ctx, gauge.DistributeTo.Denom, gauge.DistributeTo.Duration) |
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.
Question: is this change not susceptible to the recent gas reordering bug because it happens in BeginBlock?
cc: @ValarDragon
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.
Yeah exactly, we don't have gas tracking for beginblock / endblock
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.
It was only getting merkelized due to it being in a txs flow before
Co-authored-by: Roman <[email protected]>
If we don't mind leaving these open, I am having to sync from genesis to get snapshots at each upgrade in order for @niccoloraspa to enable state compatibility checks for each of these branches. I sadly imagine this taking like, 4/5 days though due to syncing from genesis speed |
That sounds good to me! (Though I'm pretty happy if it gets through a couple v7.x epochs) Can we in this process also save some snapshots from prior versions to help us out in the future? (We can run through all of these in pruned db modes) |
Yep, I will have a folder for every version from v3 to current-1 that starts 100 blocks before the first epoch of that version |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you! |
This is an automatic backport of pull request #2214 done by Mergify.
Cherry-pick of 3cdfbcc has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Mergify commands and options
More conditions and actions can be found in the documentation.
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refresh
will re-evaluate the rules@Mergifyio rebase
will rebase this PR on its base branch@Mergifyio update
will merge the base branch into this PR@Mergifyio backport <destination>
will backport this PR on<destination>
branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com