From 2c3deb0eff0d1addc491b7cab1bd034492b704a5 Mon Sep 17 00:00:00 2001 From: Steven Gu Date: Sat, 8 Jul 2023 08:52:20 +0800 Subject: [PATCH 1/4] Replace tag with rev for halo2curves in libzkp. --- common/libzkp/impl/Cargo.lock | 20 ++++++++++---------- common/libzkp/impl/Cargo.toml | 9 ++++++--- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/common/libzkp/impl/Cargo.lock b/common/libzkp/impl/Cargo.lock index ce983b78f8..b3946b6a67 100644 --- a/common/libzkp/impl/Cargo.lock +++ b/common/libzkp/impl/Cargo.lock @@ -1898,7 +1898,7 @@ source = "git+https://github.com/scroll-tech/halo2-snark-aggregator?branch=scrol dependencies = [ "group", "halo2_proofs", - "halo2curves 0.3.1 (git+https://github.com/privacy-scaling-explorations/halo2curves.git?tag=0.3.1)", + "halo2curves 0.3.1 (git+https://github.com/privacy-scaling-explorations//halo2curves.git?rev=9b67e19)", "num-bigint", "num-integer", ] @@ -1929,7 +1929,7 @@ dependencies = [ "digest 0.10.3", "group", "halo2_proofs", - "halo2curves 0.3.1 (git+https://github.com/privacy-scaling-explorations/halo2curves.git?tag=0.3.1)", + "halo2curves 0.3.1 (git+https://github.com/privacy-scaling-explorations//halo2curves.git?rev=9b67e19)", "log", "num-bigint", "poseidon", @@ -1947,7 +1947,7 @@ dependencies = [ "halo2-ecc-circuit-lib", "halo2-snark-aggregator-api", "halo2_proofs", - "halo2curves 0.3.1 (git+https://github.com/privacy-scaling-explorations/halo2curves.git?tag=0.3.1)", + "halo2curves 0.3.1 (git+https://github.com/privacy-scaling-explorations//halo2curves.git?rev=9b67e19)", "log", "rand 0.8.5", "rand_core 0.6.3", @@ -1966,7 +1966,7 @@ dependencies = [ "halo2-snark-aggregator-api", "halo2-snark-aggregator-circuit", "halo2_proofs", - "halo2curves 0.3.1 (git+https://github.com/privacy-scaling-explorations/halo2curves.git?tag=0.3.1)", + "halo2curves 0.3.1 (git+https://github.com/privacy-scaling-explorations//halo2curves.git?rev=9b67e19)", "log", "num-bigint", "sha3 0.10.1", @@ -2015,7 +2015,7 @@ dependencies = [ "cfg-if 0.1.10", "ff", "group", - "halo2curves 0.3.1 (git+https://github.com/privacy-scaling-explorations/halo2curves.git?tag=0.3.1)", + "halo2curves 0.3.1 (git+https://github.com/privacy-scaling-explorations//halo2curves.git?rev=9b67e19)", "log", "num-bigint", "num-integer", @@ -2030,7 +2030,7 @@ dependencies = [ [[package]] name = "halo2curves" version = "0.3.1" -source = "git+https://github.com/privacy-scaling-explorations/halo2curves.git?tag=0.3.1#9b67e19bca30a35208b0c1b41c1723771e2c9f49" +source = "git+https://github.com/privacy-scaling-explorations//halo2curves.git?rev=9b67e19#9b67e19bca30a35208b0c1b41c1723771e2c9f49" dependencies = [ "ff", "group", @@ -3245,7 +3245,7 @@ version = "0.2.0" source = "git+https://github.com/scroll-tech/poseidon.git?branch=scroll-dev-0220#2fb4a2385bada39b50dce12fe50cb80d2fd33476" dependencies = [ "group", - "halo2curves 0.3.1 (git+https://github.com/privacy-scaling-explorations/halo2curves.git?tag=0.3.1)", + "halo2curves 0.3.1 (git+https://github.com/privacy-scaling-explorations//halo2curves.git?rev=9b67e19)", "subtle", ] @@ -4121,7 +4121,7 @@ source = "git+https://github.com/privacy-scaling-explorations/snark-verifier?tag dependencies = [ "ecc", "halo2_proofs", - "halo2curves 0.3.1 (git+https://github.com/privacy-scaling-explorations/halo2curves.git?tag=0.3.1)", + "halo2curves 0.3.1 (git+https://github.com/privacy-scaling-explorations//halo2curves.git?rev=9b67e19)", "hex", "itertools", "lazy_static", @@ -5051,7 +5051,7 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "types" version = "0.3.0" -source = "git+https://github.com/scroll-tech/scroll-zkevm?rev=78ab7a7#78ab7a770f7753fa88c8aab4969296f06e1c811a" +source = "git+https://github.com/scroll-tech/scroll-prover?rev=78ab7a7#78ab7a770f7753fa88c8aab4969296f06e1c811a" dependencies = [ "base64 0.13.0", "blake2", @@ -5727,7 +5727,7 @@ dependencies = [ [[package]] name = "zkevm" version = "0.3.0" -source = "git+https://github.com/scroll-tech/scroll-zkevm?rev=78ab7a7#78ab7a770f7753fa88c8aab4969296f06e1c811a" +source = "git+https://github.com/scroll-tech/scroll-prover?rev=78ab7a7#78ab7a770f7753fa88c8aab4969296f06e1c811a" dependencies = [ "anyhow", "blake2", diff --git a/common/libzkp/impl/Cargo.toml b/common/libzkp/impl/Cargo.toml index 82a8de44ec..1019e90867 100644 --- a/common/libzkp/impl/Cargo.toml +++ b/common/libzkp/impl/Cargo.toml @@ -7,14 +7,17 @@ edition = "2021" [lib] crate-type = ["cdylib"] +# `//` is used to skip https://github.com/rust-lang/cargo/issues/5478#issuecomment-522719793. +[patch."https://github.com/privacy-scaling-explorations/halo2curves.git"] +halo2curves = { git = 'https://github.com/privacy-scaling-explorations//halo2curves.git', rev = "9b67e19" } [patch."https://github.com/privacy-scaling-explorations/halo2.git"] halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "scroll-dev-0220" } [patch."https://github.com/privacy-scaling-explorations/poseidon.git"] poseidon = { git = "https://github.com/scroll-tech/poseidon.git", branch = "scroll-dev-0220" } [dependencies] -zkevm = { git = "https://github.com/scroll-tech/scroll-zkevm", rev="78ab7a7" } -types = { git = "https://github.com/scroll-tech/scroll-zkevm", rev="78ab7a7" } +zkevm = { git = "https://github.com/scroll-tech/scroll-prover", rev="78ab7a7" } +types = { git = "https://github.com/scroll-tech/scroll-prover", rev="78ab7a7" } halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2022_09_10" } log = "0.4" @@ -32,4 +35,4 @@ debug-assertions = true [profile.release] opt-level = 3 -debug-assertions = true \ No newline at end of file +debug-assertions = true From 2ae5474a67f2e9a5d423011a54aedd0e0335319a Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 9 Jul 2023 09:31:02 +0800 Subject: [PATCH 2/4] Update common/libzkp/impl/Cargo.lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Péter Garamvölgyi --- common/libzkp/impl/Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/libzkp/impl/Cargo.lock b/common/libzkp/impl/Cargo.lock index b3946b6a67..3a695e7abb 100644 --- a/common/libzkp/impl/Cargo.lock +++ b/common/libzkp/impl/Cargo.lock @@ -2030,7 +2030,7 @@ dependencies = [ [[package]] name = "halo2curves" version = "0.3.1" -source = "git+https://github.com/privacy-scaling-explorations//halo2curves.git?rev=9b67e19#9b67e19bca30a35208b0c1b41c1723771e2c9f49" +source = "git+https://github.com/privacy-scaling-explorations//halo2curves.git?rev=9b67e19" dependencies = [ "ff", "group", From 148d07046bde1ce3e9830feda4771b9d9145711d Mon Sep 17 00:00:00 2001 From: Steven Gu Date: Sun, 9 Jul 2023 19:11:12 +0800 Subject: [PATCH 3/4] Fix `scroll-zkevm` to `scroll-prover` in other code. --- common/types/message/message.go | 2 +- common/version/version.go | 2 +- coordinator/Makefile | 4 ++-- roller/Makefile | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common/types/message/message.go b/common/types/message/message.go index b81dfef45e..8b67780267 100644 --- a/common/types/message/message.go +++ b/common/types/message/message.go @@ -63,7 +63,7 @@ type Identity struct { // Unverified Unix timestamp of message creation Timestamp uint32 `json:"timestamp"` // Version is common.Version+ZkVersion. Use the following to check the latest ZkVersion version. - // curl -sL https://api.github.com/repos/scroll-tech/scroll-zkevm/commits | jq -r ".[0].sha" + // curl -sL https://api.github.com/repos/scroll-tech/scroll-prover/commits | jq -r ".[0].sha" Version string `json:"version"` // Random unique token generated by manager Token string `json:"token"` diff --git a/common/version/version.go b/common/version/version.go index 0b589e0194..5db5685459 100644 --- a/common/version/version.go +++ b/common/version/version.go @@ -22,7 +22,7 @@ var commit = func() string { return "" }() -// ZkVersion is commit-id of common/libzkp/impl/cargo.lock/scroll-zkevm +// ZkVersion is commit-id of common/libzkp/impl/cargo.lock/scroll-prover var ZkVersion string // Version denote the version of scroll protocol, including the l2geth, relayer, coordinator, roller, contracts and etc. diff --git a/coordinator/Makefile b/coordinator/Makefile index 412765ca4a..756c34d034 100644 --- a/coordinator/Makefile +++ b/coordinator/Makefile @@ -5,10 +5,10 @@ IMAGE_VERSION=latest REPO_ROOT_DIR=./.. ifeq (4.3,$(firstword $(sort $(MAKE_VERSION) 4.3))) - ZKEVM_VERSION=$(shell grep -m 1 "scroll-zkevm" ../common/libzkp/impl/Cargo.lock | cut -d "#" -f2 | cut -c-7) + ZKEVM_VERSION=$(shell grep -m 1 "scroll-prover" ../common/libzkp/impl/Cargo.lock | cut -d "#" -f2 | cut -c-7) HALO2_VERSION=$(shell grep -m 1 "halo2.git" ../common/libzkp/impl/Cargo.lock | cut -d "#" -f2 | cut -c-7) else - ZKEVM_VERSION=$(shell grep -m 1 "scroll-zkevm" ../common/libzkp/impl/Cargo.lock | cut -d "\#" -f2 | cut -c-7) + ZKEVM_VERSION=$(shell grep -m 1 "scroll-prover" ../common/libzkp/impl/Cargo.lock | cut -d "\#" -f2 | cut -c-7) HALO2_VERSION=$(shell grep -m 1 "halo2.git" ../common/libzkp/impl/Cargo.lock | cut -d "\#" -f2 | cut -c-7) endif diff --git a/roller/Makefile b/roller/Makefile index 79442b088d..c7c1104d56 100644 --- a/roller/Makefile +++ b/roller/Makefile @@ -4,10 +4,10 @@ IMAGE_NAME=go-roller IMAGE_VERSION=latest ifeq (4.3,$(firstword $(sort $(MAKE_VERSION) 4.3))) - ZKEVM_VERSION=$(shell grep -m 1 "scroll-zkevm" ../common/libzkp/impl/Cargo.lock | cut -d "#" -f2 | cut -c-7) + ZKEVM_VERSION=$(shell grep -m 1 "scroll-prover" ../common/libzkp/impl/Cargo.lock | cut -d "#" -f2 | cut -c-7) HALO2_VERSION=$(shell grep -m 1 "halo2.git" ../common/libzkp/impl/Cargo.lock | cut -d "#" -f2 | cut -c-7) else - ZKEVM_VERSION=$(shell grep -m 1 "scroll-zkevm" ../common/libzkp/impl/Cargo.lock | cut -d "\#" -f2 | cut -c-7) + ZKEVM_VERSION=$(shell grep -m 1 "scroll-prover" ../common/libzkp/impl/Cargo.lock | cut -d "\#" -f2 | cut -c-7) HALO2_VERSION=$(shell grep -m 1 "halo2.git" ../common/libzkp/impl/Cargo.lock | cut -d "\#" -f2 | cut -c-7) endif @@ -42,7 +42,7 @@ test-gpu-prover: libzkp go test -tags="gpu ffi" -timeout 0 -v ./prover lastest-zk-version: - curl -sL https://api.github.com/repos/scroll-tech/scroll-zkevm/commits | jq -r ".[0].sha" + curl -sL https://api.github.com/repos/scroll-tech/scroll-prover/commits | jq -r ".[0].sha" lint: ## Lint the files - used for CI cp -r ../common/libzkp/interface ./prover/lib From a0fb6bd0e0b856007765af2d2b7f952c72c38fd8 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Mon, 10 Jul 2023 12:23:09 +0800 Subject: [PATCH 4/4] Update version.go --- common/version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/version/version.go b/common/version/version.go index 5db5685459..9047fc4d3c 100644 --- a/common/version/version.go +++ b/common/version/version.go @@ -5,7 +5,7 @@ import ( "runtime/debug" ) -var tag = "v4.0.10" +var tag = "v4.0.11" var commit = func() string { if info, ok := debug.ReadBuildInfo(); ok {