taproot-assets icon indicating copy to clipboard operation
taproot-assets copied to clipboard

tapdb+universe: implement initial version of universe ignore tree

Open Roasbeef opened this issue 10 months ago • 6 comments

In this PR, we implement the initial version of the universe Ignore Tree.

Along the way, we need a migration to the universe leaves, as the current unique index structure prevents us from adding two leaves that have the same script key, but distinct namespace (eg: transfer to a script key, then a burn of that).

With that in place, we're able to implement the ignore tree using the existing MS-SMT/Universe routines we already have in the database.

TODO

  • [x] Consistent interfaces.
  • [x] Unit tests for the database layer

Roasbeef avatar Mar 05 '25 05:03 Roasbeef

Pull Request Test Coverage Report for Build 14483915227

Details

  • 316 of 419 (75.42%) changed or added relevant lines in 6 files are covered.
  • 10 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.2%) to 28.6%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/merge-sql-schemas/main.go 0 2 0.0%
asset/asset.go 0 7 0.0%
universe/interface.go 0 8 0.0%
universe/ignore_records.go 81 121 66.94%
tapdb/ignore_tree.go 229 275 83.27%
<!-- Total: 316 419
Files with Coverage Reduction New Missed Lines %
asset/group_key.go 2 57.89%
tapgarden/caretaker.go 2 68.63%
tappsbt/create.go 2 26.74%
commitment/tap.go 4 71.59%
<!-- Total: 10
Totals Coverage Status
Change from base Build 14474635473: 0.2%
Covered Lines: 26254
Relevant Lines: 91798

đź’› - Coveralls

coveralls avatar Mar 07 '25 01:03 coveralls

Removed from draft.

Roasbeef avatar Mar 09 '25 02:03 Roasbeef

Pushed up a new version (CI was failing as we had two migration 30's). PTAL.

Roasbeef avatar Mar 21 '25 00:03 Roasbeef

@georgetsagk: review reminder

lightninglabs-deploy avatar Mar 28 '25 01:03 lightninglabs-deploy

Will fix the collision issues in the burn tree PR.

This is ready for review (no changes since my last push to fix CI after the rebase).

Roasbeef avatar Apr 02 '25 23:04 Roasbeef

I feel as if "tuple" is used as a a bit of a filler word here.

Tuple as in: https://en.wikipedia.org/wiki/Tuple.

It's not really a "coin" in the context we usually use that term within Bitcoin.

Roasbeef avatar Apr 10 '25 01:04 Roasbeef

I feel as if "tuple" is used as a a bit of a filler word here.

Tuple as in: https://en.wikipedia.org/wiki/Tuple.

It's not really a "coin" in the context we usually use that term within Bitcoin.

I think a term like “asset coin” could be useful. Or something similar, I'm not sure what the convention is around "coin". Basically a higher level term for an asset leaf in a Taproot Asset MS-SMT—something that conveys spendability.

ffranr avatar Apr 10 '25 16:04 ffranr