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
The call to fromAmino removes the nested message type indicator in a group proposal, causing an issue when multiple message types contain the same fields.
The POA module contains MsgRemovePending and MsgRemoveValidator differing only by message name, i.e., the message fields are the same in both messages.
The remove pending validator test creates a Group Proposal containing a Remove Pending Validator message, submits the proposal, vote on it and execute the proposal.
Encoding and signing the message using AMINO works fine
The message decoded by the server is of type poa/RemoveValidator instead of poa/RemovePending causing the signature check to fail. I suspect the lack of type indication in the nested message causes the issue. One is unable to match the type only from the instance.
Everything works fine when using the DIRECT signer. Everything also works fine using the AMINO signer from the manifestd CLI.
TypeError: decoder.toAminoMsg is not a function
196 | }
197 |
> 198 | return decoder.toAminoMsg!(data);
| ^
199 | }
200 | }
201 |
at Function.toAminoMsg (src/codegen/registry.ts:198:20)
at src/codegen/cosmos/group/v1/tx.ts:2870:74
at Array.map (<anonymous>)
at Object.toAmino (src/codegen/cosmos/group/v1/tx.ts:2870:39)
at AminoTypes.toAmino (node_modules/@cosmjs/stargate/src/aminotypes.ts:40:24)
at node_modules/@cosmjs/stargate/src/signingstargateclient.ts:404:56
at Array.map (<anonymous>)
at SigningStargateClient.signAmino (node_modules/@cosmjs/stargate/src/signingstargateclient.ts:404:27)
at SigningStargateClient.signAndBroadcast (node_modules/@cosmjs/stargate/src/signingstargateclient.ts:319:19)
at submitGroupProposal (starship/src/test_helper.ts:105:18)
at submitVoteExecGroupProposal (starship/src/test_helper.ts:162:22)
at Object.<anonymous> (starship/__tests__/manifest.group.test.ts:123:5)
Problem
The call to
fromAmino
removes the nested message type indicator in a group proposal, causing an issue when multiple message types contain the same fields.Context
Telescope configuration
The POA module contains MsgRemovePending and MsgRemoveValidator differing only by message name, i.e., the message fields are the same in both messages.
The remove pending validator test creates a
Group Proposal
containing aRemove Pending Validator
message, submits the proposal, vote on it and execute the proposal.Encoding and signing the message using AMINO works fine
The nested message is of the right type. However, the
signedTxBodyEncodedObject
created in thesignAmino
method and broadcasted to the server isNotice that the nested
message
field has no type indicator. This field is created by the call tofromAmino
The message decoded by the server is of type
poa/RemoveValidator
instead ofpoa/RemovePending
causing the signature check to fail. I suspect the lack of type indication in the nested message causes the issue. One is unable to match the type only from the instance.Everything works fine when using the
DIRECT
signer. Everything also works fine using the AMINO signer from themanifestd
CLI.Running the test
The text was updated successfully, but these errors were encountered: