vacp2p / zerokit

A set of Zero Knowledge modules, written in Rust and designed to be used in other system programming environments.
Apache License 2.0
130 stars 7 forks source link

bug(rln): Type mismatch in witness json serialisation and deserialisation functions #252

Closed seemenkina closed 3 months ago

seemenkina commented 3 months ago

The serialisation and deserialisation functions have problems with json field types because all value are serialized as string and deserialize required number value. And test function cover only deserialisation on constant value

Serialisation to String: https://github.com/vacp2p/zerokit/blob/fe2b224981d35ff3bfe0b67f1fe1ae169301e078/rln/src/protocol.rs#L775-L777 Deserialisation from u64 : https://github.com/vacp2p/zerokit/blob/fe2b224981d35ff3bfe0b67f1fe1ae169301e078/rln/src/protocol.rs#L247-L248

rymnc commented 3 months ago

addressed in #253