You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suspect this is due to cachedValue behind an unexported/private field and therefore, proto.Merge cannot merge it from inReq to msg, but not 100% certain on that.
This will explode as GetCachedValue will return nil.
This surfaced in an e2e test which attempts to execute an IBC client upgrade via x/gov proposal. The ibc msg contains an Any when msg is routed through gov's msg router it loses the cachedValue and errors out.
Attaching screenshot of debugger:
Cosmos SDK Version
0.52
How to reproduce?
I reproduced the same failure seen in e2e in a unit test here for easier debugging.
It's possible to check out the following the commit and revert the diffs in msg_server.go. cosmos/ibc-go@785dc47
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
What happened?
Users rely on the cachedValue in
Any
when dealing with interface types using the sdk. Currently when a msg handler is invoked through the environmentMsgRouterService
(e.g. in x/gov msg execution) we lose the cachedValue on protoAny
here: https://github.com/cosmos/cosmos-sdk/blob/main/baseapp/internal/protocompat/protocompat.go#L130I suspect this is due to
cachedValue
behind an unexported/private field and therefore,proto.Merge
cannot merge it frominReq
tomsg
, but not 100% certain on that.This leads to a problem when trying to use the
Any
later as an interface type like here: https://github.com/cosmos/ibc-go/blob/main/modules/core/02-client/types/codec.go#L77-L80This will explode as
GetCachedValue
will returnnil
.This surfaced in an e2e test which attempts to execute an IBC client upgrade via x/gov proposal. The ibc msg contains an
Any
when msg is routed through gov's msg router it loses the cachedValue and errors out.Attaching screenshot of debugger:
Cosmos SDK Version
0.52
How to reproduce?
I reproduced the same failure seen in e2e in a unit test here for easier debugging.
It's possible to check out the following the commit and revert the diffs in msg_server.go.
cosmos/ibc-go@785dc47
The text was updated successfully, but these errors were encountered: