Skip to content

Commit

Permalink
update some mor
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol1696 committed Jun 21, 2024
1 parent 0cf8b67 commit 0179e56
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 4 deletions.
33 changes: 33 additions & 0 deletions starship/charts/devnet/templates/chains/cosmos/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,39 @@ data:
{{ toJson $chain.genesis | nindent 4 }}
---
{{- end }}
{{- if hasKey $chain.ics.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: consumer-proposal-{{ $chain.hostname }}
data:
proposal.json: |-
{
"title": "Add {{ $chain.name }} consumer chain",
"description": "Add {{ $chain.name }} consumer chain with id {{ $chain.id }}",
"chain_id": "{{ $chain.id }}",
"initial_height": {
"revision_height": 0,
"revision_number": 1
},
"genesis_hash": "d86d756e10118e66e6805e9cc476949da2e750098fcc7634fd0cc77f57a0b2b0",
"binary_hash": "376cdbd3a222a3d5c730c9637454cd4dd925e2f9e2e0d0f3702fc922928583f1",
"spawn_time": "2023-02-28T20:40:00.000000Z",
"unbonding_period": 86400000000000,
"ccv_timeout_period": 259200000000000,
"transfer_timeout_period": 1800000000000,
"consumer_redistribution_fraction": "0.75",
"blocks_per_distribution_transmission": 1000,
"historical_entries": 10000,
"distribution_transmission_channel": "",
"top_N": 95,
"validators_power_cap": 0,
"validator_set_cap": 0,
"allowlist": [],
"denylist": []
}
---
{{- end }}
{{- end }}
{{- end }}
---
Expand Down
15 changes: 11 additions & 4 deletions starship/charts/devnet/templates/chains/cosmos/genesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ spec:
echo "Create node id json file"
NODE_ID=$($CHAIN_BIN tendermint show-node-id)
echo '{"node_id":"'$NODE_ID'"}' > $CHAIN_DIR/config/node_id.json
echo "Create consensus key json file"
$CHAIN_BIN tendermint show-validator > $CHAIN_DIR/config/consensus_key.json
cat $CHAIN_DIR/config/consensus_key.json
resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }}
volumeMounts:
- mountPath: {{ $chain.home }}
Expand Down Expand Up @@ -175,8 +179,9 @@ spec:
{{- if $chain.ics.enabled }}
{{ $waitParams := dict "chain" (list $chain.ics.provider) "port" $.Values.exposer.ports.rest "context" $ }}
{{- include "devnet.init.wait" $waitParams | indent 8 }}
{{ $icsChain := include "devnet.fullchain" (dict "name" $chain.ics.provider "file" $defaultFile "context" $) | fromJson }}
- name: init-ics
image: {{ get $chain.ics "image" | default $chain.image }}
image: {{ $icsChain.image }}
imagePullPolicy: {{ $.Values.images.imagePullPolicy }}
env:
{{- include "devnet.defaultEvnVars" $chain | indent 12 }}
Expand All @@ -191,16 +196,18 @@ spec:
- bash
- "-c"
- |
VAL_INDEX=${HOSTNAME##*-}
echo "Validator Index: $VAL_INDEX"
export
echo "Fetching priv keys from provider exposer"
curl -s http://{{ $chain.ics.provider }}-genesis.$NAMESPACE.svc.cluster.local:8081/priv_keys | jq > $CHAIN_DIR/config/provider_priv_validator_key.json
curl -s http://{{ $icsChain.hostname }}-genesis.$NAMESPACE.svc.cluster.local:8081/priv_keys | jq > $CHAIN_DIR/config/provider_priv_validator_key.json
cat $CHAIN_DIR/config/provider_priv_validator_key.json
echo "Replace provider priv validator key with provider keys"
mv $CHAIN_DIR/config/priv_validator_key.json $CHAIN_DIR/config/previous_priv_validator_key.json
mv $CHAIN_DIR/config/provider_priv_validator_key.json $CHAIN_DIR/config/priv_validator_key.json
echo "Create consumer addition proposal"
resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }}
volumeMounts:
- mountPath: {{ $chain.home }}
Expand Down

0 comments on commit 0179e56

Please sign in to comment.