Blockstream / Blockstream/green_qt

Confidential pegin output not showing in 2FA Green Wallet

Open
#132 12 comments 0 reactions 1 assignee Claimed by @jgriffiths View on GitHub
bug status: confirmed
Dominant language
C++
Stars
262
Forks
44
PR merge metrics
No merged PRs in 30d

Description

### Description

There was a [confidential peg-in transaction on Liquid](https://liquid.network/tx/caeb8e3703b8a1665c718b9426c91cf342c1d285fcc1693588ddc369009c4614) recently and one of its outputs was sent to a 2FA 2-of-2 address on Green Wallet. It is not showing there.

### Version

4.0.30 on Android, 2.0.7 AppImage on Linux

### Steps to reproduce

1. Make a "MULTISIG / 2OF2" account and generate a new address there. This will be `ADDR2` later.
2. Call `elements-cli getpeginaddress` and send some bitcoin to that address. We will refer to this address as `PEGINADDRESS` later and to the claimscript as `CLAIMSCRIPT`.
3. Call `elements-cli -stdin createrawtransaction` with following input:
```
[{"txid":"UBLINDED","vout":UBLINDEDVOUT},{"txid":"PEGIN","vout":PEGINVOUT,"pegin_bitcoin_tx":"HEX_TX","pegin_txout_proof":"HEX_PROOF","pegin_claim_script":"CLAIMSCRIPT"}]
[{"ADDR1":ADDR1_AMT},{"ADDR2":ADDR2_AMT},{"fee":FEE}]
```

Where the capitalized variables mean following:

- Inputs:
- an unspent transaction which was sent blinded
- `UBLINDED` is an unspent Liquid transaction ID
- `UBLINDEDVOUT` is the vout of used Liquid UTXO
- a pegin
- `PEGIN` is the Bitcoin transaction ID which sends an output to PEGINADDRESS
- `PEGINVOUT` is the exact output index going to PEGINADDRESS
- `HEX_TX` is the raw full hex of the transaction itself
- `HEX_PROOF` is a hex-encoded proof that `PEGIN` transaction was included in a block
- `CLAIMSCRIPT` was obtained above in step 2
- Outputs:
- a confidential address that receives part of the inputs
- `ADDR1` receives `ADDR1_AMT`
- a confidential address that receives the rest of the inputs minus fee
- `ADDR2` receives `ADDR2_AMT`
- a non-confidential fee
- `FEE` is the fee denominated in whole coins like all the other amounts here (e.g. `0.00000123` would be 123 sat fee)

Sum of the amounts (not explicitly written in the input but known) is the SUM.

SUM = ADDR1_AMT + ADDR2_AMT + FEE

After `createrawtransaction` also pipe the hex output to `blindrawtransaction` and consequently to `signrawtransactionwithwallet` from which output the `.hex` is to be broadcast.

### Expected behaviour

I would expect Blockstream Green wallet to show the amount received to 2FA address. Same like Aqua Wallet shows similar output (coming from a blinded pegin transaction) to its 1of1 wallet.

### Actual behaviour

The incoming transaction is not even shown in the wallet.

### Screenshots

`$ elements-cli gettxout caeb8e3703b8a1665c718b9426c91cf342c1d285fcc1693588ddc369009c4614 1`

```json
{
"bestblock": "85ad26d9a8a062e2e3a0dc6e6401940e92761f3186de0c689a8234e7b5b96f2f",
"confirmations": 2138,
"valuecommitment": "08c33dee6a5d5535eeae17cd9c600c2be4458f87d123fc1d101c22d2d454aae9db",
"assetcommitment": "0a0bab251a5d4a422af1818479810b08709bf59506eeb36468b52843fb4b1dfeab",
"commitmentnonce": "",
"scriptPubKey": {
"asm": "OP_HASH160 644bb0b401a097c97d4e84e74e2a1a0bb38f3c84 OP_EQUAL",
"desc": "addr(GrKqeUAzg1M2ZxHxgqtsUsYGLPaSJXxbVf)#0ng55r69",
"hex": "a914644bb0b401a097c97d4e84e74e2a1a0bb38f3c8487",
"address": "GrKqeUAzg1M2ZxHxgqtsUsYGLPaSJXxbVf",
"type": "scripthash"
},
"coinbase": false
}
```

### Device or machine

Android 11 smartphone running Blockstream Green wallet v4.0.30

Linux x86_64 Ubuntu running latest `BlockstreamGreen-x86_64.AppImage` (2.0.7)

### Additional info

Sending an output to a clear 1of1 address in Blockstream Green wallet was not tried yet.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.