Skip to content

Commit

Permalink
ci: tendermint -> cometbft renaming
Browse files Browse the repository at this point in the history
Follow-up to #3064. Refs #2263.
  • Loading branch information
conorsch committed Sep 21, 2023
1 parent f3f60ca commit ecadf3b
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 56 deletions.
19 changes: 19 additions & 0 deletions crates/bin/pcli/src/command/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
/// Tendermint version, if tendermint is found on PATH.
// Preserved for a while during Tendermint -> CometBFT,
// to aid in debugging.
tendermint_version: Option<String>,
/// pd version, if pd is found on PATH.
pd_version: Option<String>,
Expand All @@ -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(),
Expand All @@ -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<String> {
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<String> {
Expand Down
2 changes: 1 addition & 1 deletion deployments/charts/penumbra-metrics/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
9 changes: 0 additions & 9 deletions deployments/charts/penumbra-network/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions deployments/charts/penumbra-node/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion deployments/charts/penumbra-node/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deployments/charts/penumbra-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions deployments/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,15 +32,15 @@ services:
- "8080:8080"

# The CometBFT node
tendermint-node0:
cometbft-node0:
image: "docker.io/cometbft/cometbft:v0.34.27"
user: "${UID:-1000}"
ports:
- "26656:26656"
- "26657:26657"
volumes:
- ~/.penumbra/testnet_data/node0/cometbft:/cometbft
entrypoint: tendermint
entrypoint: cometbft
command: start --proxy_app=tcp://pd-node0:26658
environment:
- ID=0
Expand Down
2 changes: 1 addition & 1 deletion deployments/helmfile.d/penumbra-devnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion deployments/helmfile.d/penumbra-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion deployments/helmfile.d/penumbra-testnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
16 changes: 0 additions & 16 deletions deployments/networks/devnet/helm-values-for-penumbra-devnet.yml

This file was deleted.

12 changes: 0 additions & 12 deletions deployments/networks/testnet/helm-values-for-penumbra-testnet.yml

This file was deleted.

0 comments on commit ecadf3b

Please sign in to comment.