lightninglabs / lightninglabs/taproot-assets

bug: `AssetLeaves` RPC endpoint should return an error if the proof type argument is unspecified

Open
#701 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently, if the proof type argument for the `AssetLeaves` RPC endpoint is unspecified, no proof leaves are returned. This is because a proof lookup is performed for a universe that does not exist (a universe which corresponds to the unspecified proof type).

The `AssetLeaves` RPC endpoint should return an error if the proof type argument is left unspecified. The proof type should be a required argument.

This issue was reported by a user on Slack, see: https://lightningcommunity.slack.com/archives/C03B3556HQ8/p1700664670126429

We should also add a proof type sanity check to `universe.Archive.MintingLeaves`.

This issue replaces issue https://github.com/lightninglabs/taproot-assets/issues/697 which was concerned with returning all proof types if none was specified.

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

Locate the AssetLeaves RPC endpoint and universe.Archive.MintingLeaves in the Go codebase. Start by tracing how an unspecified proof type is handled, then verify that both paths reject it with an error and that the endpoint no longer returns empty proof leaves; run the related RPC and archive tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.