lightninglabs / lightninglabs/taproot-assets

Improve manual proof recovery UX when prior transfer proofs are missing

Open
#2,144 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
525
Forks
150
Avg merge
2d 15h
Merged PRs (30d)
31

Description

Background

While testing manual recovery after a failed proof courier delivery, I found that inserting only the receiver's final proof is not enough if the asset has prior transfers.

In my test, the asset history was:

mint
-> Alice self-send/change transfer
-> Alice sends to Bob

Bob's receive transaction was confirmed, and Bob had:

ADDR_EVENT_STATUS_TRANSACTION_CONFIRMED
has_proof=false

Alice could export Bob's final receive proof, and Bob could verify it as valid. However, trying to insert only Bob's final transfer proof failed because Bob was missing the previous transfer proof from Alice's self-send/change output.

The error was:

unable to fetch previous asset snapshot: unable to fetch previous proof: no universe proof found

The missing previous proof was for the intermediate transfer outpoint/script key and after exporting and inserting that intermediate transfer proof first, then inserting Bob's final receive proof, recovery worked:

ADDR_EVENT_STATUS_COMPLETED
has_proof=true

and Bob's balance showed the received asset.

Why this is a problem

Manual recovery only works if the receiver can obtain the full prior proof chain.

In my test, inserting Bob's final receive proof was not enough. It failed until I first inserted the previous self-send/change proof. That was only possible because I controlled both sides and could export the missing intermediate proof.

In a real-world case, this could be a bigger problem. For example:

Alice mints an asset
-> Alice sends the asset to Carol
-> Carol self-sends or splits the asset, creating a new intermediate transfer proof
-> Carol later sends part of the asset to Bob
-> the proof courier fails during Carol -> Bob delivery

In that case, Bob may receive the final Carol -> Bob proof, but that proof can still depend on Carol's earlier self-send/split proof. If Bob cannot fetch that intermediate proof from a universe/courier, and Carol does not provide it manually, Bob may not be able to complete recovery even though his receive transaction is confirmed.

So the question is: where is Bob expected to get those missing prior proofs from?

Expected improvement

The recovery flow should make missing prior proofs explicit and recoverable.

It would help if universe proofs insert clearly reported the missing prior proof in a copy-pasteable form, and if the docs explained whether receivers should fetch missing proofs from a universe/courier or request them from the sender.

Ideally, inserting a valid final proof would automatically fetch any missing prior proofs from configured universes/couriers.

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.

Research direction

No files, tests, or entry points are named. Start by tracing the manual universe-proof insertion and recovery flow, then determine how missing prior proofs are discovered and whether configured universes/couriers or the sender are expected to provide them; done means the missing-proof path is explicit and recovery guidance is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.