lightninglabs / lightninglabs/faraday

Audit fails if AMP invoices are present

Open
#126 0 comments 0 reactions 1 assignee View on GitHub

@carlaKC is already working on this.

Since Jun 21, 2021.

Dominant language
Go
Stars
130
Forks
35
Avg merge
7h 54m
Merged PRs (30d)
5

Description

`frcli audit` doesn't work due to "invalid" invoices with missing preimage. From what I see this happens when you send AMP invoices (I used them to rebalance my own channels sending to myself). Other features work as expected.

**Expected behavior**

`frcli audit` returns something meaningful.

**Actual behavior**

`[frcli] rpc error: code = Unknown desc = ListInvoices failed: invalid preimage length of 0, want 32`

**To reproduce**

- Send an AMP invoice to yourself using `lncli sendpayment --amp`
- run `frcli audit`

**System information**

Standalone Faraday, compiled myself from master. Running on Debian 10.9 amd64.

**Additional information**

I used `lncli listinvoices --max_invoices 100000 | jq '.invoices|map(select(.is_amp == true and .r_preimage == null))'` to see if my theory is correct and indeed, there are many invoices with both `is_amp` set and `r_preimage` being null. Filtering by `.is_amp != true and .r_preimage == null` and `.is_amp == true and .r_preimage != null` yields no results.

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.