5 releases
0.0.8 | Aug 19, 2024 |
---|---|
0.0.7 | Aug 1, 2024 |
0.0.6 | Jul 30, 2024 |
0.0.5 | Jul 25, 2024 |
0.0.3 | Jul 20, 2024 |
#3 in #cairo-vm
336 downloads per month
2MB
38K
SLoC
Swiftness CairoVM Verifier
Swiftness is a Rust implementation of the Cairo-VM STARK verifier with layouts, inspired by StarkWare's Cairo-verifier in Cairo0.
Getting Started
Verify an Example Proof
-
Install
swiftness
:cargo install -f --path cli/ --features starknet_with_keccak,keccak --no-default-features
-
Verify the proof:
Ensure you use a proof corresponding to the layout and hash used to build the binary.
swiftness --proof examples/proofs/starknet_with_keccak/cairo0_example_proof.json
-
Local Run:
cd cli && cargo run --release --bin swiftness --features starknet_with_keccak,keccak --no-default-features -- --proof ../examples/proofs/starknet_with_keccak/cairo0_example_proof.json
Running Tests
cargo test
WebAssembly (WASM) Setup
-
Install
wasm-pack
:cargo install wasm-pack
-
Build WASM:
cd wasm_bindings && wasm-pack build --target web --features starknet_with_keccak,blake2s --no-default-features
Features
Usage
- CLI
Implemented Layouts
- dex
- recursive
- recursive_with_poseidon
- small
- starknet
- starknet_with_keccak
Commitment Hashes
- keccak
- blake2s
Web Support
- WASM support
- Web Demo
- NPM packages:
- swiftness-dex-blake2s
- swiftness-dex-keccak
- swiftness-recursive-blake2s
- swiftness-recursive-keccak
- swiftness-recursive-with-poseidon-blake2s
- swiftness-recursive-with-poseidon-keccak
- swiftness-small-blake2s
- swiftness-small-keccak
- swiftness-starknet-blake2s
- swiftness-starknet-keccak
- swiftness-starknet-with-keccak-blake2s
- swiftness-starknet-with-keccak-keccak
Other Platforms Support
- Bare Armv7-R, Big Endian -
armebv7r-none-eabi
- Bare RISC-V (RV64IMAC ISA) -
riscv64imac-unknown-none-elf
- Bare ARM64, softfloat -
aarch64-unknown-none-softfloat
- Bare ARM64, hardfloat -
aarch64-unknown-none
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests to help improve this project.
Dependencies
~15MB
~265K SLoC