lightninglabs / lightninglabs/taproot-assets
tapgarden: key asset metas and proofs by locator instead of script key
Nobody has claimed this yet.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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