This repository was archived by the owner on Apr 18, 2025. It is now read-only.
Commit 1cb76ea
feat: implement mcopy opcode (#1209)
* draft buss mapping for mcopy
* rename to mcopy.rs
* add mcopy.rs
* add helper gen_copy_steps_for_memory_to_memory
* add MCOPY in opcode_ids
* handle opcode_id others as_u8, constant_gas etc.
* draft mcopy gadgets
* add gadget to execution config
* remove unused fields
* update buss mapping test
* update gadget tests
* remove unnecessary testing stuff
* update ExecutionState
* add cancun config
* update buss mapping test
* remove commented codes
* enable multi copy case
* fix buss mapping tests
* update gas cost
* remove tx id lookup
* fix memory_word_size
* update word size if no copy happens
* add copy circuit test
* remove debug log
* fmt align
* minor update
* add OOGMemoryCopy test for mcopy
* make oog memorycopy include mcopy opcode
* revert temp debug changes
* add more test data
* minor updates
* fmt adjust
* fix clippy
* add testool
* fix memory word
* increase fix table rows detected by ci
* update testool
* remove unused import
* clippy update
* fix large dest memory addr
* refactor to use memory_expansion for dest_addr
* handle dest_addr < src_addr
* update per cargo check
* intermediate clean up
* fix testool
* fix u64 overflow
* update oog memorycopy to cover src_offset overflow case
* fix clippy; fix codehash.txt
* remove debug codes
* fix clippy
* reverted commented for testing
* remove outdated comment and todo for overlap case
---------
Co-authored-by: Zhuo Zhang <mycinbrin@gmail.com>1 parent 69b9a3e commit 1cb76ea
File tree
20 files changed
+756
-36
lines changed- bus-mapping/src
- circuit_input_builder
- evm
- opcodes
- eth-types/src/evm_types
- geth-utils/l2geth
- testool
- src
- statetest
- zkevm-circuits/src
- copy_circuit
- evm_circuit
- execution
- witness
20 files changed
+756
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1950 | 1950 | | |
1951 | 1951 | | |
1952 | 1952 | | |
| 1953 | + | |
1953 | 1954 | | |
1954 | 1955 | | |
1955 | 1956 | | |
| |||
2039 | 2040 | | |
2040 | 2041 | | |
2041 | 2042 | | |
| 2043 | + | |
2042 | 2044 | | |
2043 | 2045 | | |
2044 | 2046 | | |
| |||
2096 | 2098 | | |
2097 | 2099 | | |
2098 | 2100 | | |
| 2101 | + | |
2099 | 2102 | | |
2100 | 2103 | | |
2101 | 2104 | | |
| |||
2144 | 2147 | | |
2145 | 2148 | | |
2146 | 2149 | | |
| 2150 | + | |
2147 | 2151 | | |
2148 | 2152 | | |
2149 | 2153 | | |
| |||
2205 | 2209 | | |
2206 | 2210 | | |
2207 | 2211 | | |
| 2212 | + | |
2208 | 2213 | | |
2209 | 2214 | | |
2210 | 2215 | | |
| |||
2247 | 2252 | | |
2248 | 2253 | | |
2249 | 2254 | | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
2250 | 2320 | | |
2251 | 2321 | | |
2252 | 2322 | | |
| |||
2349 | 2419 | | |
2350 | 2420 | | |
2351 | 2421 | | |
| 2422 | + | |
2352 | 2423 | | |
2353 | 2424 | | |
2354 | 2425 | | |
2355 | 2426 | | |
2356 | 2427 | | |
2357 | 2428 | | |
2358 | | - | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
2359 | 2436 | | |
2360 | 2437 | | |
2361 | 2438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| 120 | + | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| |||
235 | 237 | | |
236 | 238 | | |
237 | 239 | | |
| 240 | + | |
238 | 241 | | |
239 | 242 | | |
240 | 243 | | |
| |||
477 | 480 | | |
478 | 481 | | |
479 | 482 | | |
| 483 | + | |
480 | 484 | | |
481 | 485 | | |
482 | 486 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
0 commit comments