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

invalid value: integer 2575874549, expected i32 on parsing txes #966

Closed
cipig opened this issue Jun 4, 2021 · 7 comments · Fixed by #970
Closed

invalid value: integer 2575874549, expected i32 on parsing txes #966

cipig opened this issue Jun 4, 2021 · 7 comments · Fixed by #970
Assignees

Comments

@cipig
Copy link
Member

cipig commented Jun 4, 2021

i get the following error when trying to swap KMD/ZER using dev branch

04 17:09:26, coins:rpc_clients:159] ERROR Error JsonRpcError { client_info: "coin: ZER", request: JsonRpcRequest { jsonrpc: "2.0", id: "57872", method: "blockchain.transaction.get", params: [String("3b666753b77e28da8a4d858339825315f32516cc147fa743329c7248bd0c6902"), Bool(true)] }, error: Parse(electrum3.cipig.net:10065, "jsonrpc_client:183] error Error(\"invalid value: integer `2575874549`, expected i32\", line: 0, column: 0) parsing result from response JsonRpcResponse { jsonrpc: \"2.0\", id: \"57872\", result: Object({\"hex\": String(\"0400008085202f89010c03a2b3d8f97139a623f0759224c657513752b705b5c689a256d52b8f8279f200000000d8483045022100fa07821f4739890fa3518c73ecb4917f4a8e7a1c7a803a0d0aea28f991f14f84022041ac557507d6c9786128828c7b2fca7d5c345ba57c8050e3edb29be0c1e5d2660120bdb3d550a68dfaeebe4c416e5750d20d27617bbfb29756843d605a0570ae787b004c6b63046576ba60b17521039ef1b42c635c32440099910bbe1c5e8b0c9373274c3f21cf1003750fc88d3499ac6782012088a914a4f9f1009dcb778bf1c26052258284b32c9075098821031bb83b58ec130e28e0a6d5d2acf2eb01b0d3f1670e021d47d31db8a858219da8ac68ffffffff014ddbf305000000001976a914c3f710deb7320b0efa6edb14e3ebeeb9155fa90d88acf5b98899000000000000000000000000000000\"), \"txid\": String(\"3b666753b77e28da8a4d858339825315f32516cc147fa743329c7248bd0c6902\"), \"overwintered\": Bool(true), \"version\": Number(4), \"versiongroupid\": String(\"892f2085\"), \"locktime\": Number(2575874549), \"expiryheight\": Number(0), \"vin\": Array([Object({\"txid\": String(\"f279828f2bd556a289c6b505b752375157c6249275f023a63971f9d8b3a2030c\"), \"vout\": Number(0), \"scriptSig\": Object({\"asm\": String(\"3045022100fa07821f4739890fa3518c73ecb4917f4a8e7a1c7a803a0d0aea28f991f14f84022041ac557507d6c9786128828c7b2fca7d5c345ba57c8050e3edb29be0c1e5d266[ALL] bdb3d550a68dfaeebe4c416e5750d20d27617bbfb29756843d605a0570ae787b 0 63046576ba60b17521039ef1b42c635c32440099910bbe1c5e8b0c9373274c3f21cf1003750fc88d3499ac6782012088a914a4f9f1009dcb778bf1c26052258284b32c9075098821031bb83b58ec130e28e0a6d5d2acf2eb01b0d3f1670e021d47d31db8a858219da8ac68\"), \"hex\": String(\"483045022100fa07821f4739890fa3518c73ecb4917f4a8e7a1c7a803a0d0aea28f991f14f84022041ac557507d6c9786128828c7b2fca7d5c345ba57c8050e3edb29be0c1e5d2660120bdb3d550a68dfaeebe4c416e5750d20d27617bbfb29756843d605a0570ae787b004c6b63046576ba60b17521039ef1b42c635c32440099910bbe1c5e8b0c9373274c3f21cf1003750fc88d3499ac6782012088a914a4f9f1009dcb778bf1c26052258284b32c9075098821031bb83b58ec130e28e0a6d5d2acf2eb01b0d3f1670e021d47d31db8a858219da8ac68\")}), \"sequence\": Number(4294967295)})]), \"vout\": Array([Object({\"value\": Number(0.99867469), \"valueZat\": Number(99867469), \"valueSat\": Number(99867469), \"n\": Number(0), \"scriptPubKey\": Object({\"asm\": String(\"OP_DUP OP_HASH160 c3f710deb7320b0efa6edb14e3ebeeb9155fa90d OP_EQUALVERIFY OP_CHECKSIG\"), \"hex\": String(\"76a914c3f710deb7320b0efa6edb14e3ebeeb9155fa90d88ac\"), \"reqSigs\": Number(1), \"type\": String(\"pubkeyhash\"), \"addresses\": Array([String(\"t1bjmkBWkzLWk3mHFoybXE5daGRY9pk1fxF\")])})})]), \"vjoinsplit\": Array([]), \"valueBalance\": Number(0.0), \"valueBalanceZat\": Number(0), \"vShieldedSpend\": Array([]), \"vShieldedOutput\": Array([]), \"blockhash\": String(\"0000077e33e838d9967427018a6e7049d8619ae556acb3e80c070990e90b67fc\"), \"height\": Number(1127478), \"confirmations\": Number(8), \"time\": Number(1622825622), \"blocktime\": Number(1622825622)}), error: Null }") } getting the transaction 3b666753b77e28da8a4d858339825315f32516cc147fa743329c7248bd0c6902, retrying in 10 seconds
@cipig
Copy link
Member Author

cipig commented Jun 5, 2021

seen on QTUM too, same error:

05 12:38:36, utxo_common:2138] Error "utxo_common:2201] JsonRpcError { client_info: \"coin: QTUM\", request: JsonRpcRequest { jsonrpc: \"2.0\", id: \"174505\", method: \"blockchain.transaction.get\", params: [String(\"3c7b8665d936b4696bc01caabbfe1761585f1b80ada449427b5b7b8a3d888c2f\"), Bool(true)] }, error: Parse(electrum3.cipig.net:10050, \"jsonrpc_client:183] error Error(\\\"invalid value: integer `2942504700`, expected i32\\\", line: 0, column: 0) parsing result from response JsonRpcResponse { jsonrpc: \\\"2.0\\\", id: \\\"174505\\\", result: Object({\\\"txid\\\": String(\\\"3c7b8665d936b4696bc01caabbfe1761585f1b80ada449427b5b7b8a3d888c2f\\\"), \\\"hash\\\": String(\\\"3c7b8665d936b4696bc01caabbfe1761585f1b80ada449427b5b7b8a3d888c2f\\\"), \\\"version\\\": Number(1), \\\"size\\\": Number(301), \\\"vsize\\\": Number(301), \\\"weight\\\": Number(1204), \\\"locktime\\\": Number(2942504700), \\\"vin\\\": Array([Object({\\\"txid\\\": String(\\\"d800753fe6ead5ef72710a615b2056cb7ca778c2f61387fa67b43acfb76b3c89\\\"), \\\"vout\\\": Number(0), \\\"scriptSig\\\": Object({\\\"asm\\\": String(\\\"3045022100896e86a74ba9b76829c4c30a7fed2e911fc3ef441309f15911eecd214d0411930220525d8a93b63bd185b6420af54fa845523a95892a1829a35557fdc0ac5fb718ab[ALL] 603457b9d8a76d384bfa4cb0d70dcfaa5bf44b65d68d2ac92aa5df4baf81c681 0 6304e5bcba60b17521031bb83b58ec130e28e0a6d5d2acf2eb01b0d3f1670e021d47d31db8a858219da8ac6782012088a914e9db5b37b6fa82d8de009c3ec89f43bdcea2f2a88821039ef1b42c635c32440099910bbe1c5e8b0c9373274c3f21cf1003750fc88d3499ac68\\\"), \\\"hex\\\": String(\\\"483045022100896e86a74ba9b76829c4c30a7fed2e911fc3ef441309f15911eecd214d0411930220525d8a93b63bd185b6420af54fa845523a95892a1829a35557fdc0ac5fb718ab0120603457b9d8a76d384bfa4cb0d70dcfaa5bf44b65d68d2ac92aa5df4baf81c681004c6b6304e5bcba60b17521031bb83b58ec130e28e0a6d5d2acf2eb01b0d3f1670e021d47d31db8a858219da8ac6782012088a914e9db5b37b6fa82d8de009c3ec89f43bdcea2f2a88821039ef1b42c635c32440099910bbe1c5e8b0c9373274c3f21cf1003750fc88d3499ac68\\\")}), \\\"sequence\\\": Number(4294967295)})]), \\\"vout\\\": Array([Object({\\\"value\\\": Number(0.99844004), \\\"n\\\": Number(0), \\\"scriptPubKey\\\": Object({\\\"asm\\\": String(\\\"OP_DUP OP_HASH160 2a62e1cabacba3760ac65ee712834423a8eadd83 OP_EQUALVERIFY OP_CHECKSIG\\\"), \\\"hex\\\": String(\\\"76a9142a62e1cabacba3760ac65ee712834423a8eadd8388ac\\\"), \\\"reqSigs\\\": Number(1), \\\"type\\\": String(\\\"pubkeyhash\\\"), \\\"addresses\\\": Array([String(\\\"QQU6woDCuPKh26jaiBVzegAJAPQYXgx7pJ\\\")])})})]), \\\"hex\\\": String(\\\"0100000001893c6bb7cf3ab467fa8713f6c278a77ccb56205b610a7172efd5eae63f7500d800000000d8483045022100896e86a74ba9b76829c4c30a7fed2e911fc3ef441309f15911eecd214d0411930220525d8a93b63bd185b6420af54fa845523a95892a1829a35557fdc0ac5fb718ab0120603457b9d8a76d384bfa4cb0d70dcfaa5bf44b65d68d2ac92aa5df4baf81c681004c6b6304e5bcba60b17521031bb83b58ec130e28e0a6d5d2acf2eb01b0d3f1670e021d47d31db8a858219da8ac6782012088a914e9db5b37b6fa82d8de009c3ec89f43bdcea2f2a88821039ef1b42c635c32440099910bbe1c5e8b0c9373274c3f21cf1003750fc88d3499ac68ffffffff01a47ff305000000001976a9142a62e1cabacba3760ac65ee712834423a8eadd8388acfc0e63af\\\"), \\\"blockhash\\\": String(\\\"fa7785e09773a2bd24e5f160bd2aaa91e44ea8063e938bb37b64a86468ccedd1\\\"), \\\"confirmations\\\": Number(1910), \\\"time\\\": Number(1622835900), \\\"blocktime\\\": Number(1622835900)}), error: Null }\") }" getting the transaction 3c7b8665d936b4696bc01caabbfe1761585f1b80ada449427b5b7b8a3d888c2f, skip the unspent output

@cipig cipig changed the title invalid value: integer 2575874549, expected i32 on parsing ZER tx invalid value: integer 2575874549, expected i32 on parsing txes Jun 5, 2021
@sergeyboyko0791
Copy link

Hi @cipig, thanks for opening the issue!
We can fix it easily, I'll do it next week.

@artemii235
Copy link
Member

@cipig Where do these transactions come from? The locktime is very big, if these are generated by MM2 we have an additional bug somewhere.

@cipig
Copy link
Member Author

cipig commented Jun 8, 2021

@cipig
Copy link
Member Author

cipig commented Jun 8, 2021

tried with #970 and the problem is fixed, no error on parsing this ZER tx https://insight.zerocurrency.io/insight/tx/c8cf68edc1967fb0eddd759331423d5bf542690e5f9a21fe701c3a1f832cbb7b, which is the same (Takerpaymentspend) as the above ZER tx that failed parsing
also did QTUM/KMD swaps (buy and sell) and it worked too, no error on parsing tx

@cipig
Copy link
Member Author

cipig commented Jun 8, 2021

locktimes of the ZER txes involved in the swap:
Takerpayment: https://insight.zerocurrency.io/insight/tx/3204d7b949c217c61c16a60c120adba73e23addc32545207059ee0f6d48cf025
locktime 1623152646 = June 8, 2021 11:44:06
Takerpaymentspent: https://insight.zerocurrency.io/insight/tx/c8cf68edc1967fb0eddd759331423d5bf542690e5f9a21fe701c3a1f832cbb7b
locktime 2346399813 = May 9, 2044 9:43:33

artemii235 added a commit that referenced this issue Jun 9, 2021
Fix parsing verbose transaction with large locktime #966
@artemii235
Copy link
Member

There is still another bug that leads to MM2 setting that high locktime, which I will fix shortly.

@artemii235 artemii235 reopened this Jun 9, 2021
@artemii235 artemii235 self-assigned this Jun 9, 2021
artemii235 added a commit that referenced this issue Jun 10, 2021
* WIP. Got conflicting block header version between BTC/DOGE/QTUM.

* Add coin_variant to serialization::Reader.
@cipig cipig closed this as completed Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants