Skip to content

Commit ac56857

Browse files
0x0ecejvarela-jump
authored andcommitted
snp: solana network protocol
1 parent 239f913 commit ac56857

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

+6437
-16
lines changed

book/api/metrics-generated.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,3 +1083,62 @@
10831083
| <span class="metrics-name">exec_&#8203;progcache_&#8203;invalidations</span> | counter | Number of program cache invalidations |
10841084

10851085
</div>
1086+
1087+
## Snp Tile
1088+
1089+
<div class="metrics">
1090+
1091+
| Metric | Type | Description |
1092+
|--------|------|-------------|
1093+
| <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) |
1094+
| <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) |
1095+
| <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) |
1096+
| <span class="metrics-name">snp_&#8203;all_&#8203;conn_&#8203;cur_&#8203;total</span> | counter | The number of current created connections (all connections) |
1097+
| <span class="metrics-name">snp_&#8203;all_&#8203;conn_&#8203;cur_&#8203;established</span> | counter | The number of currently established connections (all connections) |
1098+
| <span class="metrics-name">snp_&#8203;all_&#8203;conn_&#8203;acc_&#8203;total</span> | counter | The number of accumulated created connections (all connections) |
1099+
| <span class="metrics-name">snp_&#8203;all_&#8203;conn_&#8203;acc_&#8203;established</span> | counter | The number of accumulated established connections (all connections) |
1100+
| <span class="metrics-name">snp_&#8203;all_&#8203;conn_&#8203;acc_&#8203;dropped</span> | counter | The number of accumulated dropped connections (all connections) |
1101+
| <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) |
1102+
| <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) |
1103+
| <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) |
1104+
| <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) |
1105+
| <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) |
1106+
| <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) |
1107+
| <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) |
1108+
| <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) |
1109+
| <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) |
1110+
| <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) |
1111+
| <span class="metrics-name">snp_&#8203;all_&#8203;rx_&#8203;bytes_&#8203;cnt</span> | counter | The number of bytes received (all connections) |
1112+
| <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) |
1113+
| <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) |
1114+
| <span class="metrics-name">snp_&#8203;all_&#8203;rx_&#8203;pkts_&#8203;cnt</span> | counter | The number of packets received (all connections) |
1115+
| <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) |
1116+
| <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) |
1117+
| <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) |
1118+
| <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) |
1119+
| <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) |
1120+
| <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) |
1121+
| <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) |
1122+
| <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) |
1123+
| <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) |
1124+
| <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) |
1125+
| <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) |
1126+
| <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) |
1127+
| <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) |
1128+
| <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) |
1129+
| <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) |
1130+
| <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) |
1131+
| <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) |
1132+
| <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) |
1133+
| <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) |
1134+
| <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) |
1135+
| <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) |
1136+
| <span class="metrics-name">snp_&#8203;enf_&#8203;rx_&#8203;bytes_&#8203;cnt</span> | counter | The number of bytes received (SNP-enforced connections only) |
1137+
| <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) |
1138+
| <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) |
1139+
| <span class="metrics-name">snp_&#8203;enf_&#8203;rx_&#8203;pkts_&#8203;cnt</span> | counter | The number of packets received (SNP-enforced connections only) |
1140+
| <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) |
1141+
| <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) |
1142+
| <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) |
1143+
1144+
</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
@@ -1432,6 +1432,19 @@ dynamic_port_range = "8900-9000"
14321432
# slow clients but also increase memory usage.
14331433
send_buffer_size_mb = 5120
14341434

1435+
# SNP tile handles the Solana Network Protocol (SNP), both ingress
1436+
# and egress.
1437+
[tiles.snp]
1438+
# SNP is currently optional, and disabled by default.
1439+
enabled = false
1440+
1441+
# With SNP currently optional, the validator auto detects if
1442+
# peers have SNP enabled or not, and gracefully degrades to
1443+
# UDP for peers that don't support SNP.
1444+
# SNP can be enforced for a specific set of destinations.
1445+
# For these, SNP will be required and not downgraded to UDP.
1446+
enforced_destinations = []
1447+
14351448
# These options can be useful for development, but should not be used
14361449
# when connecting to a live cluster, as they may cause the validator to
14371450
# 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)