Chore: Update helm chart with embedded wallet defaults - #1034
Conversation
9f14f94 to
c5663eb
Compare
c5663eb to
14a21c6
Compare
14a21c6 to
3c9ef65
Compare
There was a problem hiding this comment.
Pull request overview
Updates embedded wallet/SEP-45 configuration defaults across the Helm chart and the sdp-setup wizard to reduce manual setup work (especially around testnet resets and redeployments).
Changes:
- Add default embedded-wallet WASM hash and default SEP-45 contract IDs/RPC URLs (network-dependent) in the setup wizard and Helm templates.
- Update Helm chart
values.yamlannotations/defaults and regenerate chart README content accordingly. - Refresh
dev/.env.examplewith new SEP-45 contract ID / WASM hash defaults and add optional RPC auth header env vars.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/sdp-setup/internal/config/env.go | Writes embedded wallet WASM hash and network-specific SEP-45 contract/RPC defaults into generated .env files. |
| helmchart/sdp/values.yaml | Adds a default embedded wallet WASM hash and updates parameter docs around embedded wallet / SEP-45 / RPC settings. |
| helmchart/sdp/templates/01.3-configmap-tss.yaml | Adds a default testnet RPC URL for TSS when not on pubnet. |
| helmchart/sdp/templates/01.1-configmap-sdp.yaml | Adds default SEP-45 contract IDs (pubnet vs testnet) and a default testnet RPC URL for SDP core config. |
| helmchart/sdp/README.md | Regenerated/updated chart documentation to reflect new/updated values documentation. |
| dev/.env.example | Updates default WASM hash + SEP-45 contract ID and adds optional RPC auth header env vars. |
| "EMBEDDED_WALLETS_WASM_HASH": "9b784817dff1620a3e2b223fe1eb8dac56e18980dea9726f692847ccbbd3a853", | ||
| } | ||
|
|
||
| if cfg.NetworkType == "pubnet" { | ||
| switch cfg.NetworkType { |
There was a problem hiding this comment.
Consider pulling these embedded wallets / SEP-45 defaults (WASM hash, contract IDs, RPC URLs) into named constants (or a single map keyed by network) instead of inline string literals, to reduce the chance of drift and make future updates simpler.
| RPC_URL: "https://soroban-testnet.stellar.org" | ||
| {{- end }} | ||
| {{- /* | ||
| {{- /* |
There was a problem hiding this comment.
There appears to be a duplicated Helm comment opener ({{- /*)—the second one becomes part of the comment body and is confusing. Remove the extra {{- /* line so the comment block matches the pattern used elsewhere.
| {{- /* |
| SEP45_CONTRACT_ID: "CALI6JC3MSNDGFRP7Z2OKUEPREHOJRRXKMJEWQDEFZPFGXALA45RAUTH" | ||
| {{- else }} | ||
| SEP45_CONTRACT_ID: "CDY4CS2VWHAZOMYVTKUFKGNZKIVFBCXUFNFQ5KSXOTAHKL5H5ZRTAUTH" |
There was a problem hiding this comment.
Consider moving the default SEP45 contract IDs into chart values (or a helper that reads values) rather than hard-coding them in the template, so updating them after redeployments is less error-prone and defaults/docs can live in one place.
| SEP45_CONTRACT_ID: "CALI6JC3MSNDGFRP7Z2OKUEPREHOJRRXKMJEWQDEFZPFGXALA45RAUTH" | |
| {{- else }} | |
| SEP45_CONTRACT_ID: "CDY4CS2VWHAZOMYVTKUFKGNZKIVFBCXUFNFQ5KSXOTAHKL5H5ZRTAUTH" | |
| SEP45_CONTRACT_ID: {{ default "CALI6JC3MSNDGFRP7Z2OKUEPREHOJRRXKMJEWQDEFZPFGXALA45RAUTH" .Values.sdp.sep45ContractIdPubnet | quote }} | |
| {{- else }} | |
| SEP45_CONTRACT_ID: {{ default "CDY4CS2VWHAZOMYVTKUFKGNZKIVFBCXUFNFQ5KSXOTAHKL5H5ZRTAUTH" .Values.sdp.sep45ContractIdTestnet | quote }} |
770b482 to
4f69129
Compare
4f69129 to
e5253f6
Compare
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- if eq (include "isPubnet" .) "true" }} |
There was a problem hiding this comment.
We have one isPubnet check above that populates network specific configurations. We can consider doing it all in one place:
data:
{{- if eq (include "isPubnet" .) "true" }}
NETWORK_PASSPHRASE: "Public Global Stellar Network ; September 2015"
HORIZON_URL: "https://horizon.stellar.org"
{{- else }}
NETWORK_PASSPHRASE: "Test SDF Network ; September 2015"
HORIZON_URL: "https://horizon-testnet.stellar.org"
{{- end }}| {{- else }} | ||
| SEP45_CONTRACT_ID: "CDY4CS2VWHAZOMYVTKUFKGNZKIVFBCXUFNFQ5KSXOTAHKL5H5ZRTAUTH" | ||
| {{- end }} | ||
| {{- if .Values.global.rpcUrl }} |
There was a problem hiding this comment.
Why not add this in the {{- with .Values.global }} section :
{{- if .rpcUrl }}
RPC_URL: {{ .Values.global.rpcUrl | quote }}
{{- end }}| ## @param global.rpcRequestAuthHeaderKey The name of the HTTP header to include when authenticating requests to a protected RPC server. | ||
| rpcRequestAuthHeaderKey: "" | ||
| ## @param global.rpcRequestAuthHeaderValue he value of the HTTP header used for authenticating requests to a protected RPC server. | ||
| rpcRequestAuthHeaderValue: "" |
There was a problem hiding this comment.
nit: We can organize this differently :
## @extra global.rpc Stellar RPC server configuration for embedded wallets and SEP-45 features.
## @param global.rpcUrl The URL of the Stellar RPC server. When set, templates use this value and enable RPC in the dashboard.
## @param global.rpcRequestAuthHeaderKey The name of the HTTP header to include when authenticating requests to a protected RPC server.
## @param global.rpcRequestAuthHeaderValue he value of the HTTP header used for authenticating requests to a protected RPC server.
rpc:
url: ""
requestAuthHeaderKey: ""
requestAuthHeaderValue: ""There was a problem hiding this comment.
That makes a lot more sense 🤦
| {{- $rpcEnabled := false }} | ||
| {{- if .Values.global.rpcUrl }} | ||
| {{- $rpcEnabled = true }} | ||
| {{- end }} |
There was a problem hiding this comment.
nit: We can extract this to _helpers.tpl
{{/*
RPC Enabled - returns true if rpcUrl is configured, false otherwise
*/}}
{{- define "sdp.rpcEnabled" -}}
{{- if .Values.global.rpcUrl -}}
true
{{- else -}}
false
{{- end -}}
{{- end -}}
| ## @param tss.configMap.data.DB_MAX_IDLE_CONNS Maximum idle connections retained in the pool. | ||
| ## @param tss.configMap.data.DB_CONN_MAX_IDLE_TIME_SECONDS Close idle connections after N seconds. | ||
| ## @param tss.configMap.data.DB_CONN_MAX_LIFETIME_SECONDS Recycle connections after N seconds. | ||
| ## @extra tss.configMap.data.RPC_URL The URL of the Stellar RPC server for embedded wallets and SEP-45 features. Required when ENABLE_EMBEDDED_WALLETS or ENABLE_SEP45 is "true". |
There was a problem hiding this comment.
We should keep these configmaps and secrets documented here as global values don't inform where configs are being used. (E.g. look at global.bridgeIntegration.baseUrl present both there and documented in the configmap.
## Bumps the all-actions group with 2 updates - [docker/login-action](https://github.com/docker/login-action) - [docker/build-push-action](https://github.com/docker/build-push-action) --- ## docker/login-action: 4.2.0 → 4.4.0 ### Release notes (v4.4.0) - Skip empty `registry-auth` secret mask by @crazy-max in #1035 - Bump `@aws-sdk/client-ecr` and `@aws-sdk/client-ecr-public` to 3.1077.0 in #1034 **Full Changelog:** docker/login-action@v4.3.0...v4.4.0 --- ### Release notes (v4.3.0) - Preserve names in esbuild bundle by @crazy-max in #1022 - Bump `@aws-sdk/client-ecr` and `@aws-sdk/client-ecr-public` to 3.1076.0 in #999 and #1030 - Bump `@docker/actions-toolkit` from 0.90.0 to 0.92.0 in #1004 and #1027 - Bump `@sigstore/core` from 3.1.0 to 3.2.1 in #1023 - Bump `@sigstore/verify` from 3.1.0 to 3.1.1 in #1029 - Bump http-proxy-agent and https-proxy-agent to 9.1.0 in #1017 - Bump js-yaml from 4.1.1 to 5.2.0 in #1028 - Bump sigstore from 4.1.0 to 4.1.1 in #1031 - Bump tmp from 0.2.5 to 0.2.7 in #1002 - Bump undici from 6.24.1 to 6.27.0 in #1020 - Bump vite from 7.3.3 to 7.3.6 in #1019 **Full Changelog:** docker/login-action@v4.2.0...v4.3.0 --- ## docker/build-push-action: 7.2.0 → 7.3.0 ### Release notes (v7.3.0) - Preserve names in esbuild bundle by @crazy-max in #1567 - Bump `@docker/actions-toolkit` from 0.90.0 to 0.92.0 in #1545 and #1572 - Bump `@sigstore/core` from 3.1.0 to 3.2.1 in #1568 - Bump js-yaml from 4.1.1 to 4.3.0 in #1566 - Bump tmp from 0.2.5 to 0.2.7 in #1547 - Bump undici from 6.24.1 to 6.27.0 in #1564 - Bump vite from 7.3.2 to 7.3.6 in #1563 **Full Changelog:** docker/build-push-action@v7.2.0...v7.3.0
What
This updates the helm chart and wizard with defaults for the embedded wallet configuration. Between testnet resets, the wallet Wasm needs to be reuploaded, and the SEP-45 contract needs to be redeployed. I've done so manually right now, but I will add a GH workflow to automate this.
Why
Make embedded wallets easier to set up.
Known limitations
I've only checked that the helm chart can generate a manifest, but I haven't tried deploying it locally on my machine. However, I tested the flow end-to-end in a multitenant setup with the wizard.
Checklist
SDP-1234: Add new featureorChore: Refactor package xyzformat. The Jira ticket code was included if available.CHANGELOG.mdis updated (if applicable)