From 9e6e7b5dd99671513877e1d1b09bddffa0574639 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Wed, 11 Sep 2013 20:52:42 -0700 Subject: [PATCH] Add comments to the .proto file --- src/ripple_data/protocol/ripple.proto | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/ripple_data/protocol/ripple.proto b/src/ripple_data/protocol/ripple.proto index 7a59725f6..c0392ebf0 100644 --- a/src/ripple_data/protocol/ripple.proto +++ b/src/ripple_data/protocol/ripple.proto @@ -14,7 +14,7 @@ enum MessageType mtCONTACT = 11; mtGET_PEERS = 12; mtPEERS = 13; - mtANNOUNCE = 14; + mtANNOUNCE = 14; // operations for 'small' nodes mtSEARCH_TRANSACTION = 20; @@ -35,7 +35,6 @@ enum MessageType mtGET_OBJECTS = 42; } - // token, iterations, target, challenge = issue demand for proof of work // token, response = give solution to proof of work // token, result = report result of pow @@ -63,6 +62,9 @@ message TMProofWork // Sent on connect message TMHello { + // VFALCO NOTE The major and minor parts of the version number are + // encoded in the high and low order 16 bits of the uint32. + // required uint32 protoVersion = 1; required uint32 protoVersionMin = 2; required bytes nodePublic = 3; @@ -185,7 +187,6 @@ message TMValidation optional bool checkedSignature = 2; // node vouches signature is correct } - message TMGetValidations { required uint32 ledgerIndex = 1; @@ -193,8 +194,6 @@ message TMGetValidations optional uint32 count = 3; // get random validations } - - message TMContact { required bytes pubKey = 1; @@ -221,6 +220,10 @@ message TMGetPeers message TMIPv4EndPoint { required uint32 ipv4 = 1; + + // VFALCO NOTE There is no uint16 in google protocol buffers, + // so we use a uint32 to represent the port. + // required uint32 ipv4Port = 2; } @@ -231,11 +234,11 @@ message TMPeers message TMAnnounce { - required bytes serverID = 1; // The ID of this server - required bool privatePeer = 2; // This peer is private - the announce will not be propagated - required uint32 hopCount = 3; // The hop count of this server - required bytes viaPeerID = 4; // The ID of the peer through which we know this server - repeated TMIPv4EndPoint connectPoints = 5; // Addresses on which this server accepts connections (can be empty) + required bytes serverID = 1; // The ID of this server + required bool privatePeer = 2; // This peer is private - the announce will not be propagated + required uint32 hopCount = 3; // The hop count of this server + required bytes viaPeerID = 4; // The ID of the peer through which we know this server + repeated TMIPv4EndPoint connectPoints = 5; // Addresses on which this server accepts connections (can be empty) }; message TMSearchTransaction