Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

universe: finish multi-verse database #295

Closed
Roasbeef opened this issue Apr 25, 2023 · 7 comments
Closed

universe: finish multi-verse database #295

Roasbeef opened this issue Apr 25, 2023 · 7 comments
Assignees

Comments

@Roasbeef
Copy link
Member

No description provided.

@Roasbeef
Copy link
Member Author

Related to lightninglabs/tap#40.

We already have the universe forest abstraction, just need to make another tree on top of that.

@dstadulis
Copy link
Collaborator

Potentially defer to v0.2.1 would be stretch goal for v0.2

base: outpoint || scriptKey -> leaf
multi -> assetID/groupKey -> base # another layer of the tree
outpoint -> assetid -> scriptKey # can pick an arbitrary output on chain and see if anything is in it

https://github.com/lightninglabs/taro-private/blob/main/tarodb/universe_forest.go
ProofCourier Interface

@Roasbeef Roasbeef transferred this issue from another repository May 19, 2023
@ffranr ffranr self-assigned this May 24, 2023
@dstadulis
Copy link
Collaborator

@ffranr
Copy link
Contributor

ffranr commented May 25, 2023

This is the tracking issue for the OKR:

"Key Result 3: Extend existing universe RPCs to support multi-verses"

@Roasbeef
Copy link
Member Author

Worth noting that this is basically the start of it: https://github.com/lightninglabs/taproot-assets/blob/main/tapdb/universe_forest.go

You'd then need to refactor the base universe stuff a bit (allow the methods to pass in the interface), then call those from the multi-verse method. The above obtains all the roots, which then needs to be inserted into a tree. That tree then needs to be updated each time things are inserted in any of the main asset roots.

Users ideally can have more filtering flags to track basically everything, or just those for a given asset that they care about.

We'd then want to make a courier implementation, and potentially also a proof archive backed by the new db logic.

@ffranr
Copy link
Contributor

ffranr commented Jun 6, 2023

Questions for @Roasbeef:

I think the RPC endpoints should just call into MintingArchive which will then make use of universe.BaseBackend and MintingArchive.cfg.UniverseForest. Does that sound correct?

As a first step, I'm going to extend the universe.BaseForest interface with a RegisterIssuance method. Let me know if that's not right.

In this commit I rename the BaseUniverse in the RPC server to MintingArchive: 680ce67

@ffranr ffranr moved this from 🔖 Ready to 🏗 In progress in Taproot-Assets Project Board Jun 6, 2023
@ffranr
Copy link
Contributor

ffranr commented Jun 7, 2023

New issue for tracking the proof distribution aspect of this work: #344

@ffranr ffranr changed the title universe: finish multi-verse database, start to use for proof distribution universe: finish multi-verse database Jun 7, 2023
@dstadulis dstadulis added the v0.3 label Jun 13, 2023
@ffranr ffranr moved this from 🏗 In progress to 👀 In review in Taproot-Assets Project Board Aug 8, 2023
@ffranr ffranr moved this from 👀 In review to ✅ Done in Taproot-Assets Project Board Aug 9, 2023
@ffranr ffranr closed this as completed Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

No branches or pull requests

3 participants