mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-10 06:28:04 -05:00
refactor(batch): removing db fields in batch encoding type (#1196)
This commit is contained in:
@@ -99,10 +99,6 @@ func TestCodecV0(t *testing.T) {
|
||||
TotalL1MessagePoppedBefore: 0,
|
||||
ParentBatchHash: parentBatchHash,
|
||||
Chunks: []*encoding.Chunk{chunk},
|
||||
StartChunkIndex: 0,
|
||||
EndChunkIndex: 0,
|
||||
StartChunkHash: daChunkHash,
|
||||
EndChunkHash: daChunkHash,
|
||||
}
|
||||
|
||||
batchL1CommitCalldataSize, err := EstimateBatchL1CommitCalldataSize(batch)
|
||||
@@ -154,10 +150,6 @@ func TestCodecV0(t *testing.T) {
|
||||
TotalL1MessagePoppedBefore: 0,
|
||||
ParentBatchHash: parentBatchHash,
|
||||
Chunks: []*encoding.Chunk{chunk},
|
||||
StartChunkIndex: 0,
|
||||
EndChunkIndex: 0,
|
||||
StartChunkHash: daChunkHash,
|
||||
EndChunkHash: daChunkHash,
|
||||
}
|
||||
|
||||
batchL1CommitCalldataSize, err = EstimateBatchL1CommitCalldataSize(batch)
|
||||
@@ -211,10 +203,6 @@ func TestCodecV0(t *testing.T) {
|
||||
TotalL1MessagePoppedBefore: 0,
|
||||
ParentBatchHash: parentBatchHash,
|
||||
Chunks: []*encoding.Chunk{chunk},
|
||||
StartChunkIndex: 0,
|
||||
EndChunkIndex: 0,
|
||||
StartChunkHash: daChunkHash,
|
||||
EndChunkHash: daChunkHash,
|
||||
}
|
||||
|
||||
batchL1CommitCalldataSize, err = EstimateBatchL1CommitCalldataSize(batch)
|
||||
@@ -276,20 +264,11 @@ func TestCodecV0(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 61, len(chunkBytes2))
|
||||
|
||||
daChunk1Hash, err := daChunk1.Hash()
|
||||
assert.NoError(t, err)
|
||||
daChunk2Hash, err := daChunk2.Hash()
|
||||
assert.NoError(t, err)
|
||||
|
||||
batch = &encoding.Batch{
|
||||
Index: 1,
|
||||
TotalL1MessagePoppedBefore: 0,
|
||||
ParentBatchHash: parentBatchHash,
|
||||
Chunks: []*encoding.Chunk{chunk1, chunk2},
|
||||
StartChunkIndex: 0,
|
||||
EndChunkIndex: 1,
|
||||
StartChunkHash: daChunk1Hash,
|
||||
EndChunkHash: daChunk2Hash,
|
||||
}
|
||||
|
||||
batchL1CommitCalldataSize, err = EstimateBatchL1CommitCalldataSize(batch)
|
||||
@@ -343,10 +322,6 @@ func TestCodecV0(t *testing.T) {
|
||||
TotalL1MessagePoppedBefore: 37,
|
||||
ParentBatchHash: parentBatchHash,
|
||||
Chunks: []*encoding.Chunk{chunk},
|
||||
StartChunkIndex: 0,
|
||||
EndChunkIndex: 0,
|
||||
StartChunkHash: daChunkHash,
|
||||
EndChunkHash: daChunkHash,
|
||||
}
|
||||
|
||||
batchL1CommitCalldataSize, err = EstimateBatchL1CommitCalldataSize(batch)
|
||||
@@ -400,10 +375,6 @@ func TestCodecV0(t *testing.T) {
|
||||
TotalL1MessagePoppedBefore: 0,
|
||||
ParentBatchHash: parentBatchHash,
|
||||
Chunks: []*encoding.Chunk{chunk},
|
||||
StartChunkIndex: 0,
|
||||
EndChunkIndex: 0,
|
||||
StartChunkHash: daChunkHash,
|
||||
EndChunkHash: daChunkHash,
|
||||
}
|
||||
|
||||
batchL1CommitCalldataSize, err = EstimateBatchL1CommitCalldataSize(batch)
|
||||
@@ -457,10 +428,6 @@ func TestCodecV0(t *testing.T) {
|
||||
TotalL1MessagePoppedBefore: 0,
|
||||
ParentBatchHash: parentBatchHash,
|
||||
Chunks: []*encoding.Chunk{chunk},
|
||||
StartChunkIndex: 0,
|
||||
EndChunkIndex: 0,
|
||||
StartChunkHash: daChunkHash,
|
||||
EndChunkHash: daChunkHash,
|
||||
}
|
||||
|
||||
batchL1CommitCalldataSize, err = EstimateBatchL1CommitCalldataSize(batch)
|
||||
@@ -514,10 +481,6 @@ func TestCodecV0(t *testing.T) {
|
||||
TotalL1MessagePoppedBefore: 0,
|
||||
ParentBatchHash: parentBatchHash,
|
||||
Chunks: []*encoding.Chunk{chunk},
|
||||
StartChunkIndex: 0,
|
||||
EndChunkIndex: 0,
|
||||
StartChunkHash: daChunkHash,
|
||||
EndChunkHash: daChunkHash,
|
||||
}
|
||||
|
||||
batchL1CommitCalldataSize, err = EstimateBatchL1CommitCalldataSize(batch)
|
||||
|
||||
@@ -27,12 +27,6 @@ type Batch struct {
|
||||
TotalL1MessagePoppedBefore uint64
|
||||
ParentBatchHash common.Hash
|
||||
Chunks []*Chunk
|
||||
|
||||
// Only used in updating db info.
|
||||
StartChunkIndex uint64
|
||||
EndChunkIndex uint64
|
||||
StartChunkHash common.Hash
|
||||
EndChunkHash common.Hash
|
||||
}
|
||||
|
||||
// NumL1Messages returns the number of L1 messages in this block.
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"runtime/debug"
|
||||
)
|
||||
|
||||
var tag = "v4.3.71"
|
||||
var tag = "v4.3.72"
|
||||
|
||||
var commit = func() string {
|
||||
if info, ok := debug.ReadBuildInfo(); ok {
|
||||
|
||||
Reference in New Issue
Block a user