mirror of
https://github.com/mii443/merkle.rs.git
synced 2025-08-22 16:05:30 +00:00
Protocol Buffers (#9)
* Add protocol buffer messages for Proof and Lemma. * Implement Protobuf serialization for Proof and Lemma. * Implement Protobuf unserialization for Proof and Lemma. * Add write_to_bytes and parse_from_bytes methods to Proof. * Put the Protobuf-related code behind a feature flag. * Enable more flags. See #10 * Fix clippy warnings. See #10
This commit is contained in:
committed by
Frederic Jacobs
parent
28d7824b8c
commit
b395f224f5
18
protobuf/proof.proto
Normal file
18
protobuf/proof.proto
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
message ProofProto {
|
||||
bytes root_hash = 1;
|
||||
LemmaProto lemma = 2;
|
||||
}
|
||||
|
||||
message LemmaProto {
|
||||
bytes node_hash = 1;
|
||||
LemmaProto sub_lemma = 2;
|
||||
|
||||
oneof sibling_hash {
|
||||
bytes left_sibling_hash = 3;
|
||||
bytes right_sibling_hash = 4;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user