Skip to content

Commit 1248bd0

Browse files
authoredJan 29, 2024··
Merge pull request #4160 from marta-lokhova/survey_documentation
Improve survey documentation Reviewed-by: graydon
2 parents 368063a + ff170a1 commit 1248bd0

File tree

4 files changed

+34
-6
lines changed

4 files changed

+34
-6
lines changed
 

‎docs/software/admin.md

+19
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,8 @@ Once the responses are received, the `getsurveyresult` command will return a res
819819
],
820820
"numTotalInboundPeers" : 2,
821821
"numTotalOutboundPeers" : 0,
822+
"maxInboundPeerCount" : 64,
823+
"maxOutboundPeerCount" : 8,
822824
"outboundPeers" : null
823825
}
824826
}
@@ -833,7 +835,24 @@ Notable field definitions
833835
* `badResponseNodes` : List of nodes that sent a malformed response
834836
* `topology` : Map of nodes to connection information
835837
* `inboundPeers`/`outboundPeers` : List of connection information by nodes
838+
* `bytesRead`: The total number of bytes read from this peer.
839+
* `bytesWritten`: The total number of bytes written to this peer.
840+
* `duplicateFetchBytesRecv`: The number of bytes received that were duplicate transaction sets and quorum sets.
841+
* `duplicateFetchMessageRecv`: The count of duplicate transaction sets and quorum sets received from this peer.
842+
* `duplicateFloodBytesRecv`: The number of bytes received that were transactions and SCP votes duplicates.
843+
* `duplicateFloodMessageRecv`: The count of duplicate transactions and SCP votes received from this peer.
844+
* `messagesRead`: The total number of messages read from this peer.
845+
* `messagesWritten`: The total number of messages written to this peer.
846+
* `nodeId`: Node's public key.
847+
* `secondsConnected`: The total number of seconds this peer has been connected to the surveyed node.
848+
* `uniqueFetchBytesRecv`: The number of bytes received that were unique transaction sets and quorum sets.
849+
* `uniqueFetchMessageRecv`: The count of unique transaction sets and quorum sets received from this peer.
850+
* `uniqueFloodBytesRecv`: The number of bytes received that were unique transactions and SCP votes.
851+
* `uniqueFloodMessageRecv`: The count of unique transactions and SCP votes received from this peer.
852+
* `version`: stellar-core version.
853+
836854
* `numTotalInboundPeers`/`numTotalOutboundPeers` : The number of total inbound and outbound peers this node is connected to. The response will have a random subset of 25 connected peers per direction (inbound/outbound). These fields tell you if you're missing nodes so you can send another request out to get another random subset of nodes.
855+
* `maxInboundPeerCount`/`maxOutboundPeerCount` : The number of total inbound and outbound peers that this node can accept. These fields correspond to stellar-core configurations `MAX_ADDITIONAL_PEER_CONNECTIONS` and `TARGET_PEER_CONNECTIONS`, respectively.
837856

838857
### Quorum Health
839858

‎scripts/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This folder is for storing any scripts that may be helpful for using stellar-cor
1919
- `-sr SURVEYRESULT`, `--surveyResult SURVEYRESULT` - output file for survey results
2020
- sub command `analyze` - analyze an existing graph
2121
- `-gmla GRAPHMLANALYZE`, `--graphmlAnalyze GRAPHMLANALYZE` - input graphml file
22-
- sub command `augment` - analyze an existing graph
22+
- sub command `augment` - augment an existing graph with information from stellarbeat.io. Currently, only Public Network graphs are supported.
2323
- `-gmli GRAPHMLINPUT` - input graphml file
2424
- `-gmlo GRAPHMLOUTPUT` - output graphml file
2525
- sub command `flatten` - Take a graphml file containing a bidrectional graph (possibly augmented with StellarBeat data) and flatten it into an undirected graph in JSON.

‎src/overlay/SurveyManager.h

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ namespace stellar
1717
{
1818
class Application;
1919

20+
/*
21+
SurveyManager orchestrates network surveys by initiating them and
22+
maintaining a backlog of peers to survey, sending and processing messages,
23+
throttling requests to prevent overload, aggregating results, and concluding the
24+
survey upon completion or expiry.
25+
*/
2026
class SurveyManager : public std::enable_shared_from_this<SurveyManager>,
2127
public NonMovableOrCopyable
2228
{

‎src/overlay/SurveyMessageLimiter.h

+8-5
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ namespace stellar
1414
class Application;
1515

1616
/*
17-
SurveyMessageLimiter filters out -
18-
1. Messages if the Surveyor-Surveyed key pair was already seen
19-
2. Messages with an expired ledger number
20-
3. Requests from any given Surveyor if more than mMaxRequestLimit requests were
21-
sent
17+
The SurveyMessageLimiter module manages survey message traffic through specific
18+
filtering policies:
19+
* It validates ledger numbers of survey messages, restricting messages to a
20+
predefined ledger range to maintain relevance.
21+
* It enforces a cap on the number of survey requests a node can handle (via
22+
`mMaxRequestLimit`)
23+
* It implements duplication checks for `Surveyor-Surveyed` pairs
2224
*/
25+
2326
class SurveyMessageLimiter
2427
{
2528
public:

0 commit comments

Comments
 (0)
Please sign in to comment.