@@ -115,11 +115,13 @@ impl<M: TryFromBytes + Debug> DmqConsumerClientPallas<M> {
115
115
. 0
116
116
. into_iter ( )
117
117
. map ( |dmq_message| {
118
- let opcert_without_verification_key =
119
- OpCertWithoutColdVerificationKey :: try_from_bytes (
120
- & dmq_message. operational_certificate ,
121
- )
122
- . with_context ( || "Failed to parse operational certificate" ) ?;
118
+ let opcert_without_verification_key = OpCertWithoutColdVerificationKey :: try_new (
119
+ & dmq_message. operational_certificate . kes_vk ,
120
+ dmq_message. operational_certificate . issue_number ,
121
+ dmq_message. operational_certificate . start_kes_period ,
122
+ & dmq_message. operational_certificate . cert_sig ,
123
+ )
124
+ . with_context ( || "Failed to parse operational certificate" ) ?;
123
125
let cold_verification_key =
124
126
Ed25519VerificationKey :: from_bytes ( & dmq_message. cold_verification_key )
125
127
. with_context ( || "Failed to parse cold verification key" ) ?
@@ -171,7 +173,7 @@ mod tests {
171
173
facades:: DmqServer ,
172
174
miniprotocols:: {
173
175
localmsgnotification,
174
- localmsgsubmission:: { DmqMsg , DmqMsgPayload } ,
176
+ localmsgsubmission:: { DmqMsg , DmqMsgOperationalCertificate , DmqMsgPayload } ,
175
177
} ,
176
178
} ;
177
179
use tokio:: { net:: UnixListener , task:: JoinHandle , time:: sleep} ;
@@ -194,14 +196,20 @@ mod tests {
194
196
expires_at: 100 ,
195
197
} ,
196
198
kes_signature: vec![ 0 , 1 , 2 , 3 ] ,
197
- operational_certificate: vec![
198
- 132 , 88 , 32 , 230 , 80 , 215 , 83 , 21 , 9 , 187 , 108 , 255 , 215 , 153 , 140 , 40 , 198 ,
199
- 142 , 78 , 200 , 250 , 98 , 26 , 9 , 82 , 32 , 110 , 161 , 30 , 176 , 63 , 205 , 125 , 203 , 41 ,
200
- 0 , 0 , 88 , 64 , 212 , 171 , 206 , 39 , 218 , 5 , 255 , 3 , 193 , 52 , 44 , 198 , 171 , 83 , 19 ,
201
- 80 , 114 , 225 , 186 , 191 , 156 , 192 , 84 , 146 , 245 , 159 , 31 , 240 , 9 , 247 , 4 , 87 ,
202
- 170 , 168 , 98 , 199 , 21 , 139 , 19 , 190 , 12 , 251 , 65 , 215 , 169 , 26 , 86 , 37 , 137 ,
203
- 188 , 17 , 14 , 178 , 205 , 175 , 93 , 39 , 86 , 4 , 138 , 187 , 234 , 95 , 5 ,
204
- ] ,
199
+ operational_certificate: DmqMsgOperationalCertificate {
200
+ kes_vk: vec![
201
+ 50 , 45 , 160 , 42 , 80 , 78 , 184 , 20 , 210 , 77 , 140 , 152 , 63 , 49 , 165 , 168 , 5 ,
202
+ 131 , 101 , 152 , 110 , 242 , 144 , 157 , 176 , 210 , 5 , 10 , 166 , 91 , 196 , 168 ,
203
+ ] ,
204
+ issue_number: 0 ,
205
+ start_kes_period: 0 ,
206
+ cert_sig: vec![
207
+ 207 , 135 , 144 , 168 , 238 , 41 , 179 , 216 , 245 , 74 , 164 , 231 , 4 , 158 , 234 , 141 ,
208
+ 5 , 19 , 166 , 11 , 78 , 34 , 210 , 211 , 183 , 72 , 127 , 83 , 185 , 156 , 107 , 55 , 160 ,
209
+ 190 , 73 , 251 , 204 , 47 , 197 , 86 , 174 , 231 , 13 , 49 , 7 , 83 , 173 , 177 , 27 , 53 ,
210
+ 209 , 66 , 24 , 203 , 226 , 152 , 3 , 91 , 66 , 56 , 244 , 206 , 79 , 0 ,
211
+ ] ,
212
+ } ,
205
213
cold_verification_key: vec![
206
214
32 , 253 , 186 , 201 , 177 , 11 , 117 , 135 , 187 , 167 , 181 , 188 , 22 , 59 , 206 , 105 ,
207
215
231 , 150 , 215 , 30 , 78 , 212 , 76 , 16 , 252 , 180 , 72 , 134 , 137 , 247 , 161 , 68 ,
@@ -215,14 +223,20 @@ mod tests {
215
223
expires_at: 101 ,
216
224
} ,
217
225
kes_signature: vec![ 1 , 2 , 3 , 4 ] ,
218
- operational_certificate: vec![
219
- 132 , 88 , 32 , 230 , 80 , 215 , 83 , 21 , 9 , 187 , 108 , 255 , 215 , 153 , 140 , 40 , 198 ,
220
- 142 , 78 , 200 , 250 , 98 , 26 , 9 , 82 , 32 , 110 , 161 , 30 , 176 , 63 , 205 , 125 , 203 , 41 ,
221
- 0 , 0 , 88 , 64 , 212 , 171 , 206 , 39 , 218 , 5 , 255 , 3 , 193 , 52 , 44 , 198 , 171 , 83 , 19 ,
222
- 80 , 114 , 225 , 186 , 191 , 156 , 192 , 84 , 146 , 245 , 159 , 31 , 240 , 9 , 247 , 4 , 87 ,
223
- 170 , 168 , 98 , 199 , 21 , 139 , 19 , 190 , 12 , 251 , 65 , 215 , 169 , 26 , 86 , 37 , 137 ,
224
- 188 , 17 , 14 , 178 , 205 , 175 , 93 , 39 , 86 , 4 , 138 , 187 , 234 , 95 , 5 ,
225
- ] ,
226
+ operational_certificate: DmqMsgOperationalCertificate {
227
+ kes_vk: vec![
228
+ 50 , 45 , 160 , 42 , 80 , 78 , 184 , 20 , 210 , 77 , 140 , 152 , 63 , 49 , 165 , 168 , 5 ,
229
+ 131 , 101 , 152 , 110 , 242 , 144 , 157 , 176 , 210 , 5 , 10 , 166 , 91 , 196 , 168 ,
230
+ ] ,
231
+ issue_number: 0 ,
232
+ start_kes_period: 0 ,
233
+ cert_sig: vec![
234
+ 207 , 135 , 144 , 168 , 238 , 41 , 179 , 216 , 245 , 74 , 164 , 231 , 4 , 158 , 234 , 141 ,
235
+ 5 , 19 , 166 , 11 , 78 , 34 , 210 , 211 , 183 , 72 , 127 , 83 , 185 , 156 , 107 , 55 , 160 ,
236
+ 190 , 73 , 251 , 204 , 47 , 197 , 86 , 174 , 231 , 13 , 49 , 7 , 83 , 173 , 177 , 27 , 53 ,
237
+ 209 , 66 , 24 , 203 , 226 , 152 , 3 , 91 , 66 , 56 , 244 , 206 , 79 , 0 ,
238
+ ] ,
239
+ } ,
226
240
cold_verification_key: vec![
227
241
77 , 75 , 24 , 6 , 47 , 133 , 2 , 89 , 141 , 224 , 69 , 202 , 123 , 105 , 240 , 103 , 245 , 159 ,
228
242
147 , 177 , 110 , 58 , 248 , 115 , 58 , 152 , 138 , 220 , 35 , 65 , 245 , 200 ,
0 commit comments