Valida Now Supports Rust.
Writing Rust Programs to Run on Valida:
The Valida Rust compiler offers a unique environment for developers looking to harness the power of Rust. Currently, it supports compilation without access to the full standard library (std), focusing instead on the core functionalities provided by core.
Developers looking to get started can explore the lita-xyz/rust-examples on GitHub. This repository offers a variety of examples that serve as templates, allowing you to build your own applications using the Valida toolchain.
Supported Examples
Here are some examples of programs that work on Valida:
Rust examples
- Reth-valida: executes Ethereum blocks on an Ethereum virtual machine.
- Keccak: computes Keccak-256 hashes.
- JSON parsing: parses a JSON string and outputs a value it contains.
- Palindrome: recognizes palindromes.
C examples
- Keccak: computes Keccak-256 hashes.
- Mini-gmp: performs arithmetic operations on arbitrary sized integers.
- reverse.c: This program takes input and outputs it in reverse order, showcasing basic string manipulation.
- checksum.c: Outputs a checksum, which is the sum of the characters in the input, useful for data verification.
- merkle-path.c: Verifies an opening proof for a SHA256 binary Merkle tree. You can use an example proof from examples/example-merkle-proof.
- sha256.c: Computes the SHA-256 hash of the first 256 bytes of its input, which is essential for data integrity.
- sha256_32byte_in.c: Outputs the SHA-256 hash of a constant array of 32 bytes, used as a benchmark for performance.
Valida zkVM Updates
V0.5.0-alpha:
- Resolves all known issues with prover completeness
- Executions that are shorter than the segment size can be proven.
- Proofs of execution can be verified.
- Adds or fixes STARK constraints for MULHS, bit shifts, and single-byte memory operations
- Enables proving subtractions with borrowing
- Fixes a bug in the execution engine which incorrectly resulted in non-termination for programs using division opcodes
Get Started
https://github.com/lita-xyz/llvm-valida-releases/releases/tag/v0.5.0-alpha