-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[psbt saga part 4/4]: Multisig demo #796
Conversation
0d0dcb6
to
dc420e9
Compare
dc420e9
to
84274cb
Compare
1d9c31a
to
132290e
Compare
84274cb
to
ad46082
Compare
132290e
to
783fa63
Compare
fd7e5d4
to
0867183
Compare
783fa63
to
4795a21
Compare
0867183
to
7234c5c
Compare
4795a21
to
5cc1a74
Compare
7234c5c
to
b47794b
Compare
0125496
to
d89a35e
Compare
b47794b
to
ce2c51d
Compare
ce2c51d
to
d0fca7d
Compare
b1da2c3
to
e4db665
Compare
ba82a98
to
ba4fdbd
Compare
e4db665
to
9c48df2
Compare
ba4fdbd
to
efb95b0
Compare
9c48df2
to
3e986cf
Compare
efb95b0
to
3c40a9d
Compare
3e986cf
to
0170a6c
Compare
9e5f1c0
to
7e4a14a
Compare
7e4a14a
to
0e136b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, 10 of 10 files at r4, 11 of 11 files at r5, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @GeorgeTsagk and @guggero)
tapdb/sqlc/queries/assets.sql
line 296 at r4 (raw file):
WHERE spent = FALSE GROUP BY assets.genesis_id, genesis_info_view.asset_id, version, genesis_info_view.asset_tag, genesis_info_view.meta_hash,
Hmm, trying to remember why we also wanted to group by version in the first place 🤔
0e136b7
to
d1c663c
Compare
d1c663c
to
21253a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👌
21253a7
to
f51c888
Compare
Because of the versions field being in the GROUP BY clause of the query, we would get two distinct rows returned for the same asset ID if we had asset UTXOs with different versions. But because we use the asset ID as the map key of the data structure we return, only one of those two entries would be returned, causing the total amount to be incorrect. But since the genesis doesn't really have a version in the database anyway and we're just interested by the sum of asset balances by asset ID, we remove the version field from the genesis entry which causes the problem in the first place.
f51c888
to
8280b00
Compare
Hi @guggero I saw the video about Multisig. for David(no tapd with) :
|
Yes, definitely. Both on the BTC level (
Yes, if they use the correct RPCs to create the correct signatures. |
Its a great feature. its possible for btccoin address to receive taproot assets without tapd. |
Depends on #787.
This PR adds an integration test that demonstrates how multi signatures can be used on both the BTC and asset level.
In the demo we use the following Tapscript to encumber the BTC level anchor output:
This is basically a 2-of-2 multi signature. To make sure the key spend path cannot be taken, we use the NUMS public key as the internal key.
On the asset level, we use a script key that is the MuSig2 combined key of two script keys.
This means that the 1000 units of assets sent to the constructed TAP address will be co-owned by both
tapd
instances, on the asset and BTC level.We then spend from that address again, just to demonstrate how the witnesses for such transfers would be created.
This change is