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 #101

Merged
merged 8 commits into from
Jun 6, 2024
Merged

fix: tx prioritization #101

merged 8 commits into from
Jun 6, 2024

Conversation

aljo242
Copy link
Collaborator

@aljo242 aljo242 commented Jun 5, 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

aljo242 added 2 commits June 4, 2024 18:36
@aljo242 aljo242 merged commit b2dc571 into main Jun 6, 2024
9 checks passed
@aljo242 aljo242 deleted the fix/tx-prio branch June 6, 2024 15:25
mergify bot pushed a commit that referenced this pull request Jun 6, 2024
* fix

* beauty

* fix

* fix

* fix

* test

* lint

* fix

(cherry picked from commit b2dc571)

# Conflicts:
#	tests/e2e/consumer.go
aljo242 pushed a commit that referenced this pull request Jun 6, 2024
* fix: tx prioritization  (#101)

* fix

* beauty

* fix

* fix

* fix

* test

* lint

* fix

(cherry picked from commit b2dc571)

# Conflicts:
#	tests/e2e/consumer.go

* fix

---------

Co-authored-by: Alex Johnson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants