Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Renaming zkevm-constraints to linea-constraints + .gitmodules update #1083

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/gradle-ethereum-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: gradle
name: reference tests

on:
schedule:
Expand Down Expand Up @@ -52,11 +52,11 @@ jobs:
- name: Generate block chain reference tests
run: ./gradlew :reference-tests:generateBlockchainReferenceTests -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
env:
JAVA_OPTS: -Dorg.gradle.daemon=false -DZKEVM_BIN_ORIGINAL_PATH="zkevm-constraints/zkevm.bin"
JAVA_OPTS: -Dorg.gradle.daemon=false -DZKEVM_BIN_ORIGINAL_PATH="linea-constraints/zkevm.bin"
CORSET_FLAGS: fields,expand,expand,expand

- name: generate zkevm.bin
run: cd ./zkevm-constraints; make zkevm.bin -B; cd ..
run: cd ./linea-constraints; make zkevm.bin -B; cd ..

- name: Run general reference tests
run: ./gradlew referenceGeneralStateTests
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "zkevm-constraints"]
path = zkevm-constraints
url = git@github.com:Consensys/zkevm-constraints.git
[submodule "linea-constraints"]
path = linea-constraints
url = https://github.com/Consensys/linea-constraints
[submodule "reference-tests/src/test/resources/ethereum-tests"]
path = reference-tests/src/test/resources/ethereum-tests
url = https://github.com/ethereum/tests.git
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ SHADOW_NODE_ROOT := "/home/ec2-user/shadow-node"
DIST_NAME := "$(PROJECT_NAME)-$(VERSION)"
DIST_JAR_PATH := "arithmetization/build/libs/$(DIST_NAME).jar"
BESU_PLUGINS_PATH := "$(SHADOW_NODE_ROOT)/linea-besu/plugins"
ZKEVM_BIN_VERSIONED_NAME := $(shell echo zkevm.bin-$(shell git -C zkevm-constraints rev-parse --short HEAD))
ZKEVM_BIN_VERSIONED_PATH := "zkevm-constraints/$(ZKEVM_BIN_VERSIONED_NAME)"
ZKEVM_BIN_ORIGINAL_PATH := "zkevm-constraints/zkevm.bin"
ZKEVM_BIN_VERSIONED_NAME := $(shell echo zkevm.bin-$(shell git -C linea-constraints rev-parse --short HEAD))
ZKEVM_BIN_VERSIONED_PATH := "linea-constraints/$(ZKEVM_BIN_VERSIONED_NAME)"
ZKEVM_BIN_ORIGINAL_PATH := "linea-constraints/zkevm.bin"

ACCOUNT_FRAGMENT_FILE_PATH := "arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/fragment/account/AccountFragment.java"

Expand All @@ -21,7 +21,7 @@ shadow-node-deploy:
@scp -r "$(DIST_JAR_PATH)" "$(node_address):$(BESU_PLUGINS_PATH)"
@sed -i -e 's/\/\/ this\.existsInfinity = /this\.existsInfinity = /g' $(ACCOUNT_FRAGMENT_FILE_PATH)
@echo ">>>>>>>>>>> Building zkevm.bin..."
@make -C zkevm-constraints zkevm.bin -B && cp "$(ZKEVM_BIN_ORIGINAL_PATH)" "$(ZKEVM_BIN_VERSIONED_PATH)"
@make -C linea-constraints zkevm.bin -B && cp "$(ZKEVM_BIN_ORIGINAL_PATH)" "$(ZKEVM_BIN_VERSIONED_PATH)"
@scp -r "$(ZKEVM_BIN_VERSIONED_PATH)" "$(node_address):$(SHADOW_NODE_ROOT)"
@ssh -t "$(node_address)" \
'cd $(SHADOW_NODE_ROOT); ln -sf $(ZKEVM_BIN_VERSIONED_NAME) zkevm.bin; find $(BESU_PLUGINS_PATH) ! -name $(DIST_NAME).jar -type f -exec rm -f {} +; zsh -l'
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class CorsetValidator {
public record Result(boolean isValid, File traceFile, String corsetOutput) {}

/** */
private static final String ZK_EVM_RELATIVE_PATH = "/zkevm-constraints/zkevm.bin";
private static final String ZK_EVM_RELATIVE_PATH = "/linea-constraints/zkevm.bin";

/** Specifies the default zkEVM.bin file to use (including its path). */
private String defaultZkEvm = null;
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/groovy/TraceFilesTask.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ abstract class TraceFilesTask extends Exec {
"-P", module.get(),
"-o", "${project.projectDir}/src/main/java/net/consensys/linea/zktracer/module/${moduleDir.getOrElse(module.get())}"
]
arguments.addAll(files.get().collect({"zkevm-constraints/${it}"}))
arguments.addAll(files.get().collect({"linea-constraints/${it}"}))

workingDir project.rootDir
executable "corset"
Expand Down
6 changes: 3 additions & 3 deletions docs/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ echo "net.git-fetch-with-cli=true" >> .cargo/config.toml
cargo install --git ssh://git@github.com/ConsenSys/corset --locked --force
```

#### Step 5: Update constraints [submodule](https://github.com/Consensys/zkevm-constraints/)
#### Step 5: Update constraints [submodule](https://github.com/Consensys/linea-constraints/)

```shell
git submodule update --init --recursive
Expand Down Expand Up @@ -155,7 +155,7 @@ ______________________________________________________________________
- JSON files can be debugged with the following command:

```shell
corset check -T <JSON_FILE> -v zkevm-constraints/zkevm.bin
corset check -T <JSON_FILE> -v linea-constraints/zkevm.bin
```

## Disable Corset expansion
Expand All @@ -169,4 +169,4 @@ be easily disabled in IntelliJ:
![idea_disable_corset_expansion.png](images/idea_disable_corset_expansion.png)

and add `CORSET_FLAGS=` under `Environment Variables`. This turns
off all expansion modes, including field arithmetic.
off all expansion modes, including field arithmetic.
2 changes: 1 addition & 1 deletion gradle/corset.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ tasks.register('corsetExists') {

tasks.register('buildZkevmBin', Exec) {
// dependsOn corsetExists
workingDir "${project.rootDir}/zkevm-constraints/"
workingDir "${project.rootDir}/linea-constraints/"
commandLine 'make', 'zkevm.bin'

//store the output instead of printing to the console
Expand Down
1 change: 1 addition & 0 deletions linea-constraints
Submodule linea-constraints added at c9e660
1 change: 0 additions & 1 deletion zkevm-constraints
Submodule zkevm-constraints deleted from 546f26
Loading