diff --git a/.github/workflows/pr-tests.yaml b/.github/workflows/pr-tests.yaml index 957683de..cc29f82b 100644 --- a/.github/workflows/pr-tests.yaml +++ b/.github/workflows/pr-tests.yaml @@ -41,7 +41,7 @@ jobs: - name: Setup Test infra id: starship-action - uses: cosmology-tech/starship-action@0.2.11 + uses: cosmology-tech/starship-action@0.2.12 with: values: ${{ env.CONFIG_FILE }} port-forward: true diff --git a/charts/devnet/templates/chains/cosmos/genesis.yaml b/charts/devnet/templates/chains/cosmos/genesis.yaml index f2ad0f8d..88ac7322 100644 --- a/charts/devnet/templates/chains/cosmos/genesis.yaml +++ b/charts/devnet/templates/chains/cosmos/genesis.yaml @@ -191,7 +191,7 @@ spec: imagePullPolicy: Always env: - name: FAUCET_CONCURRENCY - value: "10" + value: "{{ $faucet.concurrency }}" - name: FAUCET_PORT value: "{{ $faucet.ports.rest }}" - name: FAUCET_MEMO diff --git a/charts/devnet/templates/chains/cosmos/validator.yaml b/charts/devnet/templates/chains/cosmos/validator.yaml index 26d6ad05..4d3a8695 100644 --- a/charts/devnet/templates/chains/cosmos/validator.yaml +++ b/charts/devnet/templates/chains/cosmos/validator.yaml @@ -132,7 +132,13 @@ spec: echo "Setup config files" bash -e /scripts/setup_config.sh - GENESIS_NODE_P2P=$(curl -s http://$GENESIS_HOST.$NAMESPACE.svc.cluster.local:$GENESIS_PORT/node_id | jq -r ".node_id")@$GENESIS_HOST.$NAMESPACE.svc.cluster.local:26656 + curl -s http://$GENESIS_HOST.$NAMESPACE.svc.cluster.local:$GENESIS_PORT/node_id + NODE_ID=$(curl -s http://$GENESIS_HOST.$NAMESPACE.svc.cluster.local:$GENESIS_PORT/node_id | jq -r ".node_id") + if [[ $NODE_ID == "" ]]; then + echo "Node ID is null, exiting early" + exit 1 + fi + GENESIS_NODE_P2P=$NODE_ID@$GENESIS_HOST.$NAMESPACE.svc.cluster.local:26656 echo "Node P2P: $GENESIS_NODE_P2P" sed -i "s/persistent_peers = \"\"/persistent_peers = \"$GENESIS_NODE_P2P\"/g" $CHAIN_DIR/config/config.toml diff --git a/charts/devnet/values.yaml b/charts/devnet/values.yaml index 226f2738..09c2796a 100644 --- a/charts/devnet/values.yaml +++ b/charts/devnet/values.yaml @@ -31,6 +31,7 @@ exposer: faucet: image: ghcr.io/cosmology-tech/starship/cosmjs-faucet:v0.31.0 + concurrency: 10 ports: rest: 8000 resources: diff --git a/docs/pages/config/chains.mdx b/docs/pages/config/chains.mdx index 48b22733..0e1adca7 100644 --- a/docs/pages/config/chains.mdx +++ b/docs/pages/config/chains.mdx @@ -154,11 +154,16 @@ chains: numValidators: 1 faucet: image: ghcr.io/cosmology-tech/starship/cosmjs-faucet:v0.30.1 + concurrency: 2 # default is 10 resources: cpu: "0.3" memory: "600M" ``` +Note `concurrency` in `faucet` is the number of concurrent requests the faucet can handle. +If you are running a chain with less resources, or want faster startup time, +then you can reduce the `concurrency` to a lower number. + ## `build` (optional) With the `build` directive in the chain, one can basically build chain binaries on the fly before starting the chain. When the directive is `enabled`, then the docker image is set to a [`runner` docker image](https://github.com/cosmology-tech/starship/blob/main/docker/starship/runner/Dockerfile) diff --git a/tests/configs/multi-validator.yaml b/tests/configs/multi-validator.yaml index 53a68b11..3fefd8a8 100644 --- a/tests/configs/multi-validator.yaml +++ b/tests/configs/multi-validator.yaml @@ -7,8 +7,13 @@ chains: rpc: 26653 exposer: 38083 resources: - cpu: "0.2" - memory: 400M + cpu: "0.3" + memory: 600M + faucet: + concurrency: 2 + resources: + cpu: "0.1" + memory: "300M" registry: enabled: true @@ -28,8 +33,3 @@ exposer: resources: cpu: "0.1" memory: 100M - -faucet: - resources: - cpu: "0.1" - memory: "300M" diff --git a/tests/configs/one-chain.yaml b/tests/configs/one-chain.yaml index a02c6a99..8e72900c 100644 --- a/tests/configs/one-chain.yaml +++ b/tests/configs/one-chain.yaml @@ -9,6 +9,8 @@ chains: resources: cpu: "0.5" memory: 500M + faucet: + concurrency: 2 registry: enabled: true