Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

elements-cli unblindrawtransaction cannot unblind own sent payments

Open
#1,375 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. unblindrawtransaction method changes TxId of the transaction
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ElementsProject/elements

All issues in ElementsProject/elements

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.