-
Notifications
You must be signed in to change notification settings - Fork 707
Aditya's review PR [DO NOT MERGE] #8558
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
base: gjermund/tmp-review-branch
Are you sure you want to change the base?
Conversation
Co-authored-by: Gjermund Garaba <[email protected]>
Co-authored-by: Gjermund Garaba <[email protected]>
Co-authored-by: Gjermund Garaba <[email protected]>
Co-authored-by: Gjermund Garaba <[email protected]>
…sage (#8366) Co-authored-by: Tamjid Ahmed <[email protected]> Co-authored-by: Gjermund Garaba <[email protected]>
Co-authored-by: Gjermund Garaba <[email protected]>
Co-authored-by: Gjermund Garaba <[email protected]>
Co-authored-by: Gjermund Garaba <[email protected]>
Co-authored-by: Gjermund Garaba <[email protected]>
Co-authored-by: Tamjid Ahmed <[email protected]> Co-authored-by: Gjermund Garaba <[email protected]>
…dules/light-clients/08-wasm (#8515) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* chore: rm checksums from proto and migrator * chore: update proto files * chore: use undeprecated option in buf lock * docs: add breaking change to changelog * docs: add space * Update CHANGELOG.md --------- Co-authored-by: Gjermund Garaba <[email protected]>
* test: genesis export * Genesis test * test: keeper for pfm * test: pfm keeper -> Done * fix: Lint. Shutup Meg * remove comment * Rename mock transfer * refactor: clean up test code * update deps * fix deps * refactor: rename malleates -> malleate
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gjermund Garaba <[email protected]>
Co-authored-by: Gjermund Garaba <[email protected]>
Co-authored-by: Gjermund Garaba <[email protected]>
…dules/light-clients/08-wasm (#8532) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Gjermund Garaba <[email protected]>
Co-authored-by: Gjermund Garaba <[email protected]> Co-authored-by: Alex | Interchain Labs <[email protected]>
Co-authored-by: Gjermund Garaba <[email protected]> Co-authored-by: mconcat <[email protected]> Co-authored-by: Aditya <[email protected]> Co-authored-by: tamjidahmed <[email protected]>
Co-authored-by: Tamjid Ahmed <[email protected]>
for key, value := range state.InFlightPackets { | ||
bz := k.cdc.MustMarshal(&value) | ||
if err := store.Set([]byte(key), bz); err != nil { | ||
panic(err) | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for prefix := range rtr.prefixRoutes { | ||
// Prevent existing prefix routes from colliding with the new direct route to avoid confusing behavior. | ||
if strings.HasPrefix(portID, prefix) { | ||
panic(fmt.Errorf("route %s is already matched by registered prefix route: %s", portID, prefix)) | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for portID := range rtr.routes { | ||
if strings.HasPrefix(portID, portIDPrefix) { | ||
panic(fmt.Errorf("route prefix %s is a prefix for already registered route: %s", portIDPrefix, portID)) | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
* remove restriction in types package * fix acknowledgement, and start keeper package testing * 04-channel tests * add transfer tests * CHANGELOG * lint * address review --------- Co-authored-by: Gjermund Garaba <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## gjermund/tmp-review-branch #8558 +/- ##
==============================================================
- Coverage 67.17% 57.99% -9.19%
==============================================================
Files 280 319 +39
Lines 19429 22814 +3385
==============================================================
+ Hits 13052 13231 +179
- Misses 5794 8978 +3184
- Partials 583 605 +22
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Tamjid Ahmed <[email protected]>
Co-authored-by: Gjermund Garaba <[email protected]>
Co-authored-by: Gjermund Garaba <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very large PR. So I looked at PFM and rate limit to focus on the changes that i wasn't deeply involved in
// transfer stack contains (from top to bottom): | ||
// - Packet Forward Middleware | ||
// - Transfer | ||
var transferStack ibcporttypes.IBCModule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use new stack primitive
if len(denom.Trace) == 0 { | ||
// denom is now unwound back to native denom | ||
return denom.Path() | ||
} | ||
// denom is still IBC denom | ||
return denom.IBCDenom() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if len(denom.Trace) == 0 { | |
// denom is now unwound back to native denom | |
return denom.Path() | |
} | |
// denom is still IBC denom | |
return denom.IBCDenom() | |
return denom.IBCDenom() |
IBCDenom does this logic internally
"refund-port-id", inFlightPacket.RefundPortId, | ||
) | ||
|
||
return inFlightPacket, fmt.Errorf("giving up on packet on channel (%s) port (%s) after max retries", inFlightPacket.RefundChannelId, inFlightPacket.RefundPortId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like how this function is designed where it can return an inFlightpacket and an error. Not intuitive
// If GetHourEpoch returned a zero-value epoch (due to error or missing key), | ||
// we cannot proceed with the check. | ||
if hourEpoch.Duration == 0 || hourEpoch.EpochStartTime.IsZero() { | ||
return false, 0, errorsmod.Wrapf(types.ErrInvalidEpoce, "cannot check hour epoch starting. epoch: %v", hourEpoch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misspelled epoch in error
return im.app.OnAcknowledgementPacket(ctx, sourceClient, destinationClient, sequence, acknowledgement, payload, relayer) | ||
} | ||
|
||
// TODO: Something looks off about this, please review carefully |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks correct to me
This PR is just to have a place to collect reviews from PR of main.
The target branch is from just before PFM was added, so all changes after that are included.