openmina / mina-p2p-messages-rs

1 stars 0 forks source link

Differential fuzzing for gossip messages #8

Open akoptelov opened 2 years ago

akoptelov commented 2 years ago

We need to add correctness checking to gossip messages fuzzing. The most obvious way is to use Mina OCaml codecs as a reference implementation.

akoptelov commented 2 years ago

First stage is decoding fuzzing with OCaml decoder returning if it successfully decoded input slice. Further we can get actual structure from OCaml (either as JSON or via FFI) and compare it with Rust side result.

akoptelov commented 2 years ago

The obvious way to access OCaml decoder is FFI. Though now we have some troubles using it, partly because Mina uses proof system implemented in Rust, and linker reports duplicate symbols.

I think we should be able to solve that somehow, but as a workaround we can just use IPC interface with OCaml process.