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:
Romain Ruetschi
2016-11-21 17:18:41 +01:00
committed by Frederic Jacobs
parent 28d7824b8c
commit b395f224f5
11 changed files with 959 additions and 75 deletions

18
protobuf/proof.proto Normal file
View 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;
}
}