Skip to content

Add "--public-rpc-address" option #5937

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions src/app/fdctl/commands/run_agave.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ agave_boot( config_t const * config ) {
if( config->rpc.port ) ADDH( "--rpc-port", config->rpc.port );
if( config->frankendancer.rpc.full_api ) ADD1( "--full-rpc-api" );
if( config->frankendancer.rpc.private ) ADD1( "--private-rpc" );
if( strcmp( config->frankendancer.rpc.public_address, "" ) ) ADD( "--public-rpc-address", config->frankendancer.rpc.public_address );
if( strcmp( config->frankendancer.rpc.bind_address, "" ) ) ADD( "--rpc-bind-address", config->frankendancer.rpc.bind_address );
if( config->frankendancer.rpc.transaction_history ) ADD1( "--enable-rpc-transaction-history" );
if( config->rpc.extended_tx_metadata_storage ) ADD1( "--enable-extended-tx-metadata-storage" );
Expand Down
6 changes: 6 additions & 0 deletions src/app/fdctl/config/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@ dynamic_port_range = "8900-9000"
# with the `--rpc-bind-address` argument.
bind_address = ""

# RPC address for the validator to advertise publicly in gossip.
# Useful for validators running behind a load balancer or proxy.
# This option is passed to the Agave client
# with the `--public-rpc-address` argument.
public_address = ""

# Enable historical transaction info over JSON RPC, including the
# `getConfirmedBlock` API. This will cause an increase in disk
# usage and IOPS. This option is passed to the Agave client
Expand Down
2 changes: 2 additions & 0 deletions src/app/shared/fd_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define AFFINITY_SZ (256UL)
#define CONFIGURE_STAGE_COUNT ( 12UL)
#define FD_CONFIG_GOSSIP_ENTRYPOINTS_MAX ( 16UL)
#define FD_IP4_PORT_STR_MAX ( 22UL)

struct fd_configh {
char dynamic_port_range[ 32 ];
Expand Down Expand Up @@ -63,6 +64,7 @@ struct fd_configh {
int full_api;
int private;
char bind_address[ 16 ];
char public_address[ FD_IP4_PORT_STR_MAX ];
int transaction_history;
int only_known;
int pubsub_enable_block_subscription;
Expand Down
1 change: 1 addition & 0 deletions src/app/shared/fd_config_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fd_config_extract_podh( uchar * pod,
CFG_POP ( bool, rpc.full_api );
CFG_POP ( bool, rpc.private );
CFG_POP ( cstr, rpc.bind_address );
CFG_POP ( cstr, rpc.public_address );
CFG_POP ( bool, rpc.transaction_history );
CFG_POP ( bool, rpc.only_known );
CFG_POP ( bool, rpc.pubsub_enable_block_subscription );
Expand Down