Skip to content

Commit 2043787

Browse files
committed
remove InitialL1MessageIndex from CodecV7
1 parent 0247443 commit 2043787

File tree

5 files changed

+79
-117
lines changed

5 files changed

+79
-117
lines changed

encoding/codecv7.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (d *DACodecV7) NewDABlock(block *Block, totalL1MessagePoppedBefore uint64)
3434
return nil, errors.New("block number is not uint64")
3535
}
3636

37-
numL1Messages, highestQueueIndex, err := block.NumL1MessagesNoSkipping()
37+
numL1Messages, _, highestQueueIndex, err := block.NumL1MessagesNoSkipping()
3838
if err != nil {
3939
return nil, fmt.Errorf("failed to calculate number of L1 messages: %w", err)
4040
}
@@ -90,7 +90,7 @@ func (d *DACodecV7) NewDAChunk(chunk *Chunk, totalL1MessagePoppedBefore uint64)
9090
}
9191

9292
// sanity check (within NumL1MessagesNoSkipping): L1 message indices are contiguous within a block
93-
numL1Messages, highestQueueIndex, err := block.NumL1MessagesNoSkipping()
93+
numL1Messages, _, highestQueueIndex, err := block.NumL1MessagesNoSkipping()
9494
if err != nil {
9595
return nil, fmt.Errorf("failed to get numL1Messages: %w", err)
9696
}
@@ -212,7 +212,6 @@ func (d *DACodecV7) constructBlob(batch *Batch) (*kzg4844.Blob, common.Hash, []b
212212

213213
func (d *DACodecV7) constructBlobPayload(batch *Batch) ([]byte, error) {
214214
blobPayload := blobPayloadV7{
215-
initialL1MessageIndex: batch.InitialL1MessageIndex,
216215
prevL1MessageQueueHash: batch.PrevL1MessageQueueHash,
217216
postL1MessageQueueHash: batch.PostL1MessageQueueHash,
218217
blocks: batch.Blocks,
@@ -377,7 +376,6 @@ func (d *DACodecV7) estimateL1CommitBatchSizeAndBlobSize(batch *Batch) (uint64,
377376
func (d *DACodecV7) EstimateChunkL1CommitBatchSizeAndBlobSize(chunk *Chunk) (uint64, uint64, error) {
378377
return d.estimateL1CommitBatchSizeAndBlobSize(&Batch{
379378
Blocks: chunk.Blocks,
380-
InitialL1MessageIndex: chunk.InitialL1MessageIndex,
381379
PrevL1MessageQueueHash: chunk.PrevL1MessageQueueHash,
382380
PostL1MessageQueueHash: chunk.PostL1MessageQueueHash,
383381
})

0 commit comments

Comments
 (0)