Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/AleoHQ/snarkOS
Browse files Browse the repository at this point in the history
  • Loading branch information
howardwu committed Sep 19, 2021
2 parents 3c215d1 + 22eb75b commit d6028d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
10 changes: 2 additions & 8 deletions network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ snarkOS downloads, verifies, and stores the history of valid blocks and transact
## Peer Discovery

When a node joins the network for the first time, it needs to populate a list of active peers in the network.
In order to bootstrap peer discovery, snarkOS includes a set of optional bootnodes which provides an initial set of peers.
In order to bootstrap peer discovery, snarkOS includes a set of optional specialised "beacon" nodes. Once connected, these provide an initial set of peers which includes the address of a sync provider. The sync provider will supply the node with an initial sync of the chainstate.
To allow users flexibility, snarkOS provides allows users to configure the initial set of nodes in the configuration file,
or as a input via a command-line flag.

Expand All @@ -31,13 +31,7 @@ This processes starts by asking peers for more connected nodes in the network wi
followed by attempts to establish a connection with each newly discovered peer.

Upon success, snarkOS will store the new peer address to allow it to connect directly with this peer in the future,
without needing to use bootnodes to startup in the future.

#### Bootnodes

Bootnodes operate like other full nodes and serve as a public access point for all peers in the network.
Bootnodes are run by community members and bolster the network
by enabling new nodes to connect and participate in the network effortlessly.
without needing to use beacons to startup in the future.

## Connecting to Peers

Expand Down
7 changes: 4 additions & 3 deletions rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ curl --data-binary '{"jsonrpc": "2.0", "id":"documentation", "method": "getconne
```

## getnetworkgraph
Returns the network graph crawled by this node (if it is a bootnode).
Returns the network graph crawled by this node (if it is a crawler).

### Arguments

Expand All @@ -219,7 +219,8 @@ None
| `edges[i].source` | SocketAddr | One side of the crawled connection |
| `edges[i].target` | SocketAddr | The other side of the crawled connection |
| `vertices[i].addr` | SocketAddr | The recorded address of the crawled node |
| `vertices[i].is_bootnode` | bool | Indicates whether the node is a bootnode |
| `vertices[i].is_beacon` | bool | Indicates whether the node is a beacon |
| `vertices[i].is_sync_provider` | bool | Indicates whether the node is a sync provider |
| `vertices[i].degree_centrality` | u16 | The node's degree centrality, aka its connection count |
| `vertices[i].eigenvector_centrality` | f64 | The node's eigenvector centrality, indicates its relative importance in the network |
| `vertices[i].fiedler_value` | f64 | The node's fiedler value, can be used to partition the network graph |
Expand All @@ -241,7 +242,7 @@ None

| Parameter | Type | Description |
|:----------------:|:-------------:|:---------------------------------------------:|
| `is_bootnode` | bool | Flag indicating if the node is a bootnode |
| `node_type` | NodeType | Flag indicating the node type |
| `is_miner` | bool | Flag indicating if the node is a miner |
| `is_syncing` | bool | Flag indicating if the node currently syncing |
| `launched` | timestamp | The timestamp of when the node was launched |
Expand Down

0 comments on commit d6028d8

Please sign in to comment.