Skip to content

Commit

Permalink
increase threshold for lock timings
Browse files Browse the repository at this point in the history
  • Loading branch information
yan-soon authored and yan-soon committed Jun 4, 2024
1 parent f178e00 commit 9a55922
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions oracle/reactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (oracleR *Reactor) Receive(e p2p.Envelope) {
oracleR.OracleInfo.GossipVoteBuffer.UpdateMtx.Unlock()
postLockTime := time.Now().UnixMilli()
diff := postLockTime - preLockTime
if diff > 10 {
if diff > 100 {
logrus.Warnf("WARNING!!! Receiving gossip lock took %v milliseconds", diff)
}
default:
Expand Down Expand Up @@ -231,7 +231,7 @@ func (oracleR *Reactor) broadcastVoteRoutine(peer p2p.Peer) {
oracleR.OracleInfo.GossipVoteBuffer.UpdateMtx.RUnlock()
postLockTime := time.Now().UnixMilli()
diff := postLockTime - preLockTime
if diff > 10 {
if diff > 100 {
logrus.Warnf("WARNING!!! Sending gossip lock took %v milliseconds", diff)
}

Expand Down
4 changes: 2 additions & 2 deletions oracle/service/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func ProcessSignVoteQueue(oracleInfo *types.OracleInfo, consensusState *cs.State
oracleInfo.GossipVoteBuffer.UpdateMtx.Unlock()
postLockTime := time.Now().UnixMilli()
diff := postLockTime - preLockTime
if diff > 10 {
if diff > 100 {
log.Warnf("WARNING!!! Updating gossip lock took %v milliseconds", diff)
}
}
Expand Down Expand Up @@ -164,7 +164,7 @@ func PruneVoteBuffers(oracleInfo *types.OracleInfo, consensusState *cs.State) {
oracleInfo.GossipVoteBuffer.UpdateMtx.Unlock()
postLockTime := time.Now().UnixMilli()
diff := postLockTime - preLockTime
if diff > 10 {
if diff > 100 {
log.Warnf("WARNING!!! Pruning gossip lock took %v milliseconds", diff)
}
}
Expand Down
3 changes: 1 addition & 2 deletions state/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ func (blockExec *BlockExecutor) CreateProposalBlock(
commit := lastExtCommit.ToCommit()
block := state.MakeBlock(height, txs, commit, evidence, proposerAddr)
txSlice := block.Txs.ToSliceOfBytes()
logrus.Infof("Proposer :%v, preparing block proposal for height: %v", block.ProposerAddress.String(), block.Height)
rpp, err := blockExec.proxyApp.PrepareProposal(
ctx,
&abci.RequestPrepareProposal{
Expand Down Expand Up @@ -179,7 +178,7 @@ func (blockExec *BlockExecutor) CreateProposalBlock(
blockExec.oracleInfo.GossipVoteBuffer.UpdateMtx.RUnlock()
postLockTime := time.Now().UnixMilli()
diff := postLockTime - preLockTime
if diff > 10 {
if diff > 100 {
logrus.Warnf("WARNING!!! Injecting oracle tx gossip lock took %v milliseconds", diff)
}

Expand Down

0 comments on commit 9a55922

Please sign in to comment.