Skip to content

Commit

Permalink
Merge pull request #21 from 0xPolygonHermez/feature/update-readme
Browse files Browse the repository at this point in the history
update readme
  • Loading branch information
krlosMata committed Sep 16, 2022
2 parents e2067ab + 14b1085 commit de78cf1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@ $ node src/main_executor <input.json> -r <rom.json> -o <proof.json>
```
Example:
```sh
$ node src/main_executor testvectors/input_executor.json -r ../zkrom/build/rom.json -o tmp/commit.bin
$ 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
- `-d`: debug
- `-p`: pilprogram.pil
- `-P`: pilConfig.json
- `-n <number>`: N
- `-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 asserts `newStateRoot` and `newLocalExitRoot`
- `-v`: verbode mode

### Build prove
```sh
Expand Down
3 changes: 1 addition & 2 deletions src/main_executor.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const fileCachePil = path.join(__dirname, "../cache-main-pil.json");

const argv = require("yargs")
.version(version)
.usage("main_executor <input.json> -r <rom.json> -o <proof.json> -t <test.json> -l <logs.json> -s -d [-p <main.pil>] [-P <pilconfig.json>] -u -e")
.usage("main_executor <input.json> -r <rom.json> -o <proof.json> -t <test.json> -l <logs.json> -s -d [-p <main.pil>] [-P <pilconfig.json>] -u -e -v")
.alias("o", "output")
.alias("r", "rom")
.alias("t", "test")
Expand All @@ -37,7 +37,6 @@ const argv = require("yargs")
.alias("d", "debug")
.alias("p", "pil")
.alias("P", "pilconfig")
.alias("v", "verbose")
.alias("u", "unsigned")
.alias("e", "execute")
.alias("P", "pilconfig")
Expand Down
5 changes: 2 additions & 3 deletions src/sm/sm_main/debug/tracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ const codes = require("./opcodes");

class Tracer {

constructor (fileName, logFileName){
constructor (logFileName){
this.info = [];
this.fullStack = [];
this.trace = [];
this.fileName = fileName;
this.fileName = "process-tx.zkasm";
this.folderLogs = path.join(__dirname, "../logs-trace");
this.pathLogFile = path.join(this.folderLogs, `${logFileName}__trace.json`);
this.labels = {};
}

async getTrace(ctx, romStep , print = false){

if (romStep.offsetLabel === "mapping_opcodes" && ctx.fileName.includes(this.fileName)){
let singleTrace = {};
const singleInfo = {};
Expand Down
2 changes: 1 addition & 1 deletion src/sm/sm_main/sm_main_exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ module.exports = async function execute(pols, input, rom, config = {}) {
preprocessTxs(ctx);

if (debug) {
iTracer = new Tracer("process_tx.zkasm", config.debugInfo.inputName);
iTracer = new Tracer(config.debugInfo.inputName);
fullTracer = new FullTracer(config.debugInfo.inputName)
} else {
iTracer = null
Expand Down
2 changes: 1 addition & 1 deletion tools/tx-calldata/tx-calldata.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const ethers = require("ethers")
const { utils } = require("@0xpolygonhermez/zkevm-commonjs");
const { utils } = require("./utils");
const fs = require("fs")

const argv = require("yargs")
Expand Down

0 comments on commit de78cf1

Please sign in to comment.