@@ -113,8 +113,6 @@ func NewProtocol(c *Config, b Board, phaser Phaser) (*Protocol, error) {
113
113
if c .DkgConfig .FastSync && c .Auth == nil {
114
114
return nil , errors .New ("fast sync only allowed with authentication enabled" )
115
115
}
116
- pub := c .DkgConfig .Suite .Point ().Mul (c .DkgConfig .Longterm , nil )
117
- fmt .Printf ("OLD NODES (idx %d) - pub %s:\n %s\n NEW NODES (idx %d):\n %s\n " , dkg .oidx , pub , printNodes (c .DkgConfig .OldNodes ), dkg .nidx , printNodes (c .DkgConfig .NewNodes ))
118
116
p := & Protocol {
119
117
board : b ,
120
118
phaser : phaser ,
@@ -181,15 +179,13 @@ func (p *Protocol) startFast() {
181
179
var phase Phase
182
180
sendResponseFn := func () bool {
183
181
if phase != DealPhase {
184
- fmt .Printf ("silently ignoring response phase since already done" )
185
182
return true
186
183
}
187
184
phase = ResponsePhase
188
185
bdeals := make ([]* DealBundle , 0 , len (deals ))
189
186
for _ , d := range deals {
190
187
bdeals = append (bdeals , d )
191
188
}
192
- fmt .Printf ("proto %d - done sending responses\n " , p .dkg .nidx )
193
189
if ! p .sendResponses (bdeals ) {
194
190
return false
195
191
}
@@ -251,7 +247,6 @@ func (p *Protocol) startFast() {
251
247
prevHash := prevDeal .Hash ()
252
248
newHash := newDeal .Bundle .Hash ()
253
249
if ! bytes .Equal (prevHash , newHash ) {
254
- fmt .Printf ("\n \n AIE AIE AIE\n \n " )
255
250
delete (deals , newDeal .Bundle .DealerIndex )
256
251
continue
257
252
}
@@ -261,7 +256,6 @@ func (p *Protocol) startFast() {
261
256
for idx := range deals {
262
257
idxs = append (idxs , strconv .Itoa (int (idx )))
263
258
}
264
- fmt .Printf ("-- %p nidx %d: new deal from %d received %d/%d : idx [%s]\n " , p , p .dkg .nidx , newDeal .Bundle .DealerIndex , len (deals ), oldN , strings .Join (idxs , "," ))
265
259
266
260
}
267
261
// XXX This assumes we receive our own deal bundle since we use a
@@ -316,7 +310,6 @@ func (p *Protocol) VerifySignature(packet interface{}) error {
316
310
return errors .New ("no nodes with this public key" )
317
311
}
318
312
sig = auth .Signature
319
- //fmt.Printf(" -- VERIFY Deal: index %d - pub %s - hash %x - sig %x - error? %s\n", auth.Bundle.DealerIndex, pub, hash, sig, p.conf.Auth.Verify(pub, hash, sig))
320
313
case AuthResponseBundle :
321
314
hash = auth .Bundle .Hash ()
322
315
pub , ok = findIndex (p .conf .DkgConfig .NewNodes , auth .Bundle .ShareIndex )
@@ -336,9 +329,6 @@ func (p *Protocol) VerifySignature(packet interface{}) error {
336
329
}
337
330
338
331
err := p .conf .Auth .Verify (pub , hash , sig )
339
- if err != nil {
340
- fmt .Printf ("\n INVALID SIGNATURE\n \n " )
341
- }
342
332
return err
343
333
}
344
334
0 commit comments