diff --git a/crates/bin/pcli/src/command/debug.rs b/crates/bin/pcli/src/command/debug.rs index d3b8b7285d..676a85140f 100644 --- a/crates/bin/pcli/src/command/debug.rs +++ b/crates/bin/pcli/src/command/debug.rs @@ -39,7 +39,11 @@ impl DebugCmd { #[allow(dead_code)] #[derive(Debug, Serialize)] pub struct DebugInfo { + /// CometBFT version, if cometbft is found on PATH. + cometbft_version: Option, /// Tendermint version, if tendermint is found on PATH. + // Preserved for a while during Tendermint -> CometBFT, + // to aid in debugging. tendermint_version: Option, /// pd version, if pd is found on PATH. pd_version: Option, @@ -59,6 +63,7 @@ impl DebugInfo { pub fn new(data_dir: std::path::PathBuf) -> Self { let dd = Self::get_pcli_data_directory(data_dir); Self { + cometbft_version: Self::get_cometbft_version(), tendermint_version: Self::get_tendermint_version(), pd_version: Self::get_pd_version(), pcli_version: Self::get_pcli_version(), @@ -82,6 +87,20 @@ impl DebugInfo { Err(_) => None, } } + /// Attempt to retrieve version info for CometBFT by running + /// `cometbft version`. Depending on deployment, cometbft may not be on the PATH; + /// it may be in container context that `pcli` doesn't have access to. That's OK: + /// we'll just report `None` in that case. + fn get_cometbft_version() -> Option { + let cmd = Command::new("cometbft").args(["version"]).output(); + match cmd { + Ok(c) => match std::str::from_utf8(&c.stdout) { + Ok(o) => Some(o.trim_end().to_string()), + Err(_) => None, + }, + Err(_) => None, + } + } /// Return host info, including kernel and architecture. Should work /// equally well on Linux or macOS; Windows will return None. fn get_uname() -> Option { diff --git a/deployments/charts/penumbra-metrics/templates/ingress.yaml b/deployments/charts/penumbra-metrics/templates/ingress.yaml index b7b50deb73..af85065fc8 100644 --- a/deployments/charts/penumbra-metrics/templates/ingress.yaml +++ b/deployments/charts/penumbra-metrics/templates/ingress.yaml @@ -49,7 +49,7 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ $fullName }}-tendermint + name: {{ $fullName }}-cometbft port: # number: {{ $svcPort }} number: 26657 diff --git a/deployments/charts/penumbra-network/templates/deployment.yaml b/deployments/charts/penumbra-network/templates/deployment.yaml index 26345c22b9..cce17c62c4 100644 --- a/deployments/charts/penumbra-network/templates/deployment.yaml +++ b/deployments/charts/penumbra-network/templates/deployment.yaml @@ -128,7 +128,7 @@ spec: {{- toYaml $.Values.resources | nindent 12 }} volumeMounts: - name: {{ $val_name }}-config - subPath: node{{ $i }}/tendermint + subPath: node{{ $i }}/cometbft mountPath: /cometbft {{- with $.Values.nodeSelector }} nodeSelector: diff --git a/deployments/charts/penumbra-network/templates/job-generate.yaml b/deployments/charts/penumbra-network/templates/job-generate.yaml index ef9f763729..c65678f683 100644 --- a/deployments/charts/penumbra-network/templates/job-generate.yaml +++ b/deployments/charts/penumbra-network/templates/job-generate.yaml @@ -85,8 +85,8 @@ spec: # set ownership for pd user chown -R 1000:1000 /penumbra-config/{{ $val_name }} - # set ownership for tendermint configs to match tendermint container "tmuser" uid/gid - chown -R 100:1000 /penumbra-config/{{ $val_name }}/node{{ $i }}/tendermint + # set ownership for cometbft configs to match cometbft container "tmuser" uid/gid + chown -R 100:1000 /penumbra-config/{{ $val_name }}/node{{ $i }}/cometbft ls -lsR /penumbra-config {{ end }} diff --git a/deployments/charts/penumbra-network/values.yaml b/deployments/charts/penumbra-network/values.yaml index 92ccec211e..9583f8c4f6 100644 --- a/deployments/charts/penumbra-network/values.yaml +++ b/deployments/charts/penumbra-network/values.yaml @@ -117,15 +117,6 @@ cometbft: - start - --proxy_app=tcp://127.0.0.1:26658 -tendermint: - image: - repository: tendermint/tendermint - pullPolicy: IfNotPresent - # WARNING: other versions of tendermint will fail! - tag: "v0.34.23" - containerArgs: - - start - - --proxy_app=tcp://127.0.0.1:26658 # N.B. Only `IngressRoute`, a custom CRD specific to Traefik ingress controller # is supported. This is because a traditional Ingress object doesn't allow us # to force a backend scheme of h2c, which is required for pd's gRPC service. diff --git a/deployments/charts/penumbra-node/templates/deployment.yaml b/deployments/charts/penumbra-node/templates/deployment.yaml index 40838dd26a..3379ac6705 100644 --- a/deployments/charts/penumbra-node/templates/deployment.yaml +++ b/deployments/charts/penumbra-node/templates/deployment.yaml @@ -97,7 +97,7 @@ spec: {{- with $moniker }} --moniker {{ . | quote }} \ {{- end }} - {{ $.Values.penumbra_bootstrap_node_tendermint_rpc_url }} + {{ $.Values.penumbra_bootstrap_node_cometbft_rpc_url }} fi # set ownership for pd user @@ -106,14 +106,14 @@ spec: # apply external address. useful for a two-pass deploy, in which external ips # are created after first deploy. {{- with $external_address }} - sed -i -e 's/external_address.*/external_address = "{{ $external_address }}"/' /penumbra-config/testnet_data/node0/tendermint/config/config.toml + sed -i -e 's/external_address.*/external_address = "{{ $external_address }}"/' /penumbra-config/testnet_data/node0/cometbft/config/config.toml {{- end }} {{- with $moniker }} - sed -i -e 's/moniker.*/moniker = "{{ $moniker }}"/' /penumbra-config/testnet_data/node0/tendermint/config/config.toml + sed -i -e 's/moniker.*/moniker = "{{ $moniker }}"/' /penumbra-config/testnet_data/node0/cometbft/config/config.toml {{- end }} - # set ownership for tendermint configs to match tendermint container "tmuser" uid/gid - chown -R 100:1000 /penumbra-config/testnet_data/node0/tendermint + # set ownership for cometbft configs to match cometbft container "tmuser" uid/gid + chown -R 100:1000 /penumbra-config/testnet_data/node0/cometbft volumeMounts: - name: config @@ -181,7 +181,7 @@ spec: volumeMounts: - name: config mountPath: /cometbft - subPath: testnet_data/node0/tendermint + subPath: testnet_data/node0/cometbft {{- with $.Values.nodeSelector }} nodeSelector: {{- toYaml $ | nindent 8 }} diff --git a/deployments/charts/penumbra-node/templates/ingress.yaml b/deployments/charts/penumbra-node/templates/ingress.yaml index b7b50deb73..af85065fc8 100644 --- a/deployments/charts/penumbra-node/templates/ingress.yaml +++ b/deployments/charts/penumbra-node/templates/ingress.yaml @@ -49,7 +49,7 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ $fullName }}-tendermint + name: {{ $fullName }}-cometbft port: # number: {{ $svcPort }} number: 26657 diff --git a/deployments/charts/penumbra-node/templates/tests/test-peers.yaml b/deployments/charts/penumbra-node/templates/tests/test-peers.yaml index 0f79b84400..e356ff4c26 100644 --- a/deployments/charts/penumbra-node/templates/tests/test-peers.yaml +++ b/deployments/charts/penumbra-node/templates/tests/test-peers.yaml @@ -24,7 +24,7 @@ spec: n_peers="$(curl -sSf --connect-timeout 5 http://{{ $fn_name }}:26657/net_info | jq -r .result.n_peers)" # Ideally we'd check for `count` peers here, but peering will be limited to the number # of k8s nodes the Penumbra nodes are spread over, due to 1) k8s node IP being used for egress traffic; - # and 2) tendermint rejecting duplicate IPs by default. The real limit here is n_k8s_nodes, but we + # and 2) cometbft rejecting duplicate IPs by default. The real limit here is n_k8s_nodes, but we # don't know that number in the context of the tests. # if [[ "$n_peers" -lt 1 ]] ; then if [[ "$n_peers" -lt {{ $count }} ]] ; then diff --git a/deployments/charts/penumbra-node/values.yaml b/deployments/charts/penumbra-node/values.yaml index 4248cb95fb..dc098a5707 100644 --- a/deployments/charts/penumbra-node/values.yaml +++ b/deployments/charts/penumbra-node/values.yaml @@ -12,7 +12,7 @@ image: # Penumbra node from which to bootstrap connection. Defaults to testnet. # Consider using "preview" for bleeding edge, but make sure container tags match. -penumbra_bootstrap_node_tendermint_rpc_url: "https://rpc.testnet.penumbra.zone" +penumbra_bootstrap_node_cometbft_rpc_url: "https://rpc.testnet.penumbra.zone" # Whether to preserve the LB service, in effect reserving the same IP # for subsequent deploys. This costs money! But sure is convenient. diff --git a/deployments/compose/docker-compose.yml b/deployments/compose/docker-compose.yml index 96be98b8dc..06d67b7c0d 100644 --- a/deployments/compose/docker-compose.yml +++ b/deployments/compose/docker-compose.yml @@ -16,7 +16,7 @@ services: command: >- sh -c " - if ! test -e /pd/testnet_data/node0/tendermint/config/config.toml ; then + if ! test -e /pd/testnet_data/node0/cometbft/config/config.toml ; then >&2 printf 'ERROR: testnet config not found. Run `pd testnet join` on the host machine.' >&2 echo ' See docs for details: https://guide.penumbra.zone/main/pd/join-testnet.html' exit 1 @@ -32,7 +32,7 @@ services: - "8080:8080" # The CometBFT node - tendermint-node0: + cometbft-node0: image: "docker.io/cometbft/cometbft:v0.34.27" user: "${UID:-1000}" ports: @@ -40,7 +40,7 @@ services: - "26657:26657" volumes: - ~/.penumbra/testnet_data/node0/cometbft:/cometbft - entrypoint: tendermint + entrypoint: cometbft command: start --proxy_app=tcp://pd-node0:26658 environment: - ID=0 diff --git a/deployments/helmfile.d/penumbra-devnet.yaml b/deployments/helmfile.d/penumbra-devnet.yaml index 6d1cab8ee7..539d5f67e5 100644 --- a/deployments/helmfile.d/penumbra-devnet.yaml +++ b/deployments/helmfile.d/penumbra-devnet.yaml @@ -34,7 +34,7 @@ releases: - image: tag: main # Communicate intra-cluster to the private validator rpc address. - - penumbra_bootstrap_node_tendermint_rpc_url: "http://penumbra-devnet-val-0:26657" + - penumbra_bootstrap_node_cometbft_rpc_url: "http://penumbra-devnet-val-0:26657" - nodes: # We intentionally exclude external IPs in this declaration, but include them # in the external vars/ file, which is generated via `./scripts/get-lb-ips penumbra-devnet`. diff --git a/deployments/helmfile.d/penumbra-preview.yaml b/deployments/helmfile.d/penumbra-preview.yaml index 68ac777dc1..d384d54330 100644 --- a/deployments/helmfile.d/penumbra-preview.yaml +++ b/deployments/helmfile.d/penumbra-preview.yaml @@ -34,7 +34,7 @@ releases: - image: tag: main # Communicate intra-cluster to the private validator rpc address. - - penumbra_bootstrap_node_tendermint_rpc_url: "http://penumbra-preview-val-0:26657" + - penumbra_bootstrap_node_cometbft_rpc_url: "http://penumbra-preview-val-0:26657" - nodes: # We intentionally exclude external IPs in this declaration, but include them # in the external vars/ file, which is generated via `./scripts/get-lb-ips penumbra-devnet`. diff --git a/deployments/helmfile.d/penumbra-testnet.yaml b/deployments/helmfile.d/penumbra-testnet.yaml index 7058f694b7..afda8719cf 100644 --- a/deployments/helmfile.d/penumbra-testnet.yaml +++ b/deployments/helmfile.d/penumbra-testnet.yaml @@ -36,7 +36,7 @@ releases: - image: tag: latest # Communicate intra-cluster to the private validator rpc address. - - penumbra_bootstrap_node_tendermint_rpc_url: "http://penumbra-testnet-val-0:26657" + - penumbra_bootstrap_node_cometbft_rpc_url: "http://penumbra-testnet-val-0:26657" - nodes: # We intentionally exclude external IPs in this declaration, but include them # in the external vars/ file, which is generated via `./scripts/get-lb-ips penumbra-devnet`. diff --git a/deployments/networks/devnet/helm-values-for-penumbra-devnet.yml b/deployments/networks/devnet/helm-values-for-penumbra-devnet.yml deleted file mode 100644 index 575fb29b83..0000000000 --- a/deployments/networks/devnet/helm-values-for-penumbra-devnet.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -# Values file for devnet deploys. -ingress: - enabled: true - hosts: - # The Tendermint RPC port. - rpc: rpc.devnet.penumbra.zone - # The pd gRPC port. - grpc: grpc.devnet.penumbra.zone - # The Grafana HTTP web interface, for viewing dashboards. - grafana: grafana.devnet.penumbra.zone - -# Set lower SSD requests; default is 100Gi; we'll do a tenth that -# for bespoke sandbox environments like 'devnet'. -persistence: - size: 10Gi diff --git a/deployments/networks/testnet/helm-values-for-penumbra-testnet.yml b/deployments/networks/testnet/helm-values-for-penumbra-testnet.yml deleted file mode 100644 index 54ad6667ae..0000000000 --- a/deployments/networks/testnet/helm-values-for-penumbra-testnet.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -# Values file for "testnet.penumbra.zone" CI deploys. -# Mostly sets the FQDNs on the ingress. -ingress: - enabled: true - hosts: - # The Tendermint RPC port. - rpc: rpc.testnet.penumbra.zone - # The pd gRPC port. - grpc: grpc.testnet.penumbra.zone - # The Grafana HTTP web interface, for viewing dashboards. - grafana: grafana.testnet.penumbra.zone