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

Problem: ibc relayer don't work well with default tx prioritization strategy #848

Merged
merged 8 commits into from
Aug 22, 2022

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Aug 22, 2022

Solution:

  • Change the default priority mechanism to be based on gas price

it'll be the default behavior in next SDK version: cosmos/cosmos-sdk#12953

  • add integration test

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

…trategy

Solution:
- Change the default priority mechanism to be based on gas price
app/validator_tx_fee.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 22, 2022

Codecov Report

Merging #848 (0a993f4) into master (e6166e1) will increase coverage by 0.08%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master     #848      +/-   ##
==========================================
+ Coverage   18.93%   19.02%   +0.08%     
==========================================
  Files          93       94       +1     
  Lines       11865    11889      +24     
==========================================
+ Hits         2247     2262      +15     
- Misses       9136     9142       +6     
- Partials      482      485       +3     
Flag Coverage Δ
integration_tests 16.71% <66.66%> (+0.09%) ⬆️
unit_tests 6.89% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
app/validator_tx_fee.go 65.21% <65.21%> (ø)
app/app.go 29.20% <100.00%> (-0.11%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@yihuang yihuang marked this pull request as ready for review August 22, 2022 06:32
@yihuang yihuang requested a review from a team as a code owner August 22, 2022 06:32
@tomtau
Copy link
Contributor

tomtau commented Aug 22, 2022

should this one: #846 be merged first?

@yihuang
Copy link
Collaborator Author

yihuang commented Aug 22, 2022

should this one: #846 be merged first?

no, prioritization don't need any change at relayer side, we just calculate the priority based on gas price rather than fee, relayer always use a static gas price.

Copy link
Contributor

@tomtau tomtau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks all right, the integration test may need to update pystarport or what the root cause for that failed transfer is

app/validator_tx_fee.go Outdated Show resolved Hide resolved
@yihuang yihuang merged commit 13d5e64 into crypto-org-chain:master Aug 22, 2022
@yihuang yihuang deleted the ibc-priority branch August 22, 2022 08:29
devashishdxt pushed a commit to devashishdxt/chain-main that referenced this pull request Sep 23, 2022
…trategy (crypto-org-chain#848)

* Problem: ibc relayer don't work well with default tx prioritization strategy

Solution:
- Change the default priority mechanism to be based on gas price

* add priority integration test

* Update app/validator_tx_fee.go

* fix integration test

* fix integration test

* Update app/validator_tx_fee.go
tomtau pushed a commit that referenced this pull request Sep 23, 2022
…trategy (#848)

* Problem: ibc relayer don't work well with default tx prioritization strategy

Solution:
- Change the default priority mechanism to be based on gas price

* add priority integration test

* Update app/validator_tx_fee.go

* fix integration test

* fix integration test

* Update app/validator_tx_fee.go
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