Commit 4adad21
authored
chore: improve benchmark logic (#612)
Fixes https://github.com/KILTprotocol/ticket/issues/3104, based on top
of #611.
It fixes the logic for the `dip-consumer` pallet, by delegating the
generation of a proof worst case to the proof verifier, which must make
sure the proof is indeed the one that requires the most weight to
verify, and that it verifies successfully. This also means that each
consumer runtime is responsible to implement this method, as there
cannot be a "universal" worst proof, as that depends on the use case.
The pallet benchmarking logic is now generic enough to make this
possible and flexible ✨✨✨1 parent 476c221 commit 4adad21
File tree
31 files changed
+826
-381
lines changed- crates/kilt-dip-primitives
- src
- merkle_proofs/v0
- dip_subject_state
- provider_state
- relay_state
- verifier
- parachain
- v0
- relaychain
- dip-template/runtimes
- dip-consumer
- src
- dip-provider/src
- pallets
- did/src
- pallet-deposit-storage/src
- pallet-dip-consumer/src
- pallet-dip-provider/src
- pallet-migration/src
- public-credentials/src
- runtimes/common/src
- dip
- did
- merkle/v0
- support/src
31 files changed
+826
-381
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
81 | | - | |
| 80 | + | |
82 | 81 | | |
Lines changed: 4 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 109 | + | |
116 | 110 | | |
117 | 111 | | |
118 | 112 | | |
| |||
166 | 160 | | |
167 | 161 | | |
168 | 162 | | |
169 | | - | |
170 | | - | |
171 | | - | |
| 163 | + | |
172 | 164 | | |
173 | 165 | | |
174 | 166 | | |
| |||
214 | 206 | | |
215 | 207 | | |
216 | 208 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
| 209 | + | |
226 | 210 | | |
227 | 211 | | |
228 | 212 | | |
| |||
Lines changed: 17 additions & 54 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 37 | + | |
| 38 | + | |
43 | 39 | | |
44 | | - | |
45 | | - | |
| 40 | + | |
| 41 | + | |
46 | 42 | | |
47 | 43 | | |
48 | 44 | | |
49 | 45 | | |
50 | 46 | | |
51 | 47 | | |
52 | 48 | | |
53 | | - | |
| 49 | + | |
54 | 50 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
59 | 54 | | |
60 | 55 | | |
61 | 56 | | |
| |||
76 | 71 | | |
77 | 72 | | |
78 | 73 | | |
79 | | - | |
| 74 | + | |
80 | 75 | | |
81 | 76 | | |
82 | 77 | | |
| |||
92 | 87 | | |
93 | 88 | | |
94 | 89 | | |
95 | | - | |
| 90 | + | |
96 | 91 | | |
97 | 92 | | |
98 | 93 | | |
| |||
105 | 100 | | |
106 | 101 | | |
107 | 102 | | |
108 | | - | |
109 | 103 | | |
110 | | - | |
111 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
112 | 107 | | |
113 | 108 | | |
114 | 109 | | |
115 | 110 | | |
116 | 111 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 112 | + | |
| 113 | + | |
137 | 114 | | |
138 | 115 | | |
139 | 116 | | |
| |||
188 | 165 | | |
189 | 166 | | |
190 | 167 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
0 commit comments