Skip to content

Commit 1620265

Browse files
louisingeraltafan
andauthored
Add support for new musig2 signing scheme (sign branch only)
* client and application update * fix: sweeper and tests * improve common/musig2.go * validation.go error message * Update server/internal/core/application/covenantless.go Co-authored-by: Pietralberto Mazza <[email protected]> Signed-off-by: Louis Singer <[email protected]> * Update common/bitcointree/builder.go Co-authored-by: Pietralberto Mazza <[email protected]> Signed-off-by: Louis Singer <[email protected]> * add psbt_test.go & fix lifetime encoding * fix application, APIs and clients with tree.Musig2 struct * RoundSigningEvent: add cosigners public key list involved in the tree * rework client vtxo tree signer session * go work sync * signingAll boolean in API * fix matrix of bytes encoding * fix e2e test * rename congestion_tree.go -> vtxo_tree.go * Update common/bitcointree/builder.go Co-authored-by: Pietralberto Mazza <[email protected]> Signed-off-by: Louis Singer <[email protected]> * Update common/bitcointree/builder.go Co-authored-by: Pietralberto Mazza <[email protected]> Signed-off-by: Louis Singer <[email protected]> * fix musig2_test.go * move musig2data setter to update * fix e2e_test.go * Improve readability of musig2 test (#8) --------- Signed-off-by: Louis Singer <[email protected]> Co-authored-by: Pietralberto Mazza <[email protected]>
1 parent b5b548f commit 1620265

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3158
-2343
lines changed

api-spec/openapi/swagger/ark/v1/service.swagger.json

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,20 @@
594594
}
595595
}
596596
},
597+
"v1Musig2": {
598+
"type": "object",
599+
"properties": {
600+
"cosignersPublicKeys": {
601+
"type": "array",
602+
"items": {
603+
"type": "string"
604+
}
605+
},
606+
"signingAll": {
607+
"type": "boolean"
608+
}
609+
}
610+
},
597611
"v1Node": {
598612
"type": "object",
599613
"properties": {
@@ -685,9 +699,6 @@
685699
"$ref": "#/definitions/v1Input"
686700
}
687701
},
688-
"ephemeralPubkey": {
689-
"type": "string"
690-
},
691702
"notes": {
692703
"type": "array",
693704
"items": {
@@ -717,6 +728,9 @@
717728
"$ref": "#/definitions/v1Output"
718729
},
719730
"description": "List of receivers for to convert to leaves in the next VTXO tree."
731+
},
732+
"musig2": {
733+
"$ref": "#/definitions/v1Musig2"
720734
}
721735
}
722736
},

api-spec/protobuf/ark/v1/service.proto

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,22 @@ message GetBoardingAddressResponse {
120120

121121
message RegisterInputsForNextRoundRequest {
122122
repeated Input inputs = 1;
123-
optional string ephemeral_pubkey = 2;
124-
repeated string notes = 3;
123+
repeated string notes = 2;
125124
}
126125
message RegisterInputsForNextRoundResponse {
127126
string request_id = 1;
128127
}
129128

129+
message Musig2 {
130+
repeated string cosigners_public_keys = 1;
131+
bool signing_all = 2;
132+
}
133+
130134
message RegisterOutputsForNextRoundRequest {
131135
string request_id = 1;
132136
// List of receivers for to convert to leaves in the next VTXO tree.
133137
repeated Output outputs = 2;
138+
optional Musig2 musig2 = 3;
134139
}
135140
message RegisterOutputsForNextRoundResponse {}
136141

0 commit comments

Comments
 (0)