From dfd8567efa73f2c5a117c7baf034f51c7c96cd89 Mon Sep 17 00:00:00 2001 From: axenteoctavian Date: Fri, 11 Jul 2025 11:32:38 +0300 Subject: [PATCH] Sovereign docs update --- docs/sovereign/distributed-setup.md | 6 ++-- docs/sovereign/local-setup.md | 11 +++++++ docs/sovereign/sovereign-api.md | 47 ++++++++++++++++++++++++++++ docs/sovereign/sovereign-explorer.md | 18 +++++++++++ docs/sovereign/sovereign-wallet.md | 4 +-- 5 files changed, 81 insertions(+), 5 deletions(-) diff --git a/docs/sovereign/distributed-setup.md b/docs/sovereign/distributed-setup.md index d60bf3868..86d856e0f 100644 --- a/docs/sovereign/distributed-setup.md +++ b/docs/sovereign/distributed-setup.md @@ -13,9 +13,9 @@ Before proceeding, ensure that a **SSH key** for GitHub is configured on your ma git clone git@github.com:multiversx/mx-chain-sovereign-go.git ``` -2. Navigate to testnet directory: +2. Navigate to project directory: ```bash - cd mx-chain-sovereign-go/scripts/testnet + cd mx-chain-sovereign-go ``` ### Step 2: Seeder Build @@ -206,7 +206,7 @@ Adjust the flags as needed. You can find all the available flags in `/mx-chain-s #### # observer ``` -./sovereignnode --profile-mode --log-save --log-level *:INFO --log-logger-name --log-correlation --use-health-service --rest-api-interface :8080 --working-directory ~/my_observer_node +./sovereignnode --profile-mode --log-save --log-level *:INFO --log-logger-name --log-correlation --use-health-service --destination-shard-as-observer 0 --rest-api-interface :8080 --operation-mode db-lookup-extension --working-directory ~/my_observer_node ``` ### Staking transaction diff --git a/docs/sovereign/local-setup.md b/docs/sovereign/local-setup.md index 25304d3e4..f5e8a3bdc 100644 --- a/docs/sovereign/local-setup.md +++ b/docs/sovereign/local-setup.md @@ -34,6 +34,17 @@ Before proceeding, ensure that a **SSH key** for GitHub is configured on your ma ### Step 2: Deploy Sovereign setup +#### Sovereign chain with no main chain connection + +1. Update chain parameters in `variables.sh` file + +2. Start the chain with local scripts: +```bash +./config.sh && ./sovereignStart.sh +``` + +#### Sovereign chain with main chain connection + Navigate to the `sovereignBridge` folder: ```bash cd sovereignBridge diff --git a/docs/sovereign/sovereign-api.md b/docs/sovereign/sovereign-api.md index 684305937..c789160ca 100644 --- a/docs/sovereign/sovereign-api.md +++ b/docs/sovereign/sovereign-api.md @@ -1,5 +1,50 @@ # API service +## Deploy Sovereign Proxy service + +:::info +Proxy service is automatically deployed if the sovereign chain was started with [local setup](/sovereign/local-setup) +::: + +### Step 1: Get the `mx-chain-proxy-sovereign-go` Repository + +Before proceeding, ensure that a **SSH key** for GitHub is configured on your machine. + +1. Clone the GitHub repository: + ```bash + git clone git@github.com:multiversx/mx-chain-proxy-sovereign-go.git + ``` + +2. Navigate to proxy directory: + ```bash + cd mx-chain-proxy-sovereign-go/cmd/proxy + ``` + +### Step 2: Edit Proxy `config.toml` file + +Example: +``` +[[Observers]] + ShardId = 0 + Address = "http://127.0.0.1:10000" + +[[Observers]] + ShardId = 4294967295 + Address = "http://127.0.0.1:10000" +``` + +:::note +For sovereign proxy there are 2 Observers required for `ShardId` 0 and 4294967295. The `Address` should be the same for both. +::: + +### Step 3: Start Sovereign Proxy service + +Build and run the proxy +```bash +go build +./proxy --sovereign +``` + ## Deploy Sovereign API service ### Step 1: Get the `mx-api-service` Repository @@ -28,6 +73,8 @@ ### Step 3: Start Sovereign API service ```bash +npm install +npm run init npm run start:testnet ``` diff --git a/docs/sovereign/sovereign-explorer.md b/docs/sovereign/sovereign-explorer.md index 6f4111f55..4d0909162 100644 --- a/docs/sovereign/sovereign-explorer.md +++ b/docs/sovereign/sovereign-explorer.md @@ -17,6 +17,24 @@ git clone https://github.com/multiversx/mx-explorer-dapp.git 2. Update the parameters and URLs with your own configuration in `config.testnet.ts` file +Example configuration: +``` +{ + default: true, + id: 'sovereign', + name: 'Sovereign', + chainId: 'S', + adapter: 'api', + theme: 'default', + egldLabel: 'SOV', + walletAddress: 'https://localhost:3000', + explorerAddress: 'https://localhost:3003', + apiAddress: 'https://localhost:3002', + hrp: 'erd', + isSovereign: true +} +``` + ### Step 3: Start Sovereign Explorer ```bash diff --git a/docs/sovereign/sovereign-wallet.md b/docs/sovereign/sovereign-wallet.md index 13aa3c1dd..5ddcba205 100644 --- a/docs/sovereign/sovereign-wallet.md +++ b/docs/sovereign/sovereign-wallet.md @@ -15,7 +15,7 @@ git clone https://github.com/multiversx/mx-lite-wallet-dapp.git cd src/config ``` -2. Update the `config.sovereign.ts` file: +2. Update the `sharedNetworks.ts` file: - for `sovereign` item - update the URLs with your own - update `sovereignContractAddress` with contract address from `sovereignConfig.toml` -> `SubscribedEvents` from `OutgoingSubscribedEvents` @@ -26,7 +26,7 @@ git clone https://github.com/multiversx/mx-lite-wallet-dapp.git ```bash yarn install -yarn start:sovereign +yarn start-sovereign ``` Read more about deploying lite wallet in [GitHub](https://github.com/multiversx/mx-lite-wallet-dapp/tree/main#multiversx-lite-wallet-dapp).