mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Implemented protobuf infastructure and definitions for proposal and npl messages.
This commit is contained in:
4139
src/p2p/message.pb.cc
Normal file
4139
src/p2p/message.pb.cc
Normal file
File diff suppressed because it is too large
Load Diff
2885
src/p2p/message.pb.h
Normal file
2885
src/p2p/message.pb.h
Normal file
File diff suppressed because it is too large
Load Diff
69
src/p2p/message.proto
Normal file
69
src/p2p/message.proto
Normal file
@@ -0,0 +1,69 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package p2p;
|
||||
|
||||
message Message {
|
||||
optional string version = 1;
|
||||
optional bytes publicKey = 2;
|
||||
optional int32 timestamp = 3;
|
||||
optional bytes signature = 4;
|
||||
|
||||
enum Messagetype {
|
||||
PROPOSAL = 0;
|
||||
NPL = 1;
|
||||
STATE_REQUEST = 2;
|
||||
STATE_RESPONSE = 3;
|
||||
HISTORY_REQUEST = 4;
|
||||
HISTORY_RESPONSE = 5;
|
||||
}
|
||||
|
||||
optional Messagetype type = 5;
|
||||
optional bytes content = 6;
|
||||
}
|
||||
|
||||
message StateDifference {
|
||||
map<string, string> created = 1;
|
||||
map<string, string> updated = 2;
|
||||
map<string, string> deleted = 3;
|
||||
}
|
||||
|
||||
message State {
|
||||
optional bytes previous = 1;
|
||||
optional bytes current = 2;
|
||||
optional StateDifference difference = 3;
|
||||
map<string, string> patch = 4;
|
||||
}
|
||||
|
||||
|
||||
message Proposal {
|
||||
repeated string connections = 1;
|
||||
repeated string inputs = 2;
|
||||
repeated string outputs = 3;
|
||||
optional int32 stage = 4;
|
||||
optional int32 time = 5;
|
||||
optional State state = 6;
|
||||
optional bytes lcl = 7;
|
||||
}
|
||||
|
||||
message NPL {
|
||||
optional bytes data = 1;
|
||||
optional bytes lcl = 2;
|
||||
}
|
||||
|
||||
message StateRequest {
|
||||
|
||||
}
|
||||
|
||||
message StateResponse {
|
||||
|
||||
}
|
||||
|
||||
message HistoryRequest {
|
||||
|
||||
}
|
||||
|
||||
message HistoryResponse {
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user