Skip to content

Commit 229eef2

Browse files
committed
merge develop, fix conflicts
2 parents 91fe9c8 + a1d1cbc commit 229eef2

File tree

85 files changed

+2671
-985
lines changed

Some content is hidden

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

85 files changed

+2671
-985
lines changed

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY: fmt dev_docker build_test_docker run_test_docker clean update
22

3-
L2GETH_TAG=scroll-v5.5.1
3+
L2GETH_TAG=scroll-v5.6.3
44

55
help: ## Display this help message
66
@grep -h \
@@ -40,8 +40,8 @@ fmt: ## Format the code
4040

4141
dev_docker: ## Build docker images for development/testing usages
4242
docker pull postgres
43-
docker build -t scroll_l1geth ./common/testcontainers/docker/l1geth/
44-
docker build -t scroll_l2geth ./common/testcontainers/docker/l2geth/
43+
docker build -t scroll_l1geth --platform linux/amd64 ./common/testcontainers/docker/l1geth/
44+
docker build -t scroll_l2geth --platform linux/amd64 ./common/testcontainers/docker/l2geth/
4545

4646
clean: ## Empty out the bin folder
4747
@rm -rf build/bin

bridge-history-api/internal/config/config.go

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"path/filepath"
77

88
"scroll-tech/common/database"
9+
"scroll-tech/common/utils"
910
)
1011

1112
// FetcherConfig is the configuration of Layer1 or Layer2 fetcher.
@@ -66,5 +67,11 @@ func NewConfig(file string) (*Config, error) {
6667
return nil, err
6768
}
6869

70+
// Override config with environment variables
71+
err = utils.OverrideConfigWithEnv(cfg, "SCROLL_BRIDGE_HISTORY")
72+
if err != nil {
73+
return nil, err
74+
}
75+
6976
return cfg, nil
7077
}

build/dockerfiles/bridgehistoryapi-api.Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ RUN --mount=target=. \
1717
FROM ubuntu:20.04
1818

1919
ENV CGO_LDFLAGS="-Wl,--no-as-needed -ldl"
20-
2120
COPY --from=builder /bin/bridgehistoryapi-api /bin/
2221
WORKDIR /app
2322
ENTRYPOINT ["bridgehistoryapi-api"]

build/dockerfiles/bridgehistoryapi-fetcher.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ RUN --mount=target=. \
1717
FROM ubuntu:20.04
1818

1919
ENV CGO_LDFLAGS="-Wl,--no-as-needed -ldl"
20-
20+
RUN apt update && apt install ca-certificates -y
21+
RUN update-ca-certificates
2122
COPY --from=builder /bin/bridgehistoryapi-fetcher /bin/
2223
WORKDIR /app
2324
ENTRYPOINT ["bridgehistoryapi-fetcher"]

common/forks/forks.go

+8-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ func GetHardforkName(config *params.ChainConfig, blockHeight, blockTimestamp uin
1616
return "bernoulli"
1717
} else if !config.IsDarwin(blockTimestamp) {
1818
return "curie"
19-
} else {
19+
} else if !config.IsDarwinV2(blockTimestamp) {
2020
return "darwin"
21+
} else {
22+
return "darwinV2"
2123
}
2224
}
2325

@@ -30,8 +32,10 @@ func GetCodecVersion(config *params.ChainConfig, blockHeight, blockTimestamp uin
3032
return encoding.CodecV1
3133
} else if !config.IsDarwin(blockTimestamp) {
3234
return encoding.CodecV2
33-
} else {
35+
} else if !config.IsDarwinV2(blockTimestamp) {
3436
return encoding.CodecV3
37+
} else {
38+
return encoding.CodecV4
3539
}
3640
}
3741

@@ -44,6 +48,8 @@ func GetMaxChunksPerBatch(config *params.ChainConfig, blockHeight, blockTimestam
4448
return 15
4549
} else if !config.IsDarwin(blockTimestamp) {
4650
return 45
51+
} else if !config.IsDarwinV2(blockTimestamp) {
52+
return 45
4753
} else {
4854
return 45
4955
}

common/libzkp/e2e-test.sh

+6-20
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,25 @@ export RUST_BACKTRACE=full
66
export RUST_LOG=debug
77
export RUST_MIN_STACK=100000000
88
export PROVER_OUTPUT_DIR=test_zkp_test
9+
export SCROLL_PROVER_ASSETS_DIR=/assets/test_assets
10+
export DARWIN_V2_TEST_DIR=/assets
911
#export LD_LIBRARY_PATH=/:/usr/local/cuda/lib64
1012

1113
mkdir -p $PROVER_OUTPUT_DIR
1214

1315
REPO=$(realpath ../..)
1416

1517
function build_test_bins() {
16-
cd impl
17-
cargo build --release
18-
ln -f -s $(realpath target/release/libzkp.so) $REPO/prover/core/lib
19-
ln -f -s $(realpath target/release/libzkp.so) $REPO/coordinator/internal/logic/verifier/lib
2018
cd $REPO/prover
21-
go test -tags="gpu ffi" -timeout 0 -c core/prover_test.go
19+
make tests_binary
2220
cd $REPO/coordinator
23-
go test -tags="gpu ffi" -timeout 0 -c ./internal/logic/verifier
24-
cd $REPO/common/libzkp
25-
}
26-
27-
function build_test_bins_old() {
28-
cd $REPO
29-
cd prover
30-
make libzkp
31-
go test -tags="gpu ffi" -timeout 0 -c core/prover_test.go
32-
cd ..
33-
cd coordinator
3421
make libzkp
3522
go test -tags="gpu ffi" -timeout 0 -c ./internal/logic/verifier
36-
cd ..
37-
cd common/libzkp
23+
cd $REPO/common/libzkp
3824
}
3925

4026
build_test_bins
41-
#rm -rf test_zkp_test/*
27+
rm -rf $PROVER_OUTPUT_DIR/*
4228
#rm -rf prover.log verifier.log
43-
#$REPO/prover/core.test -test.v 2>&1 | tee prover.log
29+
$REPO/prover/prover.test --exact zk_circuits_handler::darwin_v2::tests::test_circuits 2>&1 | tee prover.log
4430
$REPO/coordinator/verifier.test -test.v 2>&1 | tee verifier.log

0 commit comments

Comments
 (0)