├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── artifacts ├── buffer.bin └── rsp ├── benchmark ├── Cargo.toml └── src │ └── main.rs └── crates ├── curves ├── CHANGELOG.md ├── Cargo.toml └── src │ ├── edwards │ ├── ed25519.rs │ └── mod.rs │ ├── lib.rs │ ├── params.rs │ ├── polynomial.rs │ ├── polynomial2.rs │ ├── scalar_mul.rs │ ├── uint256.rs │ ├── utils.rs │ └── weierstrass │ ├── bls12_381.rs │ ├── bn254.rs │ ├── mod.rs │ └── secp256k1.rs ├── executor ├── CHANGELOG.md ├── Cargo.toml └── src │ ├── context.rs │ ├── disassembler │ ├── elf.rs │ ├── mod.rs │ └── rrs.rs │ ├── events │ ├── memory.rs │ ├── mod.rs │ ├── precompiles │ │ ├── ec.rs │ │ ├── edwards.rs │ │ ├── fptower.rs │ │ ├── keccak256_permute.rs │ │ ├── mod.rs │ │ ├── sha256_compress.rs │ │ ├── sha256_extend.rs │ │ └── uint256.rs │ ├── syscall.rs │ └── utils.rs │ ├── executor.rs │ ├── hook.rs │ ├── instruction.rs │ ├── io.rs │ ├── lib.rs │ ├── opcode.rs │ ├── program.rs │ ├── register.rs │ ├── state.rs │ ├── syscalls │ ├── code.rs │ ├── commit.rs │ ├── context.rs │ ├── deferred.rs │ ├── halt.rs │ ├── hint.rs │ ├── mod.rs │ ├── precompiles │ │ ├── edwards │ │ │ ├── add.rs │ │ │ ├── decompress.rs │ │ │ └── mod.rs │ │ ├── fptower │ │ │ ├── fp.rs │ │ │ ├── fp2_addsub.rs │ │ │ ├── fp2_mul.rs │ │ │ └── mod.rs │ │ ├── keccak256 │ │ │ ├── mod.rs │ │ │ └── permute.rs │ │ ├── mod.rs │ │ ├── sha256 │ │ │ ├── compress.rs │ │ │ ├── extend.rs │ │ │ └── mod.rs │ │ ├── uint256.rs │ │ └── weierstrass │ │ │ ├── add.rs │ │ │ ├── decompress.rs │ │ │ ├── double.rs │ │ │ └── mod.rs │ ├── unconstrained.rs │ ├── verify.rs │ └── write.rs │ └── utils.rs └── primitives ├── CHANGELOG.md ├── Cargo.toml └── src ├── consts.rs ├── io.rs ├── lib.rs └── types.rs /.gitignore: -------------------------------------------------------------------------------- 1 | target/ -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/Cargo.lock -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/Cargo.toml -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/README.md -------------------------------------------------------------------------------- /artifacts/buffer.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/artifacts/buffer.bin -------------------------------------------------------------------------------- /artifacts/rsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/artifacts/rsp -------------------------------------------------------------------------------- /benchmark/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/benchmark/Cargo.toml -------------------------------------------------------------------------------- /benchmark/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/benchmark/src/main.rs -------------------------------------------------------------------------------- /crates/curves/CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/CHANGELOG.md -------------------------------------------------------------------------------- /crates/curves/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/Cargo.toml -------------------------------------------------------------------------------- /crates/curves/src/edwards/ed25519.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/src/edwards/ed25519.rs -------------------------------------------------------------------------------- /crates/curves/src/edwards/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/src/edwards/mod.rs -------------------------------------------------------------------------------- /crates/curves/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/src/lib.rs -------------------------------------------------------------------------------- /crates/curves/src/params.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/src/params.rs -------------------------------------------------------------------------------- /crates/curves/src/polynomial.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/src/polynomial.rs -------------------------------------------------------------------------------- /crates/curves/src/polynomial2.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/src/polynomial2.rs -------------------------------------------------------------------------------- /crates/curves/src/scalar_mul.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/src/scalar_mul.rs -------------------------------------------------------------------------------- /crates/curves/src/uint256.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/src/uint256.rs -------------------------------------------------------------------------------- /crates/curves/src/utils.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/src/utils.rs -------------------------------------------------------------------------------- /crates/curves/src/weierstrass/bls12_381.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/src/weierstrass/bls12_381.rs -------------------------------------------------------------------------------- /crates/curves/src/weierstrass/bn254.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/src/weierstrass/bn254.rs -------------------------------------------------------------------------------- /crates/curves/src/weierstrass/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/src/weierstrass/mod.rs -------------------------------------------------------------------------------- /crates/curves/src/weierstrass/secp256k1.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/curves/src/weierstrass/secp256k1.rs -------------------------------------------------------------------------------- /crates/executor/CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/CHANGELOG.md -------------------------------------------------------------------------------- /crates/executor/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/Cargo.toml -------------------------------------------------------------------------------- /crates/executor/src/context.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/context.rs -------------------------------------------------------------------------------- /crates/executor/src/disassembler/elf.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/disassembler/elf.rs -------------------------------------------------------------------------------- /crates/executor/src/disassembler/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/disassembler/mod.rs -------------------------------------------------------------------------------- /crates/executor/src/disassembler/rrs.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/disassembler/rrs.rs -------------------------------------------------------------------------------- /crates/executor/src/events/memory.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/events/memory.rs -------------------------------------------------------------------------------- /crates/executor/src/events/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/events/mod.rs -------------------------------------------------------------------------------- /crates/executor/src/events/precompiles/ec.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/events/precompiles/ec.rs -------------------------------------------------------------------------------- /crates/executor/src/events/precompiles/edwards.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/events/precompiles/edwards.rs -------------------------------------------------------------------------------- /crates/executor/src/events/precompiles/fptower.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/events/precompiles/fptower.rs -------------------------------------------------------------------------------- /crates/executor/src/events/precompiles/keccak256_permute.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/events/precompiles/keccak256_permute.rs -------------------------------------------------------------------------------- /crates/executor/src/events/precompiles/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/events/precompiles/mod.rs -------------------------------------------------------------------------------- /crates/executor/src/events/precompiles/sha256_compress.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/events/precompiles/sha256_compress.rs -------------------------------------------------------------------------------- /crates/executor/src/events/precompiles/sha256_extend.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/events/precompiles/sha256_extend.rs -------------------------------------------------------------------------------- /crates/executor/src/events/precompiles/uint256.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/events/precompiles/uint256.rs -------------------------------------------------------------------------------- /crates/executor/src/events/syscall.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/events/syscall.rs -------------------------------------------------------------------------------- /crates/executor/src/events/utils.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/events/utils.rs -------------------------------------------------------------------------------- /crates/executor/src/executor.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/executor.rs -------------------------------------------------------------------------------- /crates/executor/src/hook.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/hook.rs -------------------------------------------------------------------------------- /crates/executor/src/instruction.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/instruction.rs -------------------------------------------------------------------------------- /crates/executor/src/io.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/io.rs -------------------------------------------------------------------------------- /crates/executor/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/lib.rs -------------------------------------------------------------------------------- /crates/executor/src/opcode.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/opcode.rs -------------------------------------------------------------------------------- /crates/executor/src/program.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/program.rs -------------------------------------------------------------------------------- /crates/executor/src/register.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/register.rs -------------------------------------------------------------------------------- /crates/executor/src/state.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/state.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/code.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/code.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/commit.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/commit.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/context.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/context.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/deferred.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/deferred.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/halt.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/halt.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/hint.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/hint.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/mod.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/edwards/add.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/edwards/add.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/edwards/decompress.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/edwards/decompress.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/edwards/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/edwards/mod.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/fptower/fp.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/fptower/fp.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/fptower/fp2_addsub.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/fptower/fp2_addsub.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/fptower/fp2_mul.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/fptower/fp2_mul.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/fptower/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/fptower/mod.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/keccak256/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod permute; 2 | -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/keccak256/permute.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/keccak256/permute.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/mod.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/sha256/compress.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/sha256/compress.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/sha256/extend.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/sha256/extend.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/sha256/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/sha256/mod.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/uint256.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/uint256.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/weierstrass/add.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/weierstrass/add.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/weierstrass/decompress.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/weierstrass/decompress.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/weierstrass/double.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/weierstrass/double.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/precompiles/weierstrass/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/precompiles/weierstrass/mod.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/unconstrained.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/unconstrained.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/verify.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/verify.rs -------------------------------------------------------------------------------- /crates/executor/src/syscalls/write.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/syscalls/write.rs -------------------------------------------------------------------------------- /crates/executor/src/utils.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/executor/src/utils.rs -------------------------------------------------------------------------------- /crates/primitives/CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/primitives/CHANGELOG.md -------------------------------------------------------------------------------- /crates/primitives/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/primitives/Cargo.toml -------------------------------------------------------------------------------- /crates/primitives/src/consts.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/primitives/src/consts.rs -------------------------------------------------------------------------------- /crates/primitives/src/io.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/primitives/src/io.rs -------------------------------------------------------------------------------- /crates/primitives/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/primitives/src/lib.rs -------------------------------------------------------------------------------- /crates/primitives/src/types.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/succinctlabs/riscv-emulator-challenge/HEAD/crates/primitives/src/types.rs --------------------------------------------------------------------------------