Skip to content

Commit 5e29c34

Browse files
committed
cleanup based
1 parent d2b00a6 commit 5e29c34

1 file changed

Lines changed: 0 additions & 33 deletions

File tree

pkg/sequencers/based/sequencer.go

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -115,32 +115,6 @@ func (s *BasedSequencer) GetNextBatch(ctx context.Context, req coresequencer.Get
115115
// Create batch from current position up to MaxBytes
116116
batchTxs := s.getTxsFromCheckpoint(req.MaxBytes)
117117

118-
// If no txs, skip filtering but still update checkpoint and use proper timestamp
119-
if len(batchTxs) == 0 {
120-
// Update checkpoint - advance to next DA epoch since this one is empty
121-
if daHeight > 0 {
122-
s.checkpoint.DAHeight = daHeight + 1
123-
s.checkpoint.TxIndex = 0
124-
s.currentBatchTxs = nil
125-
s.SetDAHeight(s.checkpoint.DAHeight)
126-
127-
// Persist checkpoint
128-
if err := s.checkpointStore.Save(ctx, s.checkpoint); err != nil {
129-
return nil, fmt.Errorf("failed to save checkpoint: %w", err)
130-
}
131-
}
132-
133-
batch := s.buildBatch(nil)
134-
// Calculate timestamp like we do at the end - when batch is empty, use currentDAEndTime
135-
remainingTxs := uint64(len(s.currentBatchTxs)) - s.checkpoint.TxIndex
136-
timestamp := s.currentDAEndTime.Add(-time.Duration(remainingTxs) * time.Millisecond)
137-
return &coresequencer.GetNextBatchResponse{
138-
Batch: batch,
139-
Timestamp: timestamp,
140-
BatchData: req.LastBatchData,
141-
}, nil
142-
}
143-
144118
// All txs in based sequencer are force-included (from DA)
145119
forceIncludedMask := make([]bool, len(batchTxs))
146120
for i := range forceIncludedMask {
@@ -171,13 +145,6 @@ func (s *BasedSequencer) GetNextBatch(ctx context.Context, req coresequencer.Get
171145
filteredTxs := filterResult.ValidTxs
172146
remainingGasFilteredTxs := filterResult.RemainingTxs
173147

174-
s.logger.Debug().
175-
Int("input_txs", len(batchTxs)).
176-
Int("filtered_txs", len(filteredTxs)).
177-
Int("remaining_for_next_block", len(remainingGasFilteredTxs)).
178-
Uint64("max_gas", maxGas).
179-
Msg("filtered DA transactions")
180-
181148
// Update checkpoint with how many transactions we consumed
182149
if daHeight > 0 || len(batchTxs) > 0 {
183150
// Count how many txs we're actually consuming from the checkpoint

0 commit comments

Comments
 (0)