Skip to content

Commit

Permalink
disable blame votes
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinssgh committed Jan 26, 2024
1 parent d1236ba commit 29d8c85
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions zetaclient/tss_signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,16 @@ func (tss *TSS) Sign(digest []byte, height uint64, nonce uint64, chain *common.C
if ksRes.Status == thorcommon.Fail {
log.Warn().Msgf("keysign status FAIL posting blame to core, blaming node(s): %#v", ksRes.Blame.BlameNodes)

digest := hex.EncodeToString(digest)
index := observertypes.GetBlameIndex(chain.ChainId, nonce, digest, height)
//digest := hex.EncodeToString(digest)
//index := observertypes.GetBlameIndex(chain.ChainId, nonce, digest, height)
//
//zetaHash, err := tss.CoreBridge.PostBlameData(&ksRes.Blame, chain.ChainId, index)
//if err != nil {
// log.Error().Err(err).Msg("error sending blame data to core")
// return [65]byte{}, err
//}

zetaHash, err := tss.CoreBridge.PostBlameData(&ksRes.Blame, chain.ChainId, index)
if err != nil {
log.Error().Err(err).Msg("error sending blame data to core")
return [65]byte{}, err
}
//log.Info().Msgf("keysign posted blame data tx hash: %s", zetaHash)

// Increment Blame counter
for _, node := range ksRes.Blame.BlameNodes {
Expand All @@ -219,7 +221,6 @@ func (tss *TSS) Sign(digest []byte, height uint64, nonce uint64, chain *common.C
counter.Inc()
}

log.Info().Msgf("keysign posted blame data tx hash: %s", zetaHash)
}
signature := ksRes.Signatures

Expand Down Expand Up @@ -273,14 +274,16 @@ func (tss *TSS) SignBatch(digests [][]byte, height uint64, nonce uint64, chain *

if ksRes.Status == thorcommon.Fail {
log.Warn().Msg("keysign status FAIL posting blame to core")
digest := combineDigests(digestBase64)
index := observertypes.GetBlameIndex(chain.ChainId, nonce, hex.EncodeToString(digest), height)
//digest := combineDigests(digestBase64)
//index := observertypes.GetBlameIndex(chain.ChainId, nonce, hex.EncodeToString(digest), height)

zetaHash, err := tss.CoreBridge.PostBlameData(&ksRes.Blame, chain.ChainId, index)
if err != nil {
log.Error().Err(err).Msg("error sending blame data to core")
return [][65]byte{}, err
}
//zetaHash, err := tss.CoreBridge.PostBlameData(&ksRes.Blame, chain.ChainId, index)
//if err != nil {
// log.Error().Err(err).Msg("error sending blame data to core")
// return [][65]byte{}, err
//}
//
//log.Info().Msgf("keysign posted blame data tx hash: %s", zetaHash)

// Increment Blame counter
for _, node := range ksRes.Blame.BlameNodes {
Expand All @@ -291,8 +294,6 @@ func (tss *TSS) SignBatch(digests [][]byte, height uint64, nonce uint64, chain *
}
counter.Inc()
}

log.Info().Msgf("keysign posted blame data tx hash: %s", zetaHash)
}

signatures := ksRes.Signatures
Expand Down

0 comments on commit 29d8c85

Please sign in to comment.