bryanlabs / cosmos-tax-cli

An opensource cosmos tax tool!
https://defiantlabs.net
Apache License 2.0
25 stars 7 forks source link

Missing codec for gov v1 causing TX parse errors #555

Closed pharr117 closed 5 months ago

pharr117 commented 5 months ago

The lens dependency is missing the codec types for the gov v1 module.

This is causing a failure on block 16923586 and TX F14D86BB3251DF0677143736C785082318AD1585B6BE26DE5FCE6D3C6505540D.

7:20PM ERR ProcessRpcTxs: unhandled error error="tx message could not be processed. CachedValue is not present. TX Hash: F14D86BB3251DF0677143736C785082318AD1585B6BE26DE5FCE6D3C6505540D, Msg type: /cosmos.gov.v1.MsgSubmitProposal, Msg index: 0, Code: 0"
7:20PM ERR Block 16923586 failed. Reason: {unknown error} error="tx message could not be processed. CachedValue is not present. TX Hash: F14D86BB3251DF0677143736C785082318AD1585B6BE26DE5FCE6D3C6505540D, Msg type: /cosmos.gov.v1.MsgSubmitProposal, Msg index: 0, Code: 0"
7:20PM ERR Failed to process block 16923586. Will add to failed blocks table

The way the gov module works, we may need to call RegisterInterfaces on the v1 and module types. However, importing this module may be enough as well.

We then need to bump the Lens dependency to a new version and pull it in here.

pharr117 commented 5 months ago

The error was masked by the fact that the TX contains a smartaccount message type in the proposal message.

image

The actual error is:

"no concrete type registered for type URL /osmosis.smartaccount.v1beta1.MsgSetActiveState against interface *types.Msg"

This is coming during RPC requesting here and here.

We are not properly registering the AppModuleBasic for the smartaccount module with the proper proposal handlers. This results in missing message types for the smartaccount module messages. We need to add the missing smartaccount module to our AppModuleBasic.

This is done in this branch of Lens which will be pulled into this repo.