Skip to content

Commit

Permalink
tapd: add x_only_group_key to key_group_info_view
Browse files Browse the repository at this point in the history
We want to be able to match the group key with universe roots, which use
the x-only (32-byte) part of the group key. To make the matching easier,
we add a x_only_group_key version of the tweaked group key to the
key_group_info_view.
  • Loading branch information
guggero committed Oct 9, 2023
1 parent d0b40b6 commit 847fc28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tapdb/sqlc/migrations/000002_assets.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ CREATE VIEW genesis_info_view AS
CREATE VIEW key_group_info_view AS
SELECT
witness_id, gen_asset_id, witness_stack, tapscript_root,
tweaked_group_key, raw_key, key_index, key_family
tweaked_group_key, raw_key, key_index, key_family,
substr(tweaked_group_key, 2) AS x_only_group_key
FROM asset_group_witnesses wit
JOIN asset_groups groups
ON wit.group_key_id = groups.group_id
Expand Down

0 comments on commit 847fc28

Please sign in to comment.