prove with stwo:
cargo run -r --features stwo pil test_data/pil/fibonacci.pil -o output -f --field m31 --prove-with stwo
prove with plonky3
cargo run pil test_data/pil/fibonacci.pil -o output -f --field bb --prove-with plonky3
hello world example
cargo run pil test_data/asm/book/hello_world.asm --inputs 0 -o output --field m31 --prove-with plonky3 -f
Run a specific test
cargo test --package powdr-backend --lib --features stwo -- stwo::prover::tests --show-output
Run Plonky3 add test (features needs to be set)
cargo test --features stwo,plonky3 --package powdr-pipeline --test pil -- add --exact --show-output --nocapture
Run stwo test
cargo test --features stwo --package powdr-pipeline --test pil -- stwo_add_and_equal --exact --show-output --nocapture
Run before push
cargo clippy --all --all-targets --features stwo --profile pr-tests --verbose -- -D warnings
RISCV test
cargo install --path ./cli-rs
compile with the correct field
powdr-rs compile riscv/tests/riscv_data/keccak -o output --field bb
you can also add –linker-mode bus or –linker-mode native below
cargo run --features stwo pil output/keccak.asm -o output --force --field m31 --prove-with stwo-composite
Test for bus
cargo run -r --features stwo pil test_data/pil/fibonacci.pil -o output -f --field m31 --linker-mode native --prove-with stwo
openVM Plonk keccak test
RUST_LOG=powdr_openvm::powdr_extension::plonk=debug cargo test -r
keccak_plonk_small_prove_mock -- --nocapture
powdr OpenVM guest code test in zkvm runtime, run in powdr root directory
RUST_LOG=debug /usr/bin/time -v cargo run -r --bin powdr_openvm -- prove $(pwd)/openvm/guest-sha256 --input 5000 --autoprecompiles 10 &> log_sha256_5000_apc_10
Full command to run a test:
cargo test --package powdr-openvm --test apc_builder_single_instructions -- single_storeh --exact --nocapture
cargo test --package powdr-openvm --lib -- tests::guest_prove_mock --exact --nocapture
Using tee
tee is a Unix command that lets you see output live AND save it to a file at the same time.
Example logging:
my_program > log.txt 2>&1
or with live view:
my_program 2>&1 | tee log.txt