Skip to content

Commit

Permalink
chore: look for other mentions of trace_decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
0xaatif committed Sep 26, 2024
1 parent 2df30a5 commit 8f45f1e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 21 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
/zero/ @muursh @Nashtare @atanmarko
/smt_trie/ @0xaatif @muursh @Nashtare
/mpt_trie/ @0xaatif @Nashtare @muursh
/trace_decoder/ @0xaatif @muursh @Nashtare
.github/ @0xaatif @atanmarko @muursh @Nashtare
20 changes: 0 additions & 20 deletions zero/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,26 +458,6 @@ Filled in:

Finally, note that both of these testing scripts force proof generation to be sequential by allowing only one worker. Because of this, this is not a realistic representation of performance but makes the debugging logs much easier to follow.

### Trace decoder tests

The trace decoder module has some basic regression tests, using the json witness data from the `trace_decoder/tests/data/witnesses` subdirectories.
When needed (e.g. some block with corner-case discovered), additional input witness data should be generated using the following procedure:

1. Run the `rpc` tool to fetch the block (or multiple blocks) witness:

```sh
cargo run --package zero --bin rpc fetch --rpc-url <node_rpc_endpoint> --start-block <start> --end-block <end> > ./b<number>_<network>.json
```

2. Download the header file for the block (or range of blocks), making the json array of headers:

```sh
file_name = "b<number>_<network>_header.json"
echo "[" > $file_name && cast rpc eth_getBlockByNumber "0x<block_number>" 'false' --rpc-url <node_rpc_endpoint> >> $file_name && echo "]" >> $file_name
```

Move the generated files to the appropriate subdirectory, and they will be automatically included in the test run.

## License

Licensed under either of
Expand Down
7 changes: 7 additions & 0 deletions zero/tests/cases/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```bash
cargo run --package zero --bin rpc fetch --rpc-url $rpc_url --start-block $number --end-block $number > ./b$number_$network.json
header_name=b$number_$network_header.json
echo "[" > $file_name
cast rpc eth_getBlockByNumber 0x$number false --rpc-url $rpc_url >> $file_name
echo "]" >> $file_name
```

0 comments on commit 8f45f1e

Please sign in to comment.