Skip to content

Commit ad2ed8b

Browse files
authored
Clean up more loggings (#266)
* Reduce logs * Remove one more log
1 parent b84fd96 commit ad2ed8b

File tree

11 files changed

+36
-15
lines changed

11 files changed

+36
-15
lines changed

espresso/docker/op-geth/op-geth-init.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ if [ "$MODE" = "genesis" ]; then
3434
"$L1_RPC" | jq -r '.result.number')
3535

3636
if [[ -z "$finalized_block" || "$finalized_block" == "null" ]]; then
37-
echo "No finalized block yet, waiting..."
3837
sleep 3
3938
continue
4039
fi

espresso/streamer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ func (s *BatchStreamer[B]) Update(ctx context.Context) error {
321321
// Process the remaining batches
322322
s.processRemainingBatches(ctx)
323323

324-
s.Log.Info("Fetching hotshot blocks", "from", start, "upTo", finish)
324+
s.Log.Debug("Fetching hotshot blocks", "from", start, "upTo", finish)
325325

326326
// Process the new batches fetched from Espresso
327327
if err := s.fetchHotShotRange(ctx, start, finish); err != nil {

op-batcher/batcher/espresso.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ func (s *espressoTransactionSubmitter) handleTransactionSubmitJobResponse() {
274274
case <-s.ctx.Done():
275275
return
276276
case <-ticker.C:
277-
log.Info("Espresso transaction submitter queue status",
277+
log.Debug("Espresso transaction submitter queue status",
278278
"submitJobQueue", len(s.submitJobQueue),
279279
"submitRespQueue", len(s.submitRespQueue),
280280
"verifyReceiptJobQueue", len(s.verifyReceiptJobQueue),
@@ -790,7 +790,7 @@ func (l *BlockLoader) reset(ctx context.Context) {
790790
}
791791

792792
func (l *BlockLoader) EnqueueBlocks(ctx context.Context, blocksToQueue inclusiveBlockRange) {
793-
l.batcher.Log.Info("Loading and queueing blocks", "range", blocksToQueue)
793+
l.batcher.Log.Debug("Loading and queueing blocks", "range", blocksToQueue)
794794
for i := blocksToQueue.start; i <= blocksToQueue.end; i++ {
795795
block, err := l.batcher.fetchBlock(ctx, i)
796796
if err != nil {
@@ -799,7 +799,7 @@ func (l *BlockLoader) EnqueueBlocks(ctx context.Context, blocksToQueue inclusive
799799
}
800800

801801
for _, txn := range block.Transactions() {
802-
l.batcher.Log.Info("tx hash before submitting to Espresso", "hash", txn.Hash().String())
802+
l.batcher.Log.Debug("tx hash before submitting to Espresso", "hash", txn.Hash().String())
803803
}
804804

805805
if len(l.queuedBlocks) > 0 && block.ParentHash() != l.queuedBlocks[len(l.queuedBlocks)-1].Hash {

op-batcher/batcher/sync_actions.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ func computeSyncActions[T channelStatuser](
9898
s := syncActions{
9999
blocksToLoad: allUnsafeBlocks,
100100
}
101-
m.Info("no blocks in state", "syncActions", s.TerminalString())
101+
// TODO: Fix upstream compatibility for logs.
102+
// <https://app.asana.com/1/1208976916964769/project/1209392461754458/task/1211175327473209?focus=true>
103+
m.Debug("no blocks in state", "syncActions", s.TerminalString())
102104
return s, false
103105
}
104106

op-node/rollup/derive/base_batch_stage.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ func (bs *baseBatchStage) updateOrigins(parent eth.L2BlockRef) {
124124
// originBehind is false.
125125
bs.l1Blocks = bs.l1Blocks[:0]
126126
}
127-
bs.log.Info("Advancing bq origin", "origin", bs.origin, "originBehind", originBehind)
127+
// TODO: Fix upstream compatibility for logs.
128+
// <https://app.asana.com/1/1208976916964769/project/1209392461754458/task/1211175327473209?focus=true>
129+
bs.log.Debug("Advancing bq origin", "origin", bs.origin, "originBehind", originBehind)
128130
}
129131

130132
// If the epoch is advanced, update bq.l1Blocks

op-node/rollup/driver/state.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ func (s *Driver) eventLoop() {
134134
<-sequencerCh
135135
}
136136
delta := time.Until(nextAction)
137-
s.log.Info("Scheduled sequencer action", "delta", delta)
137+
// TODO: Fix upstream compatibility for logs.
138+
// <https://app.asana.com/1/1208976916964769/project/1209392461754458/task/1211175327473209?focus=true>
139+
s.log.Debug("Scheduled sequencer action", "delta", delta)
138140
sequencerTimer.Reset(delta)
139141
}
140142

op-node/rollup/sequencing/sequencer.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,9 @@ func (d *Sequencer) onPayloadSuccess(x engine.PayloadSuccessEvent) {
333333
return
334334
}
335335
d.latest = BuildingState{}
336-
d.log.Info("Sequencer inserted block",
336+
// TODO: Fix upstream compatibility for logs.
337+
// <https://app.asana.com/1/1208976916964769/project/1209392461754458/task/1211175327473209?focus=true>
338+
d.log.Debug("Sequencer inserted block",
337339
"block", x.Ref, "parent", x.Envelope.ExecutionPayload.ParentID())
338340
// The payload was already published upon sealing.
339341
// Now that we have processed it ourselves we don't need it anymore.
@@ -513,7 +515,9 @@ func (d *Sequencer) startBuildingBlock() {
513515
return
514516
}
515517

516-
d.log.Info("Started sequencing new block", "parent", l2Head, "l1Origin", l1Origin)
518+
// TODO: Fix upstream compatibility for logs.
519+
// <https://app.asana.com/1/1208976916964769/project/1209392461754458/task/1211175327473209?focus=true>
520+
d.log.Debug("Started sequencing new block", "parent", l2Head, "l1Origin", l1Origin)
517521

518522
fetchCtx, cancel := context.WithTimeout(ctx, time.Second*20)
519523
defer cancel()

op-node/rollup/status/status.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ func (st *StatusTracker) OnEvent(ctx context.Context, ev event.Event) bool {
115115
st.metrics.RecordL1Ref("l1_safe", x.L1Safe)
116116
st.data.SafeL1 = x.L1Safe
117117
case finality.FinalizeL1Event:
118-
st.log.Info("New L1 finalized block", "l1_finalized", x.FinalizedL1)
118+
// TODO: Fix upstream compatibility for logs.
119+
// <https://app.asana.com/1/1208976916964769/project/1209392461754458/task/1211175327473209?focus=true>
120+
st.log.Debug("New L1 finalized block", "l1_finalized", x.FinalizedL1)
119121
st.metrics.RecordL1Ref("l1_finalized", x.FinalizedL1)
120122
st.data.FinalizedL1 = x.FinalizedL1
121123
st.data.CurrentL1Finalized = x.FinalizedL1

op-node/rollup/sync/start.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ func FindL2Heads(ctx context.Context, cfg *rollup.Config, l1 L1Chain, l2 L2Chain
171171
}
172172
// TODO: Fix upstream compatibility for logs.
173173
// <https://app.asana.com/1/1208976916964769/project/1209392461754458/task/1211175327473209?focus=true>
174+
lgr.Debug("Walking back L1Block by hash", "curr", l1Block, "next", b, "l2block", n)
174175
l1Block = b
175176
ahead = false
176177
} else if l1Block == (eth.L1BlockRef{}) || n.L1Origin.Hash != l1Block.Hash {
@@ -184,6 +185,7 @@ func FindL2Heads(ctx context.Context, cfg *rollup.Config, l1 L1Chain, l2 L2Chain
184185
ahead = notFound
185186
// TODO: Fix upstream compatibility for logs.
186187
// <https://app.asana.com/1/1208976916964769/project/1209392461754458/task/1211175327473209?focus=true>
188+
lgr.Debug("Walking back L1Block by number", "curr", l1Block, "next", b, "l2block", n)
187189
}
188190

189191
lgr.Trace("walking sync start", "l2block", n)

op-proposer/proposer/driver.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,9 @@ func (l *L2OutputSubmitter) FetchDGFOutput(ctx context.Context) (source.Proposal
292292
return source.Proposal{}, false, nil
293293
}
294294

295-
l.Log.Info("No proposals found for at least proposal interval, submitting proposal now", "proposalInterval", l.Cfg.ProposalInterval)
295+
// TODO: Fix upstream compatibility for logs.
296+
// <https://app.asana.com/1/1208976916964769/project/1209392461754458/task/1211175327473209?focus=true>
297+
l.Log.Debug("No proposals found for at least proposal interval, submitting proposal now", "proposalInterval", l.Cfg.ProposalInterval)
296298

297299
return output, true, nil
298300
}
@@ -306,7 +308,6 @@ func (l *L2OutputSubmitter) FetchCurrentBlockNumber(ctx context.Context) (uint64
306308
}
307309

308310
// Use either the finalized or safe head depending on the config. Finalized head is default & safer.
309-
l.Log.Info("Proposer config for finality", "AllowNonFinalized", l.Cfg.AllowNonFinalized)
310311
if l.Cfg.AllowNonFinalized {
311312
return status.SafeL2, nil
312313
}
@@ -375,7 +376,9 @@ func (l *L2OutputSubmitter) waitForL1Head(ctx context.Context, blockNum uint64)
375376

376377
// sendTransaction creates & sends transactions through the underlying transaction manager.
377378
func (l *L2OutputSubmitter) sendTransaction(ctx context.Context, output source.Proposal) error {
378-
l.Log.Info("Proposing output root", "output", output.Root, "block", output.SequenceNum)
379+
// TODO: Fix upstream compatibility for logs.
380+
// <https://app.asana.com/1/1208976916964769/project/1209392461754458/task/1211175327473209?focus=true>
381+
l.Log.Debug("Proposing output root", "output", output.Root, "block", output.SequenceNum)
379382
var receipt *types.Receipt
380383
if l.Cfg.DisputeGameFactoryAddr != nil {
381384
candidate, err := l.ProposeL2OutputDGFTxCandidate(ctx, output)

0 commit comments

Comments
 (0)