Skip to content

Commit

Permalink
change config var name when replacing
Browse files Browse the repository at this point in the history
  • Loading branch information
joroshiba committed Dec 16, 2024
1 parent 9a1a550 commit 80343de
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/sequencer/templates/configmaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ data:
{{- if not .Values.global.dev }}
ASTRIA_SEQUENCER_LISTEN_ADDR: "127.0.0.1:{{ .Values.ports.sequencerABCI }}"
{{- else }}
ASTRIA_SEQUENCER_LISTEN_ADDR: "{{ include "sequencer.abci_url" . }}"
ASTRIA_SEQUENCER_ABCI_LISTENER_URL: "{{ include "sequencer.abci_url" . }}"
{{- end }}
---
10 changes: 5 additions & 5 deletions crates/astria-sequencer/local.env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Socket address to listen for ABCI requests from cometbft.
# This address corresponds to the `--proxy_app "<ASTRIA_SEQUENCER_LISTEN_ADDR>"`,
# where `tcp://127.0.0.1:26658` is comebft's default.
# It can also be configured to use a unix address ie `unix:///socket/astria_abci.sock`
# Generally will see much higher peroformance with a unix socket.
ASTRIA_SEQUENCER_LISTEN_ADDR="tcp://127.0.0.1:26658"
# This address corresponds to the `--proxy_app "<ASTRIA_SEQUENCER_ABCI_LISTENER_URL>"`,
# where `tcp://127.0.0.1:26658` is comebft's default. Can also be configured to
# use a unix address ie `unix:///socket/astria_abci.sock`. Generally will see
# much higher performance with a unix socket.
ASTRIA_SEQUENCER_ABCI_LISTENER_URL="tcp://127.0.0.1:26658"

# Path to rocksdb
ASTRIA_SEQUENCER_DB_FILEPATH="/tmp/astria_db"
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-sequencer/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use serde::{
#[derive(Debug, Deserialize, Serialize)]
pub struct Config {
/// The endpoint on which Sequencer will listen for ABCI requests
pub listen_addr: String,
pub abci_listener_url: String,
/// The path to penumbra storage db.
pub db_filepath: PathBuf,
/// Log level: debug, info, warn, or error
Expand Down
8 changes: 4 additions & 4 deletions crates/astria-sequencer/src/sequencer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ impl Sequencer {
.wrap_err("failed to parse grpc_addr address")?;
let grpc_server_handle = start_grpc_server(&storage, mempool, grpc_addr, shutdown_rx);

info!(config.listen_addr, "starting abci server");
info!(config.abci_listener_url, "starting abci server");
let abci_server_handle = start_abci_server(
&storage,
app,
mempool_service,
&config.listen_addr,
&config.abci_listener_url,
server_exit_tx,
)
.wrap_err("failed to start ABCI server")?;
Expand Down Expand Up @@ -185,7 +185,7 @@ fn start_abci_server(
storage: &cnidarium::Storage,
app: App,
mempool_service: service::Mempool,
listen_addr: &String,
listen_url: &str,
server_exit_tx: oneshot::Sender<()>,
) -> Result<JoinHandle<()>, Report> {
let consensus_service = tower::ServiceBuilder::new()
Expand All @@ -208,7 +208,7 @@ fn start_abci_server(
.finish()
.ok_or_eyre("server builder didn't return server; are all fields set?")?;

let abci_url = Url::parse(listen_addr).wrap_err("failed to parse listen_addr")?;
let abci_url = Url::parse(listen_url).wrap_err("failed to parse listen_addr")?;
let validated_listen_addr = match abci_url.scheme() {
"unix" => match abci_url.to_file_path() {
Ok(_) => Ok(abci_url.path().to_string()),
Expand Down

0 comments on commit 80343de

Please sign in to comment.