Skip to content

Commit 3cb8304

Browse files
committed
Add export artifacts to files #148
1 parent 891011a commit 3cb8304

File tree

5 files changed

+255
-93
lines changed

5 files changed

+255
-93
lines changed

demo/protocol-demo/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
target/
22
mithrildemo
3-
.DS_Store
3+
.DS_Store
4+
artifacts

demo/protocol-demo/Cargo.lock

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/protocol-demo/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ base64 = "0.13.0"
1515
rouille="3.5.0"
1616
ureq = { version = "2.4.0", features = ["json"] }
1717
threadpool = "1.8.1"
18+
hex = "0.4.3"
1819

1920
rand_core = "0.6.3"
2021
rand_chacha = "0.3.1"

demo/protocol-demo/README.md

+22-19
Original file line numberDiff line numberDiff line change
@@ -71,23 +71,24 @@ Party #4: party created with 41 stakes
7171
Protocol established to StmParameters { m: 100, k: 5, phi_f: 0.2 }
7272
7373
>> Protocol initialize phase:
74+
Verifier: verifier created
75+
Verifier: protocol params updated to StmParameters { m: 100, k: 5, phi_f: 0.2 }
7476
Party #0: protocol params updated to StmParameters { m: 100, k: 5, phi_f: 0.2 }
7577
Party #1: protocol params updated to StmParameters { m: 100, k: 5, phi_f: 0.2 }
7678
Party #2: protocol params updated to StmParameters { m: 100, k: 5, phi_f: 0.2 }
7779
Party #3: protocol params updated to StmParameters { m: 100, k: 5, phi_f: 0.2 }
7880
Party #4: protocol params updated to StmParameters { m: 100, k: 5, phi_f: 0.2 }
79-
Verifier: verifier created
80-
Verifier: protocol params updated to StmParameters { m: 100, k: 5, phi_f: 0.2 }
81+
Verifier: protocol keys registration from [(0, 826), (1, 741), (2, 144), (3, 734), (4, 41)]
8182
Party #0: protocol keys registration from [(0, 826), (1, 741), (2, 144), (3, 734), (4, 41)]
8283
Party #1: protocol keys registration from [(0, 826), (1, 741), (2, 144), (3, 734), (4, 41)]
8384
Party #2: protocol keys registration from [(0, 826), (1, 741), (2, 144), (3, 734), (4, 41)]
8485
Party #3: protocol keys registration from [(0, 826), (1, 741), (2, 144), (3, 734), (4, 41)]
8586
Party #4: protocol keys registration from [(0, 826), (1, 741), (2, 144), (3, 734), (4, 41)]
86-
Verifier: protocol keys registration from [(0, 826), (1, 741), (2, 144), (3, 734), (4, 41)]
87+
Artifacts written to artifacts/parties-keys.json
8788
8889
>> Protocol issue certificates phase:
8990
Message #0 to sign: [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]
90-
Party #0: sign message [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]
91+
Party #0: sign message 7724e03fb8d84a376a43b8f41518a11c
9192
Party #0: lottery #6 won
9293
Party #0: lottery #9 won
9394
Party #0: lottery #32 won
@@ -96,45 +97,47 @@ Party #0: lottery #46 won
9697
Party #0: lottery #57 won
9798
Party #0: lottery #89 won
9899
Party #0: lottery #96 won
99-
Party #1: sign message [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]
100+
Party #1: sign message 7724e03fb8d84a376a43b8f41518a11c
100101
Party #1: lottery #6 won
101102
Party #1: lottery #9 won
102103
Party #1: lottery #43 won
103104
Party #1: lottery #46 won
104105
Party #1: lottery #57 won
105106
Party #1: lottery #89 won
106107
Party #1: lottery #96 won
107-
Party #2: sign message [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]
108+
Party #2: sign message 7724e03fb8d84a376a43b8f41518a11c
108109
Party #2: lottery #43 won
109110
Party #2: lottery #46 won
110111
Party #2: lottery #96 won
111-
Party #3: sign message [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]
112+
Party #3: sign message 7724e03fb8d84a376a43b8f41518a11c
112113
Party #3: lottery #6 won
113114
Party #3: lottery #9 won
114115
Party #3: lottery #43 won
115116
Party #3: lottery #46 won
116117
Party #3: lottery #57 won
117118
Party #3: lottery #89 won
118119
Party #3: lottery #96 won
119-
Party #4: sign message [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]
120+
Party #4: sign message 7724e03fb8d84a376a43b8f41518a11c
120121
Party #0: aggregate signature computed
121122
Party #1: aggregate signature computed
122123
Party #2: aggregate signature computed
123124
Party #3: aggregate signature computed
124125
Party #4: aggregate signature computed
126+
Artifacts written to artifacts/single-signatures.json
127+
Artifacts written to artifacts/multi-signatures.json
125128
126129
>> Protocol verify certificates phase:
127-
Message #0 to verify: [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]
128-
Party #0: aggregate signature successfully verified for [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]!
129-
Verifier: aggregate signature successfully verified for [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]!
130-
Party #1: aggregate signature successfully verified for [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]!
131-
Verifier: aggregate signature successfully verified for [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]!
132-
Party #2: aggregate signature successfully verified for [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]!
133-
Verifier: aggregate signature successfully verified for [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]!
134-
Party #3: aggregate signature successfully verified for [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]!
135-
Verifier: aggregate signature successfully verified for [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]!
136-
Party #4: aggregate signature successfully verified for [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]!
137-
Verifier: aggregate signature successfully verified for [119, 36, 224, 63, 184, 216, 74, 55, 106, 67, 184, 244, 21, 24, 161, 28]!
130+
Message #0 to verify: 7724e03fb8d84a376a43b8f41518a11c
131+
Party #0: aggregate signature successfully verified for 7724e03fb8d84a376a43b8f41518a11c!
132+
Verifier: aggregate signature successfully verified for 7724e03fb8d84a376a43b8f41518a11c!
133+
Party #1: aggregate signature successfully verified for 7724e03fb8d84a376a43b8f41518a11c!
134+
Verifier: aggregate signature successfully verified for 7724e03fb8d84a376a43b8f41518a11c!
135+
Party #2: aggregate signature successfully verified for 7724e03fb8d84a376a43b8f41518a11c!
136+
Verifier: aggregate signature successfully verified for 7724e03fb8d84a376a43b8f41518a11c!
137+
Party #3: aggregate signature successfully verified for 7724e03fb8d84a376a43b8f41518a11c!
138+
Verifier: aggregate signature successfully verified for 7724e03fb8d84a376a43b8f41518a11c!
139+
Party #4: aggregate signature successfully verified for 7724e03fb8d84a376a43b8f41518a11c!
140+
Verifier: aggregate signature successfully verified for 7724e03fb8d84a376a43b8f41518a11c!
138141
139142
>> Congrats, protocol terminated with success!
140143
```

0 commit comments

Comments
 (0)