-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,16 +12,19 @@ spec: | |
chainID: penumbra-1 | ||
network: mainnet | ||
versions: | ||
# Genesis version | ||
- height: 0 | ||
image: ghcr.io/strangelove-ventures/heighliner/cometbft:v0.37.5 | ||
image: ghcr.io/strangelove-ventures/heighliner/cometbft:v0.37.9 # TODO UPDATE ME FOR STAGED UPGRADES | ||
containers: | ||
pd: ghcr.io/strangelove-ventures/heighliner/penumbra:v0.79.0-alpha.5 | ||
- height: 734700 | ||
image: ghcr.io/strangelove-ventures/heighliner/cometbft:v0.37.5 | ||
pd: ghcr.io/strangelove-ventures/heighliner/penumbra:v0.80.0 # TODO UPDATE ME FOR STAGED UPGRADES | ||
- height: 2 | ||
image: ghcr.io/strangelove-ventures/heighliner/cometbft:v0.37.9 | ||
containers: | ||
pd: ghcr.io/strangelove-ventures/heighliner/penumbra:v0.78.0 | ||
# Stage upgrades at future block heights by adding the version information here | ||
pd: ghcr.io/strangelove-ventures/heighliner/penumbra:v0.79.1 | ||
- height: 501975 | ||
image: ghcr.io/strangelove-ventures/heighliner/cometbft:v0.37.9 | ||
containers: | ||
pd: ghcr.io/strangelove-ventures/heighliner/penumbra:v0.80.0 | ||
# Also apply latest image for height 0 for upgrades since they reset the Comet DB. (L16-L19) | ||
config: | ||
maxInboundPeers: 20 | ||
maxOutboundPeers: 20 | ||
|
@@ -34,7 +37,12 @@ spec: | |
[fastsync] | ||
version = "v0" | ||
seeds: "tcp://[email protected]:26656,tcp://[email protected]:26656,tcp://[email protected]:26656,tcp://[email protected]:21956,tcp://[email protected]:26656,tcp://[email protected]:26656,tcp://[email protected]:32670" | ||
[mempool] | ||
max_tx_bytes = 30720 | ||
max_txs_bytes = 10485760 | ||
seeds: [email protected]:21956,[email protected]:21956 | ||
peers: [email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:21956 | ||
genesisScript: echo "No need for genesis" | ||
addrbookScript: echo "No need for address book" | ||
skipInvariants: false | ||
|
@@ -50,70 +58,61 @@ spec: | |
app.kubernetes.io/name: penumbra-mainnet-sentry | ||
topologyKey: kubernetes.io/hostname | ||
initContainers: | ||
# Initialize the cometbft tmp configuration for the correct version, used for config overlay | ||
- name: chain-init | ||
command: | ||
- sh | ||
- -c | ||
- | | ||
/bin/cometbft init --home /home/operator/.tmp | ||
set -eu | ||
if [ ! -d "$CHAIN_HOME/data" ]; then | ||
echo "Initializing chain..." | ||
cometbft init --home "$CHAIN_HOME" | ||
else | ||
echo "Skipping chain init; already initialized." | ||
fi | ||
echo "Initializing into tmp dir for downstream processing..." | ||
cometbft init --home "$HOME/.tmp" | ||
volumeMounts: | ||
- mountPath: /home/operator/.tmp | ||
name: vol-tmp | ||
env: | ||
- name: HOME | ||
value: /home/operator/cosmos | ||
|
||
# Initialize the cometbft and pd data from a snapshot if it is not already initialized | ||
- name: pd-init | ||
image: ghcr.io/strangelove-ventures/heighliner/penumbra:v0.79.0-alpha.5 | ||
|
||
# use a trusted RPC endpoint here | ||
command: | ||
- sh | ||
- -c | ||
- | | ||
HOME=/home/operator/cosmos pd network join --moniker strangelove http://64.23.244.20:26657 || echo "Already initialized" | ||
volumeMounts: | ||
- mountPath: /home/operator/cosmos | ||
name: vol-chain-home | ||
|
||
# If pd-init initialized the data, move the cometbft data to the operator expected location and | ||
# move the pd data also to the root of the vol-chain-home volume so that it is included in snapshots | ||
- name: pd-move | ||
image: busybox:latest | ||
image: ghcr.io/strangelove-ventures/infra-toolkit:v0.1.7 | ||
command: | ||
- sh | ||
- -c | ||
- | | ||
HOME=/home/operator/cosmos | ||
export HOME=/home/operator/cosmos | ||
NODE0=$HOME/.penumbra/network_data/node0 | ||
mv $NODE0/cometbft/* $HOME/ || echo "Already moved cometbft data" | ||
mv $NODE0/pd $HOME/ || echo "Already moved pd data" | ||
mkdir $HOME/pd || echo "Already created pd dir" | ||
rsync -Iar --remove-source-files $NODE0/cometbft/* $HOME && rm -rf $NODE0/cometbft || echo "Already moved cometbft data" | ||
rsync -Iar --remove-source-files $NODE0/pd $HOME && rm -rf $NODE0/pd || echo "Already moved pd data" | ||
rsync -Iar --remove-source-files $HOME/cometbft/* $HOME && rm -rf $HOME/cometbft || echo "Already moved polkachu snapshot data" | ||
volumeMounts: | ||
- mountPath: /home/operator/cosmos | ||
name: vol-chain-home | ||
containers: | ||
# pd sidecar container, communicates with cometbft "node" container | ||
- name: pd | ||
command: | ||
- sh | ||
- -c | ||
- | | ||
export HOME=/home/operator/cosmos | ||
pd migrate --home $HOME/pd --comet-home $HOME | ||
pd start --home $HOME/pd | ||
ports: | ||
# CometBFT connects to PD on port 26658 | ||
- containerPort: 26658 | ||
name: abci | ||
protocol: TCP | ||
- containerPort: 8080 | ||
name: grpc | ||
protocol: TCP | ||
volumeMounts: | ||
- mountPath: /home/operator/cosmos | ||
name: vol-chain-home | ||
ports: | ||
- name: abci | ||
containerPort: 26658 | ||
protocol: TCP | ||
- name: grpc | ||
containerPort: 8080 | ||
protocol: TCP | ||
|
||
probes: | ||
# Disable liveness and readiness probes for sentries | ||
strategy: None | ||
|
@@ -139,6 +138,6 @@ spec: | |
resources: | ||
requests: | ||
# Initial storage size for the PVC, needs to be enough for snapshot restore | ||
storage: 20Gi | ||
storage: 30Gi | ||
# Storage class for the PVC, will use default storage class if not specified | ||
storageClassName: topolvm-provisioner-thin-striped |