chore: migrate hedera local node to solo (#1668)#1675
Conversation
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Test Results133 tests ±0 131 ✅ ±0 8m 40s ⏱️ + 4m 54s Results for commit ee3e58e. ± Comparison against base commit affbd3f. This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
…description (#1668) Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
#1668) Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
#1668) Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
There was a problem hiding this comment.
The reason why we need port 50211 is the fact that we ignore our own configuration from local.env. If you use correct ports in Helper.buildSdkClient like I did here:
29270d0 (just use the values from .env, not hardcoded...)
it will work:
https://github.com/hashgraph/hedera-smart-contracts/actions/runs/25550325681?pr=1682
without the need to run port-forwarding at all. I think we should do this, because:
a) pipelines will be cleaner then,
b) we will use the values from .env, which is something I think we just should do. We build sdk client with: client.fromName(process.env.NETWORK_NAME) instead of usin client.forNetwork({process.env.NETWORK_URL: process.env.NETWORK_NODE}) and we ignore mirrornodeUrl entirely.
There was a problem hiding this comment.
I think alignment of the environment variables is a good idea. I think we should discuss which way we want to go (my personal opinion - let's do both custom network and predefined networks based on env combination. I'm not sure if it should be part of this PR. I think the action plan could be:
- Leave this PR as it is (with port forwarding)
- When Solo SDK and @hiero-ledger/sdk are aligned in terms of local network port - refactor CI to remove port forwarding
- Refactor env variables usage to provide more flexibility for the users
@jasuwienas please let me know what you think
There was a problem hiding this comment.
Yes, that would be ok too, but it just feels strange to me that our application doesn’t allow configuring ports or using something other than 50211 for local instances. I would prefer to simply change Client.fromName to Client.forNetwork when we create SDK client, so users have more flexibility.
There was a problem hiding this comment.
But it’s probably not even part of this PR, especially when we have 2 approaches to choose from right now...
jasuwienas
left a comment
There was a problem hiding this comment.
LGTM, just one sugggestion, let me know what you think
There was a problem hiding this comment.
This should be converted to a workflow_call trigger under .github/workflows/zxc-setup-solo-stack.yaml we try to avoid adding in-line actions if we can.
There was a problem hiding this comment.
I would convert this to a bash script that can be used in-line as needed. Refactor to .github/workflows/support/scripts/solo-kubectl-port-forward.sh
| id: slither | ||
| with: | ||
| node-version: 20 | ||
| node-version: 22 |
There was a problem hiding this comment.
| node-version: 22 | |
| node-version: 24 |
| - name: Use Node.js [22] | ||
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||
| with: | ||
| node-version: 20 | ||
| node-version: 22 |
There was a problem hiding this comment.
| - name: Use Node.js [22] | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: 20 | |
| node-version: 22 | |
| - name: Use Node.js [24] | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: 24 |
| timeout-minutes: 5 | ||
| - name: Deploy local Hiero network (Solo / Kind) | ||
| id: solo_stack | ||
| uses: ./.github/actions/setup-solo-stack |
There was a problem hiding this comment.
| uses: ./.github/actions/setup-solo-stack | |
| uses: ./.github/workflows/zxc-setup-solo-stack.yaml |
| - name: Solo kubectl port forwards (50211 / 8545) | ||
| uses: ./.github/actions/solo-kubectl-port-forward | ||
| with: | ||
| namespace: ${{ steps.solo_stack.outputs.namespace }} |
There was a problem hiding this comment.
| - name: Solo kubectl port forwards (50211 / 8545) | |
| uses: ./.github/actions/solo-kubectl-port-forward | |
| with: | |
| namespace: ${{ steps.solo_stack.outputs.namespace }} | |
| - name: Solo kubectl port forwards (50211 / 8545) | |
| run: | | |
| ./.github/workflows/support/scripts/solo-kubectl-port-forward.sh ${{ steps.solo_stack.outputs.namespace }} |
| DEBUG_API_ENABLED: "true" | ||
| ws: | ||
| config: | ||
| DEBUG_API_ENABLED: "true" No newline at end of file |
There was a problem hiding this comment.
| DEBUG_API_ENABLED: "true" | |
| DEBUG_API_ENABLED: "true" | |
… upgrade(#1668) Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
c34cbfc
rbarker-dev
left a comment
There was a problem hiding this comment.
Small changes for consistency across workflow definitions.
| { | ||
| echo "deployment_name=${SOLO_DEPLOYMENT}" | ||
| echo "namespace=${SOLO_NS}" | ||
| } >>"$GITHUB_OUTPUT" |
There was a problem hiding this comment.
| } >>"$GITHUB_OUTPUT" | |
| } >>"${GITHUB_OUTPUT}" |
| --deployment "$SOLO_DEPLOYMENT" \ | ||
| --namespace "$SOLO_NS" |
There was a problem hiding this comment.
| --deployment "$SOLO_DEPLOYMENT" \ | |
| --namespace "$SOLO_NS" | |
| --deployment "${SOLO_DEPLOYMENT}" \ | |
| --namespace "${SOLO_NS}" |
| 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 |
There was a problem hiding this comment.
| 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 | |
| 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 |
| SOLO_VERSION="${SOLO_VERSION:?SOLO_VERSION is required}" | ||
|
|
||
| normalize_version() { | ||
| printf '%s' "$1" | sed 's/^v//' |
There was a problem hiding this comment.
| printf '%s' "$1" | sed 's/^v//' | |
| printf '%s' "${1}" | sed 's/^v//' |
| if [[ "$(normalize_version "$INITIAL_NETWORK_TAG")" != "$(normalize_version "$TARGET_NETWORK_TAG")" ]]; then | ||
| npx @hashgraph/solo@${SOLO_VERSION} consensus network upgrade \ | ||
| --deployment "$DEPLOYMENT" \ | ||
| --upgrade-version "$(normalize_version "$TARGET_NETWORK_TAG")" \ | ||
| --dev \ | ||
| --force | ||
| fi |
There was a problem hiding this comment.
| if [[ "$(normalize_version "$INITIAL_NETWORK_TAG")" != "$(normalize_version "$TARGET_NETWORK_TAG")" ]]; then | |
| npx @hashgraph/solo@${SOLO_VERSION} consensus network upgrade \ | |
| --deployment "$DEPLOYMENT" \ | |
| --upgrade-version "$(normalize_version "$TARGET_NETWORK_TAG")" \ | |
| --dev \ | |
| --force | |
| fi | |
| if [[ "$(normalize_version "${INITIAL_NETWORK_TAG}")" != "$(normalize_version "${TARGET_NETWORK_TAG}")" ]]; then | |
| npx @hashgraph/solo@${SOLO_VERSION} consensus network upgrade \ | |
| --deployment "${DEPLOYMENT}" \ | |
| --upgrade-version "$(normalize_version "${TARGET_NETWORK_TAG}")" \ | |
| --dev \ | |
| --force | |
| fi |
| if [[ "$(normalize_version "$INITIAL_MIRROR_TAG")" != "$(normalize_version "$TARGET_MIRROR_TAG")" ]]; then | ||
| npx @hashgraph/solo@${SOLO_VERSION} mirror node upgrade \ | ||
| --deployment "$DEPLOYMENT" \ | ||
| --mirror-node-version "$TARGET_MIRROR_TAG" \ | ||
| --values-file .github/mirror-node-values.yaml \ | ||
| --enable-ingress \ | ||
| --pinger \ | ||
| --force-port-forward | ||
| fi |
There was a problem hiding this comment.
| if [[ "$(normalize_version "$INITIAL_MIRROR_TAG")" != "$(normalize_version "$TARGET_MIRROR_TAG")" ]]; then | |
| npx @hashgraph/solo@${SOLO_VERSION} mirror node upgrade \ | |
| --deployment "$DEPLOYMENT" \ | |
| --mirror-node-version "$TARGET_MIRROR_TAG" \ | |
| --values-file .github/mirror-node-values.yaml \ | |
| --enable-ingress \ | |
| --pinger \ | |
| --force-port-forward | |
| fi | |
| if [[ "$(normalize_version "${INITIAL_MIRROR_TAG}")" != "$(normalize_version "${TARGET_MIRROR_TAG}")" ]]; then | |
| npx @hashgraph/solo@${SOLO_VERSION} mirror node upgrade \ | |
| --deployment "${DEPLOYMENT}" \ | |
| --mirror-node-version "${TARGET_MIRROR_TAG}" \ | |
| --values-file .github/mirror-node-values.yaml \ | |
| --enable-ingress \ | |
| --pinger \ | |
| --force-port-forward | |
| fi |
| if [[ "$(normalize_version "$INITIAL_RELAY_TAG")" != "$(normalize_version "$TARGET_RELAY_TAG")" ]]; then | ||
| npx @hashgraph/solo@${SOLO_VERSION} relay node upgrade \ | ||
| --deployment "$DEPLOYMENT" \ | ||
| --relay-release "$TARGET_RELAY_TAG" \ | ||
| --node-aliases "node1" \ | ||
| --values-file .github/relay-values.yaml \ | ||
| --force-port-forward | ||
| fi |
There was a problem hiding this comment.
| if [[ "$(normalize_version "$INITIAL_RELAY_TAG")" != "$(normalize_version "$TARGET_RELAY_TAG")" ]]; then | |
| npx @hashgraph/solo@${SOLO_VERSION} relay node upgrade \ | |
| --deployment "$DEPLOYMENT" \ | |
| --relay-release "$TARGET_RELAY_TAG" \ | |
| --node-aliases "node1" \ | |
| --values-file .github/relay-values.yaml \ | |
| --force-port-forward | |
| fi | |
| if [[ "$(normalize_version "${INITIAL_RELAY_TAG}")" != "$(normalize_version "${TARGET_RELAY_TAG}")" ]]; then | |
| npx @hashgraph/solo@${SOLO_VERSION} relay node upgrade \ | |
| --deployment "${DEPLOYMENT}" \ | |
| --relay-release "${TARGET_RELAY_TAG}" \ | |
| --node-aliases "node1" \ | |
| --values-file .github/relay-values.yaml \ | |
| --force-port-forward | |
| fi |
Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com>
| required: false | ||
| default: '@post-migration' | ||
| soloVersion: | ||
| description: 'npm version for @hashgraph/solo (Falcon one-shot on Kind)' |
There was a problem hiding this comment.
This description is a little confusing. I would prefer to see it as "Version of @hiero-ledger/solo for Falcon one-shot".
Also, we should switch to the hiero-ledger version of solo from npm as we are working on only publishing from that org in the near-ish future.
Neither of these comments prevent this PR from closing and can be addressed in a future issue.
Description:
This PR migrates the repository from Hedera Local Node to Hiero Solo
Related issue(s):
Fixes #1668
Checklist