Skip to content

tx responses can not be deserialized #2905

@onur-ozkan

Description

@onur-ozkan

Tx broadcasting is currently failing most likely due to the last release, resulting in a deserialization error.

In komodo-defi-proxy, we have implemented the Cosmos protocol which also supports IRIS (including HTLCs). However, we are encountering difficulties in broadcasting SEND and HTLC transactions. While we can still broadcast them to the network, it appears that IRIS nodes are now providing a different response compared to before that leads to deserialization errors.

Our tests and transaction functionalities had been functioning smoothly for almost 2 years, but suddenly we began experiencing deserialization errors. Has there been any intentional change in the response formats from IRIS nodes (specially in the last release)?

Error:

serde parse error\n\nCaused by:\n    invalid utf-8 sequence of 1 bytes from index 0 at line 1 column 1591\n\nLocation:\n

Sample dump of the returned data from SEND tx broadcast that fails with deserialization:

{
    "jsonrpc": "2.0",
    "id": "b7e4f089-3c03-49f5-894b-e38196fdce60",
    "result": {
        "check_tx": {
            "code": 0,
            "data": "",
            "log": "[]",
            "info": "",
            "gas_wanted": "125000",
            "gas_used": "42652",
            "events": [],
            "codespace": "",
            "sender": "",
            "priority": "0",
            "mempoolError": ""
        },
        "deliver_tx": {
            "code": 0,
            "data": "EiYKJC9jb3Ntb3MuYmFuay52MWJldGExLk1zZ1NlbmRSZXNwb25zZQ==",
            "log": "[{\"msg_index\":0,\"events\":[{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/cosmos.bank.v1beta1.MsgSend\"},{\"key\":\"sender\",\"value\":\"iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2\"},{\"key\":\"module\",\"value\":\"bank\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2\"},{\"key\":\"amount\",\"value\":\"1000unyan\"}]},{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"iaa1su9dhlytf24gff5tl7hxzszfptd0eht4cfmpgv\"},{\"key\":\"amount\",\"value\":\"1000unyan\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"iaa1su9dhlytf24gff5tl7hxzszfptd0eht4cfmpgv\"},{\"key\":\"sender\",\"value\":\"iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2\"},{\"key\":\"amount\",\"value\":\"1000unyan\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"sender\",\"value\":\"iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2\"}]}]}]",
            "info": "",
            "gas_wanted": "125000",
            "gas_used": "57511",
            "events": [
                {
                    "type": "coin_spent",
                    "attributes": [
                        {
                            "key": "spender",
                            "value": "iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2",
                            "index": true
                        },
                        {
                            "key": "amount",
                            "value": "15179unyan",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "coin_received",
                    "attributes": [
                        {
                            "key": "receiver",
                            "value": "iaa17xpfvakm2amg962yls6f84z3kell8c5l9mr3fv",
                            "index": true
                        },
                        {
                            "key": "amount",
                            "value": "15179unyan",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "transfer",
                    "attributes": [
                        {
                            "key": "recipient",
                            "value": "iaa17xpfvakm2amg962yls6f84z3kell8c5l9mr3fv",
                            "index": true
                        },
                        {
                            "key": "sender",
                            "value": "iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2",
                            "index": true
                        },
                        {
                            "key": "amount",
                            "value": "15179unyan",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "message",
                    "attributes": [
                        {
                            "key": "sender",
                            "value": "iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "tx",
                    "attributes": [
                        {
                            "key": "fee",
                            "value": "15179unyan",
                            "index": true
                        },
                        {
                            "key": "fee_payer",
                            "value": "iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "tx",
                    "attributes": [
                        {
                            "key": "acc_seq",
                            "value": "iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2/40611",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "tx",
                    "attributes": [
                        {
                            "key": "signature",
                            "value": "WnXESe8WiB5p3T9E2E2eKWVkw5GkeD0rtwjIPzBGDNhgVF407Lp8I7NSezTm3IGA38zJdh0rawtjGxQbEwMC5w==",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "message",
                    "attributes": [
                        {
                            "key": "action",
                            "value": "/cosmos.bank.v1beta1.MsgSend",
                            "index": true
                        },
                        {
                            "key": "sender",
                            "value": "iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2",
                            "index": true
                        },
                        {
                            "key": "module",
                            "value": "bank",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "coin_spent",
                    "attributes": [
                        {
                            "key": "spender",
                            "value": "iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2",
                            "index": true
                        },
                        {
                            "key": "amount",
                            "value": "1000unyan",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "coin_received",
                    "attributes": [
                        {
                            "key": "receiver",
                            "value": "iaa1su9dhlytf24gff5tl7hxzszfptd0eht4cfmpgv",
                            "index": true
                        },
                        {
                            "key": "amount",
                            "value": "1000unyan",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "transfer",
                    "attributes": [
                        {
                            "key": "recipient",
                            "value": "iaa1su9dhlytf24gff5tl7hxzszfptd0eht4cfmpgv",
                            "index": true
                        },
                        {
                            "key": "sender",
                            "value": "iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2",
                            "index": true
                        },
                        {
                            "key": "amount",
                            "value": "1000unyan",
                            "index": true
                        }
                    ]
                },
                {
                    "type": "message",
                    "attributes": [
                        {
                            "key": "sender",
                            "value": "iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2",
                            "index": true
                        }
                    ]
                }
            ],
            "codespace": ""
        },
        "hash": "BB9BCC7D4BCC4FCF4FA1A61ACA2F1E333A93633021D2CA36BA4C7555997CEF99",
        "height": "13301033"
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions