tapdb+universe: implement initial version of universe ignore tree
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
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 | |
|---|---|
| Change from base Build 14474635473: | 0.2% |
| Covered Lines: | 26254 |
| Relevant Lines: | 91798 |
đź’› - Coveralls
Removed from draft.
Pushed up a new version (CI was failing as we had two migration 30's). PTAL.
@georgetsagk: review reminder
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).
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 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.