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

[Bug] Withdraw method returns a malformed PSBT (Unsupported version number by Bitcoin Core v26.0.0) #7581

Open
Impa10r opened this issue Aug 15, 2024 · 1 comment

Comments

@Impa10r
Copy link

Impa10r commented Aug 15, 2024

Issue and Steps to Reproduce

$ lcli withdraw tb1paxtc8rvv9x4tjvapktqh7d53tzpnjfvshp9eh5lu5gzhup9hy4rsx93x6u 10000 3000perkb
{
   "tx": "0200000001be746921a1aae55836b1cbc07f2990dedad9f63dd687431ab5418b0097e6b5bd0000000000fdffffff021027000000000000225120e997838d8c29aab933a1b2c17f36915883392590b84b9bd3fca2057e04b72547242500000000000022512006213c11755d6091495470fbfb77a8c67dbeb92f203343049f223e3b91b687e633d92b00",
   "txid": "63b650bdf115ff4d784b75dbde5194aa3825de3b775d9c3decfa5771383afa5d",
   "psbt": "cHNidP8BAgQCAAAAAQMEM9krAAEEAQEBBQECAQYBAwH7BAIAAAAAAQDNAgAAAAABAdvDDEdEcXpqshfc038ERZk6WWVXnkItWuRQGeUrv3+DAAAAAAD9////AiBOAAAAAAAAIlEgS/gnDQu0LlrkmYPh0KclIWS6UckbWn4DLztwXB1ysGOGCwEAAAAAACJRIMjoYazxgfU9lDhMt4z6i7i8uTqW0SA1yru7FP1gvYMDAUA9u1No3qsonFiIVDLU10wM2XzCGfDf4IeJIhalyS8KbsxArQlF7wWMsODc1mqA8EK2mgpv85xpVESBkNhoSvCtVdkrAAEBKyBOAAAAAAAAIlEgS/gnDQu0LlrkmYPh0KclIWS6UckbWn4DLztwXB1ysGMBDiC+dGkhoarlWDaxy8B/KZDe2tn2PdaHQxq1QYsAl+a1vQEPBAAAAAABEAT9////ARNAD1NlKGXcRHPyi7Dkpq/D/a/zzWr3bl9TxEQTAWqXwY4l4oCwDvVrhjisnuyleYTzFPkjmX9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BKfAAAADPwJbGlnaHRuaW5nBAIAAQABAwgkJQAAAAAAAAEEIlEgBiE8EXVdYJFJVHD7+3eoxn2+uS8gM0MEnyI+O5G2h+YhB9VS6WEJ5WTN/HRJ1Qu0sd4cbJ1jF/OI6secNsAhCOEKCQBoVb1JoAAAAAA=
error code: -22
error message:
TX decode failed Unsupported version number: iostream error

getinfo output

v24.05

@Impa10r
Copy link
Author

Impa10r commented Aug 15, 2024

Second bug: the Tx hex it returns corresponds to UNSIGNED transaction:

$ bcli decoderawtransaction 0200000001be746921a1aae55836b1cbc07f2990dedad9f63dd687431ab5418b0097e6b5bd0000000000fdffffff021027000000000000225120e997838d8c29aab933a1b2c17f36915883392590b84b9bd3fca2057e04b72547242500000000000022512006213c11755d6091495470fbfb77a8c67dbeb92f203343049f223e3b91b687e633d92b00
{
  "txid": "63b650bdf115ff4d784b75dbde5194aa3825de3b775d9c3decfa5771383afa5d",
  "hash": "63b650bdf115ff4d784b75dbde5194aa3825de3b775d9c3decfa5771383afa5d",
  "version": 2,
  "size": 137,
  "vsize": 137,
  "weight": 548,
  "locktime": 2873651,
  "vin": [
    {
      "txid": "bdb5e697008b41b51a4387d63df6d9dade90297fc0cbb13658e5aaa1216974be",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 0.00010000,
      "n": 0,
      "scriptPubKey": {
        "asm": "1 e997838d8c29aab933a1b2c17f36915883392590b84b9bd3fca2057e04b72547",
        "desc": "rawtr(e997838d8c29aab933a1b2c17f36915883392590b84b9bd3fca2057e04b72547)#ufgjc25z",
        "hex": "5120e997838d8c29aab933a1b2c17f36915883392590b84b9bd3fca2057e04b72547",
        "address": "tb1paxtc8rvv9x4tjvapktqh7d53tzpnjfvshp9eh5lu5gzhup9hy4rsx93x6u",
        "type": "witness_v1_taproot"
      }
    },
    {
      "value": 0.00009508,
      "n": 1,
      "scriptPubKey": {
        "asm": "1 06213c11755d6091495470fbfb77a8c67dbeb92f203343049f223e3b91b687e6",
        "desc": "rawtr(06213c11755d6091495470fbfb77a8c67dbeb92f203343049f223e3b91b687e6)#h49d2wfs",
        "hex": "512006213c11755d6091495470fbfb77a8c67dbeb92f203343049f223e3b91b687e6",
        "address": "tb1pqcsncyt4t4sfzj25wralkaagce7mawf0yqe5xpylyglrhydkslnqey4cvk",
        "type": "witness_v1_taproot"
      }
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant