zkEVM proof generator reference written in Javascript
$ npm install
$ npm run build
Basic usage:
$ node src/main_executor <input.json> -r <rom.json> -o <proof.json>
Example:
$ node src/main_executor tools/build-genesis/input_executor.json -r ../zkevm-rom/build/rom.json -o tmp/commit.bin
Additional parameters:
-t <test.json>
: test-l <logs.json>
: logs-s
: skip compile pil-d
: debug mode-p
: select pilprogram.pil-P
: load pilConfig.json file-u
: unsigned transactions mode-u
: unsigned transactions mode-e
: skip assertsnewStateRoot
andnewLocalExitRoot
-v
: verbode mode
npm run buildall
npm run buildall --pil=pil/basic_main.pil --starkstruct=debug
npm run buildall --pilconfig=testvectors/pilconfig.pil --starkstruct=debug
from: syntax is --from=<step> to indicate step where start build/rebuild
npm run buildall --from=c12setup
continue: this option hasn't additional argument. With this option buildall detected last step well done and continues from next step.
npm run buildall --continue
step: syntax is --step=<step> to indicate step to execute (one step only)
npm run buildall --step=c12setup
pil: syntax is --pil=<main.pil> where main.pil was name of pil to compile. For debugging could use basic_main.pil. See --starkstruct option
npm run buildall --pil=pil/basic_main.pil --starkstruct=debug
pilconfig: syntax is --pilconfig=<pilconfig.json> where pilconfig.json was name of config used in pil compilation. See --starkstruct option
npm run buildall --pilconfig=testvectors/pilconfig.json --starkstruct=debug
starkstruct: syntax is --startstruct=debug to generates automatic starkstruct adapted to pil bits number. Only for debugging. This option shall used with --pil or pilconfig if number of bits change.
npm run buildall --starkstruct=debug
build: with this option could change build directory, by default build directory is build/proof.
npm run buildall --build=build/basic_proof
input: with this option indicates input file to use.
npm run buildall --input=test/myinputfile.json
Region (base-to) | Size | Content |
---|---|---|
0x000000 - 0x03FFFF | 8MiB | |
0x040000 - 0x07FFFF | 8MiB | First context |
0x080000 - 0x0BFFFF | 8MiB | Second context |
: | 8MiB | : |
Region (base-to) | Size | Content |
---|---|---|
CTX.base + [0x000000 - 0x00FFFF] | 2MiB | Context specific variables |
CTX.base + [0x010000 - 0x01FFFF] | 2MiB | EVM Stack |
CTX.base + [0x020000 - 0x03FFFF] | 4MiB | EVM Memory |
Polygon zkevm-proverjs
was developed by Polygon. While we plan to adopt an open source license, we haven’t selected one yet, so all rights are reserved for the time being. Please reach out to us if you have thoughts on licensing.
This code has not yet been audited, and should not be used in any production systems.ode has not yet been audited, and should not be used in any production systems.