Skip to content

Commit fa8c1b3

Browse files
committed
snp: solana network protocol
1 parent cae17c9 commit fa8c1b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+6432
-16
lines changed

book/api/metrics-generated.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,3 +1118,62 @@
11181118
| <span class="metrics-name">benchs_&#8203;transactions_&#8203;sent</span> | counter | Number of benchmark packets sent |
11191119

11201120
</div>
1121+
1122+
## Snp Tile
1123+
1124+
<div class="metrics">
1125+
1126+
| Metric | Type | Description |
1127+
|--------|------|-------------|
1128+
| <span class="metrics-name">snp_&#8203;all_&#8203;dest_&#8203;meta_&#8203;cnt</span> | counter | The number of destinations from which we have metadata (all connections) |
1129+
| <span class="metrics-name">snp_&#8203;all_&#8203;dest_&#8203;meta_&#8203;snp_&#8203;available_&#8203;cnt</span> | counter | The number of SNP-available destination (all connections) |
1130+
| <span class="metrics-name">snp_&#8203;all_&#8203;dest_&#8203;meta_&#8203;snp_&#8203;enabled_&#8203;cnt</span> | counter | The number of SNP-enabled destinations (all connections) |
1131+
| <span class="metrics-name">snp_&#8203;all_&#8203;conn_&#8203;cur_&#8203;total</span> | counter | The number of current created connections (all connections) |
1132+
| <span class="metrics-name">snp_&#8203;all_&#8203;conn_&#8203;cur_&#8203;established</span> | counter | The number of currently established connections (all connections) |
1133+
| <span class="metrics-name">snp_&#8203;all_&#8203;conn_&#8203;acc_&#8203;total</span> | counter | The number of accumulated created connections (all connections) |
1134+
| <span class="metrics-name">snp_&#8203;all_&#8203;conn_&#8203;acc_&#8203;established</span> | counter | The number of accumulated established connections (all connections) |
1135+
| <span class="metrics-name">snp_&#8203;all_&#8203;conn_&#8203;acc_&#8203;dropped</span> | counter | The number of accumulated dropped connections (all connections) |
1136+
| <span class="metrics-name">snp_&#8203;all_&#8203;conn_&#8203;acc_&#8203;dropped_&#8203;handshake</span> | counter | The number of accumulated dropped connections during handshake (all connections) |
1137+
| <span class="metrics-name">snp_&#8203;all_&#8203;conn_&#8203;acc_&#8203;dropped_&#8203;established</span> | counter | The number of accumulated dropped connections that had been established (all connections) |
1138+
| <span class="metrics-name">snp_&#8203;all_&#8203;conn_&#8203;acc_&#8203;dropped_&#8203;set_&#8203;identity</span> | counter | The number of accumulated dropped connections due to set identity (all connections) |
1139+
| <span class="metrics-name">snp_&#8203;all_&#8203;tx_&#8203;bytes_&#8203;via_&#8203;udp_&#8203;to_&#8203;snp_&#8203;avail_&#8203;cnt</span> | counter | The number of bytes sent via UDP to a SNP-available destination (all connections) |
1140+
| <span class="metrics-name">snp_&#8203;all_&#8203;tx_&#8203;pkts_&#8203;via_&#8203;udp_&#8203;to_&#8203;snp_&#8203;avail_&#8203;cnt</span> | counter | The number of packets sent via UDP to a SNP-available destination (all connections) |
1141+
| <span class="metrics-name">snp_&#8203;all_&#8203;tx_&#8203;bytes_&#8203;via_&#8203;udp_&#8203;cnt</span> | counter | The number of bytes sent via UDP (all connections) |
1142+
| <span class="metrics-name">snp_&#8203;all_&#8203;tx_&#8203;bytes_&#8203;via_&#8203;snp_&#8203;cnt</span> | counter | The number of bytes sent via SNP (all connections) |
1143+
| <span class="metrics-name">snp_&#8203;all_&#8203;tx_&#8203;pkts_&#8203;via_&#8203;udp_&#8203;cnt</span> | counter | The number of packets sent via UDP (all connections) |
1144+
| <span class="metrics-name">snp_&#8203;all_&#8203;tx_&#8203;pkts_&#8203;via_&#8203;snp_&#8203;cnt</span> | counter | The number of packets sent via SNP (all connections) |
1145+
| <span class="metrics-name">snp_&#8203;all_&#8203;tx_&#8203;pkts_&#8203;dropped_&#8203;no_&#8203;credits_&#8203;cnt</span> | counter | The number of packets that were not sent due to insufficient flow credits (all connections) |
1146+
| <span class="metrics-name">snp_&#8203;all_&#8203;rx_&#8203;bytes_&#8203;cnt</span> | counter | The number of bytes received (all connections) |
1147+
| <span class="metrics-name">snp_&#8203;all_&#8203;rx_&#8203;bytes_&#8203;via_&#8203;udp_&#8203;cnt</span> | counter | The number of bytes received via UDP (all connections) |
1148+
| <span class="metrics-name">snp_&#8203;all_&#8203;rx_&#8203;bytes_&#8203;via_&#8203;snp_&#8203;cnt</span> | counter | The number of bytes received via SNP (all connections) |
1149+
| <span class="metrics-name">snp_&#8203;all_&#8203;rx_&#8203;pkts_&#8203;cnt</span> | counter | The number of packets received (all connections) |
1150+
| <span class="metrics-name">snp_&#8203;all_&#8203;rx_&#8203;pkts_&#8203;via_&#8203;udp_&#8203;cnt</span> | counter | The number of packets received via UDP (all connections) |
1151+
| <span class="metrics-name">snp_&#8203;all_&#8203;rx_&#8203;pkts_&#8203;via_&#8203;snp_&#8203;cnt</span> | counter | The number of packets received via SNP (all connections) |
1152+
| <span class="metrics-name">snp_&#8203;all_&#8203;rx_&#8203;pkts_&#8203;dropped_&#8203;no_&#8203;credits_&#8203;cnt</span> | counter | The number of packets that were received but dropped due to insufficient flow credits (all connections) |
1153+
| <span class="metrics-name">snp_&#8203;enf_&#8203;dest_&#8203;meta_&#8203;cnt</span> | counter | The number of destinations from which we have metadata (SNP-enforced connections only) |
1154+
| <span class="metrics-name">snp_&#8203;enf_&#8203;dest_&#8203;meta_&#8203;snp_&#8203;available_&#8203;cnt</span> | counter | The number of SNP-available destination (SNP-enforced connections only) |
1155+
| <span class="metrics-name">snp_&#8203;enf_&#8203;dest_&#8203;meta_&#8203;snp_&#8203;enabled_&#8203;cnt</span> | counter | The number of SNP-enabled destinations (SNP-enforced connections only) |
1156+
| <span class="metrics-name">snp_&#8203;enf_&#8203;conn_&#8203;cur_&#8203;total</span> | counter | The number of current created connections (SNP-enforced connections only) |
1157+
| <span class="metrics-name">snp_&#8203;enf_&#8203;conn_&#8203;cur_&#8203;established</span> | counter | The number of currently established connections (SNP-enforced connections only) |
1158+
| <span class="metrics-name">snp_&#8203;enf_&#8203;conn_&#8203;acc_&#8203;total</span> | counter | The number of accumulated created connections (SNP-enforced connections only) |
1159+
| <span class="metrics-name">snp_&#8203;enf_&#8203;conn_&#8203;acc_&#8203;established</span> | counter | The number of accumulated established connections (SNP-enforced connections only) |
1160+
| <span class="metrics-name">snp_&#8203;enf_&#8203;conn_&#8203;acc_&#8203;dropped</span> | counter | The number of accumulated dropped connections (SNP-enforced connections only) |
1161+
| <span class="metrics-name">snp_&#8203;enf_&#8203;conn_&#8203;acc_&#8203;dropped_&#8203;handshake</span> | counter | The number of accumulated dropped connections during handshake (SNP-enforced connections only) |
1162+
| <span class="metrics-name">snp_&#8203;enf_&#8203;conn_&#8203;acc_&#8203;dropped_&#8203;established</span> | counter | The number of accumulated dropped connections that had been established (SNP-enforced connections only) |
1163+
| <span class="metrics-name">snp_&#8203;enf_&#8203;conn_&#8203;acc_&#8203;dropped_&#8203;set_&#8203;identity</span> | counter | The number of accumulated dropped connections due to set identity (SNP-enforced connections only) |
1164+
| <span class="metrics-name">snp_&#8203;enf_&#8203;tx_&#8203;bytes_&#8203;via_&#8203;udp_&#8203;to_&#8203;snp_&#8203;avail_&#8203;cnt</span> | counter | The number of bytes sent via UDP to a SNP-available destination (SNP-enforced connections only) |
1165+
| <span class="metrics-name">snp_&#8203;enf_&#8203;tx_&#8203;pkts_&#8203;via_&#8203;udp_&#8203;to_&#8203;snp_&#8203;avail_&#8203;cnt</span> | counter | The number of packets sent via UDP to a SNP-available destination (SNP-enforced connections only) |
1166+
| <span class="metrics-name">snp_&#8203;enf_&#8203;tx_&#8203;bytes_&#8203;via_&#8203;udp_&#8203;cnt</span> | counter | The number of bytes sent via UDP (SNP-enforced connections only) |
1167+
| <span class="metrics-name">snp_&#8203;enf_&#8203;tx_&#8203;bytes_&#8203;via_&#8203;snp_&#8203;cnt</span> | counter | The number of bytes sent via SNP (SNP-enforced connections only) |
1168+
| <span class="metrics-name">snp_&#8203;enf_&#8203;tx_&#8203;pkts_&#8203;via_&#8203;udp_&#8203;cnt</span> | counter | The number of packets sent via UDP (SNP-enforced connections only) |
1169+
| <span class="metrics-name">snp_&#8203;enf_&#8203;tx_&#8203;pkts_&#8203;via_&#8203;snp_&#8203;cnt</span> | counter | The number of packets sent via SNP (SNP-enforced connections only) |
1170+
| <span class="metrics-name">snp_&#8203;enf_&#8203;tx_&#8203;pkts_&#8203;dropped_&#8203;no_&#8203;credits_&#8203;cnt</span> | counter | The number of packets that were not sent due to insufficient flow credits (SNP-enforced connections only) |
1171+
| <span class="metrics-name">snp_&#8203;enf_&#8203;rx_&#8203;bytes_&#8203;cnt</span> | counter | The number of bytes received (SNP-enforced connections only) |
1172+
| <span class="metrics-name">snp_&#8203;enf_&#8203;rx_&#8203;bytes_&#8203;via_&#8203;udp_&#8203;cnt</span> | counter | The number of bytes received via UDP (SNP-enforced connections only) |
1173+
| <span class="metrics-name">snp_&#8203;enf_&#8203;rx_&#8203;bytes_&#8203;via_&#8203;snp_&#8203;cnt</span> | counter | The number of bytes received via SNP (SNP-enforced connections only) |
1174+
| <span class="metrics-name">snp_&#8203;enf_&#8203;rx_&#8203;pkts_&#8203;cnt</span> | counter | The number of packets received (SNP-enforced connections only) |
1175+
| <span class="metrics-name">snp_&#8203;enf_&#8203;rx_&#8203;pkts_&#8203;via_&#8203;udp_&#8203;cnt</span> | counter | The number of packets received via UDP (SNP-enforced connections only) |
1176+
| <span class="metrics-name">snp_&#8203;enf_&#8203;rx_&#8203;pkts_&#8203;via_&#8203;snp_&#8203;cnt</span> | counter | The number of packets received via SNP (SNP-enforced connections only) |
1177+
| <span class="metrics-name">snp_&#8203;enf_&#8203;rx_&#8203;pkts_&#8203;dropped_&#8203;no_&#8203;credits_&#8203;cnt</span> | counter | The number of packets that were received but dropped due to insufficient flow credits (SNP-enforced connections only) |
1178+
1179+
</div>

src/app/fdctl/Local.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ $(call add-objs,commands/run_agave,fd_fdctl)
3939
$(call make-lib,fdctl_version)
4040
$(call add-objs,version,fdctl_version)
4141

42-
$(call make-bin-rust,fdctl,main,fd_fdctl fdctl_shared fdctl_platform fd_discoh fd_disco agave_validator fd_flamenco fd_funk fd_quic fd_tls fd_reedsol fd_waltz fd_tango fd_ballet fd_util fdctl_version)
42+
$(call make-bin-rust,fdctl,main,fd_fdctl fdctl_shared fdctl_platform fd_discoh fd_disco agave_validator fd_flamenco fd_funk fd_quic fd_tls fd_snp fd_reedsol fd_waltz fd_tango fd_ballet fd_util fdctl_version)
4343

4444
check-agave-hash:
4545
@$(eval AGAVE_COMMIT_LS_TREE=$(shell git ls-tree HEAD | grep agave | awk '{print $$3}'))

src/app/fdctl/config/default.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,6 +1435,19 @@ dynamic_port_range = "8900-9000"
14351435
# slow clients but also increase memory usage.
14361436
send_buffer_size_mb = 5120
14371437

1438+
# SNP tile handles the Solana Network Protocol (SNP), both ingress
1439+
# and egress.
1440+
[tiles.snp]
1441+
# SNP is currently optional, and disabled by default.
1442+
enabled = false
1443+
1444+
# With SNP currently optional, the validator auto detects if
1445+
# peers have SNP enabled or not, and gracefully degrades to
1446+
# UDP for peers that don't support SNP.
1447+
# SNP can be enforced for a specific set of destinations.
1448+
# For these, SNP will be required and not downgraded to UDP.
1449+
enforced_destinations = []
1450+
14381451
# These options can be useful for development, but should not be used
14391452
# when connecting to a live cluster, as they may cause the validator to
14401453
# be unstable or have degraded performance or security. The program

src/app/fdctl/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ extern fd_topo_run_tile_t fd_tile_verify;
5050
extern fd_topo_run_tile_t fd_tile_dedup;
5151
extern fd_topo_run_tile_t fd_tile_pack;
5252
extern fd_topo_run_tile_t fd_tile_shred;
53+
extern fd_topo_run_tile_t fd_tile_snp;
5354
extern fd_topo_run_tile_t fd_tile_sign;
5455
extern fd_topo_run_tile_t fd_tile_metric;
5556
extern fd_topo_run_tile_t fd_tile_cswtch;
@@ -70,6 +71,7 @@ fd_topo_run_tile_t * TILES[] = {
7071
&fd_tile_dedup,
7172
&fd_tile_pack,
7273
&fd_tile_shred,
74+
&fd_tile_snp,
7375
&fd_tile_sign,
7476
&fd_tile_metric,
7577
&fd_tile_cswtch,

0 commit comments

Comments
 (0)