pset: PartiallySignedTransaction::GetUnsignedTx does not work correctly when issuance assets have null values
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- blockchain
Research direction
Inspect src/psbt.cpp at lines 126-132 and trace PartiallySignedTransaction::GetUnsignedTx for issuance and reissuance asset values. Compare the resulting unsigned transaction and sighash with the consensus validation rules, then exercise the walletprocesspsbt flow. Done means generated signatures validate for issuance cases involving null values.
Written by the indexing model from the issue text.
Description
According to the consensus validation rules, we must supple Null values for issunace/reissuance instead of explicit zero. However, the current code for tries does something else:
https://github.com/ElementsProject/elements/blob/c80e926d6e29d5a9524182767967884091665405/src/psbt.cpp#L126-L132
Fix would be to have
- two separate if else statements for issunace/re-issuance.
- force_unblinded is always used. There is no way to do explicit issuances in the current pset workflow.
This calculation causes walletprocesspsbt to create signatures that do not validate because the sighash is calculated incorrectly.
- 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
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 88/100
QuantStack/git2cpp#187 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
mlcommons/mobile_app_open#1182 ·
-
Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/winget-cli#6547 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·