Skip to content

Commit

Permalink
Fix port for 1.17 (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
esemeniuc authored Mar 17, 2024
1 parent 433d45e commit 9e7207e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = [
]

[workspace.package]
version = "0.1.7"
version = "0.1.8"
description = "Fast path to receive shreds from Jito, forwarding to local consumers. See https://jito-labs.gitbook.io/mev/searcher-services/shredstream for details."
authors = ["Jito Team <[email protected]>"]
homepage = "https://jito.wtf/"
Expand Down
4 changes: 2 additions & 2 deletions proxy/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ struct CommonArgs {
src_bind_port: u16,

/// Static set of IP:Port where Shredstream proxy forwards shreds to, comma separated.
/// Eg. `127.0.0.1:8002,10.0.0.1:8002`.
// Note: store the original string so we can do hostname resolution when refreshing destinations
/// Eg. `127.0.0.1:8001,10.0.0.1:8001`.
// Note: store the original string, so we can do hostname resolution when refreshing destinations
#[arg(long, env, value_delimiter = ',', value_parser = resolve_hostname_port)]
dest_ip_ports: Vec<(SocketAddr, String)>,

Expand Down
6 changes: 3 additions & 3 deletions scripts/get_tvu_port.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LEDGER_DIR=${LEDGER_DIR:-"/solana/ledger"}
# fetch and print port using solana tooling
get_tvu_solana() {
echo "Getting shred listen port using solana cli with \$LEDGER_DIR=$LEDGER_DIR"
solana-validator --ledger "$LEDGER_DIR" contact-info | grep "TVU Forwards" | cut -d ':' -f 3
solana-validator --ledger "$LEDGER_DIR" contact-info | grep "TVU:" | cut -d ':' -f 3
}

# fetch port using curl. not guaranteed to be accurate as we assume it uses the default port allocation order
Expand All @@ -18,7 +18,7 @@ get_tvu_curl() {
GOSSIP_PORT=$(echo "$GOSSIP_SOCKETADDR" | cut -d ':' -f 2)

# offset by 2: https://github.com/jito-foundation/jito-solana/blob/efc5f1af5442fbd6645b2debcacd555c7c4b955b/gossip/src/cluster_info.rs#L2942
echo $(("$GOSSIP_PORT" + 2))
echo $(("$GOSSIP_PORT" + 1))
}

# check solana cli and ledger directory exists
Expand All @@ -39,4 +39,4 @@ if [[ ! -x "$(command -v curl)" ]]; then
exit 1
fi

get_tvu_curl
get_tvu_curl

0 comments on commit 9e7207e

Please sign in to comment.