Skip to content

Commit 9e0f842

Browse files
committed
add da-codev9
1 parent 6bee330 commit 9e0f842

File tree

8 files changed

+14
-11
lines changed

8 files changed

+14
-11
lines changed

coordinator/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/google/uuid v1.6.0
1010
github.com/mitchellh/mapstructure v1.5.0
1111
github.com/prometheus/client_golang v1.19.0
12-
github.com/scroll-tech/da-codec v0.1.3-0.20250826112206-b4cce5c5d178
12+
github.com/scroll-tech/da-codec v0.9.0
1313
github.com/scroll-tech/go-ethereum v1.10.14-0.20251017054300-9aa8b3f38f63
1414
github.com/shopspring/decimal v1.3.1
1515
github.com/stretchr/testify v1.10.0

coordinator/internal/logic/provertask/batch_prover_task.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ func (bp *BatchProverTask) getBatchTaskDetail(dbBatch *orm.Batch, chunkProofs []
311311
if !bp.validiumMode() {
312312
dbBatchCodecVersion := encoding.CodecVersion(dbBatch.CodecVersion)
313313
switch dbBatchCodecVersion {
314-
case encoding.CodecV3, encoding.CodecV4, encoding.CodecV6, encoding.CodecV7, encoding.CodecV8:
314+
case encoding.CodecV3, encoding.CodecV4, encoding.CodecV6, encoding.CodecV7, encoding.CodecV8, encoding.CodecV9:
315315
default:
316316
return taskDetail, nil
317317
}

go.work.sum

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,14 +1413,14 @@ github.com/scroll-tech/da-codec v0.1.3-0.20250609154559-8935de62c148 h1:cyK1ifU2
14131413
github.com/scroll-tech/da-codec v0.1.3-0.20250609154559-8935de62c148/go.mod h1:gz5x3CsLy5htNTbv4PWRPBU9nSAujfx1U2XtFcXoFuk=
14141414
github.com/scroll-tech/da-codec v0.1.3-0.20250626091118-58b899494da6/go.mod h1:Z6kN5u2khPhiqHyk172kGB7o38bH/nj7Ilrb/46wZGg=
14151415
github.com/scroll-tech/da-codec v0.1.3-0.20250825071838-cddc263e5ef6/go.mod h1:Z6kN5u2khPhiqHyk172kGB7o38bH/nj7Ilrb/46wZGg=
1416+
github.com/scroll-tech/da-codec v0.9.0 h1:UvHNdSJuVhi/j9pOH7SXkRck52/zeE8T35Fx6qTPW70=
1417+
github.com/scroll-tech/da-codec v0.9.0/go.mod h1:w+vwIvNiWdiNHVE9yIY2Klx6G4s+SQhEJVSmVG/IsEQ=
14161418
github.com/scroll-tech/ecies-go/v2 v2.0.10-beta.1/go.mod h1:A+pHaITd+ogBm4Rk35xebF9OPiyMYlFlgqBOiY5PSjg=
14171419
github.com/scroll-tech/go-ethereum v1.10.14-0.20240607130425-e2becce6a1a4/go.mod h1:byf/mZ8jLYUCnUePTicjJWn+RvKdxDn7buS6glTnMwQ=
14181420
github.com/scroll-tech/go-ethereum v1.10.14-0.20240821074444-b3fa00861e5e/go.mod h1:swB5NSp8pKNDuYsTxfR08bHS6L56i119PBx8fxvV8Cs=
14191421
github.com/scroll-tech/go-ethereum v1.10.14-0.20241010064814-3d88e870ae22/go.mod h1:r9FwtxCtybMkTbWYCyBuevT9TW3zHmOTHqD082Uh+Oo=
14201422
github.com/scroll-tech/go-ethereum v1.10.14-0.20250206083728-ea43834c198f/go.mod h1:Ik3OBLl7cJxPC+CFyCBYNXBPek4wpdzkWehn/y5qLM8=
14211423
github.com/scroll-tech/go-ethereum v1.10.14-0.20250225152658-bcfdb48dd939/go.mod h1:AgU8JJxC7+nfs7R7ma35AU7dMAGW7wCw3dRZRefIKyQ=
1422-
github.com/scroll-tech/go-ethereum v1.10.14-0.20251017081611-2bc7a5482dcc h1:zSO+VMyzmEVezVuMC7jZ9PcvihwmrlKt+7cyv9rpq2s=
1423-
github.com/scroll-tech/go-ethereum v1.10.14-0.20251017081611-2bc7a5482dcc/go.mod h1:zRa7CnS75mFdgp8IeMtZV/wCAlxPRT33Ek3+fFbBJVQ=
14241424
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=
14251425
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
14261426
github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo=
@@ -1640,6 +1640,7 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk
16401640
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0=
16411641
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
16421642
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
1643+
golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs=
16431644
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
16441645
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE=
16451646
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=

rollup/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
github.com/holiman/uint256 v1.3.2
1616
github.com/mitchellh/mapstructure v1.5.0
1717
github.com/prometheus/client_golang v1.16.0
18-
github.com/scroll-tech/da-codec v0.1.3-0.20250826112206-b4cce5c5d178
18+
github.com/scroll-tech/da-codec v0.9.0
1919
github.com/scroll-tech/go-ethereum v1.10.14-0.20251017054300-9aa8b3f38f63
2020
github.com/smartystreets/goconvey v1.8.0
2121
github.com/spf13/viper v1.19.0

rollup/internal/controller/blob_uploader/blob_uploader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func (b *BlobUploader) constructBlobCodec(dbBatch *orm.Batch) (*kzg4844.Blob, er
167167
Chunks: chunks,
168168
}
169169

170-
case encoding.CodecV7, encoding.CodecV8:
170+
case encoding.CodecV7, encoding.CodecV8, encoding.CodecV9:
171171
encodingBatch = &encoding.Batch{
172172
Index: dbBatch.Index,
173173
ParentBatchHash: common.HexToHash(dbBatch.ParentBatchHash),

rollup/internal/controller/relayer/l2_relayer.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ func (r *Layer2Relayer) ProcessPendingBatches() {
488488

489489
codecVersion := encoding.CodecVersion(firstBatch.CodecVersion)
490490
switch codecVersion {
491-
case encoding.CodecV7, encoding.CodecV8:
491+
case encoding.CodecV7, encoding.CodecV8, encoding.CodecV9:
492492
if r.cfg.ValidiumMode {
493493
if len(batchesToSubmit) != 1 {
494494
log.Error("validium mode only supports committing one batch at a time", "codecVersion", codecVersion, "start index", firstBatch.Index, "end index", lastBatch.Index, "batches count", len(batchesToSubmit))
@@ -747,7 +747,7 @@ func (r *Layer2Relayer) finalizeBundle(bundle *orm.Bundle, withProof bool) error
747747

748748
var calldata []byte
749749
switch encoding.CodecVersion(bundle.CodecVersion) {
750-
case encoding.CodecV7, encoding.CodecV8:
750+
case encoding.CodecV7, encoding.CodecV8, encoding.CodecV9:
751751
if r.cfg.ValidiumMode {
752752
calldata, err = r.constructFinalizeBundlePayloadValidium(dbBatch, endChunk, aggProof)
753753
if err != nil {
@@ -1050,7 +1050,7 @@ func (r *Layer2Relayer) constructCommitBatchPayloadValidium(batch *dbBatchWithCh
10501050
commitment := common.HexToHash(lastChunk.EndBlockHash)
10511051

10521052
var version uint8
1053-
if encoding.CodecVersion(batch.Batch.CodecVersion) == encoding.CodecV8 {
1053+
if encoding.CodecVersion(batch.Batch.CodecVersion) == encoding.CodecV8 || encoding.CodecVersion(batch.Batch.CodecVersion) == encoding.CodecV9 {
10541054
// Validium version line starts with v1,
10551055
// but rollup-relayer behavior follows v8.
10561056
version = 1

rollup/internal/utils/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ func encodeBatchHeaderValidium(b *encoding.Batch, codecVersion encoding.CodecVer
186186
)
187187

188188
var version uint8
189-
if codecVersion == encoding.CodecV8 {
189+
if codecVersion == encoding.CodecV8 || codecVersion == encoding.CodecV9 {
190190
// Validium version line starts with v1,
191191
// but rollup-relayer behavior follows v8.
192192
version = 1

rollup/tests/integration_tool/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020

2121
var app *cli.App
2222
var cfg *config
23-
var codecCfg encoding.CodecVersion = encoding.CodecV8
23+
var codecCfg encoding.CodecVersion = encoding.CodecV9
2424

2525
var outputNumFlag = cli.StringFlag{
2626
Name: "counts",
@@ -144,6 +144,8 @@ func action(ctx *cli.Context) error {
144144
codecCfg = encoding.CodecV7
145145
case 8:
146146
codecCfg = encoding.CodecV8
147+
case 9:
148+
codecCfg = encoding.CodecV9
147149
default:
148150
return fmt.Errorf("invalid codec version %d", codecFl)
149151
}

0 commit comments

Comments
 (0)