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

fix: tx prioritization (backport #101) #103

Merged
merged 3 commits into from
Jun 6, 2024
Merged

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jun 6, 2024

  • pass the entire pay amount (amount used in --fee) into the txPriority calculation. This incorporates a notion of "payment over the base fee" that is used to actually derive your priority. We retain dividing by gas limit so that priority is denominated in "gas price"
  • the Coin passed into the priority calculation will always be resolved to the feemarket base fee. This calculation is always truncated when going from DecCoins to Coins
  • Refactor GetTxPriority to scale the values to integers. Previously, when gasPrices were < 1, nearly all priorities would just be truncated to 0. Added fuzz testing around this
    This is an automatic backport of pull request fix: tx prioritization  #101 done by Mergify.

* fix

* beauty

* fix

* fix

* fix

* test

* lint

* fix

(cherry picked from commit b2dc571)

# Conflicts:
#	tests/e2e/consumer.go
Copy link
Author

mergify bot commented Jun 6, 2024

Cherry-pick of b2dc571 has failed:

On branch mergify/bp/sdk-47/pr-101
Your branch is up to date with 'origin/sdk-47'.

You are currently cherry-picking commit b2dc571.
  (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)

Changes to be committed:
	modified:   x/feemarket/ante/fee.go
	new file:   x/feemarket/fuzz/tx_priority_test.go
	modified:   x/feemarket/post/fee_test.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   tests/e2e/consumer.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@aljo242 aljo242 merged commit e2fce16 into sdk-47 Jun 6, 2024
8 checks passed
@aljo242 aljo242 deleted the mergify/bp/sdk-47/pr-101 branch June 6, 2024 18:26
@aljo242 aljo242 restored the mergify/bp/sdk-47/pr-101 branch June 6, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant