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: support automatic eibc order creation for timeout #598

Merged
merged 88 commits into from
Mar 3, 2024

Conversation

omritoptix
Copy link
Contributor

@omritoptix omritoptix commented Feb 26, 2024

Description


Closes #593

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow-up issues.

PR review checkboxes:

I have...

  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Targeted PR against the correct branch
  • included the correct type prefix in the PR title
  • Linked to the GitHub issue with discussion and accepted design
  • Targets only one GitHub issue
  • Wrote unit and integration tests
  • Wrote relevant migration scripts if necessary
  • All CI checks have passed
  • Added relevant godoc comments

SDK Checklist

  • Import/Export Genesis
  • Registered Invariants
  • Registered Events
  • Updated openapi.yaml
  • No usage of go map
  • No usage of time.Now()
  • Used fixed point arithmetic and not float arithmetic
  • Avoid panicking in Begin/End block as much as possible
  • No unexpected math Overflow
  • Used sendCoin and not SendCoins
  • Out-of-block compute is bounded
  • No serialized ID at the end of store keys

Full security checklist here

For Reviewer:

  • Confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • Confirmed all author checklist items have been addressed

---;

After reviewer approval:

  • In case the PR targets the main branch, PR should not be squash merge in order to keep meaningful git history.
  • In case the PR targets a release branch, PR must be rebased.

@omritoptix omritoptix requested a review from a team as a code owner February 26, 2024 17:16
@omritoptix omritoptix linked an issue Feb 26, 2024 that may be closed by this pull request
Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 42.97521% with 69 lines in your changes are missing coverage. Please review.

Project coverage is 30.70%. Comparing base (a8fc0a3) to head (1a36823).
Report is 9 commits behind head on omritoptix/532-rollapp-packet-deletion.

❗ Current head 1a36823 differs from pull request most recent head 5adfcad. Consider uploading reports for the commit 5adfcad to get more accurate results

Files Patch % Lines
x/eibc/types/params.pb.go 0.00% 43 Missing ⚠️
x/eibc/types/params.go 25.00% 8 Missing and 4 partials ⚠️
x/delayedack/eibc.go 75.55% 8 Missing and 3 partials ⚠️
x/delayedack/ibc_middleware.go 40.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@                            Coverage Diff                             @@
##           omritoptix/532-rollapp-packet-deletion     #598      +/-   ##
==========================================================================
+ Coverage                                   30.68%   30.70%   +0.01%     
==========================================================================
  Files                                         205      205              
  Lines                                       28812    28913     +101     
==========================================================================
+ Hits                                         8841     8877      +36     
- Misses                                      18566    18624      +58     
- Partials                                     1405     1412       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

mtsitrin
mtsitrin previously approved these changes Mar 3, 2024
// Create a copy of the packet with the new recipient
// Set the recipient and sender based on the rollapp packet type
recipient, sender := data.Receiver, data.Sender
if rollappPacket.Type == commontypes.RollappPacket_ON_RECV {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe have GetSender() GetRecepient() for the rollappPacket struct
for better readability

Copy link
Contributor Author

Choose a reason for hiding this comment

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

prob is that I need all the other fields also from the data (like denom, amount etc). so I need the data object anyway on the function. however I created a method for getting the transferPacketData from rollappPacket for better readability.

@omritoptix omritoptix changed the base branch from omritoptix/532-rollapp-packet-deletion to main March 3, 2024 12:42
@omritoptix omritoptix dismissed mtsitrin’s stale review March 3, 2024 12:42

The base branch was changed.

@omritoptix omritoptix merged commit 86db62a into main Mar 3, 2024
@omritoptix omritoptix deleted the omritoptix/593-eibc-for-timeout branch March 3, 2024 14:20
srene pushed a commit that referenced this pull request Mar 5, 2024
Co-authored-by: ducnt131 <[email protected]>
Co-authored-by: GoodDaisy <[email protected]>
Co-authored-by: Ikko Eltociear Ashimine <[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.

EIBC for releasing timed-out funds on the hub
5 participants