Skip to content

Commit

Permalink
Downgrade spammy log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
moraygrieve committed Oct 17, 2023
1 parent e2bb81b commit 0a0d106
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion go/enclave/nodetype/sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ func (s *sequencer) createNewHeadBatch(l1HeadBlock *common.L1Block, skipBatchIfE
if _, err := s.produceBatch(sequencerNo.Add(sequencerNo, big.NewInt(1)), l1HeadBlock.Hash(), headBatch.Hash(), transactions, uint64(time.Now().Unix()), skipBatchIfEmpty); err != nil {
if errors.Is(err, components.ErrNoTransactionsToProcess) {
// skip batch production when there are no transactions to process
s.logger.Info("Skipping batch production, no transactions to execute")
// todo: this might be a useful event to track for metrics (skipping batch production because empty batch)
s.logger.Debug("Skipping batch production, no transactions to execute")
return nil
}
return fmt.Errorf(" failed producing batch. Cause: %w", err)
Expand Down
4 changes: 2 additions & 2 deletions go/host/enclave/guardian.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ func (g *Guardian) catchupWithL2() error {
func (g *Guardian) submitL1Block(block *common.L1Block, isLatest bool) (bool, error) {
g.logger.Trace("submitting L1 block", log.BlockHashKey, block.Hash(), log.BlockHeightKey, block.Number())
if !g.submitDataLock.TryLock() {
g.logger.Info("Unable to submit block, already submitting another block")
// we are already submitting a block, and we don't want to leak goroutines, we wil catch up with the block later
g.logger.Debug("Unable to submit block, enclave is busy processing data")
// we are waiting for the enclave to process other data, and we don't want to leak goroutines, we wil catch up with the block
return false, nil
}
receipts, err := g.sl.L1Repo().FetchObscuroReceipts(block)
Expand Down

0 comments on commit 0a0d106

Please sign in to comment.