Skip to content

Commit d8d7f00

Browse files
committed
feat: Makefile change for one zkevm bin per fork
Co-authored by: DavePearce <[email protected]>
1 parent 6ef66b8 commit d8d7f00

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

.github/workflows/check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ jobs:
1717
shell: bash
1818
run: go install github.com/consensys/go-corset/cmd/[email protected]
1919

20-
- name: Build Constraints
21-
run: make -B zkevm.bin
20+
- name: Build all forks
21+
run: make -B all

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
zkevm.bin
2+
zkevm_london.bin
3+
zkevm_shanghai.bin
24
zkevm.go.bin
35
zkevm_for_reference_tests.bin
46
zkevm_for_old_replay_tests.bin

Makefile

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ GIT_TAGS := $(shell git -P tag --points-at)
44
TIMESTAMP := $(shell date)
55
GO_CORSET_COMPILE := ${GO_CORSET} compile -Dtags="${GIT_TAGS}" -Dcommit="${GIT_COMMIT}" -Dtimestamp="${TIMESTAMP}"
66

7+
# Modules setting
8+
## Some modules set below are fork specific. Eg. For OOB, OOB_LON is the OOB module for London and OOB_SHAN the OOB module for Shanghai.
9+
## The discrimination is done by having one bin file per fork - see command line below
10+
711
ALU := alu
812

913
BIN := bin
@@ -119,10 +123,20 @@ ZKEVM_MODULES_COMMON := ${CONSTANTS} \
119123
${TRM} \
120124
${WCP}
121125

122-
ZKEVM_MODULES_LON := ${ZKEVM_MODULES_COMMON} \
123-
${HUB_LON} \
124-
${OOB_LON} \
125-
${TXN_DATA_LON}
126+
ZKEVM_MODULES_LONDON := ${ZKEVM_MODULES_COMMON} \
127+
${HUB_LON} \
128+
${OOB_LON} \
129+
${TXN_DATA_LON}
130+
131+
ZKEVM_MODULES_SHANGHAI := ${ZKEVM_MODULES_COMMON} \
132+
${HUB_SHAN} \
133+
${OOB_SHAN} \
134+
${TXN_DATA_SHAN}
135+
136+
all: zkevm_london.bin zkevm_shanghai.bin
137+
138+
zkevm_london.bin: ${ZKEVM_MODULES_LONDON}
139+
${GO_CORSET_COMPILE} -o $@ ${ZKEVM_MODULES_LONDON}
126140

127-
zkevm.bin: ${ZKEVM_MODULES}
128-
${GO_CORSET_COMPILE} -o $@ ${ZKEVM_MODULES_LON}
141+
zkevm_shanghai.bin: ${ZKEVM_MODULES_SHANGHAI}
142+
${GO_CORSET_COMPILE} -o $@ ${ZKEVM_MODULES_SHANGHAI}

0 commit comments

Comments
 (0)