Skip to content

Commit 9c2bc02

Browse files
committed
Merge remote-tracking branch 'origin/develop' into coordinator_proxy
2 parents 9e5579c + 9dceae1 commit 9c2bc02

File tree

39 files changed

+1743
-594
lines changed

39 files changed

+1743
-594
lines changed

Cargo.lock

Lines changed: 591 additions & 339 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 & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,53 +14,52 @@ edition = "2021"
1414
homepage = "https://scroll.io"
1515
readme = "README.md"
1616
repository = "https://github.com/scroll-tech/scroll"
17-
version = "4.6.3"
17+
version = "4.7.1"
1818

1919
[workspace.dependencies]
20-
scroll-zkvm-prover = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "360f364" }
21-
scroll-zkvm-verifier = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "360f364" }
22-
scroll-zkvm-types = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "360f364" }
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" }
2323

24-
sbv-primitives = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "master", features = ["scroll", "rkyv"] }
25-
sbv-utils = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "master" }
26-
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"] }
2727

2828
metrics = "0.23.0"
2929
metrics-util = "0.17"
3030
metrics-tracing-context = "0.16.0"
3131

3232
anyhow = "1.0"
3333
alloy = { version = "1", default-features = false }
34-
alloy-primitives = { version = "1.3", default-features = false, features = ["tiny-keccak"] }
34+
alloy-primitives = { version = "1.4.1", default-features = false, features = ["tiny-keccak"] }
3535
# also use this to trigger "serde" feature for primitives
3636
alloy-serde = { version = "1", default-features = false }
3737

3838
serde = { version = "1", default-features = false, features = ["derive"] }
3939
serde_json = { version = "1.0" }
4040
serde_derive = "1.0"
41-
serde_with = "3.11.0"
41+
serde_with = "3"
4242
itertools = "0.14"
4343
tiny-keccak = "2.0"
4444
tracing = "0.1"
4545
eyre = "0.6"
4646
once_cell = "1.20"
4747
base64 = "0.22"
4848

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

63-
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" }
6463

6564
[profile.maxperf]
6665
inherits = "release"

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.3"
8+
var tag = "v4.7.1"
99

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

coordinator/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ coordinator_proxy:
4141
localsetup: coordinator_api ## Local setup: build coordinator_api, copy config, and setup releases
4242
mkdir -p build/bin/conf
4343
@echo "Copying configuration files..."
44-
cp -fL $(CURDIR)/conf/config.json $(CURDIR)/build/bin/conf/config.template.json
44+
@if [ -f "$(PWD)/conf/config.template.json" ]; then \
45+
SRC="$(PWD)/conf/config.template.json"; \
46+
else \
47+
SRC="$(CURDIR)/conf/config.json"; \
48+
fi; \
49+
cp -fL "$$SRC" "$(CURDIR)/build/bin/conf/config.template.json"
4550
@echo "Setting up releases..."
4651
cd $(CURDIR)/build && bash setup_releases.sh
4752

coordinator/build/setup_releases.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ if [ -z "${SCROLL_ZKVM_VERSION}" ]; then
66
exit 1
77
fi
88

9+
# default fork name from env or "galileo"
10+
SCROLL_FORK_NAME="${SCROLL_FORK_NAME:-galileo}"
11+
912
# set ASSET_DIR by reading from config.json
1013
CONFIG_FILE="bin/conf/config.template.json"
1114
if [ ! -f "$CONFIG_FILE" ]; then
@@ -28,7 +31,13 @@ for ((i=0; i<$VERIFIER_COUNT; i++)); do
2831
# extract assets_path for current verifier
2932
ASSETS_PATH=$(jq -r ".prover_manager.verifier.verifiers[$i].assets_path" "$CONFIG_FILE")
3033
FORK_NAME=$(jq -r ".prover_manager.verifier.verifiers[$i].fork_name" "$CONFIG_FILE")
31-
34+
35+
# skip if this verifier's fork doesn't match the target fork
36+
if [ "$FORK_NAME" != "$SCROLL_FORK_NAME" ]; then
37+
echo "Expect $SCROLL_FORK_NAME, skip current fork ($FORK_NAME)"
38+
continue
39+
fi
40+
3241
if [ "$ASSETS_PATH" = "null" ]; then
3342
echo "Warning: Could not find assets_path for verifier $i, skipping..."
3443
continue

coordinator/conf/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"min_prover_version": "v4.4.45",
1111
"verifiers": [
1212
{
13-
"assets_path": "assets",
13+
"features": "legacy_witness:openvm_13",
14+
"assets_path": "assets_feynman",
1415
"fork_name": "feynman"
1516
},
1617
{

coordinator/internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ type AssetConfig struct {
6969
ForkName string `json:"fork_name"`
7070
Vkfile string `json:"vk_file,omitempty"`
7171
MinProverVersion string `json:"min_prover_version,omitempty"`
72+
Features string `json:"features,omitempty"`
7273
}
7374

7475
// VerifierConfig load zk verifier config.
7576
type VerifierConfig struct {
7677
MinProverVersion string `json:"min_prover_version"`
77-
Features string `json:"features,omitempty"`
7878
Verifiers []AssetConfig `json:"verifiers"`
7979
}
8080

coordinator/internal/logic/libzkp/lib.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,6 @@ func DumpVk(forkName, filePath string) error {
116116
return nil
117117
}
118118

119-
// Set dynamic feature flags that control libzkp runtime behavior
120-
func SetDynamicFeature(feats string) {
121-
cFeats := goToCString(feats)
122-
defer freeCString(cFeats)
123-
C.set_dynamic_feature(cFeats)
124-
}
125-
126119
// UnivTaskCompatibilityFix calls the universal task compatibility fix function
127120
func UniversalTaskCompatibilityFix(taskJSON string) (string, error) {
128121
cTaskJSON := goToCString(taskJSON)

coordinator/internal/logic/libzkp/libzkp.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ char* gen_wrapped_proof(char* proof_json, char* metadata, char* vk, size_t vk_le
5656
// Release memory allocated for a string returned by gen_wrapped_proof
5757
void release_string(char* string_ptr);
5858

59-
void set_dynamic_feature(const char* feats);
60-
6159
// Universal task compatibility fix function
6260
char* univ_task_compatibility_fix(char* task_json);
6361

coordinator/internal/logic/provertask/batch_prover_task.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,12 @@ func (bp *BatchProverTask) getBatchTaskDetail(dbBatch *orm.Batch, chunkProofs []
311311
if !bp.validiumMode() {
312312
dbBatchCodecVersion := encoding.CodecVersion(dbBatch.CodecVersion)
313313
switch dbBatchCodecVersion {
314+
case 0:
315+
log.Warn("the codec version is 0, if it is not under integration test we have encountered an error here")
316+
return taskDetail, nil
314317
case encoding.CodecV3, encoding.CodecV4, encoding.CodecV6, encoding.CodecV7, encoding.CodecV8, encoding.CodecV9:
315318
default:
316-
return taskDetail, nil
319+
return nil, fmt.Errorf("Unsupported codec version <%d>", dbBatchCodecVersion)
317320
}
318321

319322
codec, err := encoding.CodecFromVersion(encoding.CodecVersion(dbBatch.CodecVersion))
@@ -335,7 +338,7 @@ func (bp *BatchProverTask) getBatchTaskDetail(dbBatch *orm.Batch, chunkProofs []
335338
taskDetail.KzgProof = &message.Byte48{Big: hexutil.Big(*new(big.Int).SetBytes(dbBatch.BlobDataProof[112:160]))}
336339
taskDetail.KzgCommitment = &message.Byte48{Big: hexutil.Big(*new(big.Int).SetBytes(dbBatch.BlobDataProof[64:112]))}
337340
} else {
338-
log.Debug("Apply validium mode for batch proving task")
341+
log.Info("Apply validium mode for batch proving task")
339342
codec := cutils.FromVersion(version)
340343
batchHeader, decodeErr := codec.DABatchForTaskFromBytes(dbBatch.BatchHeader)
341344
if decodeErr != nil {

0 commit comments

Comments
 (0)