Repository navigation
Conversation
jtobin
force-pushed
the
universe-asset-leaf-keys
branch
from
November 30, 2026 11:24
9d48655 to
bf89532
Compare
Issuance and transfer universes key each leaf by its asset ID as well as its outpoint and script key, and a universe leaf row is identified by its tree key. A grouped asset's proofs are held only by its group universe, which inserts, queries and deletions naming the asset's ID universe resolve to. Leaf keys carry their asset ID over RPC.
A programmatic migration rebuilds every issuance and transfer universe tree with asset ID leaf keys, folds grouped assets' asset ID universes into their group universes, and rebuilds both multiverse trees.
jtobin
force-pushed
the
universe-asset-leaf-keys
branch
from
November 30, 2026 11:47
bf89532 to
ebd1b48
Compare
The universe server reports its tree version and refuses requests that compare universe trees without naming tree version 1. The syncer only syncs with servers that serve that version, and tapcli and the itests name it in their requests.
jtobin
force-pushed
the
universe-asset-leaf-keys
branch
from
November 30, 2026 12:44
ebd1b48 to
72e3286
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2381.
This adds the asset ID to universe tree leaf keys, making them now:
The effect is that grouped assets at the same outpoint and script key can no longer collide, obviating the need for the "duplicate" asset ID-indexed trees introduced by #2350.
I initially thought this was going to be a difficult migration, but it's not, really. Old universe trees just get migrated to a V1 version under this key format, with any "duplicated" asset ID-indexed trees getting pruned in the process. The initial migration should be most burdensome on our mainnet universe server, which is big (every V0 tree needs to be recalculated), but I don't expect it should take more than a few minutes to run. Most clients shouldn't notice anything. I have some benchmarks running, I'll post the results when they finish.
Re: dealing with unupgraded clients, servers can continue to serve both V0 and V1 trees. Unupgraded nodes can still send or receive proofs through an upgraded proof courier, but must upgrade to sync with one, which seems proper behaviour. Eventually in v0.10 or so we can just retire the V0 trees altogether.