-
Notifications
You must be signed in to change notification settings - Fork 23
/
cosmos_v1_cosmosfullnode_penumbra.yaml
143 lines (135 loc) · 5.01 KB
/
cosmos_v1_cosmosfullnode_penumbra.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Example Penumbra Sentry configuration
# 3 sentries, 1 per worker node
apiVersion: cosmos.strange.love/v1
kind: CosmosFullNode
metadata:
name: penumbra-mainnet-sentry
spec:
#type: Sentry
type: FullNode
replicas: 3
chain:
chainID: penumbra-1
network: mainnet
versions:
- height: 0
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.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.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
overrides: |-
moniker = "strangelove"
fast_sync = true
[consensus]
timeout_commit = "5000ms"
[fastsync]
version = "v0"
[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
binary: cometbft
podTemplate:
affinity:
podAntiAffinity:
# One sentry per node
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/name: penumbra-mainnet-sentry
topologyKey: kubernetes.io/hostname
initContainers:
- name: chain-init
command:
- sh
- -c
- |
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
- name: pd-move
image: ghcr.io/strangelove-ventures/infra-toolkit:v0.1.7
command:
- sh
- -c
- |
export HOME=/home/operator/cosmos
NODE0=$HOME/.penumbra/network_data/node0
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:
- name: pd
command:
- sh
- -c
- |
export HOME=/home/operator/cosmos
pd migrate --home $HOME/pd --comet-home $HOME
pd start --home $HOME/pd
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
resources:
requests:
cpu: 4000m
memory: 10Gi
limits:
memory: 64Gi
selfHeal:
heightDriftMitigation:
threshold: 10
pvcAutoScale:
increaseQuantity: 10%
maxSize: 5Ti
usedSpacePercentage: 75
service:
# Create a kubernetes NodePort service for the P2P port on each sentry
maxP2PExternalAddresses: 3
p2pTemplate:
type: NodePort
volumeClaimTemplate:
resources:
requests:
# Initial storage size for the PVC, needs to be enough for snapshot restore
storage: 30Gi
# Storage class for the PVC, will use default storage class if not specified
storageClassName: topolvm-provisioner-thin-striped