-
Notifications
You must be signed in to change notification settings - Fork 685
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
refactor: update icahost to use runtime.Environment #7600
Conversation
if res == nil || res.Value == nil { | ||
|
||
if err := m.cdc.Unmarshal(query.Data, msg); err != nil { | ||
return nil, err |
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 it might be best to return a more "constant" error here if this rpc is intended to be run in OnRecvPacket. Protobuf unmarshalling errors have a possibility to be indeterminate (this was a something found in earlier days of ibc transfer).
cc. @AdityaSripal this is correct, right?
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.
Actually, I think this is protected by the fact that we changed acknowledgement errors themselves to strip out abci error code alone. But none the less, this is something good to be aware of cc. @gjermundgaraba
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.
for example, back in the day we used to do this https://github.com/cosmos/ibc-go/blob/v3.4.0/modules/apps/transfer/ibc_module.go#L177 and it was for that reason.
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.
ah yea, great point to raise.
…ry request data fails
if res == nil || res.Value == nil { | ||
|
||
if err := m.cdc.Unmarshal(query.Data, msg); err != nil { | ||
return nil, errorsmod.Wrapf(ibcerrors.ErrInvalidType, "cannot unmarshal query request data to: %s", md.Input().FullName()) |
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.
lemme know if you wanna use ibcerrors.ErrInvalidRequest
instead here...
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'm pretty agnostic. They both seem OK
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.
Looks good (as good as proto stuff go)! LGTM!
if res == nil || res.Value == nil { | ||
|
||
if err := m.cdc.Unmarshal(query.Data, msg); err != nil { | ||
return nil, errorsmod.Wrapf(ibcerrors.ErrInvalidType, "cannot unmarshal query request data to: %s", md.Input().FullName()) |
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'm pretty agnostic. They both seem OK
func (m msgServer) ModuleQuerySafe(goCtx context.Context, msg *types.MsgModuleQuerySafe) (*types.MsgModuleQuerySafeResponse, error) { | ||
ctx := sdk.UnwrapSDKContext(goCtx) | ||
|
||
func (m msgServer) ModuleQuerySafe(ctx context.Context, msg *types.MsgModuleQuerySafe) (*types.MsgModuleQuerySafeResponse, error) { |
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.
what do you think @srdtrk? 😄
|
This reverts commit 7aae649.
This reverts commit 7aae649.
* Revert "chore: bump to sdk v0.52-rc.2 (#7882)" This reverts commit 4e54444. * Revert "chore: clean up module impls (#7865)" This reverts commit d91eb00. * Revert "fix: sanitize gov v1 proposal in e2e tests for compatibility with 0.52 (#7861)" This reverts commit 39b190a. * Revert "chore: bump sdk versions (#7843)" This reverts commit c29c1ab. * Revert "fix: wasm docker file + wasm simapp gas limit (#7830)" This reverts commit 7f0cf54. * Revert "chore: use header service in localhost client (#7757)" This reverts commit 0bea84d. * Revert "refactor: ibc core runtime env (#7601)" This reverts commit f5e1a4c. * Revert "refactor: use branch service in 29-fee (#7732)" This reverts commit d50f7ba. * Revert "chore: address some linter complaints (#7734)" This reverts commit 83fdb7f. * Revert "chore: refactor event service to 29-fee (#7728)" This reverts commit 0b2866d. * Revert "refactor: update 29-fee to use runtime.Environment (#7617)" This reverts commit c8dc02c. * Revert "refactor: use event service in transfer mod (#7725)" This reverts commit 0e72d08. * Revert "refactor: update transfer to use runtime.Environment (#7615)" This reverts commit fd6a78a. * Revert "Remove circuit module (#7715)" This reverts commit 39d8547. * Revert "refactor: use header info for interchain accounts address generation (#7713)" This reverts commit c15bb5c. * Revert "refactor: update icahost to use runtime.Environment (#7600)" This reverts commit 7aae649. * Revert "chore: update import alias to align (#7710)" This reverts commit a14feef. * Revert "deps: update to cosmos-sdk v0.52 (Olympus) (#7261)" This reverts commit 8575743. * fix unwanted reverts * remove invariant * lint * last go1.23 change * remove unecessary testing keeper * update go version in dockerfile * fix docker image
Description
Updates icahost submodule to use
runtime.Environment
.Removes
storeService
,msgRouterService
andqueryRouterService
in favour of embeddedappmodule.Environment
.ref: #7712
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.