everx-labs/ever-sdk-js

Weird error (can't be represented as a JavaScript number) on tvm.run_executor

Closed this issue · 6 comments

tvm.run_executor with this object as the argument:

{
    "message": "te6ccgEBBQEA2QABRYgAhWSMyfwSrUApdY7ejDsG0AonE45wNaQ3LaACiLkX/yIMAQHh/gukFT5Cw8HWojdnJ8VDspoyBDTSOczaa3jres/taQARv1Qnsogjqkz5lJvYJsyCvNeycp0y5NaYH7O9Ry3TAE+Jbltx55TJAaCHiGfGoe6ujqfBuVL2u//+ERpmDUNsAAAAX5UxDw2YeBz7UzuZGyACAWWAGuSjEiBxCHXN5F+0k7IlVYCsciNxP1XmvGuCCnNAiecgAAAAAAAAAAAAAAAAAAAAGCgDAQgAAAAABAAA",
    "account": {
        "type": "Account",
        "boc": "te6ccgECRgEAEawAAnHABCskZk/glWoBS6x29GHYNoBROJxzga0huW0AFEXIv/kSjKD6gw8CVbAAAANVnHS+EXu9CVP/00ADAQHVPiW5bceeUyQGgh4hnxqHuro6nwblS9rv//hEaZg1DbAAAAF+VCPSFJ8S3LbjzymSA0EPEM+NQ91dHU+DcqXtd//8IjTMGobYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgDACAEWgB8S3LbjzymSA0EPEM+NQ91dHU+DcqXtd//8IjTMGobYAEAIm/wD0pCAiwAGS9KDhiu1TWDD0oQYEAQr0pCD0oQUAAAIBIAkHAcj/fyHtRNAg10nCAY4n0//TP9MA0//T/9MH0wf0BPQF+G34bPhv+G74a/hqf/hh+Gb4Y/hijir0BXD4anD4a234bG34bXD4bnD4b3ABgED0DvK91wv/+GJw+GNw+GZ/+GHi0wABCAC4jh2BAgDXGCD5AQHTAAGU0/8DAZMC+ELiIPhl+RDyqJXTAAHyeuLTPwH4QyG5IJ8wIPgjgQPoqIIIG3dAoLnekyD4Y5SANPLw4jDTHwH4I7zyudMfAfAB+EdukN4SAZgl3eRmNAV92wseXqPkerl17Jy5oAaJyZp72ZOlV5AhAAogLAoCASAcCwIBIBQMA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v/y//LB8sH9AD0AMntVN5/+GcAattwIccAnSLQc9ch1wsAwAGQkOLgIdcNH5DhUxHAAJDgwQMighD////9vLGQ4AHwAfhHbpDe",
        "unlimited_balance": true
    },
    "abi": {
        "type": "Contract",
        "value": {
            "ABI version": 2,
            "header": [
                "pubkey",
                "time",
                "expire"
            ],
            "functions": [
                {
                    "name": "constructor",
                    "inputs": [
                        {
                            "name": "owners",
                            "type": "uint256[]"
                        },
                        {
                            "name": "reqConfirms",
                            "type": "uint8"
                        }
                    ],
                    "outputs": []
                },
                {
                    "name": "acceptTransfer",
                    "inputs": [
                        {
                            "name": "payload",
                            "type": "bytes"
                        }
                    ],
                    "outputs": []
                },
                {
                    "name": "sendTransaction",
                    "inputs": [
                        {
                            "name": "dest",
                            "type": "address"
                        },
                        {
                            "name": "value",
                            "type": "uint128"
                        },
                        {
                            "name": "bounce",
                            "type": "bool"
                        },
                        {
                            "name": "flags",
                            "type": "uint8"
                        },
                        {
                            "name": "payload",
                            "type": "cell"
                        }
                    ],
                    "outputs": []
                },
                {
                    "name": "submitTransaction",
                    "inputs": [
                        {
                            "name": "dest",
                            "type": "address"
                        },
                        {
                            "name": "value",
                            "type": "uint128"
                        },
                        {
                            "name": "bounce",
                            "type": "bool"
                        },
                        {
                            "name": "allBalance",
                            "type": "bool"
                        },
                        {
                            "name": "payload",
                            "type": "cell"
                        }
                    ],
                    "outputs": [
                        {
                            "name": "transId",
                            "type": "uint64"
                        }
                    ]
                },
                {
                    "name": "confirmTransaction",
                    "inputs": [
                        {
                            "name": "transactionId",
                            "type": "uint64"
                        }
                    ],
                    "outputs": []
                },
                {
                    "name": "isConfirmed",
                    "inputs": [
                        {
                            "name": "mask",
                            "type": "uint32"
                        },
                        {
                            "name": "index",
                            "type": "uint8"
                        }
                    ],
                    "outputs": [
                        {
                            "name": "confirmed",
                            "type": "bool"
                        }
                    ]
                },
                {
                    "name": "getParameters",
                    "inputs": [],
                    "outputs": [
                        {
                            "name": "maxQueuedTransactions",
                            "type": "uint8"
                        },
                        {
                            "name": "maxCustodianCount",
                            "type": "uint8"
                        },
                        {
                            "name": "expirationTime",
                            "type": "uint64"
                        },
                        {
                            "name": "minValue",
                            "type": "uint128"
                        },
                        {
                            "name": "requiredTxnConfirms",
                            "type": "uint8"
                        }
                    ]
                },
                {
                    "name": "getTransaction",
                    "inputs": [
                        {
                            "name": "transactionId",
                            "type": "uint64"
                        }
                    ],
                    "outputs": [
                        {
                            "components": [
                                {
                                    "name": "id",
                                    "type": "uint64"
                                },
                                {
                                    "name": "confirmationsMask",
                                    "type": "uint32"
                                },
                                {
                                    "name": "signsRequired",
                                    "type": "uint8"
                                },
                                {
                                    "name": "signsReceived",
                                    "type": "uint8"
                                },
                                {
                                    "name": "creator",
                                    "type": "uint256"
                                },
                                {
                                    "name": "index",
                                    "type": "uint8"
                                },
                                {
                                    "name": "dest",
                                    "type": "address"
                                },
                                {
                                    "name": "value",
                                    "type": "uint128"
                                },
                                {
                                    "name": "sendFlags",
                                    "type": "uint16"
                                },
                                {
                                    "name": "payload",
                                    "type": "cell"
                                },
                                {
                                    "name": "bounce",
                                    "type": "bool"
                                }
                            ],
                            "name": "trans",
                            "type": "tuple"
                        }
                    ]
                },
                {
                    "name": "getTransactions",
                    "inputs": [],
                    "outputs": [
                        {
                            "components": [
                                {
                                    "name": "id",
                                    "type": "uint64"
                                },
                                {
                                    "name": "confirmationsMask",
                                    "type": "uint32"
                                },
                                {
                                    "name": "signsRequired",
                                    "type": "uint8"
                                },
                                {
                                    "name": "signsReceived",
                                    "type": "uint8"
                                },
                                {
                                    "name": "creator",
                                    "type": "uint256"
                                },
                                {
                                    "name": "index",
                                    "type": "uint8"
                                },
                                {
                                    "name": "dest",
                                    "type": "address"
                                },
                                {
                                    "name": "value",
                                    "type": "uint128"
                                },
                                {
                                    "name": "sendFlags",
                                    "type": "uint16"
                                },
                                {
                                    "name": "payload",
                                    "type": "cell"
                                },
                                {
                                    "name": "bounce",
                                    "type": "bool"
                                }
                            ],
                            "name": "transactions",
                            "type": "tuple[]"
                        }
                    ]
                },
                {
                    "name": "getTransactionIds",
                    "inputs": [],
                    "outputs": [
                        {
                            "name": "ids",
                            "type": "uint64[]"
                        }
                    ]
                },
                {
                    "name": "getCustodians",
                    "inputs": [],
                    "outputs": [
                        {
                            "components": [
                                {
                                    "name": "index",
                                    "type": "uint8"
                                },
                                {
                                    "name": "pubkey",
                                    "type": "uint256"
                                }
                            ],
                            "name": "custodians",
                            "type": "tuple[]"
                        }
                    ]
                }
            ],
            "data": [],
            "events": [
                {
                    "name": "TransferAccepted",
                    "inputs": [
                        {
                            "name": "payload",
                            "type": "bytes"
                        }
                    ],
                    "outputs": []
                }
            ]
        }
    },
    "skip_transaction_check": false,
    "return_updated_account": false
}

gives this error -

"Error: 18446744073697658955 can't be represented as a JavaScript number"

I decoded this message – it is a sendTransaction function invocation.
When I called the run_executor I've received the message expired error.

I added the execution_options with block_time equal to 1642099654 (slightly greater than the message expiration time).

After that I successfully ran the run_executor. The transaction produced single out message (is a token transfer message). This message isn't match the abi so it isn't decoded.

I can't reproduce this error.
run_executor called successfully.

I added the execution_options with block_time equal to 1642099654 (slightly greater than the message expiration time).
But if not add this, then you will see the error from the previous message. Yes, the is multisign wallet and there can be "expired" transaction. Just several versions ago all was ok. We have tried to use 1.28
If you will increase "block_time", then you will get "expired", if reduce, then "Replay protection exception". But when you will try without "execution_options", then you will see "Error: 18446744073697658955 can't be represented as a JavaScript number"

Thank you for additional info, we will check it @pertinaxwallet

@pertinaxwallet We've checked all ever-sdk-js versions from 1.20 to 1.30 and couldn't reproduce the error (SDK returns expected error about message expiration). Could you create some small reproducer and give us a link to try?

https://github.com/pertinaxwallet/demo-ever-sdk-js-issues-325 - demo is here, just replace variables to generate a fresh message. You couldn't to reproduce, because the message was already encoded in the past.
Now you will be able to test this issue.
To fix it need to set "unlimited_balance" in false, but by logic "unlimited_balance" must be true for fee estimation.

@pertinaxwallet Fixed in the 1.34.0 release