Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tx responses can not be deserialized #2905

Open
onur-ozkan opened this issue Jan 22, 2024 · 4 comments
Open

tx responses can not be deserialized #2905

onur-ozkan opened this issue Jan 22, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@onur-ozkan
Copy link

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"
    }
}
@onur-ozkan onur-ozkan added the bug Something isn't working label Jan 22, 2024
@onur-ozkan
Copy link
Author

Additionally, attempting to retrieve the raw transaction using old transaction hashes results in a tx not found error. Although I can access the transaction on the explorer https://nyancat.iobscan.io/#/txs/5BBF9D0C95765675281921789AD973CA480799ED4B44EEBD43D75FDEAF246053, when I click on the JSON tab, it fails. The same issue arises when attempting to query the transaction hash on the /cosmos/tx/v1beta1/txs/{hash} endpoint.

@onur-ozkan
Copy link
Author

I debugged recent Iris releases and can confirm that this issue started with v2.1.0-rc0 release. Everything works smoothly with the v2.0.3 release.

@dreamer-zq
Copy link
Contributor

@onur-ozkan Sorry, I cannot reproduce this problem, the transaction [5BBF9D0C95765675281921789AD973CA480799ED4B44EEBD43D75FDEAF246053] no longer exists in nyancat testnet. If you still have questions later, please continue to add the content of the question.

@onur-ozkan
Copy link
Author

@onur-ozkan Sorry, I cannot reproduce this problem, the transaction [5BBF9D0C95765675281921789AD973CA480799ED4B44EEBD43D75FDEAF246053] no longer exists in nyancat testnet. If you still have questions later, please continue to add the content of the question.

How does it appear in the explorers?

Also, my main question was this:

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)?

I debugged recent Iris releases and can confirm that this issue started with v2.1.0-rc0 release. Everything works smoothly with the v2.0.3 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants