cosmos-sdk
cosmos-sdk copied to clipboard
CosmosSDK `x/tx v0.13.6` is breaking
Module x/tx v0.13.6 breaks some AMINO messages in Telescope-generated bindings.
This version is marked as a patch release, not a breaking release.
Relates https://github.com/liftedinit/manifestjs/issues/14 Relates https://github.com/hyperweb-io/telescope/issues/737
@fmorency can you include more information regarding the breaks - a patch release should not have broken users so I'd like to clean this up
@aljo242 We bumped x/tx from v0.13.1 to v0.13.7 in manifest-ledger. This change broke some messages in manifestjs, a library generated by Hyperweb's Telescope tool.
The message being verified, i.e., received by the server, is not the same as the message signed by the frontend, resulting in an invalid signature error.
Message being signed
{
"chain_id": "manifest-ledger-beta",
"account_number": "8",
"sequence": "0",
"fee": {
"amount": [
{
"denom": "umfx",
"amount": "100000"
}
],
"gas": "550000"
},
"msgs": [
{
"type": "poa/MsgCreateValidator",
"value": {
"description": {
"moniker": "test-validator",
"identity": "some identity",
"website": "www.some.website.com",
"security_contact": "some contact",
"details": "some details"
},
"commission": {
"rate": "0",
"max_rate": "0",
"max_change_rate": "0"
},
"min_self_delegation": "1",
"validator_address": "manifestvaloper1pss7nxeh3f9md2vuxku8q99femnwdjtcjhuxjm",
"pubkey": {
"type": "tendermint/PubKeyEd25519",
"value": "qS4C8i2q1orM463qxf5QA8iAwdZ+Aix7Xm+sJqr1kg4="
}
}
}
],
"memo": ""
}
Message decoded by server
{
"account_number": "8",
"chain_id": "manifest-ledger-beta",
"fee": {
"amount": [
{
"amount": "100000",
"denom": "umfx"
}
],
"gas": "550000"
},
"memo": "",
"msgs": [
{
"type": "poa/MsgCreateValidator",
"value": {
"commission": {
"max_change_rate": "0.000000000000000000",
"max_rate": "0.000000000000000000",
"rate": "0.000000000000000000"
},
"description": {
"details": "some details",
"identity": "some identity",
"moniker": "test-validator",
"security_contact": "some contact",
"website": "www.some.website.com"
},
"min_self_delegation": "1",
"pubkey": {
"type": "tendermint/PubKeyEd25519",
"value": "qS4C8i2q1orM463qxf5QA8iAwdZ+Aix7Xm+sJqr1kg4="
},
"validator_address": "manifestvaloper1pss7nxeh3f9md2vuxku8q99femnwdjtcjhuxjm"
}
}
],
"sequence": "0"
}
As you can see, the commission field has changed.
x/tx v0.13.6 introduced the following changes
https://github.com/cosmos/cosmos-sdk/pull/22161 Add special case for string represented decimals. https://github.com/cosmos/cosmos-sdk/pull/21825 Fix decimal encoding and field ordering in Amino JSON encoder. https://github.com/cosmos/cosmos-sdk/pull/21782 Fix JSON attribute sort order on messages with oneof fields.
which I believe are breaking changes.
Things are working with v0.13.5
I see so the fix was rolling back x/tx or would be generating new stubs using telescope?
I see so the fix was rolling back
x/txor would be generating new stubs using telescope?
I rolled back x/tx to a working version. Generating new stubs won't work until this fix is supported by Telescope.
following