mirror of
https://github.com/logos-blockchain/lssa-zkvm-testing.git
synced 2026-01-02 13:23:08 +00:00
zkMIPS instructions added
This commit is contained in:
parent
02f7dcfa55
commit
43330da1f3
@ -5,4 +5,5 @@ This repo reflects the tests conducted by Nescience Team on selected zkVMs.
|
||||
|
||||
To run test, corresponding to zkVM of choise read
|
||||
|
||||
[zkWASM](./zkwasm/README.md)
|
||||
- [zkWASM](./zkwasm/README.md)
|
||||
- [zkMIPS](./zkmips/README.md)
|
||||
|
||||
45
zkmips/README.md
Normal file
45
zkmips/README.md
Normal file
@ -0,0 +1,45 @@
|
||||
# Test run instructions
|
||||
|
||||
To run corresponding tests in `zkMIPS` some preparations have to be done.
|
||||
|
||||
We assume, that one is in `zkmips` folder.
|
||||
|
||||
Firstly, move into [scripts_and_tools](./scripts_and_tools/) directory.
|
||||
|
||||
Next, run
|
||||
|
||||
```sh
|
||||
./zkmips_setup.sh
|
||||
```
|
||||
|
||||
This will get mips compiler.
|
||||
|
||||
After setup, and getting compiler, go to ~/.cargo/config , and add:
|
||||
|
||||
```
|
||||
[target.mips-unknown-linux-musl]
|
||||
linker = "<path-to>/mips-linux-muslsf-cross/bin/mips-linux-muslsf-gcc"
|
||||
rustflags = ["--cfg", 'target_os="zkvm"',"-C", "target-feature=+crt-static", "-C", "link-arg=-g"]
|
||||
```
|
||||
|
||||
Additionally, be sure, that you are at the latest nightly toolchain.
|
||||
|
||||
Next, to prove execution we need to build one of the tests, let`s use [simple_arithmetic_test](./tests/simple_arithmetic_test/) as an example.
|
||||
|
||||
Run
|
||||
|
||||
```sh
|
||||
./zkmips_build.sh ../tests/simple_arithmetic_test
|
||||
```
|
||||
|
||||
If build is succsessfull you will see `simple_arithmetic_test` binary in `tests/simple_arithmetic_test/target/mips-unknown-linux-musl/release/`.
|
||||
|
||||
Now, to benchmark this test we must do the following
|
||||
|
||||
```sh
|
||||
./zkmips_bench.sh <path-to-elf>
|
||||
```
|
||||
|
||||
Where `path-to-elf` is abovementioned path to `simple_arithmetic_test` binary relative to [zkmips_tester](./tests/zkmips_tester/) folder of global.
|
||||
|
||||
This will build a tester, and after that, bench proving and do verification of a proof.
|
||||
@ -1,13 +0,0 @@
|
||||
# ATTENTION
|
||||
|
||||
Some things have to be done manually
|
||||
|
||||
After setup, and getting compiler, go to ~/.cargo/config , and add:
|
||||
|
||||
```
|
||||
[target.mips-unknown-linux-musl]
|
||||
linker = "<path-to>/mips-linux-muslsf-cross/bin/mips-linux-muslsf-gcc"
|
||||
rustflags = ["--cfg", 'target_os="zkvm"',"-C", "target-feature=+crt-static", "-C", "link-arg=-g"]
|
||||
```
|
||||
|
||||
Additionally, be sure, that you ate at the latest nightly toolchain.
|
||||
Loading…
x
Reference in New Issue
Block a user