Skip to content

Commit 438aded

Browse files
authored
docs: update readme (#84)
1 parent f73386e commit 438aded

File tree

3 files changed

+51
-7
lines changed

3 files changed

+51
-7
lines changed

README.md

+46-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,46 @@
1-
# mips-circuits
1+
# ZKM
2+
3+
ZKM is a general verifiable computing instructure based on [Plonky2](https://github.com/0xPolygonZero/plonky2) and the [MIPS microarchitecture](https://en.wikipedia.org/wiki/MIPS_architecture), empowering Ethereum as the Global Settlement Layer.
4+
5+
# Building
6+
7+
The zkm requires a latest nightly toolchain. Just run `cargo build --release` in zkm directory.
8+
9+
# Running the examples
10+
11+
An end-to-end example has been presented in [examples](./examples).
12+
13+
# Guidance for external contributors
14+
15+
Any kind of external contributions are encouraged and welcomed!
16+
17+
## General guidance for your PR
18+
19+
* The PR fixes a bug
20+
In the PR description, please clearly but briefly describe the bug, including how to reproduce, and the error/exception you got, and how your PR fixes the bugs.
21+
22+
* The PR implements a new feature
23+
24+
In the PR description, please clearly but briefly describe
25+
26+
> 1. what the feature does
27+
> 2. the approach taken to implement it
28+
> 3. All PRs for new features must include a suitable test suite.
29+
30+
* The PR improves performance
31+
32+
To help filter out false positives, the PR description for a performance improvement must clearly identify
33+
34+
> 1. the target bottleneck (only one per PR to avoid confusing things!)
35+
> 2. how performance is measured
36+
> 3. characteristics of the machine used (CPU, OS, #threads if appropriate) performance before and after the PR
37+
38+
# Licenses
39+
40+
LICENSE-APACHE is prefered. need to discuss.
41+
42+
43+
# Security
44+
45+
This code has not yet been audited, and should not be used in any production systems.
46+

examples/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,30 @@ export GOMIPS=softfloat
1313
go build hello.go
1414
```
1515

16-
* Split the ELF hello into segments
16+
* Split the ELF hello into segments. Note that the flag `BLOCK_NO` is only necessary for minigeth.
1717

1818
```
19-
BASEDIR=test-vectors RUST_LOG=trace ELF_PATH=test-vectors/hello BLOCK_NO=13284491 SEG_OUTPUT=/tmp/output SEG_SIZE=262144 \
19+
BASEDIR=test-vectors RUST_LOG=info ELF_PATH=test-vectors/hello BLOCK_NO=13284491 SEG_OUTPUT=/tmp/output SEG_SIZE=262144 \
2020
cargo run --release --example zkmips split
2121
```
2222

2323
* Generate proof for each segment
2424

2525
```
26-
BASEDIR=test-vectors RUST_LOG=trace BLOCK_NO=13284491 SEG_FILE="/tmp/output/0" SEG_SIZE=262144 \
26+
BASEDIR=test-vectors RUST_LOG=info BLOCK_NO=13284491 SEG_FILE="/tmp/output/0" SEG_SIZE=262144 \
2727
cargo run --release --example zkmips prove
2828
```
2929

3030
* Aggregate proof
3131

3232
```
33-
BASEDIR=test-vectors RUST_LOG=trace BLOCK_NO=13284491 SEG_FILE="/tmp/output/0" SEG_FILE2="/tmp/output/1" SEG_SIZE=262144 \
33+
BASEDIR=test-vectors RUST_LOG=info BLOCK_NO=13284491 SEG_FILE="/tmp/output/0" SEG_FILE2="/tmp/output/1" SEG_SIZE=262144 \
3434
cargo run --release --example zkmips aggregate_proof
3535
```
3636

3737
* Aggregate proof all
3838

3939
```
40-
BASEDIR=test-vectors RUST_LOG=trace BLOCK_NO=13284491 SEG_FILE_DIR="/tmp/output" SEG_FILE_NUM=55 SEG_SIZE=262144 \
40+
BASEDIR=test-vectors RUST_LOG=info BLOCK_NO=13284491 SEG_FILE_DIR="/tmp/output" SEG_FILE_NUM=55 SEG_SIZE=262144 \
4141
cargo run --release --example zkmips aggregate_proof_all
4242
```

src/cpu/bootstrap_kernel.rs

-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ pub(crate) fn check_memory_page_hash<F: Field>(
190190
// The Keccak sponge CTL uses memory value columns for its inputs and outputs.
191191
cpu_row.mem_channels[0].value[0] = F::ZERO; // context
192192
cpu_row.mem_channels[1].value[0] = F::from_canonical_usize(Segment::Code as usize);
193-
//cpu_row.mem_channels[2].value[0] = F::from_canonical_usize(page_data_addr[0].virt);
194193
let final_idx = page_addr_value_byte_be.len() / KECCAK_RATE_BYTES * KECCAK_RATE_U32S;
195194
cpu_row.mem_channels[2].value[0] = F::from_canonical_usize(page_data_addr[final_idx].virt);
196195
cpu_row.mem_channels[3].value[0] = F::from_canonical_usize(page_addr_value_byte_be.len()); // len

0 commit comments

Comments
 (0)