Skip to main content

Wickra Proof — a deterministic (spec, data) → blake3 hash, byte-identical across ten languages

Built on Wickra Status CI CodeQL codecov GitHub release crates.io PyPI npm NuGet Maven Central Go module R-universe License: MIT OR Apache-2.0 OpenSSF Scorecard OpenSSF Best Practices Build provenance Docs Verified across 10 languages


Proof-of-Backtest. Turn a (spec, data) pair into a deterministic backtest report and a canonical blake3 hash that anyone can recompute byte-for-byte in ten languages.

▶ Live demos: the backtester compiled to WebAssembly, an equity curve building bar by bar — backtest-live.wickra.org; one StrategySpec side by side in Python, Rust, JS and Go — playground.wickra.org; all 514 indicators of the core over a real Binance feed — live.wickra.org. Zero backend, all of them.

Part of the Wickra ecosystem: the same data-driven core and ten-language binding surface also power wickra-exchange, wickra-backtest, wickra-terminal and 20 more — see the full list.

wickra-proof is a thin, deterministic layer over the Wickra backtest engine. Given a strategy spec and candle data it produces a BacktestReport and a report_hash (blake3 over a canonical serialization). The same core logic is callable from Rust, Python, Node.js, WASM, C, C++, C#, Go, Java and R over a single JSON-over-C-ABI boundary, so the hash is identical everywhere — that identity is the proof.

Stop trusting backtest screenshots. A screenshot proves nothing: numbers can be typed, curves can be drawn. A wickra-proof claim ships the spec, the data commitment, the report and the hash — anyone, in any supported language, recomputes the hash and either matches it or doesn't. This is the foundation for fund transparency, reproducible research and higher-order tools (wickra-verify, wickra-zk).

use wickra_proof_core::{prove, verify, ProofSpec};

// A ProofSpec is the strategy and a dataset reference; the candles are
// supplied beside it. `prove` folds the two into a report and its hashes.
let spec = ProofSpec::from_json(spec_json)?;
let proof = prove(&spec, &candles_by_symbol)?;
println!("report_hash: {}", proof.report_hash);

// Anyone with the same spec and data recomputes the same bytes, in any of
// the ten languages -- and a proof that does not recompute is not valid.
assert!(verify(&proof, &spec, &candles_by_symbol)?);

The same two calls from the command line, over the spec and candles shipped in examples/data:

cargo run -p wickra-proof-cli -- prove \
  --spec examples/data/config.json \
  --data examples/data/candles/AAA.csv \
  --format json

cargo run -p wickra-proof-cli -- verify \
  --proof examples/data/config.proof.json \
  --spec examples/data/config.json \
  --data examples/data/candles/AAA.csv

Status

0.1.5 — the current release. The core (wickra-proof-core), the CLI, all ten language bindings, the byte-exact golden corpus, property + fuzz tests, benchmarks and one runnable example per language are in place and green across the full CI matrix (10 languages × 3 OS). Track progress in ROADMAP.md.

Documentation

Determinism is the product

  • Canonical JSON before hashing: keys sorted at every depth (BTreeMap), floats quantized to 1e-8 by pure decimal rounding ({:.8}, trailing zeros trimmed, whole values collapsed to their integer token so a host language's 1.0-vs-1 ambiguity can never shift the hash), no whitespace, and no NaN/±inf (rejected at parse time).
  • No RNG, fixed float operation order — the same inputs always reduce to the same bytes.
  • engine_version pinned and embedded — a different backtest engine version produces a different, visibly-labelled hash by design.
  • Any divergence of report_hash between two languages or two runs is a bug, caught by the byte-exact golden corpus and the canonicalize fuzz target.

Quickstart

--spec takes a config file ({ "spec": <ProofSpec> }); --data a CSV or a directory of <SYMBOL>.csv files. prove prints the BacktestReport and its report_hash; verify re-runs the proof against the same spec and data and prints valid only if the recomputed hash matches the claimed one. Tamper with a single field of the proof and verification fails.

ProofSpec and Proof

A proof carries everything a third party needs to reproduce it:

  • spec — the strategy definition (ProofSpec): indicators, rules and parameters, plus the pinned engine_version.
  • data commitment — a hash of the candle series the report was computed over.
  • report — the resulting BacktestReport (metrics, equity, trades).
  • report_hash — the blake3 of the canonical serialization of the report.

Because the spec and the data commitment travel with the report, a verifier never has to trust the prover: it recomputes and compares.

Canonicalization and hashing

The hash is only as trustworthy as the serialization it runs over, so canonicalization is the load-bearing contract every binding reproduces exactly (see crates/wickra-proof-core/src/canonical.rs):

  1. Object keys sorted ascending by Unicode code point.
  2. No structural whitespace.
  3. Floats quantized to 1e-8 by decimal rounding, trailing zeros trimmed, whole values collapsed to their integer token; magnitudes at or above the point where the f64 ULP reaches the 1e-8 grid fall back to the shortest round-trippable form so canonicalization stays a fixed point.
  4. NaN/±inf cannot occur.
  5. Arrays keep their order; strings use the standard JSON escaping.

blake3 over that canonical string yields the 64-hex report_hash. The canonicalize fuzz target pins the fixed-point property (canonicalize → parse → canonicalize yields identical bytes) across the full finite f64 range.

Verifying a foreign proof

Any supported language can verify a proof produced by any other — that is the whole point. Each binding exposes the same JSON-over-C-ABI command surface (prove / verify), returns the core's canonical response verbatim, and the cross-language golden tests assert byte-for-byte equality. A proof minted in Python verifies in Go; a proof minted in Rust verifies in the browser over WASM.

Engine-version pinning

engine_version is embedded in the spec and folded into the report, so a proof is bound to the exact backtest semantics that produced it. Upgrade the engine and the same (spec, data) produces a different, clearly-labelled hash — divergence is surfaced, never hidden.

Use in any language

The core is a JSON-over-C-ABI data API (Prover::command) exposed natively in Rust, Python, Node.js and WASM, and over the C ABI hub in C, C++, C#, Go, Java and R. One runnable example per language lives under examples/; the per-binding quickstarts are in each bindings/<lang>/README.md.

Project layout

crates/wickra-proof-core          the library: canonicalize + prove + verify
crates/wickra-proof-cli    reference CLI (prove / verify), binary `wickra-proof`
crates/proof-bench         Criterion benchmarks
bindings/{c,python,node,wasm,go,csharp,java,r}   ten-language surface
golden/                    fixed (spec, data) -> expected (report, hash)
examples/                  runnable per-language demos
fuzz/                      cargo-fuzz targets (spec parse, canonicalize, prove, verify)

Building everything from source

cargo build --workspace
cargo test  --workspace --all-features
cargo clippy --workspace --all-targets --all-features -- -D warnings

Each binding builds from its own directory — see the per-binding READMEs under bindings/.

Testing

Run the suites with the commands in Building everything from source.

  • wickra-proof-core — unit tests for canonicalization (key ordering, float quantization, whitespace), the prove/round-trip path, tamper detection, and the engine-version pin. The golden fixtures in golden/ are the anchor: the same (spec, data) pair must fold to the same canonical bytes and the same blake3 hash here as in every binding.
  • Every binding asserts the same golden bytes. That is the whole cross-language claim, so it is checked the same way in each one rather than approximated per language: Python with pytest, Node with node --test, WASM with wasm-bindgen-test, C and C++ through ctest, C# with dotnet test, Go with go test, Java with JUnit, and R with the shipped tests/smoke.R plus the repository-level tests/run_tests.R.
  • fuzz/ — libfuzzer targets over the JSON boundary, run as a time-boxed smoke in CI. The goal is catching a regression in the harness, not discovering novel bugs; long campaigns belong on dedicated infrastructure.
  • Repository checks — scripts/check_version_sync.py, check_license_copies.py and check_readme_links.py run in CI and assert what the repository ships rather than what it computes.

Requirements

  • Rust — workspace MSRV 1.86 (the Node binding needs 1.88).
  • Optional per binding: Python 3.9+, Node.js 22+, a C toolchain + CMake, .NET 8 SDK, JDK 22+, Go 1.23+, R ≥ 4.1.

Benchmarks

Criterion benchmarks live in crates/proof-bench and run nightly in CI; see BENCHMARKS.md.

Ecosystem

Part of the Wickra family — each one a data-driven core with a CLI and the same ten-language binding surface:

  • wickra — main library (Rust core + Python / Node.js / WASM bindings + a C ABI for C / C++ / C# / Go / Java / R)
  • wickra-playground — a polyglot strategy playground: one StrategySpec live side by side in Python, Rust, JS and Go, entirely in the browser
  • wickra-exchange — unified market-data + execution across ten crypto exchanges
  • wickra-backtest — event-driven backtester over the Wickra core
  • wickra-terminal — the trading terminal: a TUI and a browser renderer over the stack
  • wickra-screener — parallel multi-symbol screening over 514 streaming indicators
  • wickra-radar — perp-universe alert radar: OI delta, funding flip, book imbalance, liquidation clusters, OI/price divergence
  • wickra-copilot — local market copilot grounded in real order-book, liquidation and funding microstructure
  • wickra-shazam — match an asset's current microstructure fingerprint against its entire history
  • wickra-benchmark — reproducible, golden-verified benchmark suite — recompute any (strategy, dataset, report) in ten languages and confirm it byte-for-byte
  • wickra-strategy-ci — Jest for trading strategies: golden-pin the report, catch regressions in CI, property-test against fuzzed data
  • wickra-verify — confirm or refute a claimed backtest report against its strategy and data, in ten languages
  • wickra-proof — Proof-of-Backtest: deterministic (spec, data) → report + blake3 hash, recomputable byte-for-byte in ten languages
  • wickra-zk — prove a backtest zero-knowledge — on-chain-verifiable performance without revealing the data or the strategy
  • wickra-impact — the backtester that knows you would have moved the market: agent-based fills on the real historical L2 order book
  • wickra-darwin — evolutionary strategy search at millions of backtests per second, mutating and crossing JSON specs across the 514-indicator space
  • wickra-gym — a Gymnasium-compatible, microstructure-aware backtest environment with O(1) steps for deterministic RL rollouts
  • wickra-feature-store — OHLCV and microstructure streams into ML-ready feature matrices over 514 O(1) streaming indicators
  • wickra-genome — a vector database of the whole market: every asset a 514-dim live vector, for similarity search, clustering and anomaly detection
  • wickra-timemachine — scrub the whole market like a video — every symbol, full order book, rewound to any moment via deterministic re-fold
  • wickra-synth — deterministic synthetic market microstructure: OHLCV, order book, trades and funding from a single seed
  • wickra-compile — compile a strategy spec into a standalone deployable: a WASM module, a self-contained binary, or a no_std artifact
  • wickra-embed — allocation-free, no_std streaming indicators for bare-metal and HFT, byte-for-byte identical to the core
  • wickra-pico — the O(1) indicator core running bare-metal on a $5 Raspberry Pi Pico — the LED blinks on the EMA cross

Docs at docs.wickra.org; the marketing site and in-browser demo at wickra.org.

Contributing

See CONTRIBUTING.md. All commits are signed and DCO-signed off; CI must be green across every language before merge.

Security

Report vulnerabilities per SECURITY.md. The trust model — what a proof does and does not guarantee — is in THREAT_MODEL.md.

License

Licensed under either of

at your option. Use it, fork it, modify it, redistribute it — commercially or not — file issues, send pull requests; all welcome.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Disclaimer

wickra-proof is research and engineering tooling, not financial advice. A proof attests only that a given report is the deterministic result of a given spec over given data — it makes no claim about the quality, profitability or future performance of any strategy. Trading carries risk; you are responsible for your own decisions.


GitHub stars GitHub forks GitHub issues

Built on Wickra. If it saved you time, the cheapest way to say thanks is to ⭐ the repo.

wickra-proof star history

Metadata

Release files for wickra-proof 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wickra-proof 0.1.5
File Size Uploaded
wickra_proof-0.1.5.tar.gz 66.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for wickra-proof 0.1.5
File
wickra_proof-0.1.5-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details
wickra_proof-0.1.5-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
wickra_proof-0.1.5-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details
wickra_proof-0.1.5-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details
wickra_proof-0.1.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
wickra_proof-0.1.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
wickra_proof-0.1.5-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
wickra_proof-0.1.5-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 6.1 MB

Release files / wickra_proof-0.1.5.tar.gz

Download URL wickra_proof-0.1.5.tar.gz
Size 66.8 kB
Tags Source
SHA-256 checksum
How to use checksums
28be635341f720fc79a612e1e252aca307a8625a85863e501a9c59678e2472fb
BLAKE2b-256 checksum
How to use checksums
a9d27af798412606f5ccb4747ed873dbd350b3e380776fdb76f72c2b68039900
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_proof-0.1.5-cp39-abi3-win_arm64.whl

Download URL wickra_proof-0.1.5-cp39-abi3-win_arm64.whl
Size 575.9 kB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
750cdec3c430e5dbbc678fcf35e305dc8e24677f3e48edd68ccecf052a5c5a4a
BLAKE2b-256 checksum
How to use checksums
bbc3251eb640369c7dd8ce0072cbeeead1e7ebbbc068e2bae2d726472e54832b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_proof-0.1.5-cp39-abi3-win_amd64.whl

Download URL wickra_proof-0.1.5-cp39-abi3-win_amd64.whl
Size 661.5 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
7f015c44dbc5b34a34d07a710dc4450b712d805136a6308eb5004ef67feb4d9e
BLAKE2b-256 checksum
How to use checksums
36c16766349139c11f8bb895227258141c77a626b18af51c417af9642ffaa7fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_proof-0.1.5-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL wickra_proof-0.1.5-cp39-abi3-musllinux_1_2_x86_64.whl
Size 1.0 MB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
f0c92b98f0a9523437e2892d242dfe2a3911587d958757851727df2ace8a33ac
BLAKE2b-256 checksum
How to use checksums
1354af01fe571ba83b5c5f13817bc3faaf2323fb7f10570dd2e82453ec68d249
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_proof-0.1.5-cp39-abi3-musllinux_1_2_aarch64.whl

Download URL wickra_proof-0.1.5-cp39-abi3-musllinux_1_2_aarch64.whl
Size 879.4 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
249b0e67854892da215b391931211cd9090294e7c10ab378fe47b89b98d7520e
BLAKE2b-256 checksum
How to use checksums
400f00a6ce964860525eb2c634da9338e23be57f5fbb08bfc0c220be431f3852
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_proof-0.1.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL wickra_proof-0.1.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 786.0 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
2f95d1034c915499f2554b4f1041a04e3eda6579ffdbb23c690562f48a469fa2
BLAKE2b-256 checksum
How to use checksums
6b6432c01d2ced707e889c52610dff6fb29b99ad5e7f8e57ec04d83f98e01f7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_proof-0.1.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL wickra_proof-0.1.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 701.5 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
361e868d6c3c66ccea427630b19b396374332dcdeae8473cffe7ce3bd5079650
BLAKE2b-256 checksum
How to use checksums
b03fadde926efc81693120257c0859117413e8d305e3c785d158f9d5abf1087d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_proof-0.1.5-cp39-abi3-macosx_11_0_arm64.whl

Download URL wickra_proof-0.1.5-cp39-abi3-macosx_11_0_arm64.whl
Size 643.2 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
28af9b81b988480e536cb4aa22aea01d05ec2f8a2cb17766829d27920b92acf3
BLAKE2b-256 checksum
How to use checksums
47ec93883f6410ba8088b29a21df9288aa727ab516494d8bb89e42d10c23e75b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_proof-0.1.5-cp39-abi3-macosx_10_12_x86_64.whl

Download URL wickra_proof-0.1.5-cp39-abi3-macosx_10_12_x86_64.whl
Size 750.1 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
e8b7a492fa729643e4a8e5070c0059c5d14b51ed926b550cde5dea0cb22e8193
BLAKE2b-256 checksum
How to use checksums
f218f30b22a6c4c08dec5362acac878763bc14fb832ddc1b7263f3f05b16dff2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release history Release notifications | RSS feed

0.2.0

9 release files

This release

0.1.5 This release

9 release files

0.1.4

9 release files

0.1.3

9 release files

0.1.2

9 release files

0.1.1

9 release files

0.1.0

9 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page