Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added hare protocol messages representation in protobuf #237

Merged
merged 4 commits into from Nov 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 44 additions & 0 deletions hare/pb/hare.proto
@@ -0,0 +1,44 @@
syntax = "proto3";

package pb;
option go_package = "pb";

// top message of the protocol
message HareMessage {
bytes pubKey = 1;
bytes innerSig = 2; // sign inner message
gavraz marked this conversation as resolved.
Show resolved Hide resolved
InnerMessage message = 3;
bytes outerSig = 4; // optional. sign also certificate
Certificate cert = 5; // optional
}

// the certificate
message Certificate {
repeated bytes blocks = 1; // the committed set S
repeated HareMessage commits = 2; // a collection of commit messages
gavraz marked this conversation as resolved.
Show resolved Hide resolved
bytes aggSig = 3; // aggregated sig for commits
}

// safe value proof message
message SVP {
repeated HareMessage statuses = 1; // a collection of status messages
gavraz marked this conversation as resolved.
Show resolved Hide resolved
bytes aggSig = 2; // aggregated sig for statuses
Certificate cert = 3;
gavraz marked this conversation as resolved.
Show resolved Hide resolved
}

// basic message
message InnerMessage {
enum Type { // message type
STATUS = 0;
PROPOSAL = 1;
COMMIT = 2;
NOTIFY = 3;
}
Type type = 1;
bytes layer = 2;
uint32 k = 3; // the iteration
uint32 ki = 4;
repeated bytes blocks = 5; // the set S. optional for commit message in a certificate
bytes roleProof = 6; // role is implicit by message type, this is the proof
SVP svpProof = 7; // optional. only for proposal messages
}