-
Notifications
You must be signed in to change notification settings - Fork 607
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
Integrate Packet Forward Middleware #3911
Conversation
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you! |
appKeepers.GetSubspace(packetforwardtypes.ModuleName), | ||
appKeepers.TransferKeeper, | ||
appKeepers.IBCKeeper.ChannelKeeper, | ||
appKeepers.DistrKeeper, |
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.
Uhh, why does it need this? Community pool?
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.
yeah, the fee can be configured via a param as a percentage of the send and it funds the community pool.
Ideally this should go to stakers IMO, but the fee defaults to 0, so we can change that later
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.
RIP, this is bad module design imo, should be a middleware responsibility. (Fee at the base transport layer bad design)
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.
Can you please expand on this @ValarDragon ? Would love to understand your perspective so we can improve it. I'm not sure what you mean, as this is the keeper for the IBC middleware.
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 see why your transport layer for packet sending should have bips of fee bundled in at default. This is equivalent in design practice to saying our API for bank sends should take in a fee parameter as well, and have bips of all sends be captured.
You could in principle want this, but this can be pushed to wrappers of the main object, rather than being the main thing you import. (I'd prefer no capability of this in what we import, than having such a parameter forced)
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.
(NOTE: This is very minor on the overall work going into this. Awesome job on the module! And I think my first comment "bad module design imo" was too harsh for the severity of opinion actually held)
@ValarDragon Updated to the newer version of PFM which solves the json encoding issue we discussed. This should be ready for re-review/merge |
tests/e2e/e2e_test.go
Outdated
count := response["count"].(float64) | ||
// check if denom contains "uosmo" | ||
return err == nil && count == 0 |
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.
We need to handle this TODO right? IMO we should ensure exact osmo amount received, in order to be certain that our default post-upgrade parameter has no fee taken.
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 think that comment is a leftover from previous code. The balance check is done above (line419) but it's not checking the denom, just the amount. I'll add the denom check.
Needs changelog pre-merge |
return false | ||
}, | ||
1*time.Minute, | ||
10*time.Millisecond, |
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 think that CI might be flaky and blocking requests due to retrying this too frequently. I've run into similar issues before where AFAIR increasing this number helped.
I looked into the node logs: https://github.com/osmosis-labs/osmosis/suites/10828110105/artifacts/545247532 and they seem okay. So I'm guessing it might be some setup problem
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.
Tried increasing it and it didn't help, but somehow it works (locally) after I added the Require()
you suggested
* added initial packet forward middleware integration * gofumpt * updated go.mod * correct value * updating to match upstream * added params * gofumpt * added PFM to upgrades * go imports * added e2e test for PFM+wasm hoks * refactor * refactored for reusability and added comments * updated to latest version that allows native json * removed unnecessary param * reordering imports after merge * added denom check * added changelog * Update tests/e2e/e2e_test.go Co-authored-by: Roman <[email protected]> * requiring the txs to succeed * fixed e2e tests --------- Co-authored-by: Roman <[email protected]>
* added initial packet forward middleware integration * gofumpt * updated go.mod * correct value * updating to match upstream * added params * gofumpt * added PFM to upgrades * go imports * added e2e test for PFM+wasm hoks * refactor * refactored for reusability and added comments * updated to latest version that allows native json * removed unnecessary param * reordering imports after merge * added denom check * added changelog * Update tests/e2e/e2e_test.go Co-authored-by: Roman <[email protected]> * requiring the txs to succeed * fixed e2e tests --------- Co-authored-by: Roman <[email protected]> (cherry picked from commit 9f14694) # Conflicts: # app/upgrades/v15/constants.go # tests/e2e/e2e_test.go
* Integrate Packet Forward Middleware (#3911) * added initial packet forward middleware integration * gofumpt * updated go.mod * correct value * updating to match upstream * added params * gofumpt * added PFM to upgrades * go imports * added e2e test for PFM+wasm hoks * refactor * refactored for reusability and added comments * updated to latest version that allows native json * removed unnecessary param * reordering imports after merge * added denom check * added changelog * Update tests/e2e/e2e_test.go Co-authored-by: Roman <[email protected]> * requiring the txs to succeed * fixed e2e tests --------- Co-authored-by: Roman <[email protected]> * removed CL test --------- Co-authored-by: Roman <[email protected]>
What is the purpose of the change
Integrate the packet forward middleware
Brief Changelog
Testing and Verifying
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? (no)