Skip to content

Commit e62942f

Browse files
committed
Merge branch 'feat-blob-uploader-upload-blob-once-proposed' of https://github.com/scroll-tech/scroll into feat-blob-uploader-upload-blob-once-proposed
2 parents fc6130b + b2e0e22 commit e62942f

File tree

88 files changed

+3404
-953
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+3404
-953
lines changed

Cargo.lock

Lines changed: 839 additions & 439 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,54 +14,52 @@ edition = "2021"
1414
homepage = "https://scroll.io"
1515
readme = "README.md"
1616
repository = "https://github.com/scroll-tech/scroll"
17-
version = "4.5.47"
17+
version = "4.7.1"
1818

1919
[workspace.dependencies]
20-
# include compatiblity fixing from "fix/coordinator"
21-
scroll-zkvm-prover = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "a71dd2b" }
22-
scroll-zkvm-verifier = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "a71dd2b" }
23-
scroll-zkvm-types = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "a71dd2b" }
20+
scroll-zkvm-prover = { git = "https://github.com/scroll-tech/zkvm-prover", tag = "v0.7.0" }
21+
scroll-zkvm-verifier = { git = "https://github.com/scroll-tech/zkvm-prover", tag = "v0.7.0" }
22+
scroll-zkvm-types = { git = "https://github.com/scroll-tech/zkvm-prover", tag = "v0.7.0" }
2423

25-
sbv-primitives = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "master", features = ["scroll", "rkyv"] }
26-
sbv-utils = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "master" }
27-
sbv-core = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "master", features = ["scroll"] }
24+
sbv-primitives = { git = "https://github.com/scroll-tech/stateless-block-verifier", tag = "scroll-v91", features = ["scroll", "rkyv"] }
25+
sbv-utils = { git = "https://github.com/scroll-tech/stateless-block-verifier", tag = "scroll-v91" }
26+
sbv-core = { git = "https://github.com/scroll-tech/stateless-block-verifier", tag = "scroll-v91", features = ["scroll"] }
2827

2928
metrics = "0.23.0"
3029
metrics-util = "0.17"
3130
metrics-tracing-context = "0.16.0"
3231

3332
anyhow = "1.0"
3433
alloy = { version = "1", default-features = false }
35-
alloy-primitives = { version = "1.3", default-features = false, features = ["tiny-keccak"] }
34+
alloy-primitives = { version = "1.4.1", default-features = false, features = ["tiny-keccak"] }
3635
# also use this to trigger "serde" feature for primitives
3736
alloy-serde = { version = "1", default-features = false }
3837

3938
serde = { version = "1", default-features = false, features = ["derive"] }
4039
serde_json = { version = "1.0" }
4140
serde_derive = "1.0"
42-
serde_with = "3.11.0"
41+
serde_with = "3"
4342
itertools = "0.14"
4443
tiny-keccak = "2.0"
4544
tracing = "0.1"
4645
eyre = "0.6"
4746
once_cell = "1.20"
4847
base64 = "0.22"
4948

50-
[patch.crates-io]
51-
revm = { git = "https://github.com/scroll-tech/revm" }
52-
revm-bytecode = { git = "https://github.com/scroll-tech/revm" }
53-
revm-context = { git = "https://github.com/scroll-tech/revm" }
54-
revm-context-interface = { git = "https://github.com/scroll-tech/revm" }
55-
revm-database = { git = "https://github.com/scroll-tech/revm" }
56-
revm-database-interface = { git = "https://github.com/scroll-tech/revm" }
57-
revm-handler = { git = "https://github.com/scroll-tech/revm" }
58-
revm-inspector = { git = "https://github.com/scroll-tech/revm" }
59-
revm-interpreter = { git = "https://github.com/scroll-tech/revm" }
60-
revm-precompile = { git = "https://github.com/scroll-tech/revm" }
61-
revm-primitives = { git = "https://github.com/scroll-tech/revm" }
62-
revm-state = { git = "https://github.com/scroll-tech/revm" }
6349

64-
alloy-primitives = { git = "https://github.com/scroll-tech/alloy-core", branch = "feat/rkyv" }
50+
[patch.crates-io]
51+
revm = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
52+
revm-bytecode = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
53+
revm-context = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
54+
revm-context-interface = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
55+
revm-database = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
56+
revm-database-interface = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
57+
revm-handler = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
58+
revm-inspector = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
59+
revm-interpreter = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
60+
revm-precompile = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
61+
revm-primitives = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
62+
revm-state = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
6563

6664
[profile.maxperf]
6765
inherits = "release"

bridge-history-api/go.mod

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@ require (
1010
github.com/go-redis/redis/v8 v8.11.5
1111
github.com/pressly/goose/v3 v3.16.0
1212
github.com/prometheus/client_golang v1.19.0
13-
github.com/scroll-tech/da-codec v0.1.3-0.20250826112206-b4cce5c5d178
14-
github.com/scroll-tech/go-ethereum v1.10.14-0.20251017054300-9aa8b3f38f63
13+
github.com/scroll-tech/da-codec v0.9.0
14+
github.com/scroll-tech/go-ethereum v1.10.14-0.20251113125950-906b730d541d
1515
github.com/stretchr/testify v1.10.0
1616
github.com/urfave/cli/v2 v2.25.7
1717
golang.org/x/sync v0.11.0
1818
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde
1919
)
2020

21-
replace github.com/scroll-tech/go-ethereum => github.com/scroll-tech/go-ethereum v1.10.14-0.20251017081611-2bc7a5482dcc // It's a hotfix for the header hash incompatibility issue, pls change this with caution
21+
// Hotfix for header hash incompatibility issue.
22+
// PR: https://github.com/scroll-tech/go-ethereum/pull/1133/
23+
// CAUTION: Requires careful handling. When upgrading go-ethereum, ensure this fix remains up-to-date in this branch.
24+
replace github.com/scroll-tech/go-ethereum => github.com/scroll-tech/go-ethereum v1.10.14-0.20251117071111-47c22325665e
2225

2326
require (
2427
dario.cat/mergo v1.0.0 // indirect

bridge-history-api/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,10 @@ github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
309309
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
310310
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
311311
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
312-
github.com/scroll-tech/da-codec v0.1.3-0.20250826112206-b4cce5c5d178 h1:4utngmJHXSOS5FoSdZhEV1xMRirpArbXvyoCZY9nYj0=
313-
github.com/scroll-tech/da-codec v0.1.3-0.20250826112206-b4cce5c5d178/go.mod h1:Z6kN5u2khPhiqHyk172kGB7o38bH/nj7Ilrb/46wZGg=
314-
github.com/scroll-tech/go-ethereum v1.10.14-0.20251017081611-2bc7a5482dcc h1:zSO+VMyzmEVezVuMC7jZ9PcvihwmrlKt+7cyv9rpq2s=
315-
github.com/scroll-tech/go-ethereum v1.10.14-0.20251017081611-2bc7a5482dcc/go.mod h1:zRa7CnS75mFdgp8IeMtZV/wCAlxPRT33Ek3+fFbBJVQ=
312+
github.com/scroll-tech/da-codec v0.9.0 h1:UvHNdSJuVhi/j9pOH7SXkRck52/zeE8T35Fx6qTPW70=
313+
github.com/scroll-tech/da-codec v0.9.0/go.mod h1:w+vwIvNiWdiNHVE9yIY2Klx6G4s+SQhEJVSmVG/IsEQ=
314+
github.com/scroll-tech/go-ethereum v1.10.14-0.20251117071111-47c22325665e h1:7U1/JilCPIqJTYNgKzlfBEkRNORRwJ8+PCmdR8/XK6A=
315+
github.com/scroll-tech/go-ethereum v1.10.14-0.20251117071111-47c22325665e/go.mod h1:6BVek7YliYh+YeHOSjguPw9GT9BhVBfThArxzVlpqdQ=
316316
github.com/scroll-tech/zktrie v0.8.4 h1:UagmnZ4Z3ITCk+aUq9NQZJNAwnWl4gSxsLb2Nl7IgRE=
317317
github.com/scroll-tech/zktrie v0.8.4/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk=
318318
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=

common/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
github.com/modern-go/reflect2 v1.0.2
1616
github.com/orcaman/concurrent-map v1.0.0
1717
github.com/prometheus/client_golang v1.19.0
18-
github.com/scroll-tech/go-ethereum v1.10.14-0.20251017054300-9aa8b3f38f63
18+
github.com/scroll-tech/go-ethereum v1.10.14-0.20251117065849-b5c3dd1aa975
1919
github.com/stretchr/testify v1.10.0
2020
github.com/testcontainers/testcontainers-go v0.30.0
2121
github.com/testcontainers/testcontainers-go/modules/compose v0.30.0
@@ -184,7 +184,7 @@ require (
184184
github.com/rjeczalik/notify v0.9.1 // indirect
185185
github.com/rs/cors v1.7.0 // indirect
186186
github.com/russross/blackfriday/v2 v2.1.0 // indirect
187-
github.com/scroll-tech/da-codec v0.1.3-0.20250826112206-b4cce5c5d178 // indirect
187+
github.com/scroll-tech/da-codec v0.9.0 // indirect
188188
github.com/scroll-tech/zktrie v0.8.4 // indirect
189189
github.com/secure-systems-lab/go-securesystemslib v0.4.0 // indirect
190190
github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002 // indirect

common/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -636,10 +636,10 @@ github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
636636
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
637637
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
638638
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
639-
github.com/scroll-tech/da-codec v0.1.3-0.20250826112206-b4cce5c5d178 h1:4utngmJHXSOS5FoSdZhEV1xMRirpArbXvyoCZY9nYj0=
640-
github.com/scroll-tech/da-codec v0.1.3-0.20250826112206-b4cce5c5d178/go.mod h1:Z6kN5u2khPhiqHyk172kGB7o38bH/nj7Ilrb/46wZGg=
641-
github.com/scroll-tech/go-ethereum v1.10.14-0.20251017054300-9aa8b3f38f63 h1:xuqdhD4w/zcI5T8Ty1wHvqB75P2HNg3jTH/kUEHGt9Y=
642-
github.com/scroll-tech/go-ethereum v1.10.14-0.20251017054300-9aa8b3f38f63/go.mod h1:zRa7CnS75mFdgp8IeMtZV/wCAlxPRT33Ek3+fFbBJVQ=
639+
github.com/scroll-tech/da-codec v0.9.0 h1:UvHNdSJuVhi/j9pOH7SXkRck52/zeE8T35Fx6qTPW70=
640+
github.com/scroll-tech/da-codec v0.9.0/go.mod h1:w+vwIvNiWdiNHVE9yIY2Klx6G4s+SQhEJVSmVG/IsEQ=
641+
github.com/scroll-tech/go-ethereum v1.10.14-0.20251117065849-b5c3dd1aa975 h1:KluZffkRRJ4K9UyvH/r2g8Lp16/NSK8j26MR33hHmoQ=
642+
github.com/scroll-tech/go-ethereum v1.10.14-0.20251117065849-b5c3dd1aa975/go.mod h1:6BVek7YliYh+YeHOSjguPw9GT9BhVBfThArxzVlpqdQ=
643643
github.com/scroll-tech/zktrie v0.8.4 h1:UagmnZ4Z3ITCk+aUq9NQZJNAwnWl4gSxsLb2Nl7IgRE=
644644
github.com/scroll-tech/zktrie v0.8.4/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk=
645645
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=

common/testcontainers/testcontainers.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"time"
1111

1212
"github.com/scroll-tech/go-ethereum/ethclient"
13+
"github.com/scroll-tech/go-ethereum/rpc"
1314
"github.com/testcontainers/testcontainers-go"
1415
"github.com/testcontainers/testcontainers-go/modules/compose"
1516
"github.com/testcontainers/testcontainers-go/modules/postgres"
@@ -220,11 +221,21 @@ func (t *TestcontainerApps) GetGormDBClient() (*gorm.DB, error) {
220221

221222
// GetL2GethClient returns a ethclient by dialing running L2Geth
222223
func (t *TestcontainerApps) GetL2GethClient() (*ethclient.Client, error) {
224+
225+
rpcCli, err := t.GetL2Client()
226+
if err != nil {
227+
return nil, err
228+
}
229+
return ethclient.NewClient(rpcCli), nil
230+
}
231+
232+
// GetL2GethClient returns a rpc client by dialing running L2Geth
233+
func (t *TestcontainerApps) GetL2Client() (*rpc.Client, error) {
223234
endpoint, err := t.GetL2GethEndPoint()
224235
if err != nil {
225236
return nil, err
226237
}
227-
client, err := ethclient.Dial(endpoint)
238+
client, err := rpc.Dial(endpoint)
228239
if err != nil {
229240
return nil, err
230241
}

common/types/message/message.go

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ const (
3939

4040
// ChunkTaskDetail is a type containing ChunkTask detail for chunk task.
4141
type ChunkTaskDetail struct {
42+
Version uint8 `json:"version"`
4243
// use one of the string of "euclidv1" / "euclidv2"
4344
ForkName string `json:"fork_name"`
4445
BlockHashes []common.Hash `json:"block_hashes"`
4546
PrevMsgQueueHash common.Hash `json:"prev_msg_queue_hash"`
47+
PostMsgQueueHash common.Hash `json:"post_msg_queue_hash"`
4648
}
4749

4850
// it is a hex encoded big with fixed length on 48 bytes
@@ -90,40 +92,59 @@ func (e *Byte48) UnmarshalJSON(input []byte) error {
9092

9193
// BatchTaskDetail is a type containing BatchTask detail.
9294
type BatchTaskDetail struct {
95+
Version uint8 `json:"version"`
9396
// use one of the string of "euclidv1" / "euclidv2"
94-
ForkName string `json:"fork_name"`
95-
ChunkInfos []*ChunkInfo `json:"chunk_infos"`
96-
ChunkProofs []*OpenVMChunkProof `json:"chunk_proofs"`
97-
BatchHeader interface{} `json:"batch_header"`
98-
BlobBytes []byte `json:"blob_bytes"`
99-
KzgProof Byte48 `json:"kzg_proof,omitempty"`
100-
KzgCommitment Byte48 `json:"kzg_commitment,omitempty"`
101-
ChallengeDigest common.Hash `json:"challenge_digest,omitempty"`
97+
ForkName string `json:"fork_name"`
98+
ChunkProofs []*OpenVMChunkProof `json:"chunk_proofs"`
99+
BatchHeader interface{} `json:"batch_header"`
100+
BlobBytes []byte `json:"blob_bytes"`
101+
KzgProof *Byte48 `json:"kzg_proof,omitempty"`
102+
KzgCommitment *Byte48 `json:"kzg_commitment,omitempty"`
103+
// ChallengeDigest should be a common.Hash type if it is not nil
104+
ChallengeDigest interface{} `json:"challenge_digest,omitempty"`
102105
}
103106

104107
// BundleTaskDetail consists of all the information required to describe the task to generate a proof for a bundle of batches.
105108
type BundleTaskDetail struct {
109+
Version uint8 `json:"version"`
106110
// use one of the string of "euclidv1" / "euclidv2"
107111
ForkName string `json:"fork_name"`
108112
BatchProofs []*OpenVMBatchProof `json:"batch_proofs"`
109113
BundleInfo *OpenVMBundleInfo `json:"bundle_info,omitempty"`
110114
}
111115

116+
type RawBytes []byte
117+
118+
func (r RawBytes) MarshalJSON() ([]byte, error) {
119+
if r == nil {
120+
return []byte("null"), nil
121+
}
122+
// Marshal the []byte as a JSON array of numbers
123+
rn := make([]uint16, len(r))
124+
for i := range r {
125+
rn[i] = uint16(r[i])
126+
}
127+
return json.Marshal(rn)
128+
}
129+
112130
// ChunkInfo is for calculating pi_hash for chunk
113131
type ChunkInfo struct {
114-
ChainID uint64 `json:"chain_id"`
115-
PrevStateRoot common.Hash `json:"prev_state_root"`
116-
PostStateRoot common.Hash `json:"post_state_root"`
117-
WithdrawRoot common.Hash `json:"withdraw_root"`
118-
DataHash common.Hash `json:"data_hash"`
119-
IsPadding bool `json:"is_padding"`
120-
TxBytes []byte `json:"tx_bytes"`
132+
ChainID uint64 `json:"chain_id"`
133+
PrevStateRoot common.Hash `json:"prev_state_root"`
134+
PostStateRoot common.Hash `json:"post_state_root"`
135+
WithdrawRoot common.Hash `json:"withdraw_root"`
136+
DataHash common.Hash `json:"data_hash"`
137+
IsPadding bool `json:"is_padding"`
138+
// TxBytes []byte `json:"tx_bytes"`
121139
TxBytesHash common.Hash `json:"tx_data_digest"`
122140
PrevMsgQueueHash common.Hash `json:"prev_msg_queue_hash"`
123141
PostMsgQueueHash common.Hash `json:"post_msg_queue_hash"`
124142
TxDataLength uint64 `json:"tx_data_length"`
125143
InitialBlockNumber uint64 `json:"initial_block_number"`
126144
BlockCtxs []BlockContextV2 `json:"block_ctxs"`
145+
PrevBlockhash common.Hash `json:"prev_blockhash"`
146+
PostBlockhash common.Hash `json:"post_blockhash"`
147+
EncryptionKey RawBytes `json:"encryption_key"`
127148
}
128149

129150
// BlockContextV2 is the block context for euclid v2
@@ -186,6 +207,7 @@ type OpenVMBatchInfo struct {
186207
ChainID uint64 `json:"chain_id"`
187208
PrevMsgQueueHash common.Hash `json:"prev_msg_queue_hash"`
188209
PostMsgQueueHash common.Hash `json:"post_msg_queue_hash"`
210+
EncryptionKey RawBytes `json:"encryption_key"`
189211
}
190212

191213
// BatchProof includes the proof info that are required for batch verification and rollup.
@@ -246,6 +268,7 @@ type OpenVMBundleInfo struct {
246268
PrevBatchHash common.Hash `json:"prev_batch_hash"`
247269
BatchHash common.Hash `json:"batch_hash"`
248270
MsgQueueHash common.Hash `json:"msg_queue_hash"`
271+
EncryptionKey RawBytes `json:"encryption_key"`
249272
}
250273

251274
// OpenVMBundleProof includes the proof info that are required for verification of a bundle of batch proofs.

common/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"runtime/debug"
66
)
77

8-
var tag = "v4.6.1"
8+
var tag = "v4.7.2"
99

1010
var commit = func() string {
1111
if info, ok := debug.ReadBuildInfo(); ok {

coordinator/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@ coordinator_tool:
3737
localsetup: coordinator_api ## Local setup: build coordinator_api, copy config, and setup releases
3838
mkdir -p build/bin/conf
3939
@echo "Copying configuration files..."
40-
cp -r $(PWD)/conf/config.json $(PWD)/build/bin/conf/config.template.json
40+
@if [ -f "$(PWD)/conf/config.template.json" ]; then \
41+
SRC="$(PWD)/conf/config.template.json"; \
42+
else \
43+
SRC="$(CURDIR)/conf/config.json"; \
44+
fi; \
45+
cp -fL "$$SRC" "$(CURDIR)/build/bin/conf/config.template.json"
4146
@echo "Setting up releases..."
42-
cd $(PWD)/build && bash setup_releases.sh
47+
cd $(CURDIR)/build && bash setup_releases.sh
4348

4449

4550
#coordinator_api_skip_libzkp:

0 commit comments

Comments
 (0)