From 81d42f100c82ee710e58e557ae732db6800a0925 Mon Sep 17 00:00:00 2001 From: Ibo Sy Date: Fri, 29 May 2026 15:26:02 +0200 Subject: [PATCH] update splice snippets, export config. fixup inline artifacts in appdev/modules/m4-json-api-tutorial.mdx update docs generation script, references. Signed-off-by: Ibo Sy --- .../splice-snippet-list-remote.json | 208 ++++++++++ .../appdev/modules/m4-json-api-tutorial.mdx | 8 +- .../deployment/validator-kubernetes.mdx | 145 +------ .../validator-disaster-recovery.mdx | 217 ++-------- ...amples-recovery-manual-identities-dump.mdx | 25 +- ...les-sv-helm-kms-participant-aws-values.mdx | 2 +- ...les-sv-helm-kms-participant-gcp-values.mdx | 2 +- ...lidator-values-configuring-topup-start.mdx | 18 +- ...strap-migrate-to-new-participant-start.mdx | 10 +- ...values-scan-client-configuration-start.mdx | 52 +-- ...alues-synchronizer-configuration-start.mdx | 44 +- ...-sv-participant-pruning-schedule-start.mdx | 8 +- ...s-sv-helm-sv-values-docs-pruning-start.mdx | 18 +- ...ples-sv-helm-sv-values-migration-start.mdx | 18 +- ...elm-validator-values-auto-accept-start.mdx | 10 +- ...lm-validator-values-enablewallet-start.mdx | 4 +- ...ues-participant-pruning-schedule-start.mdx | 12 +- ...s-template-docs-cometbft-pruning-start.mdx | 6 +- ...-src-app-dev-testing-localnet-bash-162.mdx | 1 - ...-src-app-dev-testing-localnet-bash-175.mdx | 1 - ...-src-app-dev-testing-localnet-bash-190.mdx | 1 - ...-src-app-dev-testing-localnet-bash-206.mdx | 1 - ...-src-app-dev-testing-localnet-bash-228.mdx | 2 - ...-src-app-dev-testing-localnet-none-126.mdx | 6 +- ...-src-app-dev-testing-localnet-none-147.mdx | 3 +- ...rc-deployment-troubleshooting-text-109.mdx | 1 - ...rc-deployment-troubleshooting-text-123.mdx | 1 - ...rc-deployment-troubleshooting-text-135.mdx | 1 - ...rc-deployment-troubleshooting-text-161.mdx | 1 - ...rc-deployment-troubleshooting-text-174.mdx | 1 - ...src-deployment-troubleshooting-text-89.mdx | 1 - ...t-code-docs-src-release-notes-yaml-192.mdx | 6 + ...s-src-scalability-scalability-none-117.mdx | 7 +- ...docs-src-sv-operator-sv-backup-bash-23.mdx | 1 - ...-sv-operator-sv-network-resets-bash-75.mdx | 1 - ...-sv-operator-sv-network-resets-bash-81.mdx | 1 - ...-sv-operator-sv-network-resets-bash-90.mdx | 1 - ...tor-operator-validator-backups-bash-36.mdx | 1 - ...tor-operator-validator-backups-bash-67.mdx | 1 - ...or-operator-validator-compose-bash-167.mdx | 1 - ...or-operator-validator-compose-bash-175.mdx | 1 - ...or-operator-validator-compose-bash-281.mdx | 1 - ...or-operator-validator-compose-bash-306.mdx | 1 - ...tor-operator-validator-compose-bash-58.mdx | 1 - ...or-operator-validator-compose-yaml-105.mdx | 1 - ...or-operator-validator-compose-yaml-152.mdx | 1 - ...or-operator-validator-compose-yaml-347.mdx | 1 - ...tor-operator-validator-compose-yaml-96.mdx | 1 - ...r-validator-disaster-recovery-bash-137.mdx | 6 - ...r-validator-disaster-recovery-bash-140.mdx | 5 + ...r-validator-disaster-recovery-none-309.mdx | 33 -- ...r-validator-disaster-recovery-none-351.mdx | 20 - ...r-validator-disaster-recovery-none-355.mdx | 32 ++ ...r-validator-disaster-recovery-none-373.mdx | 20 - ...r-validator-disaster-recovery-none-397.mdx | 19 + ...r-validator-disaster-recovery-none-405.mdx | 6 - ...r-validator-disaster-recovery-none-419.mdx | 19 + ...r-validator-disaster-recovery-none-451.mdx | 5 + ...dator-operator-validator-helm-bash-514.mdx | 7 - ...dator-operator-validator-helm-bash-526.mdx | 5 - ...dator-operator-validator-helm-bash-545.mdx | 6 + ...dator-operator-validator-helm-bash-557.mdx | 3 + ...dator-operator-validator-helm-bash-567.mdx | 5 - ...dator-operator-validator-helm-bash-598.mdx | 3 + ...dator-operator-validator-helm-bash-611.mdx | 5 - ...dator-operator-validator-helm-bash-642.mdx | 3 + ...dator-operator-validator-helm-yaml-535.mdx | 15 - ...dator-operator-validator-helm-yaml-553.mdx | 12 - ...dator-operator-validator-helm-yaml-566.mdx | 13 + ...dator-operator-validator-helm-yaml-576.mdx | 33 -- ...dator-operator-validator-helm-yaml-584.mdx | 9 + ...dator-operator-validator-helm-yaml-607.mdx | 31 ++ ...dator-operator-validator-users-bash-48.mdx | 1 - ...dator-operator-validator-users-bash-66.mdx | 1 - scripts/generateOutputDocs.js | 385 ------------------ scripts/helpers/generateOutputDocs.js | 42 +- scripts/helpers/rstIncludeToMdx.js | 337 +++++++++++++++ 77 files changed, 903 insertions(+), 1034 deletions(-) create mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-release-notes-yaml-192.mdx delete mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-bash-137.mdx create mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-bash-140.mdx delete mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-309.mdx delete mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-351.mdx create mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-355.mdx delete mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-373.mdx create mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-397.mdx delete mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-405.mdx create mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-419.mdx create mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-451.mdx delete mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-514.mdx delete mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-526.mdx create mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-545.mdx create mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-557.mdx delete mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-567.mdx create mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-598.mdx delete mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-611.mdx create mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-642.mdx delete mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-535.mdx delete mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-553.mdx create mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-566.mdx delete mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-576.mdx create mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-584.mdx create mode 100644 docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-607.mdx delete mode 100644 scripts/generateOutputDocs.js create mode 100644 scripts/helpers/rstIncludeToMdx.js diff --git a/config/snippet-config/splice-snippet-list-remote.json b/config/snippet-config/splice-snippet-list-remote.json index 8a5e9932d..c5f04fc1c 100644 --- a/config/snippet-config/splice-snippet-list-remote.json +++ b/config/snippet-config/splice-snippet-list-remote.json @@ -8,6 +8,10 @@ "traffic parameters": "/global-synchronizer/deployment/synchronizer-traffic#traffic-parameters", "traffic_accounting": "/global-synchronizer/deployment/synchronizer-traffic#traffic-accounting-what-counts-as-traffic" }, + "urlSubstitutions": { + "https://docs.daml.com/canton/usermanual/kms/kms_aws_setup.html": "[Canton KMS operations](/global-synchronizer/production-operations/kms-operations#configure-a-amazon-web-services-aws-kms)", + "https://docs.daml.com/canton/usermanual/kms/kms_gcp_setup.html": "[Canton KMS operations](/global-synchronizer/production-operations/kms-operations#configure-a-google-cloud-provider-gcp-kms)" + }, "snippets": [ { "snippetName": "splice-literal-full-apps-app-src-pack-examples-recovery-manual-identities-dump", @@ -21,6 +25,30 @@ "language": "scala" } }, + { + "snippetName": "splice-literal-full-apps-app-src-pack-examples-sv-helm-kms-participant-aws-values", + "sourceRepo": "splice", + "sourceFilepath": "apps/app/src/pack/examples/sv-helm/kms-participant-aws-values.yaml", + "location": { + "type": "fullFile" + }, + "description": "", + "options": { + "language": "yaml" + } + }, + { + "snippetName": "splice-literal-full-apps-app-src-pack-examples-sv-helm-kms-participant-gcp-values", + "sourceRepo": "splice", + "sourceFilepath": "apps/app/src/pack/examples/sv-helm/kms-participant-gcp-values.yaml", + "location": { + "type": "fullFile" + }, + "description": "", + "options": { + "language": "yaml" + } + }, { "snippetName": "splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-configuring-topup-start", "sourceRepo": "splice", @@ -1871,6 +1899,21 @@ "normalizeIndent": false } }, + { + "snippetName": "splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-bash-140", + "sourceRepo": "splice", + "sourceFilepath": "docs/src/validator_operator/validator_disaster_recovery.rst", + "location": { + "type": "lines", + "start": 140, + "end": 142 + }, + "description": "", + "options": { + "language": "bash", + "normalizeIndent": false + } + }, { "snippetName": "splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-240", "sourceRepo": "splice", @@ -1946,6 +1989,66 @@ "normalizeIndent": "baseline" } }, + { + "snippetName": "splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-355", + "sourceRepo": "splice", + "sourceFilepath": "docs/src/validator_operator/validator_disaster_recovery.rst", + "location": { + "type": "lines", + "start": 355, + "end": 384 + }, + "description": "", + "options": { + "language": "", + "normalizeIndent": "baseline" + } + }, + { + "snippetName": "splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-397", + "sourceRepo": "splice", + "sourceFilepath": "docs/src/validator_operator/validator_disaster_recovery.rst", + "location": { + "type": "lines", + "start": 397, + "end": 413 + }, + "description": "", + "options": { + "language": "", + "normalizeIndent": "baseline" + } + }, + { + "snippetName": "splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-419", + "sourceRepo": "splice", + "sourceFilepath": "docs/src/validator_operator/validator_disaster_recovery.rst", + "location": { + "type": "lines", + "start": 419, + "end": 435 + }, + "description": "", + "options": { + "language": "", + "normalizeIndent": "baseline" + } + }, + { + "snippetName": "splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-451", + "sourceRepo": "splice", + "sourceFilepath": "docs/src/validator_operator/validator_disaster_recovery.rst", + "location": { + "type": "lines", + "start": 451, + "end": 453 + }, + "description": "", + "options": { + "language": "", + "normalizeIndent": "baseline" + } + }, { "snippetName": "splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-485", "sourceRepo": "splice", @@ -2081,6 +2184,111 @@ "normalizeIndent": "baseline" } }, + { + "snippetName": "splice-rst-code-docs-src-validator-operator-validator-helm-bash-545", + "sourceRepo": "splice", + "sourceFilepath": "docs/src/validator_operator/validator_helm.rst", + "location": { + "type": "lines", + "start": 545, + "end": 548 + }, + "description": "", + "options": { + "language": "bash", + "normalizeIndent": false + } + }, + { + "snippetName": "splice-rst-code-docs-src-validator-operator-validator-helm-bash-557", + "sourceRepo": "splice", + "sourceFilepath": "docs/src/validator_operator/validator_helm.rst", + "location": { + "type": "lines", + "start": 557, + "end": 557 + }, + "description": "", + "options": { + "language": "bash", + "normalizeIndent": false + } + }, + { + "snippetName": "splice-rst-code-docs-src-validator-operator-validator-helm-bash-598", + "sourceRepo": "splice", + "sourceFilepath": "docs/src/validator_operator/validator_helm.rst", + "location": { + "type": "lines", + "start": 598, + "end": 598 + }, + "description": "", + "options": { + "language": "bash", + "normalizeIndent": false + } + }, + { + "snippetName": "splice-rst-code-docs-src-validator-operator-validator-helm-bash-642", + "sourceRepo": "splice", + "sourceFilepath": "docs/src/validator_operator/validator_helm.rst", + "location": { + "type": "lines", + "start": 642, + "end": 642 + }, + "description": "", + "options": { + "language": "bash", + "normalizeIndent": false + } + }, + { + "snippetName": "splice-rst-code-docs-src-validator-operator-validator-helm-yaml-566", + "sourceRepo": "splice", + "sourceFilepath": "docs/src/validator_operator/validator_helm.rst", + "location": { + "type": "lines", + "start": 566, + "end": 576 + }, + "description": "", + "options": { + "language": "yaml", + "normalizeIndent": "baseline" + } + }, + { + "snippetName": "splice-rst-code-docs-src-validator-operator-validator-helm-yaml-584", + "sourceRepo": "splice", + "sourceFilepath": "docs/src/validator_operator/validator_helm.rst", + "location": { + "type": "lines", + "start": 584, + "end": 590 + }, + "description": "", + "options": { + "language": "yaml", + "normalizeIndent": "baseline" + } + }, + { + "snippetName": "splice-rst-code-docs-src-validator-operator-validator-helm-yaml-607", + "sourceRepo": "splice", + "sourceFilepath": "docs/src/validator_operator/validator_helm.rst", + "location": { + "type": "lines", + "start": 607, + "end": 635 + }, + "description": "", + "options": { + "language": "yaml", + "normalizeIndent": "baseline" + } + }, { "snippetName": "splice-rst-code-docs-src-validator-operator-validator-onboarding-bash-107", "sourceRepo": "splice", diff --git a/docs-main/appdev/modules/m4-json-api-tutorial.mdx b/docs-main/appdev/modules/m4-json-api-tutorial.mdx index ab4a0ef17..5f925c193 100644 --- a/docs-main/appdev/modules/m4-json-api-tutorial.mdx +++ b/docs-main/appdev/modules/m4-json-api-tutorial.mdx @@ -240,7 +240,7 @@ Look for the `createdEvent` section, which contains contract details like: ``` ### Troubleshooting -If you encounter issues while calling the using curl - you should enable `-v` (verbose) mode to see the request and response details. For instance: .. code-block: +If you encounter issues while calling the using curl - you should enable `-v` (verbose) mode to see the request and response details. For instance: ```bash curl -v -d '{"partyIdHint":"Alice", "identityProviderId": ""}' -H "Content-Type: application/json" -X POST localhost:7575/v2/parties @@ -249,9 +249,11 @@ Http response different than 200 (e.g., 400, 404, etc.) indicates an error. The If it does not help, read logs available in the canton sandbox terminal or in the file `\/logs/canton.log`. -If nothing is returned when you query `localhost:7575/v2/state/active-contracts` ensure that the offset provided is correct and corresponds to the `completionOffset` from the `localhost:7575/v2/commands/submit-and-wait` command. You can also check current offset by running: .. code-block: +If nothing is returned when you query `localhost:7575/v2/state/active-contracts` ensure that the offset provided is correct and corresponds to the `completionOffset` from the `localhost:7575/v2/commands/submit-and-wait` command. You can also check current offset by running: - curl localhost:7575/v2/state/ledger-end +```bash +curl localhost:7575/v2/state/ledger-end +``` ### Next steps #### Canton examples diff --git a/docs-main/global-synchronizer/deployment/validator-kubernetes.mdx b/docs-main/global-synchronizer/deployment/validator-kubernetes.mdx index 48e66564a..10b1e20f1 100644 --- a/docs-main/global-synchronizer/deployment/validator-kubernetes.mdx +++ b/docs-main/global-synchronizer/deployment/validator-kubernetes.mdx @@ -9,9 +9,14 @@ import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmBash1 import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmBash116 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-116.mdx"; import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmBash310 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-310.mdx"; import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmBash322 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-322.mdx"; - -import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmBash514 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-514.mdx"; - +import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmBash451 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-451.mdx"; +import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmBash545 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-545.mdx"; +import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmBash557 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-557.mdx"; +import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmYaml566 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-566.mdx"; +import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmYaml584 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-584.mdx"; +import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmBash598 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-598.mdx"; +import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmYaml607 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-607.mdx"; +import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmBash642 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-642.mdx"; import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmYaml771 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-771.mdx"; import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorHelmYaml797 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-797.mdx"; @@ -886,7 +891,7 @@ In order to install the reference charts, the following must be satisfied in you **Example of Istio installation:** - + ### Installation Instructions @@ -897,6 +902,8 @@ In order to install the reference charts, the following must be satisfied in you Create a `cluster-ingress` namespace: + + ```bash Internet ingress configuration is often specific to the network configuration and scenario of the cluster being configured. To illustrate the basic requirements of a Validator node ingress, we have @@ -904,89 +911,15 @@ provided a Helm chart that configures ingress according to the routes above usin ``` Ensure that there is a cert-manager certificate available in a secret named `cn-net-tls`. An example of a suitable certificate definition: -```yaml - -* *cert-manager* must be available in the cluster (See `cert-manager documentation `_) -* *istio* should be installed in the cluster (See `istio documentation `_) - -*Note that their deployments are often platform-dependent and good documentations on how to set them up can be found online.* - -**Example of Istio installation:** - -.. code-block:: bash + - helm repo add istio https://istio-release.storage.googleapis.com/charts - helm repo update - helm install istio-base istio/base -n istio-system --set defaults.global.istioNamespace=cluster-ingress --wait -``` Create a file named `istio-gateway-values.yaml` with the following content (Tip: on GCP you can get the cluster IP from `gcloud compute addresses list`): -```yaml -Create a `cluster-ingress` namespace: - -.. code-block:: bash - - kubectl create ns cluster-ingress - -Ensure that there is a cert-manager certificate available in a secret -named ``cn-net-tls``. An example of a suitable certificate -definition: -``` -And install it to your cluster: - -```bash - kind: Certificate - metadata: - name: cn-certificate -``` -Create an Istio Gateway resource in the `cluster-ingress` namespace. Save the following to a file named `gateway.yaml`, and replace `YOUR_HOSTNAME` with the actual hostname you want to use for your validator node (and has a DNS record pointing to the cluster IP you configured above): - -```yaml - secretName: cn-net-tls - -Create a file named ``istio-gateway-values.yaml`` with the following content -(Tip: on GCP you can get the cluster IP from ``gcloud compute addresses list``): - -.. code-block:: yaml - - service: - loadBalancerIP: "YOUR_CLUSTER_IP" - loadBalancerSourceRanges: - - "35.194.81.56/32" - - "35.198.147.95/32" - - "35.189.40.124/32" - - "34.132.91.75/32" + And install it to your cluster: -.. code-block:: bash - - helm install istio-ingress istio/gateway -n cluster-ingress -f istio-gateway-values.yaml - -Create an Istio Gateway resource in the `cluster-ingress` namespace. Save the following to a file named `gateway.yaml`, -and replace ``YOUR_HOSTNAME`` with the actual hostname you want to use for your validator node -(and has a DNS record pointing to the cluster IP you configured above): - -.. code-block:: yaml - -``` -And apply it to your cluster: - -```bash - namespace: cluster-ingress - spec: - selector: -``` -This gateway terminates tls using the secret that you configured above, and exposes raw http traffic in its outbound port 443. Istio VirtualServices can now be created to route traffic from there to the required pods within the cluster. A reference Helm chart is provided for that, which can be installed after - -1. replacing `YOUR_HOSTNAME` in `splice-node/examples/sv-helm/validator-cluster-ingress-values.yaml` and -2. setting `nameServiceDomain` in the same file to `"cns"` - -using: - -```bash -helm install cluster-ingress-validator oci://ghcr.io/digital-asset/decentralized-canton-sync/helm/splice-cluster-ingress-runbook -n validator --version ${CHART_VERSION} -f splice-node/examples/sv-helm/validator-cluster-ingress-values.yaml -``` + @@ -1038,54 +971,12 @@ And install it to your cluster: ``` Create an Istio Gateway resource in the `cluster-ingress` namespace. Save the following to a file named `gateway.yaml`, and replace `YOUR_HOSTNAME` with the actual hostname you want to use for your validator node (and has a DNS record pointing to the cluster IP you configured above): -```yaml - secretName: cn-net-tls - -Create a file named ``istio-gateway-values.yaml`` with the following content -(Tip: on GCP you can get the cluster IP from ``gcloud compute addresses list``): - -.. code-block:: yaml - - service: - loadBalancerIP: "YOUR_CLUSTER_IP" - loadBalancerSourceRanges: - - "35.194.81.56/32" - - "35.198.147.95/32" - - "35.189.40.124/32" - - "34.132.91.75/32" - -And install it to your cluster: - -.. code-block:: bash - - helm install istio-ingress istio/gateway -n cluster-ingress -f istio-gateway-values.yaml - -Create an Istio Gateway resource in the `cluster-ingress` namespace. Save the following to a file named `gateway.yaml`, -and replace ``YOUR_HOSTNAME`` with the actual hostname you want to use for your validator node -(and has a DNS record pointing to the cluster IP you configured above): + -.. code-block:: yaml -``` And apply it to your cluster: -```bash - namespace: cluster-ingress - spec: - selector: -``` -This gateway terminates tls using the secret that you configured above, and exposes raw http traffic in its outbound port 443. Istio VirtualServices can now be created to route traffic from there to the required pods within the cluster. A reference Helm chart is provided for that, which can be installed after - -1. replacing `YOUR_HOSTNAME` in `splice-node/examples/sv-helm/validator-cluster-ingress-values.yaml` and -2. setting `nameServiceDomain` in the same file to `"cns"` - -using: - -```bash -helm install cluster-ingress-validator oci://ghcr.io/digital-asset/decentralized-canton-sync/helm/splice-cluster-ingress-runbook -n validator --version ${CHART_VERSION} -f splice-node/examples/sv-helm/validator-cluster-ingress-values.yaml -``` - - + @@ -1178,9 +1069,7 @@ This gateway terminates tls using the secret that you configured above, and expo using: -```bash -helm install cluster-ingress-validator oci://ghcr.io/digital-asset/decentralized-canton-sync/helm/splice-cluster-ingress-runbook -n validator --version ${CHART_VERSION} -f splice-node/examples/sv-helm/validator-cluster-ingress-values.yaml -``` + diff --git a/docs-main/global-synchronizer/production-operations/validator-disaster-recovery.mdx b/docs-main/global-synchronizer/production-operations/validator-disaster-recovery.mdx index 68f93e91e..96deb9851 100644 --- a/docs-main/global-synchronizer/production-operations/validator-disaster-recovery.mdx +++ b/docs-main/global-synchronizer/production-operations/validator-disaster-recovery.mdx @@ -3,7 +3,7 @@ title: "Validator Disaster Recovery" description: "Disaster recovery and restore procedures for validator nodes" --- -import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorDisasterRecoveryBash137 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-bash-137.mdx"; +import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorDisasterRecoveryBash140 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-bash-140.mdx"; import ExternalSpliceMainSpliceRstLiteralMarkerAppsAppSrcPackExamplesSvHelmStandaloneValidatorValuesParticipantBootstrapMigrateToNewParticipantStart from "/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-participant-bootstrap-migrate-to-new-participant-start.mdx"; import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorDisasterRecoveryYaml185 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-yaml-185.mdx"; import ExternalSpliceMainSpliceRstLiteralFullAppsAppSrcPackExamplesRecoveryManualIdentitiesDump from "/snippets/external/splice/main/splice-literal-full-apps-app-src-pack-examples-recovery-manual-identities-dump.mdx"; @@ -11,6 +11,14 @@ import ExternalSpliceMainSpliceRstLiteralFullAppsAppSrcPackExamplesRecoveryManua import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorDisasterRecoveryNone299 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-299.mdx"; import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorDisasterRecoveryNone314 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-314.mdx"; +import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorDisasterRecoveryNone264 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-264.mdx"; +import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorDisasterRecoveryNone355 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-355.mdx"; +import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorDisasterRecoveryNone397 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-397.mdx"; +import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorDisasterRecoveryNone419 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-419.mdx"; +import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorDisasterRecoveryNone451 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-451.mdx"; + +import { NetworkVariables } from '/snippets/components/version.mdx'; +import { networkData } from '/snippets/generated/version-dashboard-data.mdx'; import ExternalSpliceMainSpliceRstCodeDocsSrcValidatorOperatorValidatorDisasterRecoveryNone485 from "/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-485.mdx"; {/* COPIED_START source="splice:docs/src/validator_operator/validator_disaster_recovery.rst" hash="48572fc5" */} @@ -79,7 +87,7 @@ To re-onboard a validator in a Kubernetes deployment and recover the balances of - Create a Kubernetes secret with the content of the identities backup file. Assuming you set the environment variable `PARTICIPANT_BOOTSTRAP_DUMP_FILE` to a backup file path, you can create the secret with the following command: - + - Uncomment the following lines in the `standalone-validator-values.yaml` file. This will specify a new participant ID for the validator. Replace `put-some-new-string-never-used-before` with a string that was never used before. Make sure to also adjust `nodeIdentifier` to match the same value. @@ -317,225 +325,50 @@ We now need to sign and submit the topology transaction to host the external par To do so, first generate the topology transaction. Note that the instructions here assume that the party is only hosted on a single participant node. If you want to host it on multiple nodes, you will need to adjust this. -``` - those from the rejected ``OwnerToKeyMapping`` in your participant logs, and replace the - old participant ID with your actual old participant ID: - - .. code:: - - val keys = Seq("", "").map(prefix => - participant.keys.public.list().filter(_.publicKey.id.toProtoPrimitive.startsWith(prefix)).head.publicKey) - - val oldParticipantId = ParticipantId.fromProtoPrimitive("", "participant").toOption.get - val otk = OwnerToKeyMapping(member = oldParticipantId, keys = NonEmpty.from(keys).get) - participant.topology.owner_to_key_mappings.propose(otk, force = ForceFlag.AlienMember) + 3. Start the validator app using your original identities dump configuration. -.. _validator_recover_external_party: - Recover the Coin balance of an external party -+++++++++++++++++++++++++++++++++++++++++++++ For a party relying on external signing, a similar procedure can be used to recover its coin balance in case the validator originally hosting it becomes unusable for whatever reason. -.. warning:: The target validator that you use to host the party after - recovery **must** be a **completely new validator**. An existing validator - may brick completely due to some limitations around party - migrations and there is no way to recover from that at - this point. Recovering a validator from an identities backup does not classify - as a completely new validator here. You must setup it with a completely new identity - and a completely clean database. - This limitation is expected to be lifted in -``` -We'll need the topology transaction and the definitions defined here later again. Either keep your Canton console open or save them. - -The topology transaction hash needs to be signed externally following the [documentation for external signing](/appdev/deep-dives/external-signing-onboarding#external-party-onboarding-transactions). - -After you signed it externally, you need to construct the signed topology transaction, sign it additionally through the participant and then submit it through the synchronizer. - -``` -it on multiple nodes, you will need to adjust this. - -.. code:: - - // replace YOUR_PARTY_ID by the ID of your external party - val partyId = PartyId.tryFromProtoPrimitive("YOUR_PARTY_ID") - val participantId = participant.id - val synchronizerId = participant.synchronizers.id_of("global") - - // generate topology transaction - val partyToParticipant = PartyToParticipant.tryCreate( - partyId = partyId, - threshold = PositiveInt.one, - participants = Seq( - HostingParticipant( - participantId, - ParticipantPermission.Confirmation, - ) -``` -We can now check that the topology transaction got correctly applied and get the `validFrom` time: - -``` - val topologyTransaction = participant.topology.transactions.generate( - Seq( - GenerateTransactions.Proposal( - partyToParticipant, - TopologyStoreId.Synchronizer(synchronizerId), - ) - ) - ).head - - // Print out the hash that needs to be signed. Note that you need to sign - // the actual bytes the hex string represents not the hex string - topologyTransaction.hash.hash.toHexString - -We'll need the topology transaction and the definitions defined here later again. Either keep your Canton console open or save them. - -The topology transaction hash needs to be signed externally following the -`documentation for external signing `_. - -``` -In this example, the validFrom time is `2025-05-14T10:19:33.534074Z`. - -We can now query CC Scan to get the active contract set (ACS) for a party and write it to the file `acs_snapshot`: - -```bash -// Make sure to adjust YOUR_VALID_FROM to the time you got from the previous query and YOUR_PARY_ID -curl -sSL --fail-with-body 'https://scan.sv-1.dev.global.canton.network.sync.global/api/scan/v0/acs/YOUR_PARTY_ID?record_time=YOUR_VALID_FROM' -H 'Content-Type: application/json' | jq -r .acs_snapshot | base64 -d > acs_snapshot -``` -Lastly, we can import the ACS: - -``` - val topologyTxSignedByBoth = participant.topology.transactions.sign( - topologyTxSignedByParty, - TopologyStoreId.Synchronizer(synchronizerId), - signedBy = Seq(participantId.namespace.fingerprint) -``` -The party is now hosted on the node and can participat in transactions. The last step is to setup the necessary contracts to allow the validator automation to renew transfer preapprovals and complete transfer commands. To do so, go through the same flow used for initial onboarding of the party, i.e., `/v0/admin/external-party/setup-proposal`, `/v0/admin/external-party/setup-proposal/prepare-accept` and `/v0/admin/external-party/setup-proposal/submit-accept`. For details refer to the docs for the validator external signing API. - - - - - -For a party relying on external signing, a similar procedure can be used to recover its coin balance in case the validator originally hosting it becomes unusable for whatever reason. - -The target validator that you use to host the party after recovery **must** be a **completely new validator**. An existing validator may brick completely due to some limitations around party migrations and there is no way to recover from that at this point. Recovering a validator from an identities backup does not classify as a completely new validator here. You must setup it with a completely new identity and a completely clean database. This limitation is expected to be lifted in the future. +The target validator that you use to host the party after recovery **must** be a **completely new validator**. An existing validator may brick completely due to some limitations around party migrations and there is no way to recover from that at this point. Recovering a validator from an identities backup does not classify as a completely new validator here. You must setup it with a completely new identity and a completely clean database. This limitation is expected to be lifted in -First, setup a new validator following the standard standard validator deployment docs. - -Next, connect a Canton console to that new validator. - -We now need to sign and submit the topology transaction to host the external party on the new node and import the ACS for that party. - -To do so, first generate the topology transaction. Note that the instructions here assume that the party is only hosted on a single participant node. If you want to host it on multiple nodes, you will need to adjust this. - -``` - those from the rejected ``OwnerToKeyMapping`` in your participant logs, and replace the - old participant ID with your actual old participant ID: - - .. code:: - - val keys = Seq("", "").map(prefix => - participant.keys.public.list().filter(_.publicKey.id.toProtoPrimitive.startsWith(prefix)).head.publicKey) - - val oldParticipantId = ParticipantId.fromProtoPrimitive("", "participant").toOption.get - val otk = OwnerToKeyMapping(member = oldParticipantId, keys = NonEmpty.from(keys).get) - participant.topology.owner_to_key_mappings.propose(otk, force = ForceFlag.AlienMember) - -3. Start the validator app using your original identities dump configuration. - -.. _validator_recover_external_party: - -Recover the Coin balance of an external party -+++++++++++++++++++++++++++++++++++++++++++++ - -For a party relying on external signing, a similar procedure can be -used to recover its coin balance in case the validator originally -hosting it becomes unusable for whatever reason. - -.. warning:: The target validator that you use to host the party after - recovery **must** be a **completely new validator**. An existing validator - may brick completely due to some limitations around party - migrations and there is no way to recover from that at - this point. Recovering a validator from an identities backup does not classify - as a completely new validator here. You must setup it with a completely new identity - and a completely clean database. - This limitation is expected to be lifted in -``` We'll need the topology transaction and the definitions defined here later again. Either keep your Canton console open or save them. The topology transaction hash needs to be signed externally following the [documentation for external signing](/appdev/deep-dives/external-signing-onboarding#external-party-onboarding-transactions). After you signed it externally, you need to construct the signed topology transaction, sign it additionally through the participant and then submit it through the synchronizer. -``` it on multiple nodes, you will need to adjust this. -.. code:: + - // replace YOUR_PARTY_ID by the ID of your external party - val partyId = PartyId.tryFromProtoPrimitive("YOUR_PARTY_ID") - val participantId = participant.id - val synchronizerId = participant.synchronizers.id_of("global") - - // generate topology transaction - val partyToParticipant = PartyToParticipant.tryCreate( - partyId = partyId, - threshold = PositiveInt.one, - participants = Seq( - HostingParticipant( - participantId, - ParticipantPermission.Confirmation, - ) -``` We can now check that the topology transaction got correctly applied and get the `validFrom` time: -``` - val topologyTransaction = participant.topology.transactions.generate( - Seq( - GenerateTransactions.Proposal( - partyToParticipant, - TopologyStoreId.Synchronizer(synchronizerId), - ) - ) - ).head - - // Print out the hash that needs to be signed. Note that you need to sign - // the actual bytes the hex string represents not the hex string - topologyTransaction.hash.hash.toHexString - -We'll need the topology transaction and the definitions defined here later again. Either keep your Canton console open or save them. - -The topology transaction hash needs to be signed externally following the -`documentation for external signing `_. + ``` In this example, the validFrom time is `2025-05-14T10:19:33.534074Z`. We can now query CC Scan to get the active contract set (ACS) for a party and write it to the file `acs_snapshot`: -```bash -// Make sure to adjust YOUR_VALID_FROM to the time you got from the previous query and YOUR_PARY_ID -curl -sSL --fail-with-body 'https://scan.sv-1.test.global.canton.network.sync.global/api/scan/v0/acs/YOUR_PARTY_ID?record_time=YOUR_VALID_FROM' -H 'Content-Type: application/json' | jq -r .acs_snapshot | base64 -d > acs_snapshot -``` + + Lastly, we can import the ACS: -``` - val topologyTxSignedByBoth = participant.topology.transactions.sign( - topologyTxSignedByParty, - TopologyStoreId.Synchronizer(synchronizerId), - signedBy = Seq(participantId.namespace.fingerprint) -``` + + The party is now hosted on the node and can participat in transactions. The last step is to setup the necessary contracts to allow the validator automation to renew transfer preapprovals and complete transfer commands. To do so, go through the same flow used for initial onboarding of the party, i.e., `/v0/admin/external-party/setup-proposal`, `/v0/admin/external-party/setup-proposal/prepare-accept` and `/v0/admin/external-party/setup-proposal/submit-accept`. For details refer to the docs for the validator external signing API. - + For a party relying on external signing, a similar procedure can be used to recover its coin balance in case the validator originally hosting it becomes unusable for whatever reason. @@ -638,16 +471,12 @@ We can now query CC Scan to get the active contract set (ACS) for a party and wr ```bash // Make sure to adjust YOUR_VALID_FROM to the time you got from the previous query and YOUR_PARY_ID -curl -sSL --fail-with-body 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/acs/YOUR_PARTY_ID?record_time=YOUR_VALID_FROM' -H 'Content-Type: application/json' | jq -r .acs_snapshot | base64 -d > acs_snapshot +curl -sSL --fail-with-body 'https://scan.sv-1.test.global.canton.network.sync.global/api/scan/v0/acs/YOUR_PARTY_ID?record_time=YOUR_VALID_FROM' -H 'Content-Type: application/json' | jq -r .acs_snapshot | base64 -d > acs_snapshot ``` Lastly, we can import the ACS: -``` - val topologyTxSignedByBoth = participant.topology.transactions.sign( - topologyTxSignedByParty, - TopologyStoreId.Synchronizer(synchronizerId), - signedBy = Seq(participantId.namespace.fingerprint) -``` + + The party is now hosted on the node and can participat in transactions. The last step is to setup the necessary contracts to allow the validator automation to renew transfer preapprovals and complete transfer commands. To do so, go through the same flow used for initial onboarding of the party, i.e., `/v0/admin/external-party/setup-proposal`, `/v0/admin/external-party/setup-proposal/prepare-accept` and `/v0/admin/external-party/setup-proposal/submit-accept`. For details refer to the docs for the validator external signing API. @@ -670,4 +499,4 @@ Validators then need to: Note that depending on how exactly the old synchronizer failed, validators may desynchronize if some validators have observed a transaction before the failure while others have not. In that case, the participant will produce ACS mismatches that should be resolved using the [standard ACS mismatch resolution process](/global-synchronizer/troubleshooting-guide/transaction-failures#troubleshoot-acs-commitments) after migrating to the new physical synchronizer. -{/* COPIED_END */} \ No newline at end of file +{/* COPIED_END */} diff --git a/docs-main/snippets/external/splice/main/splice-literal-full-apps-app-src-pack-examples-recovery-manual-identities-dump.mdx b/docs-main/snippets/external/splice/main/splice-literal-full-apps-app-src-pack-examples-recovery-manual-identities-dump.mdx index 2c370d186..004f0394f 100644 --- a/docs-main/snippets/external/splice/main/splice-literal-full-apps-app-src-pack-examples-recovery-manual-identities-dump.mdx +++ b/docs-main/snippets/external/splice/main/splice-literal-full-apps-app-src-pack-examples-recovery-manual-identities-dump.mdx @@ -1,20 +1,19 @@ ```scala - import com.digitalasset.canton.topology.transaction.TopologyMapping - import com.digitalasset.canton.topology.store.TimeQuery - import java.util.Base64 +import com.digitalasset.canton.topology.transaction.TopologyMapping +import com.digitalasset.canton.topology.store.TimeQuery +import java.util.Base64 - val id = participant.id.toProtoPrimitive +val id = participant.id.toProtoPrimitive - // This line needs to be adapted if your participant stores keys in an external KMS - val keys = "[" + participant.keys.secret.list().filter(k => k.name.get.unwrap != "cometbft-governance-keys").map(key => s"{\"keyPair\": \"${Base64.getEncoder.encodeToString(participant.keys.secret.download(key.publicKey.fingerprint).toByteArray)}\", \"name\": \"${key.name.get.unwrap}\"}") .mkString(",") + "]" +// This line needs to be adapted if your participant stores keys in an external KMS +val keys = "[" + participant.keys.secret.list().filter(k => k.name.get.unwrap != "cometbft-governance-keys").map(key => s"{\"keyPair\": \"${Base64.getEncoder.encodeToString(participant.keys.secret.download(key.publicKey.fingerprint).toByteArray)}\", \"name\": \"${key.name.get.unwrap}\"}") .mkString(",") + "]" - val authorizedStoreSnapshot = Base64.getEncoder.encodeToString(participant.topology.transactions.export_topology_snapshot(timeQuery = TimeQuery.Range(from = None, until = None), filterMappings = Seq(TopologyMapping.Code.NamespaceDelegation, TopologyMapping.Code.OwnerToKeyMapping, TopologyMapping.Code.VettedPackages), filterNamespace = participant.id.namespace.toProtoPrimitive).toByteArray) +val authorizedStoreSnapshot = Base64.getEncoder.encodeToString(participant.topology.transactions.export_topology_snapshot(timeQuery = TimeQuery.Range(from = None, until = None), filterMappings = Seq(TopologyMapping.Code.NamespaceDelegation, TopologyMapping.Code.OwnerToKeyMapping, TopologyMapping.Code.VettedPackages), filterNamespace = participant.id.namespace.toProtoPrimitive).toByteArray) - val combinedJson = s"""{ "id" : "$id", "keys" : $keys, "authorizedStoreSnapshot" : "$authorizedStoreSnapshot" }""" - - // Write to file - import java.nio.file.{Files, Paths} - val dumpPath = Paths.get("identities-dump.json") - Files.writeString(dumpPath, combinedJson) +val combinedJson = s"""{ "id" : "$id", "keys" : $keys, "authorizedStoreSnapshot" : "$authorizedStoreSnapshot" }""" +// Write to file +import java.nio.file.{Files, Paths} +val dumpPath = Paths.get("identities-dump.json") +Files.writeString(dumpPath, combinedJson) ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-literal-full-apps-app-src-pack-examples-sv-helm-kms-participant-aws-values.mdx b/docs-main/snippets/external/splice/main/splice-literal-full-apps-app-src-pack-examples-sv-helm-kms-participant-aws-values.mdx index 61294beb3..d34405a72 100644 --- a/docs-main/snippets/external/splice/main/splice-literal-full-apps-app-src-pack-examples-sv-helm-kms-participant-aws-values.mdx +++ b/docs-main/snippets/external/splice/main/splice-literal-full-apps-app-src-pack-examples-sv-helm-kms-participant-aws-values.mdx @@ -24,4 +24,4 @@ additionalEnvVars: secretKeyRef: name: aws-credentials key: secretAccessKey -``` +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-literal-full-apps-app-src-pack-examples-sv-helm-kms-participant-gcp-values.mdx b/docs-main/snippets/external/splice/main/splice-literal-full-apps-app-src-pack-examples-sv-helm-kms-participant-gcp-values.mdx index 70c262162..519907cb6 100644 --- a/docs-main/snippets/external/splice/main/splice-literal-full-apps-app-src-pack-examples-sv-helm-kms-participant-gcp-values.mdx +++ b/docs-main/snippets/external/splice/main/splice-literal-full-apps-app-src-pack-examples-sv-helm-kms-participant-gcp-values.mdx @@ -28,4 +28,4 @@ extraVolumes: - name: gcp-credentials secret: secretName: gke-credentials -``` +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-configuring-topup-start.mdx b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-configuring-topup-start.mdx index 440d1f804..6e14b3f66 100644 --- a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-configuring-topup-start.mdx +++ b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-configuring-topup-start.mdx @@ -1,11 +1,11 @@ ```yaml - # Configuring a validator's traffic top-up loop; - # see documentation for more detailed information. - topup: - # set to false in order to disable automatic traffic top-ups - enabled: true - # target throughput in bytes / second of sequenced traffic; targetThroughput=0 <=> enabled=false - targetThroughput: 20000 - # minTopupInterval - minimum time interval that must elapse before the next top-up - minTopupInterval: "1m" +# Configuring a validator's traffic top-up loop; +# see documentation for more detailed information. +topup: + # set to false in order to disable automatic traffic top-ups + enabled: true + # target throughput in bytes / second of sequenced traffic; targetThroughput=0 <=> enabled=false + targetThroughput: 20000 + # minTopupInterval - minimum time interval that must elapse before the next top-up + minTopupInterval: "1m" ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-participant-bootstrap-migrate-to-new-participant-start.mdx b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-participant-bootstrap-migrate-to-new-participant-start.mdx index 5614b2a8b..e41603ae3 100644 --- a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-participant-bootstrap-migrate-to-new-participant-start.mdx +++ b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-participant-bootstrap-migrate-to-new-participant-start.mdx @@ -1,7 +1,7 @@ ```yaml - # participantIdentitiesDumpImport: - # secretName: participant-bootstrap-dump - # # Make sure to also adjust nodeIdentifier to the same value - # newParticipantIdentifier: put-some-new-string-never-used-before - # migrateValidatorParty: true +# participantIdentitiesDumpImport: +# secretName: participant-bootstrap-dump +# # Make sure to also adjust nodeIdentifier to the same value +# newParticipantIdentifier: put-some-new-string-never-used-before +# migrateValidatorParty: true ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-scan-client-configuration-start.mdx b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-scan-client-configuration-start.mdx index d7e68043c..6d2596126 100644 --- a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-scan-client-configuration-start.mdx +++ b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-scan-client-configuration-start.mdx @@ -1,35 +1,35 @@ ```yaml - scanClient: - scanType: "bft" - seedUrls: ["TRUSTED_SCAN_URL"] # replace with scan seed url. Supports multiple urls, separated by comma. +scanClient: + scanType: "bft" + seedUrls: ["TRUSTED_SCAN_URL"] # replace with scan seed url. Supports multiple urls, separated by comma. - # scanClient denotes how the validator makes connections to scan service and supports three modes of operation. +# scanClient denotes how the validator makes connections to scan service and supports three modes of operation. - # Mode 1: bft (Byzantine Fault Tolerance) - # Connects to all available scans in the network. It validates responses by ensuring - # at least f+1 matching responses are received. +# Mode 1: bft (Byzantine Fault Tolerance) +# Connects to all available scans in the network. It validates responses by ensuring +# at least f+1 matching responses are received. - # scanClient: - # scanType: "bft" - # seedUrls: ["TRUSTED_SCAN_URL"] # replace with scan seed url(s). Supports multiple urls, separated by comma. +# scanClient: +# scanType: "bft" +# seedUrls: ["TRUSTED_SCAN_URL"] # replace with scan seed url(s). Supports multiple urls, separated by comma. - # Mode 2: bft-custom - # A specialized version of bft where you specify a subset of trusted SVs. - # The validator connects only to the scans of the SVs listed in 'svNames'. - # Optional param 'threshold' defines how many identical responses are required to consider the scan responses valid. +# Mode 2: bft-custom +# A specialized version of bft where you specify a subset of trusted SVs. +# The validator connects only to the scans of the SVs listed in 'svNames'. +# Optional param 'threshold' defines how many identical responses are required to consider the scan responses valid. - # scanClient: - # scanType: "bft-custom" - # svNames: ["TRUSTED_SV"] # replace with trusted SV names(s) - # seedUrls: ["TRUSTED_SCAN_URL"] # replace with actual scan seed urls(s) - # threshold: # optional integer indicating the number of matching responses required for validation +# scanClient: +# scanType: "bft-custom" +# svNames: ["TRUSTED_SV"] # replace with trusted SV names(s) +# seedUrls: ["TRUSTED_SCAN_URL"] # replace with actual scan seed urls(s) +# threshold: # optional integer indicating the number of matching responses required for validation - # Mode 3: trust-single - # Connects to a single trusted scan address. - # This means that you depend on that single SV and if it is broken or malicious you will be unable to use the network. - # Hence, usually you want to default to not enabling this +# Mode 3: trust-single +# Connects to a single trusted scan address. +# This means that you depend on that single SV and if it is broken or malicious you will be unable to use the network. +# Hence, usually you want to default to not enabling this - # scanClient: - # scanType: "trust-single" - # scanAddress: "TRUSTED_SCAN_URL" # replace with the trusted scan url +# scanClient: +# scanType: "trust-single" +# scanAddress: "TRUSTED_SCAN_URL" # replace with the trusted scan url ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-synchronizer-configuration-start.mdx b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-synchronizer-configuration-start.mdx index cd94b530d..6f3d28251 100644 --- a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-synchronizer-configuration-start.mdx +++ b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-standalone-validator-values-synchronizer-configuration-start.mdx @@ -1,31 +1,31 @@ ```yaml - synchronizer: - connectionType: "bft" +synchronizer: + connectionType: "bft" - # synchronizer configuration enables to configure how the validator's participant connects to the synchronizer. - # synchronizer configuration has three modes of operation. +# synchronizer configuration enables to configure how the validator's participant connects to the synchronizer. +# synchronizer configuration has three modes of operation. - # Mode 1: bft (Byzantine Fault Tolerance) - # Uses all available synchronizer connections provided by the scan service. - # Responses are validated against the network's f+1 fault tolerance logic. +# Mode 1: bft (Byzantine Fault Tolerance) +# Uses all available synchronizer connections provided by the scan service. +# Responses are validated against the network's f+1 fault tolerance logic. - # synchronizer: - # connectionType: "bft" +# synchronizer: +# connectionType: "bft" - # Mode 2: bft-custom - # Connects only to sequencers operated by the specific SVs listed in 'svNames'. - # optional param 'threshold' defines the minimum number of matching responses required for validation. +# Mode 2: bft-custom +# Connects only to sequencers operated by the specific SVs listed in 'svNames'. +# optional param 'threshold' defines the minimum number of matching responses required for validation. - # synchronizer: - # connectionType: "bft-custom" - # svNames: ["TRUSTED_SV"] # replace with trusted SV name(s) - # threshold: # optional integer indicating the number of matching responses required for validation +# synchronizer: +# connectionType: "bft-custom" +# svNames: ["TRUSTED_SV"] # replace with trusted SV name(s) +# threshold: # optional integer indicating the number of matching responses required for validation - # Mode 3: trust-Single - # Connects to a single specified sequencer URL. - # trust-single makes you dependent on a single SV; if it is malicious or down, you will be unable to use the network. +# Mode 3: trust-Single +# Connects to a single specified sequencer URL. +# trust-single makes you dependent on a single SV; if it is malicious or down, you will be unable to use the network. - #synchronizer: - # connectionType: "trust-single" - # url: "TRUSTED_SYNCHRONIZER_SEQUENCER_URL" # replace with the trusted synchronizer sequencer url +#synchronizer: +# connectionType: "trust-single" +# url: "TRUSTED_SYNCHRONIZER_SEQUENCER_URL" # replace with the trusted synchronizer sequencer url ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-sv-validator-values-sv-participant-pruning-schedule-start.mdx b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-sv-validator-values-sv-participant-pruning-schedule-start.mdx index c65c297dd..c4fc11527 100644 --- a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-sv-validator-values-sv-participant-pruning-schedule-start.mdx +++ b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-sv-validator-values-sv-participant-pruning-schedule-start.mdx @@ -1,6 +1,6 @@ ```yaml - participantPruningSchedule: - cron: 0 /10 * * * ? # Run every 10min - maxDuration: 5m # Run for a max of 5min per iteration - retention: 30d # Retain history that is newer than 30d. +participantPruningSchedule: + cron: 0 /10 * * * ? # Run every 10min + maxDuration: 5m # Run for a max of 5min per iteration + retention: 30d # Retain history that is newer than 30d. ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-sv-values-docs-pruning-start.mdx b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-sv-values-docs-pruning-start.mdx index 6db77b5b3..7cb881dad 100644 --- a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-sv-values-docs-pruning-start.mdx +++ b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-sv-values-docs-pruning-start.mdx @@ -1,11 +1,11 @@ ```yaml - synchronizers: - current: - sequencerPruningConfig: - # Enable or disable sequencer pruning - enabled: true - # The pruning interval is the time between two consecutive prunings. - pruningInterval: "1 hour" - # The retention period is the time for which the sequencer will retain the data. - retentionPeriod: "30 days" +synchronizers: + current: + sequencerPruningConfig: + # Enable or disable sequencer pruning + enabled: true + # The pruning interval is the time between two consecutive prunings. + pruningInterval: "1 hour" + # The retention period is the time for which the sequencer will retain the data. + retentionPeriod: "30 days" ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-sv-values-migration-start.mdx b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-sv-values-migration-start.mdx index f3613b8c6..249192a55 100644 --- a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-sv-values-migration-start.mdx +++ b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-sv-values-migration-start.mdx @@ -1,11 +1,11 @@ ```yaml - # Replace MIGRATION_ID with the migration ID of the global synchronizer. - migration: - id: "MIGRATION_ID" - # Uncomment these when redeploying as part of a migration, - # i.e., MIGRATION_ID was incremented and a migration dump was exported to the attached pvc. - # migrating: true - # This declares that your sequencer with that migration id is still up. You should remove it - # once you take down the sequencer for the prior migration id - # legacyId: "MIGRATION_ID_BEFORE_INCREMENTED" +# Replace MIGRATION_ID with the migration ID of the global synchronizer. +migration: + id: "MIGRATION_ID" + # Uncomment these when redeploying as part of a migration, + # i.e., MIGRATION_ID was incremented and a migration dump was exported to the attached pvc. + # migrating: true + # This declares that your sequencer with that migration id is still up. You should remove it + # once you take down the sequencer for the prior migration id + # legacyId: "MIGRATION_ID_BEFORE_INCREMENTED" ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-auto-accept-start.mdx b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-auto-accept-start.mdx index a87505bf4..fcf464ccd 100644 --- a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-auto-accept-start.mdx +++ b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-auto-accept-start.mdx @@ -1,7 +1,7 @@ ```yaml - # To configure the validator to auto-accept transfer offers from specific parties, uncomment and fill in the following: - #autoAcceptTransfers: - # "": - # fromParties: - # - "" +# To configure the validator to auto-accept transfer offers from specific parties, uncomment and fill in the following: +#autoAcceptTransfers: +# "": +# fromParties: +# - "" ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-enablewallet-start.mdx b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-enablewallet-start.mdx index c5fd6a97e..315b1de29 100644 --- a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-enablewallet-start.mdx +++ b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-enablewallet-start.mdx @@ -1,4 +1,4 @@ ```yaml - # This will disable the wallet HTTP server and wallet automations when set to false - enableWallet: true +# This will disable the wallet HTTP server and wallet automations when set to false +enableWallet: true ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-participant-pruning-schedule-start.mdx b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-participant-pruning-schedule-start.mdx index f32a5b982..bd038af2b 100644 --- a/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-participant-pruning-schedule-start.mdx +++ b/docs-main/snippets/external/splice/main/splice-literal-marker-apps-app-src-pack-examples-sv-helm-validator-values-participant-pruning-schedule-start.mdx @@ -1,8 +1,8 @@ ```yaml - # To configure participant pruning uncomment the following section. - # Refer to the documentation for more details. - # participantPruningSchedule: - # cron: 0 /10 * * * ? # Run every 10min - # maxDuration: 5m # Run for a max of 5min per iteration - # retention: 48h # Retain history that is newer than 48h. +# To configure participant pruning uncomment the following section. +# Refer to the documentation for more details. +# participantPruningSchedule: +# cron: 0 /10 * * * ? # Run every 10min +# maxDuration: 5m # Run for a max of 5min per iteration +# retention: 48h # Retain history that is newer than 48h. ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-literal-marker-cluster-helm-splice-cometbft-values-template-docs-cometbft-pruning-start.mdx b/docs-main/snippets/external/splice/main/splice-literal-marker-cluster-helm-splice-cometbft-values-template-docs-cometbft-pruning-start.mdx index 5ed5f6aa6..1606705fe 100644 --- a/docs-main/snippets/external/splice/main/splice-literal-marker-cluster-helm-splice-cometbft-values-template-docs-cometbft-pruning-start.mdx +++ b/docs-main/snippets/external/splice/main/splice-literal-marker-cluster-helm-splice-cometbft-values-template-docs-cometbft-pruning-start.mdx @@ -1,5 +1,5 @@ ```yaml - # Number of blocks to keep, used for pruning. 0 -> keep all blocks. - # Number of blocks to keep for 30 days with an upper bound of 7k blocks/h. - retainBlocks: 5040000 +# Number of blocks to keep, used for pruning. 0 -> keep all blocks. + # Number of blocks to keep for 30 days with an upper bound of 7k blocks/h. + retainBlocks: 5040000 ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-162.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-162.mdx index a81ccfae6..bf9ed6f98 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-162.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-162.mdx @@ -6,5 +6,4 @@ --profile sv \ --profile app-provider \ --profile app-user up -d - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-175.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-175.mdx index 1c3234bde..9f4dee92d 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-175.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-175.mdx @@ -6,5 +6,4 @@ --profile sv \ --profile app-provider \ --profile app-user down -v - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-190.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-190.mdx index 64d7d9129..0de6b821a 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-190.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-190.mdx @@ -7,5 +7,4 @@ --profile app-provider \ --profile app-user \ --profile swagger-ui up -d - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-206.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-206.mdx index e20e51ffe..cdfc8b8e4 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-206.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-206.mdx @@ -7,5 +7,4 @@ --profile app-provider \ --profile app-user \ --profile swagger-ui down -v - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-228.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-228.mdx index d6a7d7ef7..7891ca84b 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-228.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-bash-228.mdx @@ -4,6 +4,4 @@ -f $LOCALNET_DIR/compose.yaml \ -f $LOCALNET_DIR/resource-constraints.yaml \ run --rm console - - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-none-126.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-none-126.mdx index de65d8ce0..f38a51270 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-none-126.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-none-126.mdx @@ -1,6 +1,4 @@ ``` - 127.0.0.1 scan.localhost - 127.0.0.1 wallet.localhost - - +127.0.0.1 scan.localhost +127.0.0.1 wallet.localhost ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-none-147.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-none-147.mdx index 842c7b003..060ccab15 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-none-147.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-app-dev-testing-localnet-none-147.mdx @@ -1,4 +1,3 @@ ``` - `app-provider`.adminToken - +`app-provider`.adminToken ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-109.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-109.mdx index 2f794c26e..33a149ff2 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-109.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-109.mdx @@ -1,4 +1,3 @@ ```text Insufficient funds to buy configured traffic amount. Please ensure that the validator’s wallet has enough amulets to purchase 1.9998 MB of traffic to continue healthy operation. - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-123.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-123.mdx index 8979ce1f1..3e431bd93 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-123.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-123.mdx @@ -1,4 +1,3 @@ ```text 2025-02-11T10:16:13.098Z [⋮] ERROR - o.l.s.v.ValidatorSvConnection:validator=validator_backend (7427be2620676fce8a464eee769eb1d8-app_version-2d71c55f5ecd731b-793d382fa2d6ce14) - Gave up getting 'app version of https://scan.sv-2.dev.global.canton.network.digitalasset.com/api/sv' org.apache.pekko.http.scaladsl.unmarshalling.Unmarshaller$UnsupportedContentTypeException: Unsupported Content-Type [Some(text/html)], supported: application/json - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-135.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-135.mdx index 0a1a0adc8..de4a3fb07 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-135.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-135.mdx @@ -1,4 +1,3 @@ ```text 2025-02-14T11:32:00.304Z [⋮] INFO - o.l.s.v.ValidatorApp:validator=validator_backend (50836441bf579035d64a56f776566cbf) - The operation 'Get user 7D95xiEUxju4IUXFQgyUrwHMMuZO0g2F@clients' failed with a retryable error (full stack trace omitted): UNAUTHENTICATED: An error occurred. Please contact the operator and inquire about the request efd009557dec03da74dd29b723949cd6 with tid efd009557dec03da74dd29b723949cd6 - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-161.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-161.mdx index 26e9bb749..d03c1db6d 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-161.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-161.mdx @@ -1,4 +1,3 @@ ```text │Caused by: io.grpc.StatusRuntimeException: INTERNAL: Node has identity a-b-c-1::122098ffcd99..., but identifier a-b-1 was expected. │ - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-174.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-174.mdx index 84b5a1014..ed4e346bc 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-174.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-174.mdx @@ -2,5 +2,4 @@ 2025-04-16T08:18:06.451Z [⋮] DEBUG - c.d.c.s.c.t.GrpcSequencerSubscription:participant=participant/domainId=global-domain::12206d339948/sequencerAlias=Some-Alias (---) - Completed subscription with Success(GrpcSubscriptionError(Request failed for sequencer. GrpcRequestRefusedByServer: FAILED_PRECONDITION/MemberDisabled(PAR::validator1::12203d9ed85f...) Request: subscription - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-89.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-89.mdx index dcd811729..9d3603ad6 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-89.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-deployment-troubleshooting-text-89.mdx @@ -1,4 +1,3 @@ ```text ABORTED: Traffic balance below reserved traffic amount (0 < 200000) - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-release-notes-yaml-192.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-release-notes-yaml-192.mdx new file mode 100644 index 000000000..66d0f3e7d --- /dev/null +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-release-notes-yaml-192.mdx @@ -0,0 +1,6 @@ +```yaml + - ``/v0/transactions`` + + - SV / Validator apps + +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-scalability-scalability-none-117.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-scalability-scalability-none-117.mdx index 7c7d687f3..9b54858ee 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-scalability-scalability-none-117.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-scalability-scalability-none-117.mdx @@ -1,6 +1,5 @@ ``` - - name: ADDITIONAL_CONFIG_TOPOLOGY_BATCH_SIZE - value: | - canton.participants.participant.topology.broadcast-batch-size = 20 - +- name: ADDITIONAL_CONFIG_TOPOLOGY_BATCH_SIZE + value: | + canton.participants.participant.topology.broadcast-batch-size = 20 ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-backup-bash-23.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-backup-bash-23.mdx index aa110260e..99fab8d1b 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-backup-bash-23.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-backup-bash-23.mdx @@ -1,4 +1,3 @@ ```bash curl "https://sv.sv.YOUR_HOSTNAME/api/sv/v0/admin/domain/identities-dump" -H "authorization: Bearer " - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-network-resets-bash-75.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-network-resets-bash-75.mdx index acdc30b55..7a398508e 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-network-resets-bash-75.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-network-resets-bash-75.mdx @@ -1,4 +1,3 @@ ```bash curl -sSL --fail-with-body https://YOUR_SCAN_URL/api/scan/v0/dso > current_state.json - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-network-resets-bash-81.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-network-resets-bash-81.mdx index 8f1c7f1a3..eaebedc26 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-network-resets-bash-81.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-network-resets-bash-81.mdx @@ -2,5 +2,4 @@ jq '.dso_rules.contract.payload.svs.[] | [.[1].name, .[1].svRewardWeight]' backup.json > weights_backup.json jq '.dso_rules.contract.payload.svs.[] | [.[1].name, .[1].svRewardWeight]' current_state.json > weights_current.json diff -C2 weights_backup.json weights_current.json - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-network-resets-bash-90.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-network-resets-bash-90.mdx index 531ff1af1..05f9d6ece 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-network-resets-bash-90.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-sv-operator-sv-network-resets-bash-90.mdx @@ -2,5 +2,4 @@ jq '.amulet_rules.contract.payload' backup.json > amulet_backup.json jq '.amulet_rules.contract.payload' current_state.json > amulet_current.json diff amulet_backup.json amulet_current.json - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-backups-bash-36.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-backups-bash-36.mdx index 0386dc99c..c24293014 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-backups-bash-36.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-backups-bash-36.mdx @@ -1,4 +1,3 @@ ```bash curl "https://wallet.validator.YOUR_HOSTNAME/api/validator/v0/admin/participant/identities" -H "authorization: Bearer " - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-backups-bash-67.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-backups-bash-67.mdx index 4ba2b65b3..fd1a8c306 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-backups-bash-67.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-backups-bash-67.mdx @@ -2,5 +2,4 @@ docker exec -i splice-validator-postgres-splice-1 pg_dump -U cnadmin validator > "${backup_dir}"/validator-"$(date -u +"%Y-%m-%dT%H:%M:%S%:z")".dump active_participant_db=$(docker exec splice-validator-participant-1 bash -c 'echo $CANTON_PARTICIPANT_POSTGRES_DB') docker exec splice-validator-postgres-splice-1 pg_dump -U cnadmin "${active_participant_db}" > "${backup_dir}"/"${active_participant_db}"-"$(date -u +"%Y-%m-%dT%H:%M:%S%:z")".dump - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-167.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-167.mdx index b84a32242..8baae882f 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-167.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-167.mdx @@ -1,4 +1,3 @@ ```bash cd splice-node/docker-compose/validator - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-175.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-175.mdx index 53506dbdd..d7b57e28a 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-175.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-175.mdx @@ -1,4 +1,3 @@ ```bash ./start.sh -s "" -o "" -p "" -m "" -w - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-281.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-281.mdx index d30d386fd..b430410d5 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-281.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-281.mdx @@ -1,4 +1,3 @@ ```bash ./start.sh -s "" -o "" -p "" -m "" -w -a - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-306.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-306.mdx index 5a15fa970..cfd5151f3 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-306.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-306.mdx @@ -1,5 +1,4 @@ ```bash export TARGET_TRAFFIC_THROUGHPUT=20000 # target throughput in bytes/second export MIN_TRAFFIC_TOPUP_INTERVAL="1m" # minimum interval between top-ups - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-58.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-58.mdx index 44263f6ed..fe016edcc 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-58.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-bash-58.mdx @@ -8,5 +8,4 @@ Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd > jq --version jq-1.7.1 - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-105.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-105.mdx index 10e1daa94..dbce50d89 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-105.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-105.mdx @@ -5,5 +5,4 @@ JAVA_TOOL_OPTIONS: >- -Dhttps.proxyHost=your.proxy.host -Dhttps.proxyPort=your_proxy_port - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-152.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-152.mdx index 205393577..3ba3b4146 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-152.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-152.mdx @@ -6,5 +6,4 @@ -Dhttps.proxyHost=your.proxy.host -Dhttps.proxyPort=your_proxy_port -Dhttp.nonProxyHosts=localhost|127.0.0.1|*.internal|10.* - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-347.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-347.mdx index 68e9379fc..772ad55ed 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-347.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-347.mdx @@ -9,5 +9,4 @@ from-parties = ["", ""] } } - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-96.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-96.mdx index 81578624d..8002cdd1b 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-96.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-compose-yaml-96.mdx @@ -5,5 +5,4 @@ JAVA_TOOL_OPTIONS: >- -Dhttps.proxyHost=your.proxy.host -Dhttps.proxyPort=your_proxy_port - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-bash-137.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-bash-137.mdx deleted file mode 100644 index 6a669bc1a..000000000 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-bash-137.mdx +++ /dev/null @@ -1,6 +0,0 @@ -```bash - -.. code-block:: bash - - kubectl create secret generic participant-bootstrap-dump \ -``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-bash-140.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-bash-140.mdx new file mode 100644 index 000000000..32ef65119 --- /dev/null +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-bash-140.mdx @@ -0,0 +1,5 @@ +```bash + kubectl create secret generic participant-bootstrap-dump \ + --from-file=content=${PARTICIPANT_BOOTSTRAP_DUMP_FILE} \ + -n validator +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-309.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-309.mdx deleted file mode 100644 index d84372230..000000000 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-309.mdx +++ /dev/null @@ -1,33 +0,0 @@ -``` - those from the rejected ``OwnerToKeyMapping`` in your participant logs, and replace the - old participant ID with your actual old participant ID: - - .. code:: - - val keys = Seq("", "").map(prefix => - participant.keys.public.list().filter(_.publicKey.id.toProtoPrimitive.startsWith(prefix)).head.publicKey) - - val oldParticipantId = ParticipantId.fromProtoPrimitive("", "participant").toOption.get - val otk = OwnerToKeyMapping(member = oldParticipantId, keys = NonEmpty.from(keys).get) - participant.topology.owner_to_key_mappings.propose(otk, force = ForceFlag.AlienMember) - -3. Start the validator app using your original identities dump configuration. - -.. _validator_recover_external_party: - -Recover the Coin balance of an external party -+++++++++++++++++++++++++++++++++++++++++++++ - -For a party relying on external signing, a similar procedure can be -used to recover its coin balance in case the validator originally -hosting it becomes unusable for whatever reason. - -.. warning:: The target validator that you use to host the party after - recovery **must** be a **completely new validator**. An existing validator - may brick completely due to some limitations around party - migrations and there is no way to recover from that at - this point. Recovering a validator from an identities backup does not classify - as a completely new validator here. You must setup it with a completely new identity - and a completely clean database. - This limitation is expected to be lifted in -``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-351.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-351.mdx deleted file mode 100644 index 4afc08701..000000000 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-351.mdx +++ /dev/null @@ -1,20 +0,0 @@ -``` -it on multiple nodes, you will need to adjust this. - -.. code:: - - // replace YOUR_PARTY_ID by the ID of your external party - val partyId = PartyId.tryFromProtoPrimitive("YOUR_PARTY_ID") - val participantId = participant.id - val synchronizerId = participant.synchronizers.id_of("global") - - // generate topology transaction - val partyToParticipant = PartyToParticipant.tryCreate( - partyId = partyId, - threshold = PositiveInt.one, - participants = Seq( - HostingParticipant( - participantId, - ParticipantPermission.Confirmation, - ) -``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-355.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-355.mdx new file mode 100644 index 000000000..13f3cb5c9 --- /dev/null +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-355.mdx @@ -0,0 +1,32 @@ +``` +// replace YOUR_PARTY_ID by the ID of your external party +val partyId = PartyId.tryFromProtoPrimitive("YOUR_PARTY_ID") +val participantId = participant.id +val synchronizerId = participant.synchronizers.id_of("global") + +// generate topology transaction +val partyToParticipant = PartyToParticipant.tryCreate( + partyId = partyId, + threshold = PositiveInt.one, + participants = Seq( + HostingParticipant( + participantId, + ParticipantPermission.Confirmation, + ) + ), + ) + +import com.digitalasset.canton.admin.api.client.commands.TopologyAdminCommands.Write.GenerateTransactions +val topologyTransaction = participant.topology.transactions.generate( + Seq( + GenerateTransactions.Proposal( + partyToParticipant, + TopologyStoreId.Synchronizer(synchronizerId), + ) + ) +).head + +// Print out the hash that needs to be signed. Note that you need to sign +// the actual bytes the hex string represents not the hex string +topologyTransaction.hash.hash.toHexString +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-373.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-373.mdx deleted file mode 100644 index 9d549ca0d..000000000 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-373.mdx +++ /dev/null @@ -1,20 +0,0 @@ -``` - val topologyTransaction = participant.topology.transactions.generate( - Seq( - GenerateTransactions.Proposal( - partyToParticipant, - TopologyStoreId.Synchronizer(synchronizerId), - ) - ) - ).head - - // Print out the hash that needs to be signed. Note that you need to sign - // the actual bytes the hex string represents not the hex string - topologyTransaction.hash.hash.toHexString - -We'll need the topology transaction and the definitions defined here later again. Either keep your Canton console open or save them. - -The topology transaction hash needs to be signed externally following the -`documentation for external signing `_. - -``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-397.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-397.mdx new file mode 100644 index 000000000..aa50a77ce --- /dev/null +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-397.mdx @@ -0,0 +1,19 @@ +``` +// Replace HASH_SIGNATURE_HEXSTRING with the signed topology transaction hash +val signature = Signature.fromExternalSigning(SignatureFormat.Raw, HexString.parseToByteString("HASH_SIGNATURE_HEXSTRING").get, partyId.namespace.fingerprint, SigningAlgorithmSpec.Ed25519) +val topologyTxSignedByParty = SignedTopologyTransaction.create( + topologyTransaction, + NonEmpty(Set, SingleTransactionSignature(topologyTransaction.hash, signature): TopologyTransactionSignature), + isProposal = false, + ProtocolVersion.v34, +) +val topologyTxSignedByBoth = participant.topology.transactions.sign( + topologyTxSignedByParty, + TopologyStoreId.Synchronizer(synchronizerId), + signedBy = Seq(participantId.namespace.fingerprint) +) +participant.topology.transactions.load( + topologyTxSignedByBoth, + TopologyStoreId.Synchronizer(synchronizerId), +) +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-405.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-405.mdx deleted file mode 100644 index 0ab01ad71..000000000 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-405.mdx +++ /dev/null @@ -1,6 +0,0 @@ -``` - val topologyTxSignedByBoth = participant.topology.transactions.sign( - topologyTxSignedByParty, - TopologyStoreId.Synchronizer(synchronizerId), - signedBy = Seq(participantId.namespace.fingerprint) -``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-419.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-419.mdx new file mode 100644 index 000000000..7e09775a7 --- /dev/null +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-419.mdx @@ -0,0 +1,19 @@ +``` +// The detailed output will slightly vary. Make sure that you see the new participant ID though. +participant.topology.party_to_participant_mappings.list(synchronizerId, filterParty = partyId.filterString) + res36: Seq[topology.ListPartyToParticipantResult] = Vector( + ListPartyToParticipantResult( + context = BaseResult( + storeId = Synchronizer(id = global-domain::122025296c61...), + validFrom = 2025-05-14T10:19:33.534074Z, + validUntil = None, + sequenced = 2025-05-14T10:19:33.534074Z, + operation = Replace, + transactionHash = , + serial = PositiveNumeric(value = 1), + signedBy = Vector(1220b529c1d9...) + ), + item = PartyToParticipant(YOUR_PARTY_ID, PositiveNumeric(1), Vector(HostingParticipant(YOUR_PARTICIPANT_ID..., Submission))) + ) + ) +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-451.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-451.mdx new file mode 100644 index 000000000..c511f7366 --- /dev/null +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-disaster-recovery-none-451.mdx @@ -0,0 +1,5 @@ +``` +participant.synchronizers.disconnect_all() +participant.repair.import_acs("acs_snapshot") +participant.synchronizers.reconnect_all() +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-514.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-514.mdx deleted file mode 100644 index 3eb15fc8d..000000000 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-514.mdx +++ /dev/null @@ -1,7 +0,0 @@ -```bash -* ``https://wallet.validator.`` should be routed to service ``wallet-web-ui`` in the ``validator`` namespace -* ``https://wallet.validator./api/validator`` should be routed to ``/api/validator`` at port 5003 of service ``validator-app`` in the ``validator`` namespace -* ``https://cns.validator.`` should be routed to service ``ans-web-ui`` in the ``validator`` namespace -* ``https://cns.validator./api/validator`` should be routed to ``/api/validator`` at port 5003 of service ``validator-app`` in the ``validator`` namespace - -``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-526.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-526.mdx deleted file mode 100644 index 3d3cde3c5..000000000 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-526.mdx +++ /dev/null @@ -1,5 +0,0 @@ -```bash -Internet ingress configuration is often specific to the network configuration and scenario of the -cluster being configured. To illustrate the basic requirements of a Validator node ingress, we have -provided a Helm chart that configures ingress according to the routes above using Istio, as detailed in the sections below. -``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-545.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-545.mdx new file mode 100644 index 000000000..edf844d21 --- /dev/null +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-545.mdx @@ -0,0 +1,6 @@ +```bash + helm repo add istio https://istio-release.storage.googleapis.com/charts + helm repo update + helm install istio-base istio/base -n istio-system --set defaults.global.istioNamespace=cluster-ingress --wait + helm install istiod istio/istiod -n cluster-ingress --set global.istioNamespace="cluster-ingress" --set meshConfig.accessLogFile="/dev/stdout" --wait +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-557.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-557.mdx new file mode 100644 index 000000000..cdb8c4d36 --- /dev/null +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-557.mdx @@ -0,0 +1,3 @@ +```bash + kubectl create ns cluster-ingress +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-567.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-567.mdx deleted file mode 100644 index 54b21a3d7..000000000 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-567.mdx +++ /dev/null @@ -1,5 +0,0 @@ -```bash - kind: Certificate - metadata: - name: cn-certificate -``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-598.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-598.mdx new file mode 100644 index 000000000..b72c53147 --- /dev/null +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-598.mdx @@ -0,0 +1,3 @@ +```bash + helm install istio-ingress istio/gateway -n cluster-ingress -f istio-gateway-values.yaml +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-611.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-611.mdx deleted file mode 100644 index 9cd7e629c..000000000 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-611.mdx +++ /dev/null @@ -1,5 +0,0 @@ -```bash - namespace: cluster-ingress - spec: - selector: -``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-642.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-642.mdx new file mode 100644 index 000000000..8ff91efcd --- /dev/null +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-bash-642.mdx @@ -0,0 +1,3 @@ +```bash + kubectl apply -f gateway.yaml -n cluster-ingress +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-535.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-535.mdx deleted file mode 100644 index dd8681e38..000000000 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-535.mdx +++ /dev/null @@ -1,15 +0,0 @@ -```yaml - -* *cert-manager* must be available in the cluster (See `cert-manager documentation `_) -* *istio* should be installed in the cluster (See `istio documentation `_) - -*Note that their deployments are often platform-dependent and good documentations on how to set them up can be found online.* - -**Example of Istio installation:** - -.. code-block:: bash - - helm repo add istio https://istio-release.storage.googleapis.com/charts - helm repo update - helm install istio-base istio/base -n istio-system --set defaults.global.istioNamespace=cluster-ingress --wait -``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-553.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-553.mdx deleted file mode 100644 index 4bba621fd..000000000 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-553.mdx +++ /dev/null @@ -1,12 +0,0 @@ -```yaml -Create a `cluster-ingress` namespace: - -.. code-block:: bash - - kubectl create ns cluster-ingress - - -Ensure that there is a cert-manager certificate available in a secret -named ``cn-net-tls``. An example of a suitable certificate -definition: -``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-566.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-566.mdx new file mode 100644 index 000000000..15bfa6ff1 --- /dev/null +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-566.mdx @@ -0,0 +1,13 @@ +```yaml +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: cn-certificate + namespace: cluster-ingress +spec: + dnsNames: + - '*.validator.YOUR_HOSTNAME' + issuerRef: + name: letsencrypt-production + secretName: cn-net-tls +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-576.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-576.mdx deleted file mode 100644 index 72bcdba7b..000000000 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-576.mdx +++ /dev/null @@ -1,33 +0,0 @@ -```yaml - secretName: cn-net-tls - - -Create a file named ``istio-gateway-values.yaml`` with the following content -(Tip: on GCP you can get the cluster IP from ``gcloud compute addresses list``): - -.. code-block:: yaml - - service: - loadBalancerIP: "YOUR_CLUSTER_IP" - loadBalancerSourceRanges: - - "35.194.81.56/32" - - "35.198.147.95/32" - - "35.189.40.124/32" - - "34.132.91.75/32" - - - -And install it to your cluster: - -.. code-block:: bash - - helm install istio-ingress istio/gateway -n cluster-ingress -f istio-gateway-values.yaml - - -Create an Istio Gateway resource in the `cluster-ingress` namespace. Save the following to a file named `gateway.yaml`, -and replace ``YOUR_HOSTNAME`` with the actual hostname you want to use for your validator node -(and has a DNS record pointing to the cluster IP you configured above): - -.. code-block:: yaml - -``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-584.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-584.mdx new file mode 100644 index 000000000..170696e86 --- /dev/null +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-584.mdx @@ -0,0 +1,9 @@ +```yaml +service: + loadBalancerIP: "YOUR_CLUSTER_IP" + loadBalancerSourceRanges: + - "35.194.81.56/32" + - "35.198.147.95/32" + - "35.189.40.124/32" + - "34.132.91.75/32" +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-607.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-607.mdx new file mode 100644 index 000000000..b38311ef7 --- /dev/null +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-helm-yaml-607.mdx @@ -0,0 +1,31 @@ +```yaml +apiVersion: networking.istio.io/v1alpha3 +kind: Gateway +metadata: + name: cn-http-gateway + namespace: cluster-ingress +spec: + selector: + app: istio-ingress + istio: ingress + servers: + - port: + number: 443 + name: https + protocol: HTTPS + tls: + mode: SIMPLE + credentialName: cn-net-tls # name of the secret created above + hosts: + - "*.YOUR_HOSTNAME" + - "YOUR_HOSTNAME" + - port: + number: 80 + name: http + protocol: HTTP + tls: + httpsRedirect: true + hosts: + - "*.YOUR_HOSTNAME" + - "YOUR_HOSTNAME" +``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-users-bash-48.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-users-bash-48.mdx index b8afc523c..71106afda 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-users-bash-48.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-users-bash-48.mdx @@ -2,5 +2,4 @@ curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ --data-raw "{\"party_id\":\"$PARTY_ID\",\"name\":\"$USER\"}" \ https:///api/validator/v0/admin/users - ``` \ No newline at end of file diff --git a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-users-bash-66.mdx b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-users-bash-66.mdx index abc0126f2..564f63704 100644 --- a/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-users-bash-66.mdx +++ b/docs-main/snippets/external/splice/main/splice-rst-code-docs-src-validator-operator-validator-users-bash-66.mdx @@ -2,5 +2,4 @@ curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ --data-raw "{\"party_id\":\"$PARTY_ID\",\"name\":\"$USER\",\"createPartyIfMissing\":true}" \ https:///api/validator/v0/admin/users - ``` \ No newline at end of file diff --git a/scripts/generateOutputDocs.js b/scripts/generateOutputDocs.js deleted file mode 100644 index 4cbb0df9d..000000000 --- a/scripts/generateOutputDocs.js +++ /dev/null @@ -1,385 +0,0 @@ -#!/usr/bin/env node - -// generateOutputDocs.js -// -// - Reads a single export config: docs/config/exportConfig.json -// - Writes extracted snippets into: docs-output/.mdx -// - Resolves source files relative to the repo root - -const fs = require('fs') -const path = require('path') - -const REPO_ROOT = path.join(__dirname, '..', '..') -const EXPORT_CONFIG_PATH = path.join(REPO_ROOT, 'scripts/docs/exportConfig.json') -const OUTPUT_FOLDER_PATH = path.join(REPO_ROOT, 'docs-output') - -function readFileContent(filePath) { - try { - return fs.readFileSync(filePath, 'utf8') - } catch (error) { - throw new Error(`Failed to read file ${filePath}: ${error.message}`) - } -} - -function extractByLines(fileContent, start, end) { - const lines = fileContent.split(/\r?\n/) - const startLine = Number(start) - const endLine = Number(end) - - if ( - startLine < 1 || - endLine < 1 || - startLine > lines.length || - endLine > lines.length - ) { - throw new Error( - `Line numbers out of range: start=${startLine}, end=${endLine}, file has ${lines.length} lines` - ) - } - - if (startLine > endLine) { - throw new Error( - `Invalid line range: start (${startLine}) must be <= end (${endLine})` - ) - } - - return lines.slice(startLine - 1, endLine).join('\n') -} - -function extractByStringMarker(fileContent, startMarker, endMarker) { - const startIndex = fileContent.indexOf(startMarker) - if (startIndex === -1) { - throw new Error(`Start marker not found: "${startMarker}"`) - } - - const contentStart = startIndex + startMarker.length - const endIndex = fileContent.indexOf(endMarker, contentStart) - if (endIndex === -1) { - throw new Error(`End marker not found: "${endMarker}"`) - } - - return fileContent.substring(contentStart, endIndex).trim() -} - -function extractByRegexWrap(fileContent, startRegex, endRegex) { - const startPattern = new RegExp(startRegex) - const endPattern = new RegExp(endRegex) - - const startMatch = fileContent.match(startPattern) - if (!startMatch) { - throw new Error(`Start regex pattern not found: "${startRegex}"`) - } - - const contentStart = startMatch.index + startMatch[0].length - const remainingContent = fileContent.substring(contentStart) - const endMatch = remainingContent.match(endPattern) - - if (!endMatch) { - throw new Error(`End regex pattern not found: "${endRegex}"`) - } - - return remainingContent.substring(0, endMatch.index).trim() -} - -function extractByJsonIndex(fileContent, start, end) { - let arr - try { - arr = JSON.parse(fileContent) - } catch (e) { - throw new Error(`File is not valid JSON: ${e.message}`) - } - if (!Array.isArray(arr)) { - throw new Error( - 'JSON root must be an array for location type jsonIndex' - ) - } - const startIdx = Number(start) - const endIdx = Number(end) - if ( - startIdx < 0 || - endIdx < 0 || - startIdx >= arr.length || - endIdx >= arr.length - ) { - throw new Error( - `Array index out of range: start=${startIdx}, end=${endIdx}, array length=${arr.length}` - ) - } - if (startIdx > endIdx) { - throw new Error( - `Invalid index range: start (${startIdx}) must be <= end (${endIdx})` - ) - } - if (startIdx === endIdx) { - const item = arr[startIdx] - return typeof item === 'string' ? item : String(item) - } - return arr - .slice(startIdx, endIdx + 1) - .map((item) => (typeof item === 'string' ? item : String(item))) - .join('\n') -} - -function extractSnippetContent(fileContent, location) { - switch (location.type) { - case 'fullFile': - return fileContent - - case 'lines': - return extractByLines(fileContent, location.start, location.end) - - case 'jsonIndex': - return extractByJsonIndex(fileContent, location.start, location.end) - - case 'stringMarker': - return extractByStringMarker( - fileContent, - location.start, - location.end - ) - - case 'regexWrap': - return extractByRegexWrap(fileContent, location.start, location.end) - - default: - throw new Error(`Unknown location type: ${location.type}`) - } -} - -function normalizeIndent(content) { - const lines = content.split('\n') - - let minIndent = null - for (const line of lines) { - if (line.trim() === '') continue - const match = line.match(/^(\s*)/) - const indent = match ? match[1].length : 0 - if (minIndent === null || indent < minIndent) { - minIndent = indent - } - } - - // Strip the common leading whitespace from every non-blank line and then - // re-indent the whole block by two spaces. Using `line.slice(strip)` - // (instead of stripping ALL leading whitespace) preserves the relative - // indentation between lines — including the case where minIndent is 0, - // which would otherwise flatten any source that contains a top-level - // line at column 0 (e.g. HOCON config files where a `}` closes at the - // start of the line). - const strip = minIndent ?? 0 - return lines - .map((line) => { - if (line.trim() === '') return '' - return ` ${line.slice(strip)}` - }) - .join('\n') -} - -function trimBlankEdges(content) { - return content.replace(/^\s*\n+/, '').replace(/\n+\s*$/, '') -} - -function convertRstBlocksToMarkdown(content, fallbackLanguage = '') { - const input = trimBlankEdges(content) - const lines = input.split('\n') - const out = [] - let i = 0 - - while (i < lines.length) { - const m = lines[i].match(/^\s*\.\.\s+code-block::\s*(\S*)\s*$/) - if (!m) { - i++ - continue - } - - let language = (m[1] || '').trim() - if (!language || language.toLowerCase() === 'none') { - language = fallbackLanguage || '' - } - - i++ - while (i < lines.length && lines[i].trim() === '') i++ - - const block = [] - while (i < lines.length) { - const line = lines[i] - if (line.trim() === '') { - block.push('') - i++ - continue - } - - if (/^( {4}|\t)/.test(line)) { - block.push(line.replace(/^( {4}|\t)/, '')) - i++ - continue - } - break - } - - while (block.length > 0 && block[block.length - 1] === '') { - block.pop() - } - - if (language) { - out.push(`\`\`\`${language}`) - } else { - out.push('```') - } - out.push(block.join('\n')) - out.push('```') - out.push('') - } - - if (out.length === 0) { - // Safety fallback: strip any leftover RST directives and keep only content. - const cleaned = input - .split('\n') - .filter((line) => !/^\s*\.\.\s+code-block::/.test(line)) - .join('\n') - const trimmed = trimBlankEdges(cleaned) - const language = fallbackLanguage || '' - if (language) { - return `\`\`\`${language}\n${trimmed}\n\`\`\`` - } - return `\`\`\`\n${trimmed}\n\`\`\`` - } - - while (out.length > 0 && out[out.length - 1] === '') out.pop() - return out.join('\n') -} - -function formatSnippetContent(content, options) { - if (options && options.transform === 'rstjson') { - const language = options && options.language ? options.language : '' - return convertRstBlocksToMarkdown(content, language) - } - const displayStyle = (options && options.displayStyle) || 'wrapCode' - const rawLanguage = options && options.language ? options.language : '' - const language = - rawLanguage && rawLanguage.toLowerCase() === 'none' ? '' : rawLanguage - - switch (displayStyle) { - case 'wrapCode': - if (language) { - return `\`\`\`${language}\n${content}\n\`\`\`` - } else { - return `\`\`\`\n${content}\n\`\`\`` - } - - default: - return content - } -} - -function getSourceFilePath(snippet) { - if (snippet.sourceFilepath) { - return path.join(REPO_ROOT, snippet.sourceFilepath) - } else { - throw new Error( - `Snippet "${snippet.snippetName}" has no source file path specified` - ) - } -} - -function processSnippet(snippet, verbose) { - try { - if (verbose) { - console.log(`Processing snippet: ${snippet.snippetName}`) - } - - if (!snippet.snippetName) { - throw new Error('Snippet missing required field: snippetName') - } - - if (!snippet.location) { - throw new Error( - `Snippet "${snippet.snippetName}" missing required field: location` - ) - } - - const sourceFilePath = getSourceFilePath(snippet) - - const fileContent = readFileContent(sourceFilePath) - - const extractedContent = extractSnippetContent( - fileContent, - snippet.location - ) - const skipNormalizeIndent = - snippet.options && - snippet.options.transform !== 'rstjson' && - snippet.options.normalizeIndent === false - const normalizedContent = - snippet.options && snippet.options.transform === 'rstjson' - ? extractedContent - : skipNormalizeIndent - ? extractedContent - : normalizeIndent(extractedContent) - - const formattedContent = formatSnippetContent( - normalizedContent, - snippet.options || {} - ) - - const outputFileName = `${snippet.snippetName}.mdx` - const outputPath = path.join(OUTPUT_FOLDER_PATH, outputFileName) - const outputPathDir = path.dirname(outputPath) - - fs.mkdirSync(outputPathDir, { recursive: true }) - - fs.writeFileSync(outputPath, formattedContent, 'utf8') - - if (verbose) { - console.log(`✓ Successfully extracted snippet to: ${outputPath}`) - } - } catch (error) { - console.error( - `✗ Error processing snippet "${snippet.snippetName}": ${error.message}` - ) - throw error - } -} - -/** - * Main function - * Reads docs/config/exportConfig.json and processes each snippet. - */ -function main() { - try { - const verbose = process.argv.includes('--verbose') - const configContent = readFileContent(EXPORT_CONFIG_PATH) - const config = JSON.parse(configContent) - - if (!config.snippets || !Array.isArray(config.snippets)) { - throw new Error( - 'exportConfig.json must have a top-level "snippets" array' - ) - } - - let successCount = 0 - let errorCount = 0 - - for (const snippet of config.snippets) { - try { - processSnippet(snippet, verbose) - successCount++ - } catch (error) { - errorCount++ - } - } - - console.log( - `\nProcessing complete: ${successCount} succeeded, ${errorCount} failed` - ) - - if (errorCount > 0) { - process.exit(1) - } - } catch (error) { - console.error(`Fatal error: ${error.message}`) - process.exit(1) - } -} - -main() diff --git a/scripts/helpers/generateOutputDocs.js b/scripts/helpers/generateOutputDocs.js index 8690e5ee2..880fcd23d 100644 --- a/scripts/helpers/generateOutputDocs.js +++ b/scripts/helpers/generateOutputDocs.js @@ -11,7 +11,7 @@ const path = require('path') const { convertRstIncludeToMdx } = require('./rstIncludeToMdx') const REPO_ROOT = path.join(__dirname, '..', '..') -const EXPORT_CONFIG_PATH = path.join(__dirname, 'exportConfig.json') +const EXPORT_CONFIG_PATH = path.join(REPO_ROOT, 'scripts/docs/exportConfig.json') const OUTPUT_FOLDER_PATH = path.join(REPO_ROOT, 'docs-output') function readFileContent(filePath) { @@ -209,10 +209,36 @@ function applyIndentOption(content, normalizeIndentOption) { return normalizeIndent(content) } +/** Default indent mode when options.normalizeIndent is omitted. */ +function defaultNormalizeIndent(location) { + switch (location && location.type) { + case 'fullFile': + case 'stringMarker': + return 'baseline' + default: + return true + } +} + function trimBlankEdges(content) { return content.replace(/^\s*\n+/, '').replace(/\n+\s*$/, '') } +/** Replace literal substrings (e.g. legacy docs.daml.com URLs in YAML comments). */ +function applyUrlSubstitutions(content, globalSubstitutions, snippetSubstitutions) { + const merged = { + ...(globalSubstitutions || {}), + ...(snippetSubstitutions || {}), + } + const keys = Object.keys(merged) + if (keys.length === 0) return content + let result = content + for (const from of keys) { + result = result.split(from).join(merged[from]) + } + return result +} + function convertRstBlocksToMarkdown(content, fallbackLanguage = '') { const input = trimBlankEdges(content) const lines = input.split('\n') @@ -307,6 +333,7 @@ function formatSnippetContent(content, options, globalOptions = {}) { switch (displayStyle) { case 'wrapCode': + body = trimBlankEdges(body) if (language) { return `\`\`\`${language}\n${body}\n\`\`\`` } else { @@ -361,11 +388,19 @@ function processSnippet(snippet, verbose, globalOptions = {}) { ? extractedContent : applyIndentOption( extractedContent, - indentOpt === undefined ? true : indentOpt + indentOpt === undefined + ? defaultNormalizeIndent(snippet.location) + : indentOpt ) - const formattedContent = formatSnippetContent( + const substitutedContent = applyUrlSubstitutions( normalizedContent, + globalOptions.urlSubstitutions, + snippet.options && snippet.options.urlSubstitutions + ) + + const formattedContent = formatSnippetContent( + substitutedContent, snippet.options || {}, globalOptions ) @@ -410,6 +445,7 @@ function main() { const globalOptions = { rstIncludeRefTargets: config.rstIncludeRefTargets || {}, + urlSubstitutions: config.urlSubstitutions || {}, } for (const snippet of config.snippets) { diff --git a/scripts/helpers/rstIncludeToMdx.js b/scripts/helpers/rstIncludeToMdx.js new file mode 100644 index 000000000..8a8f7a14c --- /dev/null +++ b/scripts/helpers/rstIncludeToMdx.js @@ -0,0 +1,337 @@ +/** + * Convert a slice of splice RST (from .. include:: targets) into embeddable MDX. + * Used with export config options.transform === "rstinclude". + */ + +function trimBlankEdges(content) { + return content.replace(/^\s*\n+/, '').replace(/\n+\s*$/, '') +} + +function stripLeadingRstComments(lines) { + let i = 0 + while (i < lines.length) { + const t = lines[i].trim() + if (t === '') { + i++ + continue + } + if (/^\.\./.test(t) && !/^\.\.\s+[\w-]+::/.test(t)) { + i++ + continue + } + if (/^Copyright\b/i.test(t) || /^SPDX-License-Identifier:/i.test(t)) { + i++ + continue + } + break + } + return lines.slice(i) +} + +function dedentBlock(lines) { + if (lines.length === 0) return [] + const indents = lines + .filter((l) => l.trim() !== '') + .map((l) => (l.match(/^(\s*)/) || ['', ''])[1].length) + const min = indents.length ? Math.min(...indents) : 0 + return lines.map((l) => (l.trim() === '' ? '' : l.slice(min))) +} + +function inlineRstMarkup(text, refTargets = {}) { + let out = text + out = out.replace( + /:ref:`([^<]+?)\s*<([^>]+)>`/g, + (_, label, target) => { + const href = refTargets[target.trim()] + return href ? `[${label.trim()}](${href})` : label.trim() + } + ) + out = out.replace(/:ref:`([^`]+)`/g, (_, target) => { + const key = target.trim() + const href = refTargets[key] + if (href) { + const label = key.replace(/_/g, ' ') + return `[${label}](${href})` + } + return key + }) + out = out.replace(/\*\*([^*]+)\*\*/g, '**$1**') + out = out.replace(/``([^`]+)``/g, '`$1`') + return out +} + +function fieldListToMarkdown(lines, startIdx, refTargets = {}) { + const items = [] + let i = startIdx + while (i < lines.length) { + const line = lines[i] + const lt = line.trim() + if (lt === '') { + i++ + continue + } + if (/^\.\.\s+[\w-]+::/.test(lt)) break + if (/^\s/.test(line)) break + if (!/^[A-Z][A-Z0-9_]+$/.test(lt)) break + const term = lt + i++ + const body = [] + while (i < lines.length && /^\s+/.test(lines[i])) { + const bt = lines[i].trim() + if (bt === '') { + i++ + continue + } + if (/^\.\.\s+/.test(bt)) break + body.push(bt) + i++ + } + const bodyText = inlineRstMarkup(body.join(' '), refTargets) + const linkified = bodyText + .replace( + /form \|generic_sv_url\|/g, + 'form |generic_sv_url|' + ) + .replace( + /use \|gsf_sv_url\|/g, + 'use |gsf_sv_url|' + ) + if (term === 'ONBOARDING_SECRET') { + items.push({ + type: 'paragraph', + text: `**${term}**\n${linkified}`, + }) + } else { + items.push({ + type: 'bullet', + text: `**${term}** — ${linkified}`, + }) + } + } + return { next: i, items } +} + +function readDirectiveBlock(lines, startIdx) { + const body = [] + let i = startIdx + while (i < lines.length) { + const line = lines[i] + if (line.trim() === '') { + body.push('') + i++ + continue + } + if (!/^\s/.test(line) && /^\.\.\s+/.test(line)) break + if (!/^\s/.test(line) && line.trim() !== '' && body.length > 0) break + body.push(line) + i++ + } + return { body: dedentBlock(body), next: i } +} + +function convertRstIncludeToMdx(content, options = {}) { + const refTargets = options.refTargets || {} + const rawLines = trimBlankEdges(content).split('\n') + const lines = stripLeadingRstComments(rawLines) + const out = [] + let i = 0 + + while (i < lines.length) { + const line = lines[i] + const trimmed = line.trim() + + if (trimmed === '') { + i++ + continue + } + + const warning = trimmed.match(/^\.\.\s+warning::\s*$/) + if (warning) { + const block = readDirectiveBlock(lines, i + 1) + const inner = block.body + .filter((l) => l.trim() !== '') + .map((l) => inlineRstMarkup(l.trim(), refTargets)) + .join('\n\n') + out.push(`\n\n${inner}\n\n`) + i = block.next + continue + } + + const note = trimmed.match(/^\.\.\s+note::\s*$/) + if (note) { + const block = readDirectiveBlock(lines, i + 1) + const inner = block.body + .filter((l) => l.trim() !== '') + .map((l) => inlineRstMarkup(l.trim(), refTargets)) + .join('\n\n') + out.push(`\n\n${inner}\n\n`) + i = block.next + continue + } + + const admonition = trimmed.match(/^\.\.\s+admonition::\s*(.+)\s*$/) + if (admonition) { + const title = admonition[1].trim() + const block = readDirectiveBlock(lines, i + 1) + const parts = [] + let j = 0 + const bodyLines = block.body + while (j < bodyLines.length) { + const bl = bodyLines[j].trim() + if (bl === '') { + j++ + continue + } + if (/^\.\.\s+parsed-literal::\s*$/.test(bl)) { + j++ + const codeBlock = readDirectiveBlock(bodyLines, j) + const code = codeBlock.body + .filter((l) => l.trim() !== '') + .join('\n') + parts.push('```bash\n' + code + '\n```') + j = codeBlock.next + continue + } + const para = [] + while (j < bodyLines.length && bodyLines[j].trim() !== '') { + if (/^\.\.\s+/.test(bodyLines[j].trim())) break + para.push(bodyLines[j].trim()) + j++ + } + if (para.length) { + parts.push(inlineRstMarkup(para.join(' '), refTargets)) + } + } + const wrapper = + title.toLowerCase().includes('devnet') || + title.toLowerCase().includes('devnet-only') + ? '
\n\n' + : '' + const wrapperEnd = wrapper ? '\n\n
' : '' + const inner = parts + .map((p) => + p.startsWith('```') ? p : `\n\n${p}\n\n` + ) + .join('\n\n') + out.push(`${wrapper}${inner}${wrapperEnd}`) + i = block.next + continue + } + + const parsedLiteral = trimmed.match(/^\.\.\s+parsed-literal::\s*$/) + if (parsedLiteral) { + const block = readDirectiveBlock(lines, i + 1) + const code = block.body + .filter((l) => l.trim() !== '') + .join('\n') + out.push('```bash\n' + code + '\n```') + i = block.next + continue + } + + const codeBlock = trimmed.match(/^\.\.\s+code(?:-block)?::\s*(\S*)\s*$/) + if (codeBlock) { + const lang = codeBlock[1] || 'bash' + const block = readDirectiveBlock(lines, i + 1) + const code = block.body + .filter((l) => l.trim() !== '') + .join('\n') + out.push('```' + lang + '\n' + code + '\n```') + i = block.next + continue + } + + if (/^\.\.\s+/.test(trimmed)) { + i++ + continue + } + + if (!/^\s/.test(line) && /^[A-Z][A-Z0-9_]+$/.test(trimmed)) { + const fl = fieldListToMarkdown(lines, i, refTargets) + let inList = false + for (const item of fl.items) { + if (item.type === 'bullet') { + if (!inList) { + out.push('
    ') + inList = true + } + out.push(`
  • ${item.text}
  • `) + } else { + if (inList) { + out.push('
') + inList = false + } + out.push(`

${item.text.replace(/\n/g, '
\n')}

`) + } + } + if (inList) out.push('') + i = fl.next + continue + } + + if (trimmed.startsWith('- ')) { + const items = [] + while (i < lines.length) { + const t = lines[i].trim() + if (t.startsWith('- ')) { + items.push( + inlineRstMarkup(t.replace(/^-\s+/, ''), refTargets) + ) + i++ + } else if (t === '') { + i++ + if ( + i >= lines.length || + (!lines[i].trim().startsWith('- ') && + !/^\s+/.test(lines[i])) + ) { + break + } + } else if (/^\s/.test(lines[i]) && items.length > 0) { + items[items.length - 1] += + ' ' + inlineRstMarkup(t, refTargets) + i++ + } else { + break + } + } + out.push('
    ') + for (const item of items) { + out.push(`
  • ${item}
  • `) + } + out.push('
') + continue + } + + if (!/^\s/.test(line)) { + const para = [] + while (i < lines.length) { + const pl = lines[i] + const pt = pl.trim() + if (pt === '') break + if (/^\.\.\s+/.test(pt)) break + if (pt.startsWith('- ')) break + if (!/^\s/.test(pl) && /^[A-Z][A-Z0-9_]+$/.test(pt)) { + break + } + para.push(pt) + i++ + } + if (para.length) { + out.push( + `

${inlineRstMarkup(para.join(' '), refTargets)}

` + ) + } + continue + } + + i++ + } + + return trimBlankEdges(out.join('\n\n')) +} + +module.exports = { + convertRstIncludeToMdx, + stripLeadingRstComments, +}