Tendermint light client
Implementation of tendermint light client in rust compilable to wasm. The code is heavily inspired from tendermint-rs. It is optimized to run in a constrained environment of a smart contract. Refer here to know how it works under the hood.
- Rust 1.42.0 or higher
- Two target need to be installed
wasm32-unknown-unknownto compile it into wasm and integrate it with CosmWasm
x86_64-apple-darwinto run tests
Compile in wasm
make wasm in project directory. This will produce a file
To produce a size optimized build, you need to run
How it works?
Tendermint light client is implemented according to the specification found here.
Since this light client runs in a constrained environment without access to I/O, the bisection part of the specification is not implemented, instead only
verifySingle function that operates on the local trusted state is implemented to validate incoming headers.