Node crashes when processing partial transaction
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- blockchain
Research direction
Start with blindpsbt.cpp around line 554 and reproduce the supplied walletprocesspsbt case using the dummy blinded output created through createpsbt. Trace the blinding status and rangeproof failure for the zero-value output, then add or run a regression test for this transaction so the node no longer aborts while processing the partial transaction.
Written by the indexing model from the issue text.
Description
I made the node crash while trying to blind the following pset:
$ e1 walletprocesspsbt cHNldP8BAgQCAAAAAQMEAAAAAAEEAQEBBQEDAfsEAgAAAAABDiAqrJ9c31tcJHnWDjQWJNUfArZMJr1w1h7/S6GIMG31DwEPBAAAAAABEAT/////AAEEFgAUBFTPa7NoO3V+jzsjbmvRlQwcOWoBAwgA4fUFAAAAAAf8BHBzZXQCINMRFPznA5TB+dNUdQG0udNvQgI27GQZkVRWZDSIWs8tAAEEFgAU+a3P0cB6H1+r8pR099KXbz20PbwBAwgAAAAAAAAAAAf8BHBzZXQCICWyUQcOKcoZBDzzPM1zJOLdqwPsxK4LXnfE/A5c9slaB/wEcHNldAYhAv2YM9xdvR/Mxx+ulKcSzcom+JQpzsV/hrxKHexk7BYYB/wEcHNldAgEAAAAAAABBAABAwjoAwAAAAAAAAf8BHBzZXQCICWyUQcOKcoZBDzzPM1zJOLdqwPsxK4LXnfE/A5c9slaAA== false
The input of the tx is confidential and its amount is exactly 0.00001, therefore it's spent entirely by the fee out.
The first output of the tx is a non-LBTC unblinded one, therefore i tried to add a dummy LBTC blinded output to balance the tx as {"el1qqt7esv7utk73lnx8r7hfffcjeh9zd7y5988v2luxh39pmmryastp37ddelguq7slt74l99r57lffwmeaks7mc883qj7565fdg": 0, "blinder_index": 0} in createpsbt.
These are the last logs of the node:
2022-04-15T15:39:50Z [default wallet] AddToWallet 02338810e562a4fe99d555e616932f76dbb8301e9e264fcf6e9a3cf56ce5322d new
2022-04-15T15:39:50Z [default wallet] AddToWallet 0ff56d3088a14bff1ed670bd264cb6021fd52416340ed679245c5bdf5c9fac2a update
elementsd: blindpsbt.cpp:554: BlindingStatus BlindPSBT(PartiallySignedTransaction&, std::map<unsigned int, std::tuple<long int, CAsset, uint256, uint256> >, std::map<unsigned int, std::pair<CKey, CKey> >): Assertion `rangeresult' failed.
Seems like the blinder role fails to create a rangeproof for the dummy output. Am I doing something wrong?
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 418
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 13
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ElementsProject/elements
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
ElementsProject/elements#1555 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
ElementsProject/elements#1521 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
ElementsProject/elements#1516 · 5 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
ElementsProject/elements#1502 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
ElementsProject/elements#1500 · 2 comments ·
All issues in ElementsProject/elements
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
google/libultrahdr#485 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
godotengine/godot#123776 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 60/100
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ros2/common_interfaces#344 ·