Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 0 additions & 127 deletions .github/actions/setup-solo-stack/action.yml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/support/scripts/setup-solo-stack.sh
Comment thread
PavelSBorisov marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
#
# Deploys Solo Falcon one-shot on Kind. Expects repo root as cwd and Kind tooling
# already installed (e.g. via helm/kind-action). Writes deployment_name and
# namespace to GITHUB_OUTPUT when set (GitHub Actions).

set -euo pipefail

NETWORK_TAG="${NETWORK_TAG:-v0.72.0}"
MIRROR_TAG="${MIRROR_TAG:-v0.151.0}"
RELAY_TAG="${RELAY_TAG:-0.76.2}"
SOLO_VERSION="${SOLO_VERSION:-0.72.0}"
EXTERNAL_ADDRESS="${EXTERNAL_ADDRESS:-127.0.0.1}"

mkdir -p .github
Comment thread
PavelSBorisov marked this conversation as resolved.
Outdated

cat >.github/falcon.yml <<EOF
network:
--release-tag: "${NETWORK_TAG}"
setup:
--release-tag: "${NETWORK_TAG}"
consensusNode:
--force-port-forward: true
--node-aliases: "node1"
mirrorNode:
--enable-ingress: true
--pinger: true
--mirror-node-version: "${MIRROR_TAG}"
--values-file: .github/mirror-node-values.yaml
--force-port-forward: true
relayNode:
--relay-release: "${RELAY_TAG}"
--node-aliases: "node1"
--force-port-forward: true
EOF

NS_BASE="sc-${GITHUB_RUN_ID:-local}-${GITHUB_RUN_ATTEMPT:-1}-${GITHUB_JOB:-solo}"
SOLO_NS="$(echo "${NS_BASE}" | tr '[:upper:]_' '[:lower:]-' | cut -c1-63)"
SOLO_DEPLOYMENT="${SOLO_NS}"

if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
{
echo "deployment_name=${SOLO_DEPLOYMENT}"
echo "namespace=${SOLO_NS}"
} >>"${GITHUB_OUTPUT}"
fi

npx "@hashgraph/solo@${SOLO_VERSION}" one-shot falcon deploy \
--values-file .github/falcon.yml \
--dev \
--deploy-explorer=false \
--deployment "${SOLO_DEPLOYMENT}" \
--namespace "${SOLO_NS}" \
--external-address "${EXTERNAL_ADDRESS}"

echo "Waiting for mirror node REST API..."
for i in $(seq 1 30); do
response=$(curl -sf http://localhost:38081/api/v1/accounts 2>/dev/null || true)
if echo "${response}" | grep -q '"accounts"'; then
echo "Mirror REST API is up."
exit 0
fi
echo "Attempt ${i}/30: not ready, retrying in 10s..."
sleep 10
done

echo "ERROR: Mirror REST API did not become available."
exit 1
28 changes: 28 additions & 0 deletions .github/workflows/support/scripts/solo-kubectl-port-forward.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
#
# Starts background kubectl port-forward processes so localhost matches the
# expectations of `@hashgraph/sdk` local-node consumers (127.0.0.1:50211 →
# consensus via HAProxy) and the mirror Web3 endpoint (127.0.0.1:8545 →
# svc/mirror-1-web3), consistent with hiero-sdk-js solo-lib.js.
#
# Required environment:
# SOLO_NAMESPACE — Kubernetes namespace from the Solo deploy step
# (e.g. steps.<id>.outputs.namespace).

set -euo pipefail

NS="${SOLO_NAMESPACE:?SOLO_NAMESPACE is required}"

kubectl get svc haproxy-node1-svc -n "${NS}"
kubectl port-forward -n "${NS}" svc/haproxy-node1-svc 50211:50211 &
echo "Forwarding svc/haproxy-node1-svc -> localhost:50211 (consensus gRPC for local-node)"

if kubectl get svc mirror-1-web3 -n "${NS}" &>/dev/null; then
kubectl port-forward -n "${NS}" svc/mirror-1-web3 8545:80 &
echo "Forwarding svc/mirror-1-web3 -> localhost:8545 (mirror Web3)"
else
echo "::warning::svc/mirror-1-web3 not found in ${NS}; skipping 8545 forward"
fi

sleep 3
70 changes: 51 additions & 19 deletions .github/workflows/test.yml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should update to node 24

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node 24 seems to break some things, I tried a direct bump but got consistent failures in CI - https://github.com/hashgraph/hedera-forking/actions/runs/25926032257/job/76504944946

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '20'
node-version: 22

- name: Install Foundry
uses: step-security/foundry-toolchain@01e2d127ea061e2ce8fa34340de71ca8518f093e # v1.2.1
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '20'
node-version: 22

- name: Install Foundry
uses: step-security/foundry-toolchain@01e2d127ea061e2ce8fa34340de71ca8518f093e # v1.2.1
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '20'
node-version: 22

- name: Install Foundry
uses: step-security/foundry-toolchain@01e2d127ea061e2ce8fa34340de71ca8518f093e # v1.2.1
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '20'
node-version: 22

- name: Install Foundry
uses: step-security/foundry-toolchain@01e2d127ea061e2ce8fa34340de71ca8518f093e # v1.2.1
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '20'
node-version: 22

- name: Install Foundry
uses: step-security/foundry-toolchain@01e2d127ea061e2ce8fa34340de71ca8518f093e # v1.2.1
Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '20'
node-version: 22

- name: Install Dependencies
run: npm ci
Expand Down Expand Up @@ -359,7 +359,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '20'
node-version: 22

- name: Install Foundry
uses: step-security/foundry-toolchain@01e2d127ea061e2ce8fa34340de71ca8518f093e # v1.2.1
Expand Down Expand Up @@ -397,7 +397,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
node-version: 22

- name: Install Foundry
uses: step-security/foundry-toolchain@01e2d127ea061e2ce8fa34340de71ca8518f093e # v1.2.1
Expand All @@ -410,11 +410,27 @@ jobs:
- name: Install Dependencies
run: npm ci

- name: Set up Solo stack
id: solo_stack
uses: ./.github/actions/setup-solo-stack
- name: Setup Kind
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
with:
solo-version: ${{ env.SOLO_VERSION }}
install_only: true
node_image: kindest/node:v1.32.5@sha256:e3b2327e3a5ab8c76f5ece68936e4cafaa82edf58486b769727ab0b3b97a5b0d
version: v0.29.0
kubectl_version: v1.32.5
verbosity: 3
wait: 120s

- name: Deploy local Hiero network (Solo / Kind)
id: solo_stack
run: bash .github/workflows/support/scripts/setup-solo-stack.sh
env:
SOLO_VERSION: ${{ env.SOLO_VERSION }}
timeout-minutes: 15

- name: Solo kubectl port forwards (50211 / 8545)
run: bash .github/workflows/support/scripts/solo-kubectl-port-forward.sh
env:
SOLO_NAMESPACE: ${{ steps.solo_stack.outputs.namespace }}

- name: Run Forge build on Foundry HTS example
run: forge build
Expand All @@ -439,7 +455,7 @@ jobs:
test $TOKEN_CODE != "0x"
working-directory: examples/foundry-hts

- name: Destroy Solo stack
- name: One-shot Falcon destroy
if: always()
run: |
npx @hashgraph/solo@${{ env.SOLO_VERSION }} one-shot falcon destroy \
Expand Down Expand Up @@ -472,7 +488,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '20'
node-version: 22

- name: Install Foundry
uses: step-security/foundry-toolchain@01e2d127ea061e2ce8fa34340de71ca8518f093e # v1.2.1
Expand All @@ -485,16 +501,32 @@ jobs:
- name: Install Dependencies
run: npm ci

- name: Set up Solo stack
id: solo_stack
uses: ./.github/actions/setup-solo-stack
- name: Setup Kind
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
with:
solo-version: ${{ env.SOLO_VERSION }}
install_only: true
node_image: kindest/node:v1.32.5@sha256:e3b2327e3a5ab8c76f5ece68936e4cafaa82edf58486b769727ab0b3b97a5b0d
version: v0.29.0
kubectl_version: v1.32.5
verbosity: 3
wait: 120s

- name: Deploy local Hiero network (Solo / Kind)
id: solo_stack
run: bash .github/workflows/support/scripts/setup-solo-stack.sh
env:
SOLO_VERSION: ${{ env.SOLO_VERSION }}
timeout-minutes: 15

- name: Solo kubectl port forwards (50211 / 8545)
run: bash .github/workflows/support/scripts/solo-kubectl-port-forward.sh
env:
SOLO_NAMESPACE: ${{ steps.solo_stack.outputs.namespace }}

- name: Run e2e Validation Tests
run: npm run test:e2e

- name: Destroy Solo stack
- name: One-shot Falcon destroy
if: always()
run: |
npx @hashgraph/solo@${{ env.SOLO_VERSION }} one-shot falcon destroy \
Expand Down
Loading