Skip to content

Commit daa30f0

Browse files
authored
Merge pull request #8 from drand/fix/ndkg
without logging
2 parents d654e4d + f7d4207 commit daa30f0

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

share/dkg/protocol.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ func NewProtocol(c *Config, b Board, phaser Phaser) (*Protocol, error) {
113113
if c.DkgConfig.FastSync && c.Auth == nil {
114114
return nil, errors.New("fast sync only allowed with authentication enabled")
115115
}
116-
pub := c.DkgConfig.Suite.Point().Mul(c.DkgConfig.Longterm, nil)
117-
fmt.Printf("OLD NODES (idx %d) - pub %s:\n %s\nNEW NODES (idx %d):\n%s\n", dkg.oidx, pub, printNodes(c.DkgConfig.OldNodes), dkg.nidx, printNodes(c.DkgConfig.NewNodes))
118116
p := &Protocol{
119117
board: b,
120118
phaser: phaser,
@@ -181,15 +179,13 @@ func (p *Protocol) startFast() {
181179
var phase Phase
182180
sendResponseFn := func() bool {
183181
if phase != DealPhase {
184-
fmt.Printf("silently ignoring response phase since already done")
185182
return true
186183
}
187184
phase = ResponsePhase
188185
bdeals := make([]*DealBundle, 0, len(deals))
189186
for _, d := range deals {
190187
bdeals = append(bdeals, d)
191188
}
192-
fmt.Printf("proto %d - done sending responses\n", p.dkg.nidx)
193189
if !p.sendResponses(bdeals) {
194190
return false
195191
}
@@ -251,7 +247,6 @@ func (p *Protocol) startFast() {
251247
prevHash := prevDeal.Hash()
252248
newHash := newDeal.Bundle.Hash()
253249
if !bytes.Equal(prevHash, newHash) {
254-
fmt.Printf("\n\n AIE AIE AIE\n\n")
255250
delete(deals, newDeal.Bundle.DealerIndex)
256251
continue
257252
}
@@ -261,7 +256,6 @@ func (p *Protocol) startFast() {
261256
for idx := range deals {
262257
idxs = append(idxs, strconv.Itoa(int(idx)))
263258
}
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, ","))
265259

266260
}
267261
// XXX This assumes we receive our own deal bundle since we use a
@@ -316,7 +310,6 @@ func (p *Protocol) VerifySignature(packet interface{}) error {
316310
return errors.New("no nodes with this public key")
317311
}
318312
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))
320313
case AuthResponseBundle:
321314
hash = auth.Bundle.Hash()
322315
pub, ok = findIndex(p.conf.DkgConfig.NewNodes, auth.Bundle.ShareIndex)
@@ -336,9 +329,6 @@ func (p *Protocol) VerifySignature(packet interface{}) error {
336329
}
337330

338331
err := p.conf.Auth.Verify(pub, hash, sig)
339-
if err != nil {
340-
fmt.Printf("\nINVALID SIGNATURE\n\n")
341-
}
342332
return err
343333
}
344334

0 commit comments

Comments
 (0)