Skip to content

Solana. Increased p2p port range and modified samples to support new … #168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/solana/lib/assets/node/node-base-rpc-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ __ENTRY_POINTS__ \
--full-rpc-api \
--rpc-port 8899 \
--gossip-port 8800 \
--dynamic-port-range 8800-8814 \
--dynamic-port-range 8800-8816 \
--private-rpc \
--rpc-bind-address $EC2_INTERNAL_IP \
--wal-recovery-mode skip_any_corrupted_record \
Expand Down
2 changes: 1 addition & 1 deletion lib/solana/lib/assets/node/node-extended-rpc-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ __ENTRY_POINTS__ \
--full-rpc-api \
--rpc-port 8899 \
--gossip-port 8800 \
--dynamic-port-range 8800-8814 \
--dynamic-port-range 8800-8816 \
--private-rpc \
--rpc-bind-address $EC2_INTERNAL_IP \
--wal-recovery-mode skip_any_corrupted_record \
Expand Down
4 changes: 2 additions & 2 deletions lib/solana/lib/constructs/node-security-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export interface NodeSecurityGroupConstructProps {
});

// Public ports
sg.addIngressRule(ec2.Peer.anyIpv4(), ec2.Port.tcpRange(8800, 8814), "allow all TCP P2P protocols (gossip, turbine, repair, etc)");
sg.addIngressRule(ec2.Peer.anyIpv4(), ec2.Port.udpRange(8800, 8814), "allow all UDP P2P protocols (gossip, turbine, repair, etc)");
sg.addIngressRule(ec2.Peer.anyIpv4(), ec2.Port.tcpRange(8800, 8816), "allow all TCP P2P protocols (gossip, turbine, repair, etc)");
sg.addIngressRule(ec2.Peer.anyIpv4(), ec2.Port.udpRange(8800, 8816), "allow all UDP P2P protocols (gossip, turbine, repair, etc)");

// Private ports restricted only to the VPC IP range
sg.addIngressRule(ec2.Peer.ipv4(vpc.vpcCidrBlock), ec2.Port.tcp(8899), "allow internal RPC port HTTP (user access needs to be restricted. Allowed access only from internal IPs)");
Expand Down
18 changes: 9 additions & 9 deletions lib/solana/sample-configs/.env-sample-extendedrpc-x86
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ SOLANA_CLUSTER="mainnet-beta" # All options: "mainnet-beta", "t
SOLANA_NODE_CONFIGURATION="extendedrpc" # All options: "baserpc", "extendedrpc"
SOLANA_VERSION="2.0.19" # Latest required version of Agave above 2.x. Check for latest Mainnet version https://github.com/anza-xyz/agave/releases

SOLANA_INSTANCE_TYPE="i7ie.18xlarge"
SOLANA_INSTANCE_TYPE="r7a.16xlarge"
SOLANA_CPU_TYPE="x86_64" # All options: "x86_64", "ARM_64". IMPORTANT: Make sure the CPU type matches the instance type used
# Data volume configuration
SOLANA_DATA_VOL_TYPE="instance-store" # Other options: "io1" | "io2" | "gp3" | "instance-store" . IMPORTANT: Use "instance-store" option only with instance types that support that feature, like popular for node im4gn, d3, i3en, and i4i instance families
#SOLANA_DATA_VOL_SIZE="2000" # Current required data size to keep both smapshot archive and unarchived version of it
#SOLANA_DATA_VOL_IOPS="7000" # Max IOPS for EBS volumes (not applicable for "instance-store")
#SOLANA_DATA_VOL_THROUGHPUT="700" # Max throughput for EBS gp3 volumes (not applicable for "io1" | "io2" | "instance-store")
SOLANA_DATA_VOL_TYPE="io2" # Other options: "io1" | "io2" | "gp3" | "instance-store" . IMPORTANT: Use "instance-store" option only with instance types that support that feature, like popular for node im4gn, d3, i3en, and i4i instance families
SOLANA_DATA_VOL_SIZE="2000" # Current required data size to keep both smapshot archive and unarchived version of it
SOLANA_DATA_VOL_IOPS="10000" # Max IOPS for EBS volumes (not applicable for "instance-store")
SOLANA_DATA_VOL_THROUGHPUT="700" # Max throughput for EBS gp3 volumes (not applicable for "io1" | "io2" | "instance-store")
# Accounts volume configuration
SOLANA_ACCOUNTS_VOL_TYPE="instance-store" # Other options: "io1" | "io2" | "gp3" | "instance-store" . IMPORTANT: Use "instance-store" option only with instance types that support that feature, like popular for node im4gn, d3, i3en, and i4i instance families
#SOLANA_ACCOUNTS_VOL_SIZE="400" # Current required data size to keep both smapshot archive and unarchived version of it
#SOLANA_ACCOUNTS_VOL_IOPS="7000" # Max IOPS for EBS volumes (not applicable for "instance-store")
#SOLANA_ACCOUNTS_VOL_THROUGHPUT="700" # Max throughput for EBS gp3 volumes (not applicable for "io1" | "io2" | "instance-store")
SOLANA_ACCOUNTS_VOL_TYPE="io2" # Other options: "io1" | "io2" | "gp3" | "instance-store" . IMPORTANT: Use "instance-store" option only with instance types that support that feature, like popular for node im4gn, d3, i3en, and i4i instance families
SOLANA_ACCOUNTS_VOL_SIZE="400" # Current required data size to keep both smapshot archive and unarchived version of it
SOLANA_ACCOUNTS_VOL_IOPS="10000" # Max IOPS for EBS volumes (not applicable for "instance-store")
SOLANA_ACCOUNTS_VOL_THROUGHPUT="700" # Max throughput for EBS gp3 volumes (not applicable for "io1" | "io2" | "instance-store")
# Secrets configuration
SOLANA_NODE_IDENTITY_SECRET_ARN="none" # Optional. The ARN of the secret in AWS Secrets Manager with the node identity key pair. In case you want to provision a node but keep the old identity.
SOLANA_VOTE_ACCOUNT_SECRET_ARN="none" # Optional for consensus node type. ARN of the secret in AWS Secrets Manager with the Vote Account's key pair.
Expand Down
4 changes: 2 additions & 2 deletions lib/solana/test/ha-nodes-stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ describe("SolanaHANodesStack", () => {
"Description": "allow all TCP P2P protocols (gossip, turbine, repair, etc)",
"FromPort": 8800,
"IpProtocol": "tcp",
"ToPort": 8814
"ToPort": 8816
},
{
"CidrIp": "0.0.0.0/0",
"Description": "allow all UDP P2P protocols (gossip, turbine, repair, etc)",
"FromPort": 8800,
"IpProtocol": "udp",
"ToPort": 8814
"ToPort": 8816
},
{
"CidrIp": "1.2.3.4/5",
Expand Down
4 changes: 2 additions & 2 deletions lib/solana/test/single-node-stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ describe("SolanaSingleNodeStack", () => {
"Description": "allow all TCP P2P protocols (gossip, turbine, repair, etc)",
"FromPort": 8800,
"IpProtocol": "tcp",
"ToPort": 8814
"ToPort": 8816
},
{
"CidrIp": "0.0.0.0/0",
"Description": "allow all UDP P2P protocols (gossip, turbine, repair, etc)",
"FromPort": 8800,
"IpProtocol": "udp",
"ToPort": 8814
"ToPort": 8816
},
{
"CidrIp": "1.2.3.4/5",
Expand Down
Loading