Skip to content

Commit

Permalink
move default chains and relayers to defaults.yaml file (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol1696 committed Aug 8, 2023
1 parent 2333929 commit cafaf2c
Show file tree
Hide file tree
Showing 13 changed files with 285 additions and 276 deletions.
263 changes: 263 additions & 0 deletions charts/devnet/defaults.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
# API for interacting with the charts for devnet
# TODO: need a way to create state reaching jobs, those will run user bash scripts
# after the chain has been initialized, get the chain to a state and then complete
defaultChains:
osmosis:
image: ghcr.io/cosmology-tech/starship/osmosis:v15.1.2-wasmvm1.1.2
home: /root/.osmosisd
binary: osmosisd
prefix: osmo
denom: uosmo
coins: 100000000000000uosmo,100000000000000uion
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/osmosis-labs/osmosis
juno:
image: ghcr.io/cosmology-tech/starship/juno:v15.0.0
home: /root/.juno
binary: junod
prefix: juno
denom: ujuno
coins: 100000000000000ujuno
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/CosmosContracts/juno
wasmd:
image: anmol1696/wasmd:latest
home: /root/.wasmd
binary: wasmd
prefix: wasm
denom: stake
coins: 100000000000000ucosm,100000000000000stake
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/CosmWasm/wasmd
cosmos:
image: ghcr.io/cosmology-tech/starship/gaia:v9.1.1
home: /root/.gaia
binary: gaiad
prefix: cosmos
denom: uatom
coins: 100000000000000stake,100000000000000uatom
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/cosmos/gaia
simapp:
image: ghcr.io/cosmology-tech/starship/simapp:v0.47.3
home: /root/.simapp
binary: simd
prefix: cosmos
denom: stake
coins: 100000000000000stake
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/cosmos/cosmos-sdk/tree/main/simapp
persistencecore:
image: anmol1696/persistencecore:latest
home: /root/.persistenceCore
binary: persistenceCore
prefix: persistence
denom: uxprt
coins: 100000000000000uxprt
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/persistenceOne/persistenceCore
stride:
image: ghcr.io/cosmology-tech/starship/stride:v9.2.1
home: /root/.stride
binary: strided
prefix: stride
denom: ustrd
coins: 100000000000000ustrd
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/Stride-Labs/stride
injective:
image: ghcr.io/cosmology-tech/starship/injective:v1.11-1685225746
home: /root/.injectived
binary: injectived
prefix: inj
denom: inj
coins: 100000000000000inj
hdPath: m/44'/60'/0'/0/0
coinType: 60
repo: https://github.com/InjectiveLabs/injective-chain-releases
ics:
image: ghcr.io/cosmology-tech/starship/ics:v0.1.0
home: /root/.ics
binary: interchain-security-pd
prefix: cosmos
denom: uatom
coins: 100000000000000stake,100000000000000uatom
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/cosmos/interchain-security
cronos:
image: ghcr.io/cosmology-tech/starship/cronos:v1.0.4
home: /root/.cronos
binary: cronosd
prefix: crc
denom: basecro
coins: 100000000000000basecro
hdPath: m/44'/60'/0'/0/0
coinType: 60
repo: https://github.com/crypto-org-chain/cronos
cryptoorgchain:
image: ghcr.io/cosmology-tech/starship/cryptoorgchain:v4.1.2
home: /root/.cryptoorgchain
binary: chain-maind
prefix: cro
denom: basecro
coins: 100000000000000basecro
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/crypto-org-chain/chain-main
evmos:
image: ghcr.io/cosmology-tech/starship/evmos:v12.1.5
home: /root/.evmosd
binary: evmosd
prefix: evmos
denom: aevmos
coins: 100000000000000aevmos
hdPath: m/44'/60'/0'/0/0
coinType: 60
repo: https://github.com/evmos/evmos
regen:
image: ghcr.io/cosmology-tech/starship/regen:v5.0.0
home: /root/.regen
binary: regen
prefix: regen
denom: uregen
coins: 100000000000000uregen
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/regen-network/regen-ledger
quasar:
image: ghcr.io/cosmology-tech/starship/quasar:v0.1.1
home: /root/.quasarnode
binary: quasarnoded
prefix: quasar
denom: uqsr
coins: 100000000000000uqsr
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/quasar-finance/quasar-preview
quicksilver:
image: ghcr.io/cosmology-tech/starship/quicksilver:v0.6.6
home: /root/.quicksilverd
binary: quicksilverd
prefix: quick
denom: uqck
coins: 100000000000000uqck
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/ingenuity-build/quicksilver
sei:
image: ghcr.io/cosmology-tech/starship/sei:2.0.46beta
home: /root/.seid
binary: seid
prefix: sei
denom: usei
coins: 100000000000000usei
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/sei-protocol/sei-chain
sommelier:
image: ghcr.io/cosmology-tech/starship/sommelier:v6.0.0
home: /root/.sommelier
binary: sommelier
prefix: somm
denom: usomm
coins: 100000000000000usomm
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/PeggyJV/sommelier
stargaze:
image: ghcr.io/cosmology-tech/starship/stargaze:v10.0.1
home: /root/.starsd
binary: starsd
prefix: stars
denom: ustars
coins: 100000000000000ustars
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/public-awesome/stargaze
umee:
image: ghcr.io/cosmology-tech/starship/umee:v3.1.0
home: /root/.umee
binary: umeed
prefix: umee
denom: uumee
coins: 100000000000000uumee
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/umee-network/umee
eth:
prysmCtl:
image: gcr.io/prysmaticlabs/prysm/cmd/prysmctl
command: ["/app/cmd/prysmctl/prysmctl"]
args:
- testnet
- generate-genesis
- --num-validators=36
- --output-ssz=/ethereum/consensus/genesis.ssz
- --chain-config-file=/etc/config/config.yml
geth:
image: ethereum/client-go:v1.10.26
args:
- --nodiscover
- --http
- --http.api=eth,net,web3,debug
- --http.addr=0.0.0.0
- --http.vhosts=*
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/etc/secrets/jwt.hex
- --datadir=/ethereum/execution
- --allow-insecure-unlock
- --unlock=0x123463a4B065722E99115D6c222f267d9cABb524
- --password=/dev/null
- --syncmode=full
- --mine
- --miner.etherbase=0x123463a4b065722e99115d6c222f267d9cabb524
- --networkid=32382
beaconChain:
image: gcr.io/prysmaticlabs/prysm/beacon-chain:v4.0.7
command: ["/app/cmd/beacon-chain/beacon-chain"]
args:
- --datadir=/ethereum/consensus/beacon
- --min-sync-peers=0
- --genesis-state=/ethereum/consensus/genesis.ssz
- --bootstrap-node=
- --chain-config-file=/etc/config/config.yml
- --config-file=/etc/config/config.yml
- --chain-id=32382
- --rpc-host=0.0.0.0
- --contract-deployment-block=0
- --grpc-gateway-host=0.0.0.0
- --execution-endpoint=http://localhost:8551
- --accept-terms-of-use
- --jwt-secret=/etc/secrets/jwt.hex
- --contract-deployment-block=0
- --suggested-fee-recipient=0x123463a4B065722E99115D6c222f267d9cABb524
validator:
image: gcr.io/prysmaticlabs/prysm/validator:v4.0.7
command: ["/app/cmd/validator/validator"]
args:
- --accept-terms-of-use
- --beacon-rpc-provider=localhost:4000
- --datadir=/ethereum/consensus/validator
- --interop-num-validators=36
- --interop-start-index=0
- --force-clear-db
- --chain-config-file=/etc/config/config.yml
- --config-file=/etc/config/config.yml
- --suggested-fee-recipient=0x0C46c2cAFE097b4f7e1BB868B89e5697eE65f934
contracts: []

defaultRelayers:
ts-relayer:
image: ghcr.io/cosmology-tech/starship/ts-relayer:0.9.0
hermes:
image: ghcr.io/cosmology-tech/starship/hermes:1.5.1
go-relayer:
image: ghcr.io/polymerdao/relayer-ibcx:starship-integration
3 changes: 2 additions & 1 deletion charts/devnet/templates/chains/cosmos/genesis.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{- range $chain := .Values.chains }}
{{- if ne $chain.type "virtual" }}
{{ $dataExposer := dict "chain" $chain.name "port" ($.Values.exposer.ports.rest | quote | default "8081") }}
{{ $defaultChain := get $.Values.defaultChains $chain.type | default dict }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}
{{ $defaultChain := get $defaultFile.defaultChains $chain.type | default dict }}

# merge defaultChain values into the $chain dict
{{ $chain = merge $chain $defaultChain }}
Expand Down
3 changes: 2 additions & 1 deletion charts/devnet/templates/chains/cosmos/validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
{{- if ne $chain.type "virtual" }}
{{- if gt $chain.numValidators 1.0 }}
{{ $dataExposer := dict "chain" $chain.name "port" ($.Values.exposer.ports.rest | quote | default "8081") }}
{{ $defaultChain := get $.Values.defaultChains $chain.type | default dict }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}
{{ $defaultChain := get $defaultFile.defaultChains $chain.type | default dict }}
# merge defaultChain values into the $chain dict
{{ $chain = merge $chain $defaultChain }}

Expand Down
3 changes: 2 additions & 1 deletion charts/devnet/templates/chains/virtual/eth/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
{{- if eq $chain.type "virtual" }}
{{- if eq $chain.subtype "eth" }}

{{ $defaultChain := get $.Values.defaultChains $chain.subtype | default dict }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}
{{ $defaultChain := get $defaultFile.defaultChains $chain.subtype | default dict }}
{{ $chain = merge $chain $defaultChain }}


Expand Down
3 changes: 2 additions & 1 deletion charts/devnet/templates/explorer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ metadata:
name: explorer
data:
{{- range $chain := .Values.chains }}
{{ $defaultChain := get $.Values.defaultChains $chain.type | default dict }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}
{{ $defaultChain := get $defaultFile.defaultChains $chain.type | default dict }}
{{ $chain = merge $chain $defaultChain }}
{{ $host := "localhost" }}
{{- if not $.Values.explorer.localhost }}
Expand Down
3 changes: 2 additions & 1 deletion charts/devnet/templates/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ spec:
{{- end }}
---
{{- range $chain := .Values.chains }}
{{ $defaultChain := get $.Values.defaultChains $chain.type | default dict }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}
{{ $defaultChain := get $defaultFile.defaultChains $chain.type | default dict }}
{{ $chain = merge $chain $defaultChain }}
{{ $host := "localhost" }}
{{- if not $.Values.registry.localhost }}
Expand Down
3 changes: 2 additions & 1 deletion charts/devnet/templates/relayers/go-relayer/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ data:
{{- range $i, $chain := $relayer.chains }}
{{- range $fullchain := $.Values.chains }}
{{- if eq $fullchain.name $chain }}
{{ $defaultChain := get $.Values.defaultChains $fullchain.type }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}
{{ $defaultChain := get $defaultFile.defaultChains $fullchain.type | default dict }}
{{ $fullchain = merge $fullchain $defaultChain }}
{{ $fullchain.name }}.json: |-
{
Expand Down
3 changes: 2 additions & 1 deletion charts/devnet/templates/relayers/go-relayer/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{- range $relayer := .Values.relayers }}
{{- if eq $relayer.type "go-relayer" }}
{{ $defaultRelayer := get $.Values.defaultRelayers $relayer.type }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}
{{ $defaultRelayer := get $defaultFile.defaultRelayers $relayer.type | default dict }}
{{ $initParams := dict "chains" $relayer.chains "port" $.Values.exposer.ports.rest "context" $ }}

{{ $imagePullSecrets := $relayer.imagePullSecrets | default list }}
Expand Down
3 changes: 2 additions & 1 deletion charts/devnet/templates/relayers/hermes/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ data:
{{- range $i, $chain := $relayer.chains }}
{{- range $fullchain := $.Values.chains }}
{{- if eq $fullchain.name $chain }}
{{ $defaultChain := get $.Values.defaultChains $fullchain.type | default dict }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}
{{ $defaultChain := get $defaultFile.defaultChains $fullchain.type | default dict }}
{{ $fullchain = merge $fullchain $defaultChain }}
[[chains]]
id = "{{ $chain }}"
Expand Down
3 changes: 2 additions & 1 deletion charts/devnet/templates/relayers/hermes/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{- range $relayer := .Values.relayers }}
{{- if eq $relayer.type "hermes" }}
{{ $defaultRelayer := get $.Values.defaultRelayers $relayer.type }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}
{{ $defaultRelayer := get $defaultFile.defaultRelayers $relayer.type | default dict }}
{{ $initParams := dict "chains" $relayer.chains "port" $.Values.exposer.ports.rest "context" $ }}
---
apiVersion: apps/v1
Expand Down
3 changes: 2 additions & 1 deletion charts/devnet/templates/relayers/ts-relayer/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ data:
{{ $chain }}:
{{- range $fullchain := $.Values.chains }}
{{- if eq $fullchain.name $chain }}
{{ $defaultChain := get $.Values.defaultChains $fullchain.type | default dict }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}
{{ $defaultChain := get $defaultFile.defaultChains $fullchain.type | default dict }}
{{ $fullchain = merge $fullchain $defaultChain }}
chain_id: {{ $chain }}
# You can include multiple RPC endpoints and it will rotate through them if
Expand Down
3 changes: 2 additions & 1 deletion charts/devnet/templates/relayers/ts-relayer/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{- range $relayer := .Values.relayers }}
{{- if eq $relayer.type "ts-relayer" }}
{{ $defaultRelayer := get $.Values.defaultRelayers $relayer.type }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}
{{ $defaultRelayer := get $defaultFile.defaultRelayers $relayer.type | default dict }}
{{ $initParams := dict "chains" $relayer.chains "port" $.Values.exposer.ports.rest "context" $ }}
---
apiVersion: apps/v1
Expand Down
Loading

0 comments on commit cafaf2c

Please sign in to comment.