mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-08 03:43:56 -05:00
Prover: go-corset as submodule (#759)
* feat(go-corset): go-corset as submodule (#743) * remove corset submodule * add go-corset submodule * use go-corst in Makefile * use go-corset v0.9.2 * update go-corset submodule url * fix(go-corset): typo in submodule url * fix: use go-corset instead of corset * add zkevm_for_old_trace.bin without 2B block gas limit constraint to test old traces --------- Signed-off-by: Leo Jeong <dreamerty@postech.ac.kr>
This commit is contained in:
@@ -96,7 +96,7 @@ jobs:
|
||||
RUSTFLAGS="-C target-cpu=x86-64-v3"
|
||||
build-contexts: |
|
||||
prover=prover/
|
||||
corset=corset/
|
||||
go-corset=go-corset/
|
||||
constraints=constraints/
|
||||
platforms: linux/amd64
|
||||
load: true
|
||||
@@ -123,7 +123,7 @@ jobs:
|
||||
RUSTFLAGS="-C target-cpu=x86-64-v3"
|
||||
build-contexts: |
|
||||
prover=prover/
|
||||
corset=corset/
|
||||
go-corset=go-corset/
|
||||
constraints=constraints/
|
||||
platforms: linux/amd64
|
||||
load: false
|
||||
|
||||
8
.gitmodules
vendored
8
.gitmodules
vendored
@@ -1,9 +1,9 @@
|
||||
[submodule "constraints"]
|
||||
path = constraints
|
||||
url = git@github.com:ConsenSys/zkevm-constraints.git
|
||||
[submodule "corset"]
|
||||
path = corset
|
||||
url = git@github.com:consensys/corset.git
|
||||
[submodule "go-corset"]
|
||||
path = go-corset
|
||||
url = git@github.com:Consensys/go-corset.git
|
||||
[submodule "contracts/lib/forge-std"]
|
||||
path = contracts/lib/forge-std
|
||||
url = https://github.com/foundry-rs/forge-std
|
||||
url = https://github.com/foundry-rs/forge-std
|
||||
1
corset
1
corset
Submodule corset deleted from 3d6496a034
1
go-corset
Submodule
1
go-corset
Submodule
Submodule go-corset added at 4e884ec4c0
@@ -1,18 +1,14 @@
|
||||
# required for `source`
|
||||
SHELL := /usr/bin/env bash
|
||||
CORSET_ROOT := $(shell pwd)/../corset
|
||||
|
||||
CGO_CFLAGS := "-I${CORSET_ROOT}/target/"
|
||||
CGO_LDFLAGS := "${CORSET_ROOT}/target/release/libcorset.a -lm -ldl"
|
||||
CORSET_FLAGS := CGO_CFLAGS=${CGO_CFLAGS} CGO_LDFLAGS=${CGO_LDFLAGS}
|
||||
CORSET_ROOT := $(shell pwd)/../go-corset
|
||||
|
||||
VERSION := $(shell git rev-parse --short HEAD)
|
||||
|
||||
LINUX_AMD64_FLAGS := CGO_ENABLED=1 CC="x86_64-linux-musl-gcc" CXX="x86_64-linux-musl-g++" GOOS="linux" GOARCH="amd64"
|
||||
DARWIN_ARM64_FLAGS := CGO_ENABLED=1 GOOS="linux" GOARCH="arm64"
|
||||
|
||||
# Ensure that we are using corset from the monorepo
|
||||
CORSET := PATH="${CORSET_ROOT}/target/release":$$PATH
|
||||
# Ensure that we are using go-corset from the monorepo
|
||||
GO_CORSET := PATH="${CORSET_ROOT}/bin":$$PATH
|
||||
|
||||
# these targets are not defined as depending on source files,
|
||||
# so they should be recompiled by default “just in case”.
|
||||
@@ -30,21 +26,28 @@ CORSET := PATH="${CORSET_ROOT}/target/release":$$PATH
|
||||
docker \
|
||||
bin/prover \
|
||||
bin/checker \
|
||||
corset \
|
||||
go-corset \
|
||||
testdata \
|
||||
|
||||
|
||||
##
|
||||
## This rule produces both the corset binary and libcorset.a & corset.h for the FFI
|
||||
## This rule produces the go-corset binary
|
||||
##
|
||||
corset:
|
||||
cd ${CORSET_ROOT} && cargo build --release
|
||||
go-corset:
|
||||
cd ${CORSET_ROOT} && make build
|
||||
|
||||
##
|
||||
## Build and bundle the Corset trace-expander dependency
|
||||
## Build and bundle the go-corset trace-expander dependency
|
||||
##
|
||||
zkevm/arithmetization/zkevm.bin: corset
|
||||
cd ../constraints && $(CORSET) make zkevm.bin && mv zkevm.bin ../prover/zkevm/arithmetization
|
||||
zkevm/arithmetization/zkevm.bin: go-corset
|
||||
cd ../constraints && $(GO_CORSET) make zkevm.bin && mv zkevm.bin ../prover/zkevm/arithmetization
|
||||
|
||||
##
|
||||
## zkevm.bin without 2B block gas limit constraint to test old traces
|
||||
##
|
||||
zkevm/arithmetization/zkevm_for_old_trace.bin: go-corset
|
||||
cd ../constraints && $(GO_CORSET) make zkevm_for_old_replay_tests.bin &&\
|
||||
mv zkevm_for_old_replay_tests.bin ../prover/zkevm/arithmetization/zkevm_for_old_trace.bin
|
||||
|
||||
##
|
||||
## Generate the setup for the execution prover (to be run with S3 access)
|
||||
|
||||
@@ -26,7 +26,7 @@ services:
|
||||
dockerfile: ./prover/Dockerfile
|
||||
additional_contexts:
|
||||
prover: ../prover/
|
||||
corset: ../corset/
|
||||
go-corset: ../go-corset/
|
||||
constraints: ../constraints/
|
||||
environment:
|
||||
VERSION: "0.2.0" # TODO @gbotrel hunt all the hard coded version strings
|
||||
|
||||
Reference in New Issue
Block a user