Commit d37c7ff5 authored by Joshua Gutow's avatar Joshua Gutow Committed by GitHub

op-node: More reset & pipeline logging (#3178)

parent 565bfc4f
...@@ -79,6 +79,7 @@ func (bq *BatchQueue) Step(ctx context.Context, outer Progress) error { ...@@ -79,6 +79,7 @@ func (bq *BatchQueue) Step(ctx context.Context, outer Progress) error {
for _, batch := range batches { for _, batch := range batches {
if uint64(batch.Timestamp) <= bq.next.SafeL2Head().Time { if uint64(batch.Timestamp) <= bq.next.SafeL2Head().Time {
bq.log.Debug("Dropping batch", "SafeL2Head", bq.next.SafeL2Head(), "SafeL2Head_Time", bq.next.SafeL2Head().Time, "batch_timestamp", batch.Timestamp)
// drop attributes if we are still progressing towards the next stage // drop attributes if we are still progressing towards the next stage
// (after a reset rolled us back a full sequence window) // (after a reset rolled us back a full sequence window)
continue continue
...@@ -201,7 +202,7 @@ func (bq *BatchQueue) deriveBatches(ctx context.Context, l2SafeHead eth.L2BlockR ...@@ -201,7 +202,7 @@ func (bq *BatchQueue) deriveBatches(ctx context.Context, l2SafeHead eth.L2BlockR
bq.log.Trace("found batches", "len", len(batches)) bq.log.Trace("found batches", "len", len(batches))
// Filter + Fill batches // Filter + Fill batches
batches = FilterBatches(bq.log, bq.config, epoch.ID(), minL2Time, maxL2Time, batches) batches = FilterBatches(bq.log, bq.config, epoch.ID(), minL2Time, maxL2Time, batches)
bq.log.Trace("filtered batches", "len", len(batches), "l1Origin", bq.l1Blocks[0], "nextL1Block", bq.l1Blocks[1]) bq.log.Trace("filtered batches", "len", len(batches), "l1Origin", bq.l1Blocks[0], "nextL1Block", bq.l1Blocks[1], "minL2Time", minL2Time, "maxL2Time", maxL2Time)
batches = FillMissingBatches(batches, epoch.ID(), bq.config.BlockTime, minL2Time, nextL1BlockTime) batches = FillMissingBatches(batches, epoch.ID(), bq.config.BlockTime, minL2Time, nextL1BlockTime)
bq.log.Trace("added missing batches", "len", len(batches), "l1OriginTime", l1OriginTime, "nextL1BlockTime", nextL1BlockTime) bq.log.Trace("added missing batches", "len", len(batches), "l1OriginTime", l1OriginTime, "nextL1BlockTime", nextL1BlockTime)
// Advance an epoch after filling all batches. // Advance an epoch after filling all batches.
......
...@@ -286,6 +286,7 @@ func (eq *EngineQueue) ResetStep(ctx context.Context, l1Fetcher L1Fetcher) error ...@@ -286,6 +286,7 @@ func (eq *EngineQueue) ResetStep(ctx context.Context, l1Fetcher L1Fetcher) error
return fmt.Errorf("cannot reset block derivation to start at L2 block %s with time %d older than its L1 origin %s with time %d, time invariant is broken", return fmt.Errorf("cannot reset block derivation to start at L2 block %s with time %d older than its L1 origin %s with time %d, time invariant is broken",
safe, safe.Time, l1Origin, l1Origin.Time) safe, safe.Time, l1Origin, l1Origin.Time)
} }
eq.log.Debug("Reset engine queue", "safeHead", safe, "unsafe", unsafe, "safe_timestamp", safe.Time, "unsafe_timestamp", unsafe.Time, "l1Origin", l1Origin)
eq.unsafeHead = unsafe eq.unsafeHead = unsafe
eq.safeHead = safe eq.safeHead = safe
eq.progress = Progress{ eq.progress = Progress{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment