Skip to content

Commit dc388d0

Browse files
feat: eanble zkevm.bin for old replay tests (#602)
Signed-off-by: F Bojarski <[email protected]>
1 parent 6d52fce commit dc388d0

File tree

3 files changed

+57
-9
lines changed

3 files changed

+57
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
zkevm.bin
22
zkevm.go.bin
33
zkevm_for_reference_tests.bin
4+
zkevm_for_old_replay_tests.bin
45
zkevm.go
56
*.swp

Makefile

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,27 @@ BIN := bin
1010

1111
BLAKE2f_MODEXP_DATA := blake2fmodexpdata
1212

13-
# with gaslimit for ethereum file
14-
BLOCKDATA_FOR_REFERENCE_TESTS := $(wildcard blockdata/*.lisp) \
15-
$(wildcard blockdata/processing/*.lisp) \
16-
$(wildcard blockdata/processing/gaslimit/common.lisp) \
17-
$(wildcard blockdata/processing/gaslimit/ethereum.lisp) \
18-
$(wildcard blockdata/lookups/*.lisp)
19-
20-
# with gaslimit for linea file
13+
# constraints used in prod for LINEA, with linea block gas limit
2114
BLOCKDATA_FOR_LINEA := $(wildcard blockdata/*.lisp) \
2215
$(wildcard blockdata/processing/*.lisp) \
2316
$(wildcard blockdata/processing/gaslimit/common.lisp) \
2417
$(wildcard blockdata/processing/gaslimit/linea.lisp) \
2518
$(wildcard blockdata/lookups/*.lisp)
2619

20+
# with gaslimit for old replay tests (ie without the constraint BLOCK_GAS_LIMIT = LINEA_BLOCK_GAS_LIMIT = 2 000 000 000)
21+
BLOCKDATA_FOR_OLD_REPLAY_TESTS := $(wildcard blockdata/*.lisp) \
22+
$(wildcard blockdata/processing/*.lisp) \
23+
$(wildcard blockdata/processing/gaslimit/common.lisp) \
24+
$(wildcard blockdata/processing/gaslimit/old_replay_test.lisp) \
25+
$(wildcard blockdata/lookups/*.lisp)
26+
27+
# with gaslimit for ethereum file (used for reference tests)
28+
BLOCKDATA_FOR_REFERENCE_TESTS := $(wildcard blockdata/*.lisp) \
29+
$(wildcard blockdata/processing/*.lisp) \
30+
$(wildcard blockdata/processing/gaslimit/common.lisp) \
31+
$(wildcard blockdata/processing/gaslimit/ethereum.lisp) \
32+
$(wildcard blockdata/lookups/*.lisp)
33+
2734
BLOCKHASH := blockhash
2835

2936
CONSTANTS := constants/constants.lisp
@@ -111,6 +118,42 @@ ZKEVM_MODULES := ${CONSTANTS} \
111118
zkevm.bin: ${ZKEVM_MODULES}
112119
${GO_CORSET_COMPILE} -o $@ ${ZKEVM_MODULES}
113120

121+
# Corset is order sensitive - to compile, we load the constants first
122+
ZKEVM_MODULES_FOR_OLD_REPLAY_TESTS := ${CONSTANTS} \
123+
${ALU} \
124+
${BIN} \
125+
${BLAKE2f_MODEXP_DATA} \
126+
${BLOCKDATA_FOR_OLD_REPLAY_TESTS} \
127+
${BLOCKHASH} \
128+
${EC_DATA} \
129+
${EUC} \
130+
${EXP} \
131+
${GAS} \
132+
${HUB} \
133+
${LIBRARY} \
134+
${LOG_DATA} \
135+
${LOG_INFO} \
136+
${MMIO} \
137+
${MMU} \
138+
${MXP} \
139+
${OOB} \
140+
${RLP_ADDR} \
141+
${RLP_TXN} \
142+
${RLP_TXRCPT} \
143+
${ROM} \
144+
${ROM_LEX} \
145+
${SHAKIRA_DATA} \
146+
${SHIFT} \
147+
${STP} \
148+
${TABLES} \
149+
${TRM} \
150+
${TXN_DATA} \
151+
${WCP}
152+
153+
154+
zkevm_for_reference_tests.bin: ${ZKEVM_MODULES_FOR_OLD_REPLAY_TESTS}
155+
${GO_CORSET_COMPILE} -o $@ ${ZKEVM_MODULES_FOR_OLD_REPLAY_TESTS}
156+
114157
# Corset is order sensitive - to compile, we load the constants first
115158
ZKEVM_MODULES_FOR_REFERENCE_TESTS := ${CONSTANTS} \
116159
${ALU} \
@@ -144,5 +187,5 @@ ZKEVM_MODULES_FOR_REFERENCE_TESTS := ${CONSTANTS} \
144187
${WCP}
145188

146189

147-
zkevm_for_reference_tests.bin: ${ZKEVM_MODULES_FOR_REFERENCE_TESTS}
190+
zkevm_for_old_replay_tests.bin: ${ZKEVM_MODULES_FOR_REFERENCE_TESTS}
148191
${GO_CORSET_COMPILE} -o $@ ${ZKEVM_MODULES_FOR_REFERENCE_TESTS}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
(module blockdata)
2+
3+
(defconst GAS_LIMIT_MINIMUM LINEA_GAS_LIMIT_MINIMUM)
4+
(defconst GAS_LIMIT_MAXIMUM LINEA_GAS_LIMIT_MAXIMUM)

0 commit comments

Comments
 (0)