Skip to content

Commit

Permalink
fix: allow fetching archive-url from env var (#4093)
Browse files Browse the repository at this point in the history
Follow-up to [0]. We've tested several times the creation and use of
archive urls via cli, but hadn't yet added logic to deploy new nodes
from archive URLs, as well. This change worked for adding a new-joining
node to a bespoke devnet post-upgrade.

[0] #4055

Co-authored-by: Conor Schaefer <[email protected]>
  • Loading branch information
conorsch and conorsch authored Mar 25, 2024
1 parent c59ed53 commit b228130
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bin/pd/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ pub enum TestnetCommand {
/// Optional URL of archived node state in .tar.gz format. The archive will be
/// downloaded and extracted locally, allowing the node to join a network at a block height
/// higher than 0.
#[clap(long)]
#[clap(long, env = "PENUMBRA_PD_ARCHIVE_URL")]
archive_url: Option<Url>,

/// Human-readable name to identify node on network
Expand Down
4 changes: 4 additions & 0 deletions deployments/charts/penumbra-node/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ spec:
value: "{{ .Values.cometbft.config.p2p.max_num_outbound_peers }}"
- name: PENUMBRA_COMETBFT_INDEXER
value: "{{ .Values.cometbft.config.indexer }}"
{{- if .Values.penumbra_bootstrap_archive_url }}
- name: PENUMBRA_PD_ARCHIVE_URL
value: "{{ .Values.penumbra_bootstrap_archive_url }}"
{{- end }}
{{- if .Values.postgres.credentialsSecretName }}
- name: COMETBFT_POSTGRES_CONNECTION_URL
valueFrom:
Expand Down
4 changes: 4 additions & 0 deletions deployments/charts/penumbra-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ image:
# Consider using "preview" for bleeding edge, but make sure container tags match.
penumbra_bootstrap_node_cometbft_rpc_url: "https://rpc.testnet.penumbra.zone"

# Whether to fetch a remote archive for loading historical state,
# e.g. post-upgrade.
penumbra_bootstrap_archive_url: ""

# Whether to preserve the LB service, in effect reserving the same IP
# for subsequent deploys. This costs money! But sure is convenient.
preserve_lb_svc: false
Expand Down

0 comments on commit b228130

Please sign in to comment.