lightninglabs / lightninglabs/taproot-assets

multi: create account/segmentation overlay for transfers+addrs+assets

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

Nobody has claimed this yet.

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

Description

Today, all the UTXOs and assets referenced occupy a single namespace. This works for instances where one primary users is controlling the daemon, but falls short in situations wherein multiple users might be sharing the daemon, or a daemon mapped to many down stream clients.

To address, this we should add an account/namespace overlay layer. This would be similar to the namespacing scheme we already have in the db for the Universe trees. Instead, we'd add this new namespace field to all the relevant on-chain tables. Users should be able to mint assets into a namespace, and have those assets be invisible from outside the namespace. The same goes for addresses, UTXOs, and transfers.

A sketch of the table would look something like:
```sql
CREATE TABLE IF NOT EXISTS onchain_namespace (
id INTEGER PRIMARY KEY,
name TEXT UNIQUE
);
```

We'd then add a new foreign key ref from the relevant tables into this new namespace table. Then any of the relevant RPC calls can then use that as an extra filter argument.

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 with the existing database namespacing scheme for the Universe trees, then review the on-chain tables and RPC calls described in the issue. Done means namespaces can be created, relevant assets, addresses, UTXOs, and transfers are scoped to them, and RPC queries apply the namespace filter.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
api, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.