lightninglabs / lightninglabs/taproot-assets

tapgarden: key asset metas and proofs by locator instead of script key

Open
#844 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

Right now one of the invariants we maintain for a minting batch is that seedling names are unique. This means that multiple seedlings should be able to use the same script key.

However, we currently key some data structures inside the minter only on the asset script key, which means we could have collisions. This includes the `AssetMetas` mapping to seedling metadata and the `mintingProofs` mapping to proofs of asset genesis. There may be other spots where this occurs as well.

Given that all these uses happen after a batch is funded and all assets are sprouted, we should be able to use the `proof.Locator` struct as a replacement map key (maybe we have to use a hash of the locator).

This should allow us to support duplicate script keys. We should add a new test for that as well.

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

Start in the minter code that defines AssetMetas and mintingProofs, and trace all maps keyed by asset script key after funding and sprouting. Inspect proof.Locator usage and add coverage for multiple seedlings sharing a script key; done when their metadata and genesis proofs remain distinct.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.