Skip to content

Commit

Permalink
Merge pull request #232 from massalabs/feature/securenet
Browse files Browse the repository at this point in the history
Add SecurNet API doc
  • Loading branch information
damip authored Nov 15, 2023
2 parents cefeb12 + 58a51fe commit 30d6043
Show file tree
Hide file tree
Showing 9 changed files with 11,293 additions and 7,907 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ yarn-error.log*

# downlaoded files
external/client/buildnet/config.toml
external/client/securnet/config.toml
external/client/testnet/config.toml
external/node/buildnet/config.toml
external/node/securnet/bootstrap_whitelist.json
external/node/securnet/config.toml
external/node/testnet/bootstrap_whitelist.json
external/node/testnet/config.toml

Expand Down
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
153 changes: 86 additions & 67 deletions docs/build/api/jsonrpc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,76 +72,95 @@ curl --location --request POST 'https://test.massa.net/api/v2' \

```json
{
"jsonrpc": "2.0",
"result": {
"node_id": "N1VRyXjUaHeJd4Rmr3waVmpZDFzzH5ARRi3f5ye5BYgxBmxHC7X",
"node_ip": "141.94.218.103",
"version": "TEST.26.1",
"current_time": 1678095036319,
"current_cycle": 201,
"current_cycle_time": 1678094448000,
"next_cycle_time": 1678096496000,
"connected_nodes": {
"N13Ykon8Zo73PTKMruLViMMtE2rEG646JQ4sCcee2DnopmVM3P5": [
"51.75.60.228",
false
"jsonrpc": "2.0",
"result": {
"node_id": "N1VRyXjUaHeJd4Rmr3waVmpZDFzzH5ARRi3f5ye5BYgxBmxHC7X",
"node_ip": "141.94.218.103",
"version": "SECU.27.0",
"current_time": 1699881695772,
"current_cycle": 208,
"current_cycle_time": 1699879784000,
"next_cycle_time": 1699881832000,
"connected_nodes": {
"N13Ykon8Zo73PTKMruLViMMtE2rEG646JQ4sCcee2DnopmVM3P5": [
"::ffff:51.75.60.228",
false
],
"N1XxexKa3XNzvmakNmPawqFrE9Z2NFhfq1AhvV1Qx4zXq5p1Bp9": [
"::ffff:158.69.23.120",
false
],
"N1qxuqNnx9kyAMYxUfsYiv2gQd5viiBX126SzzexEdbbWd2vQKu": [
"::ffff:198.27.74.5",
false
],
"N12UbyLJDS7zimGWf3LTHe8hYY67RdLke1iDRZqJbQQLHQSKPW8j": [
"::ffff:149.202.86.103",
false
],
"N12rPDBmpnpnbECeAKDjbmeR19dYjAUwyLzsa8wmYJnkXLCNF28E": [
"::ffff:158.69.120.215",
false
],
"N12vxrYTQzS5TRzxLfFNYxn6PyEsphKWkdqx2mVfEuvJ9sPF43uq": [
"::ffff:149.202.89.125",
false
]
},
"last_slot": {
"period": 26743,
"thread": 15
},
"next_slot": {
"period": 26743,
"thread": 16
},
"consensus_stats": {
"start_timespan": 1699881635772,
"end_timespan": 1699881695772,
"final_block_count": 121,
"stale_block_count": 0,
"clique_count": 1
},
"pool_stats": [
0,
96
],
...
"N12v69D3R9DRQefDVMRuJv4nzkLTtvcoa42pWixZq3zJQPeSBGSh": [
"46.4.76.149",
true
]
},
"last_slot": {
"period": 25764,
"thread": 24
},
"next_slot": {
"period": 25764,
"thread": 25
},
"consensus_stats": {
"start_timespan": 1678094976319,
"end_timespan": 1678095036319,
"final_block_count": 120,
"stale_block_count": 0,
"clique_count": 1
},
"pool_stats": [
482673,
1322
],
"network_stats": {
"in_connection_count": 18,
"out_connection_count": 13,
"known_peer_count": 10033,
"banned_peer_count": 0,
"active_node_count": 31
},
"execution_stats": {
"time_window_start": 1678094976319,
"time_window_end": 1678095036319,
"final_block_count": 120,
"final_executed_operations_count": 183229,
"active_cursor": {
"period": 25764,
"thread": 20
"network_stats": {
"in_connection_count": 6,
"out_connection_count": 0,
"known_peer_count": 7,
"banned_peer_count": 0,
"active_node_count": 6
},
"execution_stats": {
"time_window_start": 1699881635772,
"time_window_end": 1699881695772,
"final_block_count": 121,
"final_executed_operations_count": 0,
"active_cursor": {
"period": 26743,
"thread": 11
},
"final_cursor": {
"period": 26741,
"thread": 14
}
},
"config": {
"genesis_timestamp": 1699453800000,
"end_timestamp": null,
"thread_count": 32,
"t0": 16000,
"delta_f0": 1088,
"operation_validity_periods": 10,
"periods_per_cycle": 128,
"block_reward": "1.02",
"roll_price": "100",
"max_block_size": 300000
}
},
"config": {
"genesis_timestamp": 1677682800000,
"end_timestamp": 1680292800000,
"thread_count": 32,
"t0": 16000,
"delta_f0": 1088,
"operation_validity_periods": 10,
"periods_per_cycle": 128,
"block_reward": "0.30",
"roll_price": "100",
"max_block_size": 1000000
}
},
"id": 1
"id": 1
}
```

Expand Down
7 changes: 1 addition & 6 deletions docs/build/api/providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To enhance redundancy and facilitate load balancing, consider using multiple pro
</tbody>
</table>
</TabItem>
<TabItem value="testnet" label="🧑‍🔬 TestNet">
<TabItem value="testnet" label="🧑‍🔬 SecurNet">
<table>
<thead>
<tr>
Expand All @@ -56,11 +56,6 @@ To enhance redundancy and facilitate load balancing, consider using multiple pro
<td><code>gRPC</code></td>
<td><code>grpc://test.massa.net:33037</code></td>
</tr>
<tr>
<td><a href="https://www.altailabs.tech/">Altai Labs</a></td>
<td><code>JsonRPC</code></td>
<td><code>https://massexplo.io/api/node</code></td>
</tr>
</tbody>
</table>
</TabItem>
Expand Down
8 changes: 4 additions & 4 deletions docs/node/all-configs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ EXTERNAL_BUILDNET_NODE_CONFIG_CONTENT
```

</TabItem>
<TabItem value="testnet" label="🧑‍🔬 TestNet">
<TabItem value="testnet" label="🧑‍🔬 SecurNet">

```toml
EXTERNAL_TESTNET_NODE_CONFIG_CONTENT
EXTERNAL_SECURNET_NODE_CONFIG_CONTENT

```

Expand All @@ -53,10 +53,10 @@ EXTERNAL_BUILDNET_CLIENT_CONFIG_CONTENT
```

</TabItem>
<TabItem value="testnet" label="🧑‍🔬 TestNet">
<TabItem value="securnet" label="🧑‍🔬 SecurNet">

```toml
EXTERNAL_TESTNET_CLIENT_CONFIG_CONTENT
EXTERNAL_SECURNET_CLIENT_CONFIG_CONTENT

```

Expand Down
1 change: 1 addition & 0 deletions external/client/securnet/config-files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://raw.githubusercontent.com/massalabs/massa/securnet/massa-client/base_config/config.toml
1 change: 1 addition & 0 deletions external/node/securnet/config-files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://raw.githubusercontent.com/massalabs/massa/securnet/massa-node/base_config/config.toml
10 changes: 10 additions & 0 deletions scripts/download-configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ insert_content "EXTERNAL_BUILDNET_NODE_CONFIG_CONTENT" "./external/node/buildnet
# Add client config file content to the documentation
insert_content "EXTERNAL_BUILDNET_CLIENT_CONFIG_CONTENT" "./external/client/buildnet/config.toml" "./docs/node/all-configs.mdx"

# Download node and client config files
download_files "./external/node/securnet/" "./external/node/securnet/config-files.txt"
download_files "./external/client/securnet/" "./external/client/securnet/config-files.txt"

# Add node config file content to the documentation
insert_content "EXTERNAL_SECURNET_NODE_CONFIG_CONTENT" "./external/node/securnet/config.toml" "./docs/node/all-configs.mdx"

# Add client config file content to the documentation
insert_content "EXTERNAL_SECURNET_CLIENT_CONFIG_CONTENT" "./external/client/securnet/config.toml" "./docs/node/all-configs.mdx"

# Download node and client config files
download_files "./external/node/testnet/" "./external/node/testnet/config-files.txt"
download_files "./external/client/testnet/" "./external/client/testnet/config-files.txt"
Expand Down
Loading

0 comments on commit 30d6043

Please sign in to comment.