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

feat: speedup epoch distribution, superfluid component (backport #2214) #2262

Closed
wants to merge 4 commits into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 31, 2022

This is an automatic backport of pull request #2214 done by Mergify.
Cherry-pick of 3cdfbcc has failed:

On branch mergify/bp/v9.x/pr-2214
Your branch is up to date with 'origin/v9.x'.

You are currently cherry-picking commit 3cdfbccd.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md
	both modified:   x/incentives/keeper/distribute.go

no changes added to commit (use "git add" and/or "git commit -a")

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> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

* 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
@mergify mergify bot requested a review from a team July 31, 2022 13:37
@mergify mergify bot added the conflicts label Jul 31, 2022
@ValarDragon ValarDragon self-assigned this Jul 31, 2022
@czarcas7ic czarcas7ic force-pushed the mergify/bp/v9.x/pr-2214 branch from e235ca2 to 7b53339 Compare July 31, 2022 21:11
CHANGELOG.md Outdated Show resolved Hide resolved
@@ -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)
Copy link
Member

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

Copy link
Member

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

Copy link
Member

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

@czarcas7ic
Copy link
Member

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

@ValarDragon
Copy link
Member

ValarDragon commented Aug 3, 2022

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)

@czarcas7ic
Copy link
Member

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

@github-actions
Copy link
Contributor

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!

@github-actions github-actions bot added the Stale label Aug 18, 2022
@czarcas7ic czarcas7ic removed the Stale label Aug 18, 2022
@czarcas7ic czarcas7ic closed this Aug 20, 2022
@mergify mergify bot deleted the mergify/bp/v9.x/pr-2214 branch August 20, 2022 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants