Skip to content

Commit 7818f68

Browse files
authored
feat: Makefile change for one zkevm bin per fork (#652)
1 parent 6ef66b8 commit 7818f68

File tree

4 files changed

+27
-11
lines changed

4 files changed

+27
-11
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}

hub/london/columns/miscellaneous.lisp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
( STP_FLAG :binary@prove )
1414

1515
;; EXP columns (DONE)
16-
( EXP_INST :i32 )
16+
( EXP_INST :i16 )
1717
( EXP_DATA :array [5] :i128 )
1818

1919
;; MMU columns (DONE)
20-
( MMU_INST :i32 :display :hex)
20+
( MMU_INST :i16 :display :hex)
2121
( MMU_SRC_ID :i32 )
2222
( MMU_TGT_ID :i32 )
2323
( MMU_AUX_ID :i32 )
@@ -34,7 +34,7 @@
3434
( MMU_EXO_SUM :i32 )
3535

3636
;; MXP colummns
37-
( MXP_INST :i32 )
37+
( MXP_INST :byte )
3838
( MXP_MXPX :binary )
3939
( MXP_DEPLOYS :binary )
4040
( MXP_OFFSET_1_HI :i128 )

0 commit comments

Comments
 (0)