elements-cli unblindrawtransaction cannot unblind own sent payments
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, cli
Research direction
Start by reproducing the issue with elements-cli using getrawtransaction, unblindrawtransaction, and decoderawtransaction, comparing the transaction IDs and each output before and after unblinding. Done means unblindrawtransaction preserves the original txid and unblinds every applicable output, including sent payments rather than only wallet-owned outputs.
Written by the indexing model from the issue text.
Description
There are two bugs:
unblindrawtransactionmethod changes TxId of the transaction- it does not unblind all outputs, but only those coming back to the wallet (change or deposits)
Have a look:
~ $ elements-cli listtransactions
...
{
"address": "tex1q5w27zcjlvrry5fkgez2mvk5jsp8t8c887w7kj9",
"category": "send",
"amount": -0.00001234,
"txid": "97bd4529dcbc5b04b600976031d0ace907ab458121b1d61049029ee1a36c94ae",
... ...
~ $ elements-cli getrawtransaction 97bd4529dcbc5b04b600976031d0ace907ab458121b1d61049029ee1a36c94ae true
{
"txid": "97bd4529dcbc5b04b600976031d0ace907ab458121b1d61049029ee1a36c94ae",
...
"vout": [
{
"value-minimum": 0.00000001,
"value-maximum": 45035996.27370496,
...
},
{
"value-minimum": 0.00000001,
"value-maximum": 45035996.27370496,
... },
{
"value": 0.00000026,
... "type": "fee"
}
.. "hex": "0200000001011a2b2ac527...715192888e9d55f52c0000",
...
}
~ $ elements-cli unblindrawtransaction 0200000001011a2b2ac527...88e9d55f52c0000
{
"hex": "0200000001011a2b2ac...192888e9d55f52c0000"
}
~ $ elements-cli decoderawtransaction 0200000001011a2b2ac...192888e9d55f52c0000
{
"txid": "7e7a2d8f297509bab56b9493c95e299b00fef58e80f77f523b96b78e56edcc30",
...
"vout": [
{
"value": 0.00002112,
"asset": "144c654344aa716d6f3abcc1ca90e5641e4e2a7f633bc09fe3baf64585819a49",
...
},
{
"value-minimum": 0.00000001,
"value-maximum": 45035996.27370496,
...
}
- 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 ·