From 4b72fa28ac8961cef31e048ad765919e42ce2e8a Mon Sep 17 00:00:00 2001 From: marta-lokhova Date: Fri, 19 May 2023 10:36:46 -0700 Subject: [PATCH 1/2] update overlay xdr --- Stellar-overlay.x | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Stellar-overlay.x b/Stellar-overlay.x index 8203258..a6e823b 100644 --- a/Stellar-overlay.x +++ b/Stellar-overlay.x @@ -27,6 +27,12 @@ struct SendMore uint32 numMessages; }; +struct SendMoreExtended +{ + uint32 numMessages; + uint32 numBytes; +}; + struct AuthCert { Curve25519Public pubkey; @@ -47,16 +53,7 @@ struct Hello uint256 nonce; }; - -// During the roll-out phrase, pull mode will be optional. -// Therefore, we need a way to communicate with other nodes -// that we want/don't want pull mode. -// However, the goal is for everyone to enable it by default, -// so we don't want to introduce a new member variable. -// For now, we'll use the `flags` field (originally named -// `unused`) in `Auth`. -// 100 is just a number that is not 0. -const AUTH_MSG_FLAG_PULL_MODE_REQUESTED = 100; +const AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED = 200; struct Auth { @@ -83,7 +80,7 @@ struct PeerAddress uint32 numFailures; }; -// Next ID: 18 +// Next ID: 21 enum MessageType { ERROR_MSG = 0, @@ -112,6 +109,8 @@ enum MessageType SURVEY_RESPONSE = 15, SEND_MORE = 16, + SEND_MORE_EXTENDED = 20, + FLOOD_ADVERT = 18, FLOOD_DEMAND = 19 }; @@ -274,7 +273,8 @@ case GET_SCP_STATE: uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest case SEND_MORE: SendMore sendMoreMessage; - +case SEND_MORE_EXTENDED: + SendMoreExtended sendMoreExtendedMessage; // Pull mode case FLOOD_ADVERT: FloodAdvert floodAdvert; From 6deca74fed326d8762d90dbcebff6bb4543ef845 Mon Sep 17 00:00:00 2001 From: marta-lokhova Date: Fri, 19 May 2023 15:25:50 -0700 Subject: [PATCH 2/2] Add comment --- Stellar-overlay.x | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Stellar-overlay.x b/Stellar-overlay.x index a6e823b..4c96473 100644 --- a/Stellar-overlay.x +++ b/Stellar-overlay.x @@ -53,6 +53,13 @@ struct Hello uint256 nonce; }; +// During the roll-out phrase, nodes can disable flow control in bytes. +// Therefore, we need a way to communicate with other nodes +// that we want/don't want flow control in bytes. +// We use the `flags` field in the Auth message with a special value +// set to communicate this. Note that AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED != 0 +// AND AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED != 100 (as previously +// that value was used for other purposes). const AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED = 200; struct Auth