# Secret Network > Run a Secret Network node on secret-4 with binary 1.27.2. Operator documentation from Secret³ Dev. Index: https://docs.scrt.network/llms.txt # Quick Setup > Run secret-setup.py to install secretd 1.27.2, register the node, and restore the secret-4 snapshot. Source: https://docs.scrt.network/ · Markdown: https://docs.scrt.network/index.md ```bash curl -fsSL https://docs.scrt.network/secret-setup.py -o secret-setup.py && curl -fsSL https://docs.scrt.network/restore.sh -o restore.sh && python3 secret-setup.py ``` Run it on Ubuntu 22.04 or 24.04, `x86_64`, as the account that will own `~/.secretd`. Do not run it as root. If `genesis.json` already exists, the script skips the moniker and `secretd init`. It still asks for the key, the password, public RPC, public gRPC, and public LCD. It asks for prune only when `app.toml` has no pruning line. It rewrites `p2p.seeds` to the seven Home-page peers and leaves `persistent_peers` as they are. On a physical host, enable SGX in firmware first. On Azure, use a DCsv3 or DCdsv3 Gen2 image. The script installs the Intel DCAP packages, writes `/etc/sgx_default_qcnl.conf` for that host, enables and restarts `aesmd`, adds your user to `sgx` and `sgx_prv`, then runs `init-enclave`. On a new home it asks, in this order: 1. Moniker. 2. Key name. Use letters, digits, `.`, `_`, or `-`. 3. Keyring password. It is not echoed. Use at least 8 characters and at most 72 bytes. If that name is already in the file keyring, the script uses it. If it is not, the script creates it and prints the mnemonic. Write the mnemonic down. 4. Public RPC? Answer `yes` or `no`. 5. Public gRPC? Answer `yes` or `no`. 6. Public LCD? Answer `yes` or `no`. Yes does not bind `0.0.0.0`. 7. Prune setting: `default`, `nothing`, or `everything`. `nothing` keeps archive state. `archive` is accepted as `nothing`. Then it does this: 1. Install `curl`, `ca-certificates`, `jq`, `zstd`, `tar`, and `libsnappy1v5`. 2. Probe Azure metadata for one second with `--noproxy '*'`. A DCsv3 or DCdsv3 answer and any other host both install the full Intel list, including `libsgx-dcap-default-qpl`. Do not install `az-dcap-client`. Then download the v1.27.2 `MAINNET` deb for that Ubuntu release, check the release SHA-256, and install it with `dpkg -i`. Require `secretd version` to print `1.27.2`. The deb does not ship `libsgx_dcap_ql.so.1`, `libsgx_dcap_quoteverify.so.1`, or `libsgx_urts.so.2`. 3. Set the client keyring backend to `file` and the client chain-id to `secret-4`. 4. Run `secretd init --chain-id secret-4` when the home is new. On resume, skip this step. 5. Set `p2p.seeds` in `config.toml` to the seven public secret-4 peers on [Create the node home](/operators/home). On a new home, leave `persistent_peers` empty. On resume, leave `persistent_peers` unchanged. For chain-id `secret-4`, `init` writes three peers, `scrt-seed-01.scrtlabs.com`, `scrt-seed-02.scrtlabs.com`, and `scrt-seed-03.scrtlabs.com`. This step replaces that line. 6. Write `/etc/sgx_default_qcnl.conf` for the host from step 2, then enable and restart `aesmd`, then add your user to `sgx` and `sgx_prv`. A physical host gets Intel PCS v4. Azure 22.04 and Azure 24.04 get the DCAP 1.22 file: PCK from THIM, collateral from Intel PCS v4. 7. Run `secretd init-enclave` under `sg sgx` / `sgx_prv` so the new groups apply without logging out. 8. Sign `tx register auth` for `/opt/secret/.sgx_secrets/attestation_combined.bin` (`$SCRT_SGX_STORAGE` if you set it). Send it to `https://rpc.secret.mainnet.secret3.dev` with `--from` your key, `--chain-id secret-4`, `--keyring-backend file`, `--gas 700000`, and `--gas-prices 0.1uscrt`. The password goes on stdin. Do not use `--gas auto`. 9. Wait until that transaction is in a block. If the machine is not on the allowlist, the script stops. If the balance is under 70,000 `uscrt` (0.07 SCRT), the script prints the address and stops before it sends the transaction. 10. Run `secretd query register secret-network-params`, `secretd dump` on `pubkey.bin`, `secretd query register seed`, and `secretd configure-secret`. That writes `~/.secretd/.node/new_seed.json`. 11. Set `pruning` to the value you chose. Set `iavl-disable-fastnode = true` in the root of `app.toml`. Leave RPC on `tcp://127.0.0.1:26657`, LCD on `tcp://127.0.0.1:1317`, and gRPC on `127.0.0.1:9090`. Answering yes does not bind `0.0.0.0`. If you answered yes, set `enabled-unsafe-cors = false` and publish a proxy on [RPC and LCD](/operators/rpc-lcd). Firewall `26657`, `1317`, `9090`, `6060`, and `26660`. 12. Run `restore.sh` from this site. It downloads the snapshot from `https://mainnet-secret-snapshot.secret3.dev`. A rerun skips `restore.sh` when `data/application.db` or `data/blockstore.db` exists and `127.0.0.1:26657` does not answer, and it does not print Snapshot restore finished. If you will not run the script, follow Manual from [SGX prerequisites](/operators/sgx) through [Sync](/operators/full-node). # Allowlist and machine replacement > Put the machine id on the enclave allowlist, including on Azure. Source: https://docs.scrt.network/operators/allowlist/ · Markdown: https://docs.scrt.network/operators/allowlist/index.md Use this when `check-hw` succeeded and `tx register auth` failed the allowlist, or when you are moving a machine id that is already bound to your consensus key. Take the machine id from `check-hw` (40 hex characters). To replace a machine, the old id must already be on the list and bound to the consensus key that the new quote will carry. Hardware is on [SGX prerequisites](/operators/sgx). Every platform, including Azure, needs the machine id on the enclave allowlist. ## Add a new id Do this before the first successful `tx register auth`. `check-hw` does not add the id. The enclave boots with a compiled-in allowlist. Governance can add ids after that. Write `whitelist-proposal.json` with exactly one message. Put your validator moniker, alias, team, or company in `title` and `summary`, not the machine id. Replace WhisperNode with the name people already know you by. If you are whitelisting a full node, say full node instead of validator in the summary. ```json { "messages": [ { "@type": "/secret.compute.v1beta1.MsgUpdateMachineWhitelistProposal", "authority": "secret10d07y265gmmuvt4z0w9aw880jnsr700jc88vt0", "title": "Add machine id for WhisperNode", "description": "Whitelist Machine ID <40 hex chars, no 0x> so WhisperNode can register a validator on secret-4.", "machine_id": "<40 hex chars, no 0x>" } ], "metadata": "", "deposit": "5000000000uscrt", "title": "Add machine id for WhisperNode", "summary": "Whitelist Machine ID <40 hex chars, no 0x> so WhisperNode can register a validator on secret-4.", "expedited": false } ``` Expedited is the same file with `"deposit": "12500000000uscrt"` and `"expedited": true`. Voting runs 7 days on a normal proposal and 1 day on an expedited one. Quorum is 0.334 and the veto threshold is 0.334. The pass threshold is 0.5 for normal and 0.667 for expedited. Submit the file: ```bash secretd tx gov submit-proposal whitelist-proposal.json \ --from KEY --chain-id secret-4 \ --node https://rpc.secret.mainnet.secret3.dev \ --gas 700000 --gas-prices 0.1uscrt ``` `700000` is the same gas ceiling used for [Register the node](/operators/register). It is not a measured cost for this message. - `authority` stays `secret10d07y265gmmuvt4z0w9aw880jnsr700jc88vt0`. Leave `metadata` empty. The outer `title` and `summary` match the message `title` and `description`. - `machine_id` is one string: the 40 hex characters `check-hw` prints, with no `0x`. Several ids are that string separated by commas and no spaces. - The deposit that opens voting on a normal proposal is `5000000000uscrt` (5000 SCRT). The initial-deposit ratio is 0, so a smaller first deposit keeps the proposal in the deposit period until the minimum is met. Any later deposit has to be at least `50000000uscrt` (50 SCRT). The proposal id is in the submit response. While the total is under `5000000000uscrt`, the proposal stays in the deposit period for 7 days. Add the shortfall with a new transaction. The amount is only what you are adding now, in `uscrt`, and that amount has to be at least `50000000uscrt` (50 SCRT). If the gap is smaller than 50 SCRT, send 50 SCRT. An expedited proposal uses the same command with a minimum of `125000000uscrt` (125 SCRT). ```bash secretd tx gov deposit uscrt \ --from KEY --chain-id secret-4 \ --node https://rpc.secret.mainnet.secret3.dev \ --gas 700000 --gas-prices 0.1uscrt ``` `700000` is the same gas ceiling as submit. It is not a measured cost for this message. Check the total on secretnodes.com before you send it. Open [https://secretnodes.com/governance](https://secretnodes.com/governance) and select Deposit. The card reads Needs deposit · `` / 5,000 SCRT min. Open that card. The address is `https://secretnodes.com/governance/`. Deposits is the total from every depositor. Deposit end is the deadline. Show depositors lists each address and the amount that address has put in. Your row is the running total for your key, because a second deposit from the same key adds to that row. Send `uscrt` equal to 5000 SCRT minus the Deposits figure, unless that gap is under 50 SCRT. When Deposits is at least 5,000 SCRT, the card leaves Deposit and the proposal is in voting. Do not send another deposit to reach the allowlist step. If the total is still short when Deposit end passes, the proposal does not enter voting and the deposit is returned. `min_initial_deposit_ratio` is 0. A later deposit on a normal proposal must be at least 50 SCRT. On an expedited proposal that floor is 125 SCRT. - Passing the proposal does not write the allowlist. That handler checks the authority and emits an event. After status `PROPOSAL_STATUS_PASSED`, run `update-machine-whitelist` below with the same `machine_id` string as the second argument. One message only. A second message in the file makes that follow-up fail. After status `PROPOSAL_STATUS_PASSED`, send a second transaction. Pass two arguments. `machine_ids` must equal the proposal string exactly. ```bash secretd tx compute update-machine-whitelist \ --from KEY --chain-id secret-4 \ --node https://rpc.secret.mainnet.secret3.dev \ --gas 700000 --gas-prices 0.1uscrt ``` The transaction fails if the proposal is not passed, does not contain exactly one message, or has the wrong type URL. On success the id is added. Do not use `--replace-machine-id` for an id that has never been on the list. ## Replace a listed machine Stop the old process first. See [Validator](/operators/validator). Copy `config/priv_validator_key.json` from the old home to the new home before `init-enclave`, so the new quote’s owner field is that same key. Then run `init-enclave`, then: ```bash secretd tx register auth /opt/secret/.sgx_secrets/attestation_combined.bin \ --replace-machine-id <40 hex chars of the old machine id> \ --from KEY --chain-id secret-4 \ --node https://rpc.secret.mainnet.secret3.dev \ --gas 700000 --gas-prices 0.1uscrt ``` Pass 40 hex characters. Anything else is treated as no replacement. The swap succeeds only when the old id is on the list, its stored owner equals this quote’s validator key, and the new id is not already present. Failures log `Failed to replace MachineID - machine … not owned by validator key …`, `unknown machine`, or `machine … already exists`, and the transaction is `InvalidCert`. The allowlist key is the quote’s PPID hash. `--replace-machine-id` is only the id you are removing. After a successful replace the old machine logs `Self machine included: false`. ## Id already listed on this machine Register with no `--replace-machine-id` to bind this machine to your validator key. An unknown machine fails with `unknown machine`. Produce the quote and seed on [Register the node](/operators/register). ## Upgrade Replacing the deb on a machine that is already registered does not add or remove an id. A hardware change that changes the PPID does. Follow the replace steps above. # Archive node > Set pruning to nothing before the heights you need are committed. Source: https://docs.scrt.network/operators/archive/ · Markdown: https://docs.scrt.network/operators/archive/index.md Use the same host, home, and registration as [Sync](/operators/full-node). The oldest height you must query has to still be on disk. Install the v1.27.2 `MAINNET` deb. A pruned join is [Sync](/operators/full-node). Set two keys in `~/.secretd/config/app.toml` before the process starts. The unit is `ExecStart=/usr/local/bin/secretd start` with no pruning flag. - `pruning = "nothing"` keeps every IAVL version. - `min-retain-blocks = 0` tells Comet not to drop blocks. It does not keep IAVL versions. It is also the default. A default full node can serve an old block and still fail the state query. | Key | Archive value | What it does | | --- | --- | --- | | `pruning` | `"nothing"` | Keep every IAVL version. | | `min-retain-blocks` | `0` | Do not prune Comet blocks. Also the SDK default. | Use `pruning-keep-recent` and `pruning-interval` only when `pruning = "custom"`. Do not use `custom` to keep everything: `pruning-interval` must be at least `10` and must not be `0`, and `pruning-keep-recent` must be at least `2`. An unknown `pruning` string is an error at start. There is no `pruning-keep-every`. Use the keys in the table above. | `pruning` | Versions kept | Delete cadence | | --- | --- | --- | | `default` | last `362880` | every 10 heights | | `nothing` | all | never | | `everything` | current plus previous (`KeepRecent = 2`) | every 10 heights | | `custom` | last `pruning-keep-recent` | every `pruning-interval` heights | `default` keeps the last `362880` versions, about 3.5 weeks if blocks are 6 seconds. These keys are not the archive switch: - Leave `[tx_index] indexer` at `"kv"`. `"null"` does not serve tx search. - Leave `[storage] discard_abci_responses` at `false`. `true` drops the responses `/block_results` and event reindex need. - Leave `[wasm] store-sgx-data` at `false` unless you want ecall and execution traces. It is not IAVL history. Turning it on later does not recreate records for heights already passed. `pruning = "nothing"` keeps ciphertext. It does not decrypt it. A historical secret-contract query still needs a registered enclave. Do not start mainnet with `scripts/start-node.sh`. That script passes `--pruning=nothing` and `SGX_MODE=SW`. ## When you need it Set `pruning = "nothing"` before you serve an ABCI, LCD, or gRPC query at an old height with header `x-cosmos-block-height`. If the version is gone, `GetImmutable` returns `version does not exist. Version has either been pruned, or is for a future block height`. A latest-height query, a `/block` for a height still in the blockstore, `/tx` when the index exists, and `/block_results` when ABCI responses were kept do not need `pruning = "nothing"` by themselves. Staking `historical_entries` `10000` is a ring in module state. It does not replace an old IAVL version. Do not use the release RPC as an archive. ## Do not expect deleted heights to come back Once versions are deleted, they stay deleted. Switching a live node to `nothing` keeps versions still on disk and every version committed after the restart. It does not rebuild deleted versions. The switch also does not bring back blocks you never downloaded, blocks already pruned because `min-retain-blocks` was non-zero, ABCI responses discarded while `discard_abci_responses = true`, tx index entries never written or deleted with `data/`, ecall records for heights where `store-sgx-data` was false, or any height the pruned tarball never contained. A pruned-snapshot join starts at the snapshot height. ## Steps 1. Pick the oldest height that must stay queryable. 2. If that height is below the published snapshot, do not start from the Secret³ tarball. Replay from the first height in range. 3. Before the first commit under a pruning strategy, set `app.toml`: ```toml pruning = "nothing" min-retain-blocks = 0 ``` Leave `pruning-keep-recent` and `pruning-interval` unused. Leave `indexer = "kv"` and `discard_abci_responses = false` if `/tx` and `/block_results` matter. Set `store-sgx-data = true` only if the ecall and trace methods must be stored. 4. Replay from the first height in range. 5. Install the `MAINNET` deb. `dpkg` replaces the systemd unit, not `app.toml`. After that install, check `pruning` is still `"nothing"`. See [Upgrade a seeded node](/operators/upgrade/v1.27.2). 6. Restart `secret-node`. Query a height older than 362880 blocks, using a height the blockstore actually has. 7. To stop archiving, set `pruning` to `"default"` or `"everything"` and restart. Deleted versions do not come back. To prune blocks as well, set `min-retain-blocks` to a non-zero offset and restart. ## Disk `pruning = "nothing"` grows for the life of the node. Plan disk for that growth. Set the keys before the first commit of the range. On a node that has been pruning, the switch only protects what is still on disk and what comes next. A binary upgrade does not change `pruning`. `store-sgx-data` does not rebuild IAVL history. A machine without SGX cannot serve encrypted queries. To publish the API, follow [RPC and LCD](/operators/rpc-lcd). Keep Prometheus off, or bind it to `127.0.0.1:26660`. # Boards > CPUs and motherboards verified for Intel SGX and DCAP on secret-4 nodes. Source: https://docs.scrt.network/operators/boards/ · Markdown: https://docs.scrt.network/operators/boards/index.md This is hardware that has been verified. It is not a complete catalog. ## CPUs - Xeon E-23xxG - Xeon D-1700, D-2700, D-1800, D-2800. BIOS updates may be infrequent. - Xeon Max. BIOS updates may be infrequent. - Xeon 3rd Gen Scalable. Supported. Multi-socket needs extra configuration. - Xeon 4th Gen Scalable. Supported. - Xeon 5th Gen Scalable. Supported. ## Motherboards These boards expose SGX and DCAP in BIOS: - Supermicro X11SCM-F. Systems SYS-5019C-M and SYS-5019C-MR. - Supermicro X11SCW-F. System SYS-5019C-WR. - Supermicro X11SCZ-F. - Supermicro X11SSL-F. - Dell R240. BIOS 2.14.1. - Dell R350. BIOS 1.7.3. - HP DL20 G10. BIOS 1.80_07-20-2023. - HP DL20 G10+. - ASUS RS100-E10-PI2. BIOS 5601. See [Requirements](/operators/requirements) for OS, memory, storage, and device nodes. # Sync > Catch up a secret-4 process from the pruned snapshot. Source: https://docs.scrt.network/operators/full-node/ · Markdown: https://docs.scrt.network/operators/full-node/index.md Finish [Create the node home](/operators/home), [Register the node](/operators/register), and [SGX prerequisites](/operators/sgx) first. Require a non-empty `~/.secretd/.node/new_seed.json` or `seed.json`. `secretd version` must be `1.27.2` or newer. You need `curl`, `tar`, `sha256sum`, `jq`, and `zstd` or `pzstd`. ## Snapshot ```bash curl -fsSL -H 'Cache-Control: no-cache' -o restore.sh "https://docs.scrt.network/restore.sh?t=$(date +%s)" && bash restore.sh ``` Download `restore.sh` from the host that served this page. The script fetches `latest.json` and the tarball from `https://mainnet-secret-snapshot.secret3.dev`. `restore.sh` exits immediately when `hostname -s` is `archive-00` or `archive-01`. Run it as the account that owns `~/.secretd`. The restore replaces `data/`, `.compute/`, `config/genesis.json`, and `config/addrbook.json`. It keeps `config/config.toml`, `config/priv_validator_key.json`, and `.node/`. Before this script starts `secret-node`, set `iavl-disable-fastnode = true` in the root of `app.toml`, above the first `[section]`. The fresh value is `false`. A copy under `[wasm]` is ignored. `restore.sh` does not edit `app.toml`. It does not replace `/opt/secret/.sgx_secrets/data-.bin`. It compares the local RPC height only when `127.0.0.1:26657` answers. If that port does not answer and `application.db` or `blockstore.db` is already there, `restore.sh` stops and changes nothing. `restore.sh` writes `priv_validator_state.json` at height 0. Leave it. If the local height is above the snapshot: - The blocks above the snapshot are still on disk. Do not restore this snapshot onto this enclave. Put those blocks back. - This consensus key is already a live validator. Do not register a second seed to get past the snapshot. The node is caught up when `catching_up` is `false` and the local height matches `https://rpc.secret.mainnet.secret3.dev/status` within a block or two. ## Watch ```bash journalctl -u secret-node -f curl -fsS http://127.0.0.1:26657/status curl -fsS http://127.0.0.1:26657/net_info ``` While catching up, require the unit `active`, `secretd version` `1.27.2`, `.result.sync_info.catching_up` `true`, `latest_block_height` increasing across two samples, `.result.node_info.network` `secret-4`, and `n_peers` greater than 0. `max_num_outbound_peers` is 40, so a handful of peers is enough. Caught up means `catching_up` is `false` and local height matches `https://rpc.secret.mainnet.secret3.dev/status` within a block or two. Point the CLI at the local RPC only after the node is up: ```bash secretd config set client chain-id secret-4 secretd config set client node tcp://127.0.0.1:26657 ``` Registration commands pass `--node` and `--chain-id` on the command line. After this process is up, point the CLI at it. Do not leave the CLI on the public RPC when you mean to query this process. ## Day-2 ```bash sudo systemctl start secret-node sudo systemctl stop secret-node sudo systemctl restart secret-node systemctl status secret-node journalctl -u secret-node -n 100 --no-pager ``` The unit uses `Restart=on-failure`, `RestartSec=3`, and `StartLimitInterval=0`, so systemd keeps retrying. A later package install overwrites the unit. Copy the unit aside, as on [Upgrade a seeded node](/operators/upgrade/v1.27.2), before you restart after `dpkg`. `secretd check-enclave` is a local SGX check. The host steps are [SGX prerequisites](/operators/sgx). If the node already has a seed and is caught up, upgrade it and then use these health checks. ## Failure modes | What you see | What to do | | --- | --- | | `auto-register is not available yet; register with tx register auth` | Follow [Register the node](/operators/register). | | Missing `libsgx_urts.so.2`, `libsgx_dcap_ql.so.1`, or `libsgx_dcap_quoteverify.so.1` | The deb is installed and the SGX runtime is not. Return to [SGX prerequisites](/operators/sgx). | | Dynamic linker error for `libgo_cosmwasm.so` or `librandom_api.so` | Put `/usr/lib` on the loader path, or finish the deb install. The unit sets `SCRT_ENCLAVE_DIR` for the enclave, not for these host libraries. | | `This machine is not on the PPID whitelist` | Follow [Allowlist and machine replacement](/operators/allowlist). | | `The CPU is deprecated. Running forbidden` | The FMSPC is in the end-of-life set. | | `invalid encrypted seed format …` | Strip the `0x` prefix. | | Panic `Initialize node seed failed` | `new_seed.json` and `seed.json` are missing or rejected. Register again. | | Halt and `minimum-gas-prices` empty | Set `minimum-gas-prices` to `0.1uscrt`. | | `genesis.json file already exists` | Do not re-init and do not pass `--overwrite`. Leave the home and continue at Register or Sync. `restore.sh` replaces the placeholder genesis. | | Height stuck, `n_peers` 0 | Seeds are empty or unreachable, or outbound TCP `26656` is blocked. | | `Height range not consequent` | The enclave's sealed height is ahead of the snapshot. The tarball did not replace `data-.bin`. | | `catching_up` false while far below the release RPC | Genesis is wrong, or the process is not on `secret-4`. | | Unit runs as `root` and the seed is under your home | You ran `dpkg` from a root shell. Put the seed and genesis in that user’s home, or set `User=` to the account that owns them. | After `catching_up` is false, continue at [Validator](/operators/validator) or [RPC and LCD](/operators/rpc-lcd). Set archive pruning before the heights you need are committed. # Create the node home > Init a secret-4 home and set p2p.seeds before registration and snapshot restore. Source: https://docs.scrt.network/operators/home/ · Markdown: https://docs.scrt.network/operators/home/index.md Run this after [Install secretd](/operators/install) and before `init-enclave`. Run the commands as the unit `User=`. Do not re-init a home that already exists. [Upgrade a seeded node](/operators/upgrade/v1.27.2) leaves `config.toml` and `genesis.json` in place. ## Init `secretd init` writes `config/config.toml`, `config/app.toml`, and a placeholder `config/genesis.json`. It creates `config/node_key.json` and `config/priv_validator_key.json`. Keep `priv_validator_key.json`. You need it before `init-enclave`. Do not generate a second consensus key after the quote. ```bash secretd init --chain-id secret-4 ``` If `genesis.json` already exists, `init` refuses unless you pass `--overwrite`. Do not pass `--overwrite`. `--overwrite` replaces `genesis.json` with a new placeholder. An existing `priv_validator_key.json` stays. The placeholder stays until Sync runs `restore.sh`. After `init`, replace `p2p.seeds`. For chain-id `secret-4`, the installed binary writes three peers on `scrt-seed-01.scrtlabs.com`, `scrt-seed-02.scrtlabs.com`, and `scrt-seed-03.scrtlabs.com`. Replace that line with the seven peers below. A home that already ran `init` keeps the old `config.toml` until you edit that line. | Node | Peer | | --- | --- | | snapshot-node | `d047c7c0431e13ef914a928f4d738870c3de932d@162.251.234.169:26656` | | s2-g00 | `9c530e33a6737efb14c5dc4c087188815375ed5f@162.251.234.143:26656` | | spare-00 | `08a1f831254bf6198a6535011ffccbefbbcf240b@162.251.234.170:26656` | | spare-01 | `d3827d7a908ffc87b62a72ee2706e3d4082ababe@162.251.234.171:26656` | | spare-02 | `7fb7e3751a3aff1d70c03fa1aa19b78cb12525a5@162.251.234.172:26656` | | archive-00 | `3f5ade9acf08c1dd93451e27729926645d6722e2@162.251.234.131:26656` | | archive-01 | `ad039e1610dbfd507b4e91003b7c8ff1b6670e92@162.251.234.132:26656` | ```toml seeds = "d047c7c0431e13ef914a928f4d738870c3de932d@162.251.234.169:26656,9c530e33a6737efb14c5dc4c087188815375ed5f@162.251.234.143:26656,08a1f831254bf6198a6535011ffccbefbbcf240b@162.251.234.170:26656,d3827d7a908ffc87b62a72ee2706e3d4082ababe@162.251.234.171:26656,7fb7e3751a3aff1d70c03fa1aa19b78cb12525a5@162.251.234.172:26656,3f5ade9acf08c1dd93451e27729926645d6722e2@162.251.234.131:26656,ad039e1610dbfd507b4e91003b7c8ff1b6670e92@162.251.234.132:26656" ``` That line is `p2p.seeds`. A seed is dialed for addresses and then dropped. Leave `p2p.persistent_peers` empty. `init` also sets: | Key | Value `init` writes | Comet default it replaces | | --- | --- | --- | | `p2p.max_num_inbound_peers` | `320` | `40` | | `p2p.max_num_outbound_peers` | `40` | `10` | | `mempool.size` | `10000` | `5000` | | `block_sync.version` | `v0` | `v0` | Leave `p2p.persistent_peers` as `""`, `db_backend` as `goleveldb`, `p2p.laddr` as `tcp://0.0.0.0:26656`, and `rpc.laddr` as `tcp://127.0.0.1:26657`. Keep RPC on loopback until you follow [RPC and LCD](/operators/rpc-lcd). ## Persistent peers ```toml persistent_peers = "" ``` Leave `persistent_peers` empty until you have peers to add. ## Genesis `secretd init` leaves a placeholder `~/.secretd/config/genesis.json`. The chain genesis is about 1.36 GiB and ships inside the pruned snapshot tarball on `https://mainnet-secret-snapshot.secret3.dev`. Do not replace that file by hand. Do not pull genesis from the RPC. After [Register the node](/operators/register), run `restore.sh` from [Sync](/operators/full-node). It downloads the snapshot and copies `genesis.json` and `addrbook.json` into `config/` while keeping your node keys and `config.toml`. Quick Setup runs the same restore at the end. ## app.toml `secretd init` already wrote `app.toml`. Edit that file before start. Do not run `secretd start` to create it. The 1.27.2 binary writes `minimum-gas-prices = "0.0125uscrt"`. Set it to `0.1uscrt` before you start the node: ```toml minimum-gas-prices = "0.1uscrt" ``` In that same root table, set `iavl-disable-fastnode = true`. The fresh value is `false`, which turns the IAVL fastnode index on. The first start then builds that index. Keep the key above the first `[section]`. The same line under `[wasm]` is ignored. Confirm a fresh file also shows: | Key | Value | | --- | --- | | `iavl-disable-fastnode` | `false` | | `api.enable` | `true` | | `api.swagger` | `true` | | `api.enabled-unsafe-cors` | `true` | | `grpc.concurrency` | `false` | | `grpc-web.enable` | `true` | | `wasm.contract-query-gas-limit` | `10000000` | | `wasm.contract-memory-cache-size` | `0` | | `wasm.contract-memory-enclave-cache-size` | `200` | | `wasm.store-sgx-data` | `false` | A new home uses `pruning = "default"` (last `362880` states, delete every 10) and `min-retain-blocks = 0`. Set `pruning = "nothing"` on [Archive node](/operators/archive) before the heights you need are committed. Do not leave `minimum-gas-prices` empty. Startup halts if it is empty; at `0.0125uscrt` the node starts with the package default until you change it. `api.address` is `tcp://localhost:1317` and `grpc.address` is `localhost:9090`. Do not publish `1317` or `9090` yet. A fresh file sets `enabled-unsafe-cors = true`. Turn that off in [RPC and LCD](/operators/rpc-lcd) before the API is reachable. ## Ports and paths | Item | Value | | --- | --- | | Chain-id | `secret-4` | | Bech32 prefix | `secret` | | Fee denom | `uscrt` | | Node home | `~/.secretd` of the unit `User` | | Enclave dir | `SCRT_ENCLAVE_DIR=/usr/lib` | | SGX storage | `/opt/secret/.sgx_secrets` unless `SCRT_SGX_STORAGE` is set | | P2P | `tcp://0.0.0.0:26656` | | RPC | `tcp://127.0.0.1:26657` | | ABCI proxy | `tcp://127.0.0.1:26658` | | Prometheus | `:26660`, `prometheus = false` | Create a custom `SCRT_SGX_STORAGE` directory yourself before `init-enclave`. The command does not create a missing custom path. The package creates `/opt/secret/.sgx_secrets`. Next: [Register the node](/operators/register). `priv_validator_key.json` must already be on disk. # Install secretd > Install the v1.27.2 MAINNET deb on Ubuntu 22.04 or 24.04. Do not start the unit yet. Source: https://docs.scrt.network/operators/install/ · Markdown: https://docs.scrt.network/operators/install/index.md Finish [SGX prerequisites](/operators/sgx) first. Use Ubuntu 22.04 or 24.04, `x86_64`. :::caution Do not start `secret-node` yet. `secretd start` panics without a seed file. Do not build the public git tag and run it as mainnet. Install the deb. ::: Download [Secret3dev/SecretNetwork](https://github.com/Secret3dev/SecretNetwork/releases/tag/v1.27.2) tag `v1.27.2`. ## Install the deb ```bash set -euo pipefail . /etc/os-release case "$VERSION_ID" in 22.04|24.04) ;; *) echo "Ubuntu 22.04 or 24.04"; exit 1 ;; esac uname -m # x86_64 deb="secretnetwork_1.27.2_MAINNET_goleveldb_amd64_ubuntu-${VERSION_ID}.deb" curl -fL -o "/tmp/$deb" \ "https://github.com/Secret3dev/SecretNetwork/releases/download/v1.27.2/$deb" case "$VERSION_ID" in 22.04) echo "ffcca0fe04422228ae92b0bb216808a0eafa1030a7073d1bf1ca347a0781fcbb /tmp/$deb" ;; 24.04) echo "f90e7104d6308d491c9cfdb691672302b17b3364c3b355962479adc46da3d903 /tmp/$deb" ;; esac | sha256sum -c - sudo dpkg -i "/tmp/$deb" test "$(secretd version | head -1)" = 1.27.2 systemctl cat secret-node ``` Confirm `User=` is the account that will own `~/.secretd`. `sudo dpkg -i` from user `ubuntu` writes `User=ubuntu` and `WorkingDirectory=/home/ubuntu`. A root shell with empty `SUDO_USER` writes `User=root` and `/root`. Do not install from a root shell. ### Ubuntu 22.04 `secretnetwork_1.27.2_MAINNET_goleveldb_amd64_ubuntu-22.04.deb` SHA-256 `ffcca0fe04422228ae92b0bb216808a0eafa1030a7073d1bf1ca347a0781fcbb` ### Ubuntu 24.04 `secretnetwork_1.27.2_MAINNET_goleveldb_amd64_ubuntu-24.04.deb` SHA-256 `f90e7104d6308d491c9cfdb691672302b17b3364c3b355962479adc46da3d903` Do not install a `TRINITY` deb on `secret-4`. Those packages are the testnet build. ## Files the deb installs - `/usr/local/bin/secretd` - `/usr/local/bin/secretcli` - `/usr/lib/libgo_cosmwasm.so` - `/usr/lib/librandom_api.so` - `/usr/lib/librust_cosmwasm_enclave.signed.so` The 22.04 package is `secretnetwork` `1.27.2` `amd64` and depends only on `libsnappy1v5`. `dpkg` does not ship `config.toml`, `app.toml`, or `check-hw`. The signed enclave `.so` in the two mainnet debs is the same file (sha256 `bf11471011a5ec3cdc3f33ae9aea66e8c0638227a8cf3ee9af9a306c2a039316`). `secretd`, `secretcli`, and `libgo_cosmwasm.so` differ between the debs. Mainnet measurement: `f0d59dd2561b1c86de88ef27b8b9146bcc2c1b02875ba3c48db48a32bb20d90b`. Use Ubuntu 22.04 or 24.04 only. The filenames are `amd64` and `goleveldb` only. ## Unit the package writes `postinst` writes this unit, then runs `daemon-reload`. It also creates `/opt/secret/.sgx_secrets`, `/opt/secret/.secretd/.node`, and `~$SUDO_USER/.sgx_secrets`, changes owner of `/opt/secret` to `SUDO_USER`, and runs `chmod -R 777 /opt/secret`. `/opt/secret/.sgx_secrets` holds `data.sealed`, `data-.bin`, and the quote. ```ini [Unit] Description=Secret node service After=network.target [Service] Type=simple Environment=SCRT_ENCLAVE_DIR=/usr/lib WorkingDirectory=/home/ ExecStart=/usr/local/bin/secretd start User= Restart=on-failure StartLimitInterval=0 RestartSec=3 LimitNOFILE=65535 LimitMEMLOCK=209715200 [Install] WantedBy=multi-user.target ``` `LimitMEMLOCK=209715200` is a 200 MiB memlock cap, not the RAM size. `ExecStart` does not pass `--home`. The process uses that user’s `~/.secretd`. The unit does not set `SCRT_SGX_STORAGE`, so enclave files go to `/opt/secret/.sgx_secrets`. `/opt/secret/.secretd/.node` stays unused unless you later add `--home /opt/secret/.secretd`. `postrm` stops and disables `secret-node`, deletes the unit, and reloads systemd. After each `dpkg -i`, set `/opt/secret` and `/opt/secret/.sgx_secrets` owned by the unit user and not world-writable: ```bash unit="$(systemctl show -p User --value secret-node)" sudo chown -R "$unit:$unit" /opt/secret /opt/secret/.sgx_secrets sudo find /opt/secret /opt/secret/.sgx_secrets -type d -exec chmod 750 {} \; sudo find /opt/secret /opt/secret/.sgx_secrets -type f -exec chmod 600 {} \; ``` The next package install opens them again until `postinst` is changed. On a fresh machine, keep the unit `dpkg` wrote. If you already customized the unit, copy it aside first and follow [Upgrade a seeded node](/operators/upgrade/v1.27.2). Next, [create the node home](/operators/home). # Register the node > Produce a DCAP quote and sign tx register auth. Source: https://docs.scrt.network/operators/register/ · Markdown: https://docs.scrt.network/operators/register/index.md Use this on a new machine, or after you reset the enclave. If the node already has a seed, follow [Upgrade a seeded node](/operators/upgrade/v1.27.2) and do not register again. Finish [SGX prerequisites](/operators/sgx). Use `secretd` 1.27.2. `~/.secretd/config/priv_validator_key.json` must already exist, from `secretd init` on this home or copied from the machine you are replacing. Stop the old process before you copy that key. Create the fee key in the file keyring if that name is not already there. It is not the consensus key. The key needs at least 0.07 SCRT (70,000 `uscrt`) before you sign. ```bash secretd config set client keyring-backend file secretd config set client chain-id secret-4 secretd keys add KEY --keyring-backend file ``` Skip `keys add` when that name is already in the file keyring. :::notice `auto-register` is being rebuilt. ::: `init-enclave` writes a DCAP quote. The report data is the registration public key plus the ed25519 public key of `priv_validator_key.json`, unless you pass `--unbound-attestation`. `tx register auth` submits `attestation_combined.bin`. On Azure, submit the file `init-enclave` wrote. Do not send it to Azure Attestation and do not replace it. On success, `configure-secret` writes `~/.secretd/.node/new_seed.json`. Do not run `secretd start` until that file exists. Without it, start panics `Initialize node seed failed`. ## Steps ```bash sg sgx -c "sg sgx_prv -c 'secretd init-enclave'" secretd tx register auth /opt/secret/.sgx_secrets/attestation_combined.bin \ --from KEY --chain-id secret-4 \ --keyring-backend file \ --node https://rpc.secret.mainnet.secret3.dev \ --gas 700000 --gas-prices 0.1uscrt # wait until that transaction is in a block secretd query register secret-network-params \ --node https://rpc.secret.mainnet.secret3.dev NODE_ID=$(secretd dump /opt/secret/.sgx_secrets/pubkey.bin) SEED=$(secretd query register seed "$NODE_ID" \ --node https://rpc.secret.mainnet.secret3.dev | sed 's/^0x//') secretd configure-secret node-master-key.txt "$SEED" ``` Run `secret-network-params` and `configure-secret` from the directory that contains `node-master-key.txt`. ```bash test -s ~/.secretd/.node/new_seed.json ``` If `genesis.json` is still the placeholder, run `restore.sh` from [Sync](/operators/full-node) before you enable the unit. `restore.sh` refuses to run without `new_seed.json` or `seed.json`. After restore finishes: ```bash sudo systemctl enable --now secret-node ``` ## Files and flags | Item | Value | | --- | --- | | Secrets directory | `$SCRT_SGX_STORAGE`, or `/opt/secret/.sgx_secrets` | | Quote file | `attestation_combined.bin` in that directory. EPID section length 0. | | Registration public key | `pubkey.bin`, 32 raw bytes. `secretd dump` prints 64 hex characters, no `0x`. | | Sealed registration key | `data.sealed` | | Id accepted by `query register seed` | exactly 64 hex characters | | Files `secret-network-params` writes | `node-master-key.txt` and `io-master-key.txt` in the cwd, mode `0600`, base64 | | Seed file | `$HOME/.secretd/.node/new_seed.json`, mode `0600`, `version` 2 | | Seed string | hex, no `0x`, length a multiple of 96 | | `init-enclave` flags | `--reset`, `--migration`, `--unbound-attestation` | Create a custom `SCRT_SGX_STORAGE` directory before `init-enclave`. The command does not create a missing custom path. The unit sets `SCRT_ENCLAVE_DIR` for `secret-node`. ## Confirm the transaction On success the message event has `signer`, `encrypted_seed` (`0x` plus hex), and `node_id` (`0x` plus 64 hex). Tx response `data` is `S: ` plus the ciphertext hex. Failure is `Failed to authenticate node` (codespace `register`, code 2). `query register seed` prints `0x` plus hex and a newline. `sed 's/^0x//'` matches that. An unknown id returns `Failed to query seed for …`. `secret-network-params` prints a one-line JSON object and a literal `/n`. Success is the two files on disk. `configure-secret` exits 0 and prints the seed to stdout. Do not start on a seed query that ran before the register transaction was in a block. Use RPC `https://rpc.secret.mainnet.secret3.dev` and chain-id `secret-4`. LCD `https://lcd.secret.mainnet.secret3.dev` serves `GET /registration/v1beta1/tx-key`, `/registration-key`, and `/encrypted-seed/{pub_key}`. ## Reset and re-register - `secretd reset-enclave` deletes `~/.secretd/.node/new_seed.json` and the secrets directory, then recreates the directory. Your account keys stay. - `init-enclave --reset` generates a new registration key and does not delete `new_seed.json`. The new `pubkey.bin` is a new node id. Fetch the seed for the new id after the new transaction commits. - If `data.sealed` already exists, `init-enclave` without `--reset` keeps it and only refreshes the quote. If the local height is above the snapshot: - The blocks above the snapshot are still on disk. Do not restore this snapshot onto this enclave. Put those blocks back. - This consensus key is already a live validator. Do not register a second seed to get past the snapshot. ## Upgrade If you are already on 1.27.2 and you have a seed, do not register. Follow [Upgrade a seeded node](/operators/upgrade/v1.27.2). A quote from an older binary fails as `MrEnclaveMismatch`. Produce the quote with the 1.27.2 enclave. Mainnet measurement is `f0d59dd2561b1c86de88ef27b8b9146bcc2c1b02875ba3c48db48a32bb20d90b`. ## Warnings - Do not pass `--unbound-attestation` if you may later use `--replace-machine-id`. An unbound quote omits the validator key and cannot prove ownership of the old machine id. - If the machine is not on the allowlist, registration is rejected. `The CPU is deprecated. Running forbidden` means the FMSPC is in the end-of-life set. Follow [Allowlist and machine replacement](/operators/allowlist). - `configure-secret` rejects a bad seed with `invalid encrypted seed format (requires hex string of multiples of 96 bytes without 0x prefix)`. Strip the `0x` prefix. - Keep `/opt/secret/.sgx_secrets/` (`data.sealed`, `attestation_combined.bin`, `pubkey.bin`), `~/.secretd/.node/new_seed.json`, `config/node_key.json`, `config/genesis.json`, and `config/config.toml`. If you delete the seed or the sealed key, register again. - `init-enclave` requires `priv_validator_key.json` on this home. After the seed file exists, go to [Sync](/operators/full-node). # Requirements > Ubuntu, memory, storage, and Intel SGX with DCAP for a secret-4 node on 1.27.2. Source: https://docs.scrt.network/operators/requirements/ · Markdown: https://docs.scrt.network/operators/requirements/index.md You need a physical host, or an Azure DCsv3 or DCdsv3 VM, that meets these limits before you run [Quick Setup](/) or the Manual path. - Ubuntu 22.04 or 24.04. - 32 GB RAM minimum, 20 GB or more of swap. 64 GB RAM recommended. - 512 GB SSD minimum. 1 TB NVMe recommended. - Intel CPU with SGX through SPS. SGX through Intel ME does not work. AMD does not work. - The machine must expose `/dev/sgx_enclave` and `/dev/sgx_provision`. The setup script already stops if those are missing. - On a physical host, BIOS must expose SGX and DCAP. On Azure DCsv3 or DCdsv3, pick a Gen2 image. See [Boards](/operators/boards) for verified motherboards. # RPC and LCD > After catching_up is false, keep RPC, LCD, and gRPC on loopback and publish only a proxy. Source: https://docs.scrt.network/operators/rpc-lcd/ · Markdown: https://docs.scrt.network/operators/rpc-lcd/index.md Do this after the node is running and `catching_up` is false. `/health` does not check sync. It returns an empty result whenever the RPC process is up. For old heights, follow [Archive node](/operators/archive). ## Listeners - RPC is CometBFT JSON-RPC, including WebSocket, in `config.toml` `[rpc]`. - LCD / API is the Cosmos SDK REST server, in `app.toml` `[api]`. Point secret.js at this port, not at RPC. - Cosmos gRPC is a third listener. The LCD dials it locally. Do not publish it. Both files are created only when missing. If the node already has configs, it keeps its binds. The fresh file already sets `api.address` to `tcp://localhost:1317` and `grpc.address` to `localhost:9090`. Change those two lines to `tcp://127.0.0.1:1317` and `127.0.0.1:9090`. Do not add a second address key. ## Fresh RPC keys | Key | Fresh value | | --- | --- | | `laddr` | `tcp://127.0.0.1:26657` | | `cors_allowed_origins` | `[]` (empty disables CORS) | | `cors_allowed_methods` | `HEAD`, `GET`, `POST` | | `cors_allowed_headers` | `Origin`, `Accept`, `Content-Type`, `X-Requested-With`, `X-Server-Time` | | `grpc_laddr` | `""` (Comet’s own gRPC, only `/broadcast_tx_commit`, stays off) | | `grpc_max_open_connections` | `900` | | `unsafe` | `false` | | `max_open_connections` | `900` | | `max_subscription_clients` | `100` | | `max_subscriptions_per_client` | `5` | | `experimental_subscription_buffer_size` | `200` | | `experimental_websocket_write_buffer_size` | `200` | | `experimental_close_on_slow_client` | `false` | | `timeout_broadcast_tx_commit` | `10s` | | `max_request_batch_size` | `10` | | `max_body_bytes` | `1000000` | | `max_header_bytes` | `1048576` | | `tls_cert_file`, `tls_key_file` | `""` | | `pprof_laddr` | `localhost:6060` | `laddr` must include a scheme. Other fresh values: `proxy_app = "tcp://127.0.0.1:26658"`, `priv_validator_laddr = ""`, `[p2p] laddr = "tcp://0.0.0.0:26656"`, `prometheus = false`, `prometheus_listen_addr = ":26660"`, `discard_abci_responses = false`, `indexer = "kv"`. The SDK also sets `consensus.timeout_commit` to `5s` when the file is created (Comet default `1s`). ## Fresh app keys A fresh Secret `app.toml` sets `minimum-gas-prices = "0.0125uscrt"` from the package default; set `minimum-gas-prices = "0.1uscrt"` before you start. Set `iavl-disable-fastnode = true` in that same root table before the first start. The fresh value in the table below is `false`. `[api] enable = true`, `swagger = true`, `enabled-unsafe-cors = true`, `[grpc-web] enable = true`, and `[grpc] concurrency = false`. The key name is `enabled-unsafe-cors`. | Key | Fresh Secret value | | --- | --- | | `[api] address` | `tcp://localhost:1317` | | `[api] max-open-connections` | `1000` | | `[api] rpc-read-timeout` | `10` seconds | | `[api] rpc-write-timeout` | `0` (no write timeout) | | `[api] rpc-max-body-bytes` | `1000000` | | `[grpc] enable` | `true` | | `[grpc] address` | `localhost:9090` (no `tcp://`) | | `[grpc] max-recv-msg-size` | `10485760` | | `[grpc] max-send-msg-size` | `2147483647` | | `[grpc] concurrency` | `false` | | `query-gas-limit` | `0` (unbounded) | | `pruning` | `default` | | `iavl-disable-fastnode` | `false` | `[api]` has no TLS fields. gRPC is plaintext. With `swagger = true`, the routes are `/swagger/`, `/openapi/`, and `/static/`. Leave gRPC enabled on localhost if the LCD is enabled. The gateway is attached only when `grpc.enable` is true. Plain `secretd start` keeps the file’s `enable = true`. An unchanged `--api.enable` flag does not override the file. An upgrade does not rewrite an existing `app.toml`. Read the file before you publish. ## Steps Do this only after `catching_up` is false. 1. Confirm the home is `~/.secretd` of the unit `User=`. `dpkg` overwrites that unit. See [Upgrade a seeded node](/operators/upgrade/v1.27.2). 2. Read `http://127.0.0.1:26657/status`. Require `catching_up` false and network `secret-4`. Use `trinity-b` only if that is the chain this home is on. 3. Edit `config.toml` toward the safe block below. 4. Edit `app.toml` toward the safe block below. 5. `sudo systemctl restart secret-node`. 6. Run the health checks against localhost. 7. Publish only the proxy on 443. Firewall `26657`, `1317`, `9090`, `6060`, and `26660`. P2P `26656` is separate and is bound to `0.0.0.0` by default. 8. Point remote clients at the proxy, not at the loopback ports. ```toml # config.toml priv_validator_laddr = "" [rpc] laddr = "tcp://127.0.0.1:26657" cors_allowed_origins = [] grpc_laddr = "" unsafe = false max_open_connections = 900 tls_cert_file = "" tls_key_file = "" pprof_laddr = "" [instrumentation] prometheus = false prometheus_listen_addr = "127.0.0.1:26660" ``` ```toml # app.toml [api] enable = true swagger = false address = "tcp://127.0.0.1:1317" max-open-connections = 1000 rpc-read-timeout = 10 rpc-write-timeout = 30 rpc-max-body-bytes = 1000000 enabled-unsafe-cors = false [grpc] enable = true address = "127.0.0.1:9090" concurrency = false [grpc-web] enable = false ``` `rpc-write-timeout = 30` is the value to set. The fresh file has `0`. Set a finite value on any API reachable from the internet. If a browser calls RPC directly, set an explicit `cors_allowed_origins` list. `["*"]` is the template’s any-origin value. LCD has no origin allowlist. `enabled-unsafe-cors = true` allows every origin, including gRPC-Web. A fresh Secret file turns it on. Turn it off before the API port is reachable. Browsers that need LCD go through a proxy that sets a specific `Access-Control-Allow-Origin`. One-shot overrides belong in the unit `ExecStart` or they disappear on the next plain restart: ```text secretd start \ --rpc.laddr tcp://127.0.0.1:26657 \ --api.enable=true \ --api.address tcp://127.0.0.1:1317 \ --api.swagger=false \ --api.enabled-unsafe-cors=false \ --grpc.enable=true \ --grpc.address 127.0.0.1:9090 \ --grpc-web.enable=false ``` Proxy sketch. WebSocket needs the upgrade headers. Timeouts should be longer than `timeout_broadcast_tx_commit` (default 10s). ```nginx # RPC + WebSocket location / { proxy_pass http://127.0.0.1:26657; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_read_timeout 60s; } # LCD on a different name location / { proxy_pass http://127.0.0.1:1317; proxy_read_timeout 60s; } ``` Do not put Cosmos gRPC `9090` on a public TCP listener. If you need remote gRPC, put a TLS-terminating gRPC proxy in front of `127.0.0.1:9090`. The node will not terminate that TLS. Keep RPC on loopback. WebSocket path is `/websocket`. Local URL `ws://127.0.0.1:26657/websocket`. Behind TLS, `wss:///websocket`. `subscribe`, `unsubscribe`, and `unsubscribe_all` are WebSocket-only. Caps: 100 clients, 5 subscriptions each, buffers of 200. Leave `grpc.concurrency = false`. Concurrency is experimental and a source of node failures. `[wasm] store-sgx-data = true` does not make port `9090` safe to publish. It is still plaintext. The in-process limits are connection and body size. Put request-rate limits on the proxy. Limit `tx_search`, `block_search`, `abci_query`, and `broadcast_tx_commit`. `query-gas-limit = 0` means a REST or gRPC query may use unbounded gas. Contract queries use `wasm.contract-query-gas-limit` `10000000`. ## Stay closed `unsafe = true` (registers `dial_seeds`, `dial_peers`, `unsafe_flush_mempool`), `pprof_laddr` on a public address, `--cpu-profile` on a public unit, Prometheus on all interfaces, LCD `/metrics` when telemetry is enabled, `enabled-unsafe-cors = true`, gRPC-Web unless the proxy is the product, `priv_validator_laddr` on a public address, the key files, Cosmos gRPC `9090`, Comet `grpc_laddr`, and swagger if the port is shared. `dump_consensus_state`, `consensus_state`, `net_info`, and `unconfirmed_txs` are on by default and are not behind `unsafe`. Publishing RPC publishes them. Port 9091 is not a default listener. gRPC-Web on this version shares port 1317. ## Health checks ```bash curl -fsS http://127.0.0.1:26657/status \ | jq '{network:.result.node_info.network, catching_up:.result.sync_info.catching_up, height:.result.sync_info.latest_block_height}' curl -fsS http://127.0.0.1:26657/abci_info \ | jq '.result.response | {data, version}' curl -fsS http://127.0.0.1:26657/health curl -fsS http://127.0.0.1:1317/cosmos/base/tendermint/v1beta1/node_info \ | jq '{network:.default_node_info.network, version:.application_version.version, app:.application_version.app_name}' curl -fsS http://127.0.0.1:1317/cosmos/base/node/v1beta1/status \ | jq '{height, earliest_store_height}' ``` Expect RPC `data` `secret`, `version` `1.27.2`, LCD `app` `secretd`. Historical header, only for a height the node stored: ```bash curl -fsS -H 'x-cosmos-block-height: HEIGHT' \ http://127.0.0.1:1317/cosmos/base/tendermint/v1beta1/blocks/latest ``` Use a height this node has stored. ## CLI ```bash secretcli config set client node tcp://127.0.0.1:26657 secretcli config set client chain-id secret-4 secretcli status ``` Remote RPC: ```bash secretcli config set client node https://rpc.secret.mainnet.secret3.dev secretcli config set client chain-id secret-4 ``` `secretcli` speaks Comet RPC. It does not use port 1317. `client.toml` keys: `chain-id`, `keyring-backend`, `output`, `node`, `broadcast-mode`. Defaults: broadcast `sync`, keyring `os`, output `text`, node `tcp://localhost:26657`. `secretcli config node` and `secretcli config chain-id` without `set` are the pre-0.50 form. Do not use them. Do not set chain-id `pulsar-3`. secret.js: ```js import { SecretNetworkClient } from "secretjs"; const secretjs = new SecretNetworkClient({ url: "http://127.0.0.1:1317", chainId: "secret-4", }); ``` `url` is the LCD. Point it at the proxy in front of 1317, not at 26657 and not at 9090. A signer also needs `wallet` and `walletAddress`. ## Public endpoints | Role | URL | | --- | --- | | RPC | `https://rpc.secret.mainnet.secret3.dev` | | LCD | `https://lcd.secret.mainnet.secret3.dev` | Rosetta is a subcommand and is not started by `secretd start`. Apply the safe block before you publish. On an upgrade, read the existing files. The package install will not fix them. # SGX prerequisites > Confirm Intel SGX with FLC and DCAP on Ubuntu 22.04 or 24.04 before you start secretd. Source: https://docs.scrt.network/operators/sgx/ · Markdown: https://docs.scrt.network/operators/sgx/index.md :::caution Do not treat `Platform Okay!` as success. `check-hw` does not put the machine on the allowlist. An Azure attestation JWT does not authorize registration. ::: Confirm all four before you register: 1. `/proc/cpuinfo` flags include `sgx` and `sgx_lc`. 2. `/dev/sgx_enclave` and `/dev/sgx_provision` exist, and your user can open both. 3. `aesmd` is running and the quote provider can fetch collateral. 4. `check-hw`, loaded with the v1.27.2 mainnet enclave, prints `DCAP attestation obtained and verified ok` and `Platform verification successful! You are able to run a mainnet Secret node`, then `Your machine ID:`. ## Pick the machine Use Intel SGX with FLC on Ubuntu 22.04 or 24.04, the in-kernel driver, and `/etc/sgx_default_qcnl.conf` for DCAP collateral. - CPU families: Xeon E-23xxG, Xeon D-1700, D-2700, D-1800, D-2800, Xeon Max, Xeon Scalable 3rd, 4th, and 5th gen. - Motherboards: Supermicro X11SCM-F, X11SCW-F, X11SCZ-F, X11SSL-F; Dell R240 (BIOS 2.14.1) and R350 (BIOS 1.7.3); HP DL20 G10 (BIOS 1.80, 2023-07-20); ASUS RS100-E10-PI2 (BIOS 5601); ASRock E3C246D4U2-2T; GIGABYTE MX33-BS1 (BIOS F06). - On Azure, use DCsv3 or DCdsv3 (Ice Lake, EPC large enough for the 2 GiB heap). Ubuntu 22.04 and 24.04 both use Intel’s quote provider and the DCAP 1.22 Azure file below. Do not install `az-dcap-client`. - Do not use DCsv2. It is Xeon E-2288G. The largest published EPC is 168 MiB, below the heap. - Do not use DCasv5, DCadsv5, ECasv5, or ECadsv5 (AMD SEV-SNP), or DCesv5, DCesv6, and EC TDX sizes. They do not load this enclave. - On another provider, use the same device nodes and `check-hw`. You still need the allowlist. - Do not use a Client Core CPU after the 11th generation, an EPID-only platform, AMD, or ME-only SGX. - The signed mainnet enclave heap is `0x80000000` (2 GiB) plus an 8 MiB stack. A smaller EPC cannot start it. - Give the host 32 GB RAM, 20 GB or more of swap, and a 512 GB SSD. 64 GB and 1 TB NVMe is the larger size. ## Steps 1. On a physical machine, install the latest BIOS, enable SGX (not software-controlled), disable Secure Boot, and disable hyperthreading. On 3rd Gen Xeon Scalable and newer, FLC is already on and is not a BIOS switch. On Azure DCsv3 or DCdsv3, skip the BIOS menu and pick a Gen2 image. 2. Confirm OS and CPU flags: ```bash . /etc/os-release # VERSION_ID must be 22.04 or 24.04 uname -r grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(sgx|sgx_lc)$' ``` 3. Confirm the in-kernel nodes. Do not install the out-of-tree `.bin` driver on a kernel that already has in-kernel SGX. ```bash ls -l /dev/sgx_enclave /dev/sgx_provision dmesg | grep -i sgx ``` If the nodes are missing on 22.04 or 24.04, turn SGX on in firmware, use a CPU with FLC, or use an SGX VM. Intel’s kernel floor is 5.11. Ubuntu 22.04 GA is 5.15 and 24.04 GA is 6.8. 4. Install the DCAP runtime from Intel’s apt repo (keyring and `${VERSION_CODENAME}` from `/etc/os-release`). The build pin is PSW `2.25.100.3` and DCAP `1.22.100.3` for `jammy1` or `noble1`. Intel apt may publish newer packages. On a physical host and on Azure DCsv3 or DCdsv3, Ubuntu 22.04 or 24.04, install the Intel quote provider: ```bash . /etc/os-release curl -fsSL https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key \ | gpg --dearmor | sudo tee /usr/share/keyrings/intel-sgx-archive-keyring.gpg > /dev/null echo "deb [signed-by=/usr/share/keyrings/intel-sgx-archive-keyring.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu ${VERSION_CODENAME} main" \ | sudo tee /etc/apt/sources.list.d/intel-sgx.list sudo apt-get update sudo apt-get install -y \ libsgx-aesm-launch-plugin libsgx-enclave-common libsgx-epid libsgx-launch \ libsgx-quote-ex libsgx-uae-service libsgx-qe3-logic libsgx-pce-logic \ libsgx-aesm-pce-plugin libsgx-dcap-ql libsgx-dcap-quote-verify libsgx-urts \ sgx-aesm-service libsgx-aesm-ecdsa-plugin libsgx-aesm-quote-ex-plugin \ libsgx-ae-qve libsgx-dcap-default-qpl ``` 5. Write `/etc/sgx_default_qcnl.conf` before you enable and restart `aesmd`. On other hosts, point the quote provider at Intel PCS: ```bash sudo tee /etc/sgx_default_qcnl.conf <<'EOF' {"pccs_url":"https://api.trustedservices.intel.com/sgx/certification/v4/","use_secure_cert":true,"retry_times":6,"retry_delay":10,"pck_cache_expire_hours":168,"verify_collateral_cache_expire_hours":168,"local_cache_only":false} EOF ``` On Azure DCsv3 or DCdsv3, Ubuntu 22.04 or 24.04: ```bash sudo tee /etc/sgx_default_qcnl.conf <<'EOF' {"pccs_url":"https://global.acccache.azure.net/sgx/certification/v4/","use_secure_cert":true,"collateral_service":"https://api.trustedservices.intel.com/sgx/certification/v4/","pccs_api_version":"3.1","retry_times":6,"retry_delay":5,"local_pck_url":"http://169.254.169.254/metadata/THIM/sgx/certification/v4/","pck_cache_expire_hours":48,"verify_collateral_cache_expire_hours":48,"custom_request_options":{"get_cert":{"headers":{"metadata":"true"},"params":{"api-version":"2021-07-22-preview"}}}} EOF ``` 6. Enable and restart the AESM service: ```bash sudo systemctl enable --now aesmd sudo systemctl restart aesmd systemctl is-active aesmd ``` 7. Add your user to `sgx` and `sgx_prv`, install udev rules, and fix device permissions. `usermod` does not affect your current shell; run `init-enclave` through `sg` so the groups apply without logging out. ```bash NODE_USER="${USER}" sudo groupadd sgx 2>/dev/null || true sudo groupadd sgx_prv 2>/dev/null || true sudo usermod -aG sgx,sgx_prv "$NODE_USER" sudo tee /etc/udev/rules.d/99-sgx-permissions.rules <<'EOF' SUBSYSTEM=="misc", KERNEL=="sgx_enclave", MODE="0660", GROUP="sgx" SUBSYSTEM=="misc", KERNEL=="sgx_provision", MODE="0660", GROUP="sgx_prv" EOF sudo udevadm control --reload-rules sudo udevadm trigger sudo chgrp sgx /dev/sgx_enclave sudo chmod 0660 /dev/sgx_enclave sudo chgrp sgx_prv /dev/sgx_provision sudo chmod 0660 /dev/sgx_provision ``` 8. On a multi-socket Xeon Scalable, configure `sgx-ra-service` and read `/var/log/mpa_registration.log`. 9. Install the mainnet deb so the signed enclave is on disk. Stop before `init-enclave` and before `tx register`. Do not start `secret-node`. Follow [Install secretd](/operators/install). 10. `check-hw` from a directory that contains `check_hw_enclave.so`. The kit binary is at `kits/v1.27.2/mainnet/check-hw/check-hw`. Copy the signed enclave out of the deb: ```bash . /etc/os-release mkdir -p "$HOME/check-hw" && cd "$HOME/check-hw" curl -fsSL https://docs.scrt.network/check-hw -o check-hw chmod +x check-hw dpkg-deb -x /tmp/secretnetwork_1.27.2_MAINNET_goleveldb_amd64_ubuntu-${VERSION_ID}.deb /tmp/sn127 cp /tmp/sn127/usr/lib/librust_cosmwasm_enclave.signed.so ./check_hw_enclave.so sg sgx -c "sg sgx_prv -c './check-hw'" ``` Success text: ```text Creating enclave instance.. DCAP attestation obtained and verified ok DCAP attestation: Enclave quote is valid Platform verification successful! You are able to run a mainnet Secret node Your machine ID: <40 hex chars> ``` `check-hw` verifies the quote with the allowlist check off. It accepts `SGX_QL_QV_RESULT_OK` and `SGX_QL_QV_RESULT_SW_HARDENING_NEEDED`. If the result is not `OK`, it prints a warning and still treats the quote as verified. The allowlist check happens later, on chain. Save the machine id. It is the first 20 bytes of SHA-256 over the platform PPID (40 hex characters). It changes if you toggle SGX, reset it in BIOS, replace the board or CPU, or install some firmware updates. - If `check-hw` succeeds and `tx register auth` fails the allowlist, continue at [Allowlist and machine replacement](/operators/allowlist). - Do not run `embed_azure_attestation.sh`. - The deb depends only on `libsnappy1v5`. `dpkg -i` can succeed and `secretd` can still fail looking for `libsgx_urts.so.2`, `libsgx_dcap_ql.so.1`, or `libsgx_dcap_quoteverify.so.1`. - Do not set `SGX_MODE=SW`. - Check `check-hw` against sha256 `5f1fb76fb611e91bd8bb1ec3f12bb21216d66a0782b6bf21968309897c2c122d` in `kits/v1.27.2/SHA256SUMS`. Run every step on a new machine. If this hardware already quoted and you only changed the OS, repeat the OS, device, and DCAP steps, then follow [Upgrade a seeded node](/operators/upgrade/v1.27.2). Skip `check-hw` on a machine that is already signing. Run it before a new registration. # Upgrade > Install a MAINNET deb on a secret-4 node that already has a seed. Do not register again. Source: https://docs.scrt.network/operators/upgrade/ · Markdown: https://docs.scrt.network/operators/upgrade/index.md Install a MAINNET deb on a secret-4 node that already has a seed. Do not register again. If this node signs, it must be the only signer. Stop the process before you swap the binary. SGX has to already work. - [1.27.3](/operators/upgrade/v1.27.3/). Scheduled for 9:00 America/New_York on 13 October 2026 (13:00 UTC). Release: [v1.27.3](https://github.com/Secret3dev/SecretNetwork/releases/tag/v1.27.3). - [1.27.2](/operators/upgrade/v1.27.2/). The halt at height `27286266` is over. The chain is producing blocks. Release: [v1.27.2](https://github.com/Secret3dev/SecretNetwork/releases/tag/v1.27.2). # Upgrade a seeded node > Install the 1.27.2 MAINNET deb on a secret-4 node that already has a seed. Do not register again. Source: https://docs.scrt.network/operators/upgrade/v1.27.2/ · Markdown: https://docs.scrt.network/operators/upgrade/v1.27.2/index.md | | | | --- | --- | | Version | 1.27.2 | | Release | [v1.27.2](https://github.com/Secret3dev/SecretNetwork/releases/tag/v1.27.2) | Use this when the home already has `new_seed.json` or `seed.json`. If this node signs, it must be the only signer. Stop the process before you swap the binary. SGX has to already work. The halt at height `27286266` is over. The chain is producing blocks. ## Already on 1.27.2 `secretd version` prints `1.27.2`. Back up the unit, install the matching MAINNET deb, put the unit back, and restart. Do not register again. ```bash set -euo pipefail sudo cp -a /etc/systemd/system/secret-node.service /tmp/secret-node.service.bak . /etc/os-release case "$VERSION_ID" in 22.04|24.04) ;; *) echo "Ubuntu 22.04 or 24.04"; exit 1 ;; esac deb="secretnetwork_1.27.2_MAINNET_goleveldb_amd64_ubuntu-${VERSION_ID}.deb" curl -fL -o "/tmp/$deb" \ "https://github.com/Secret3dev/SecretNetwork/releases/download/v1.27.2/$deb" case "$VERSION_ID" in 22.04) echo "ffcca0fe04422228ae92b0bb216808a0eafa1030a7073d1bf1ca347a0781fcbb /tmp/$deb" ;; 24.04) echo "f90e7104d6308d491c9cfdb691672302b17b3364c3b355962479adc46da3d903 /tmp/$deb" ;; esac | sha256sum -c - sudo dpkg -i "/tmp/$deb" unit="$(systemctl show -p User --value secret-node)" sudo chown -R "$unit:$unit" /opt/secret /opt/secret/.sgx_secrets sudo find /opt/secret /opt/secret/.sgx_secrets -type d -exec chmod 750 {} \; sudo find /opt/secret /opt/secret/.sgx_secrets -type f -exec chmod 600 {} \; sudo cp -a /tmp/secret-node.service.bak /etc/systemd/system/secret-node.service sudo systemctl daemon-reload sudo systemctl restart secret-node secretd version ``` Install the deb with the commands and hashes on [Install secretd](/operators/install). `dpkg` replaces `/etc/systemd/system/secret-node.service` on every install. Repeat the backup on every later package install. Confirm `secretd version` prints `1.27.2`. Run one process only. Stop, swap, start. Do not run the old and new binaries together on the same consensus key. The upgrade does not rewrite `app.toml`. If you set archive pruning, check `pruning` is still `"nothing"` on [Archive node](/operators/archive). Existing bind addresses, CORS, and `api.enable` stay. Read them on [RPC and LCD](/operators/rpc-lcd) before you publish. ## Still on 1.26.0 Do not install this deb. That package replaces the enclave. The 1.27.2 measurement is `f0d59dd2561b1c86de88ef27b8b9146bcc2c1b02875ba3c48db48a32bb20d90b`, and the old sealed key does not open under it. `autopilot.sh` will not perform the handover. The collector state is done and the script exits with `upgrade secret-4-v1.27.2 is done.` ## Warnings - Do not set `UNSAFE_SKIP_BACKUP`. Do not run `secretd tendermint unsafe-reset-all`. - If this machine is a validator, leave the key file and the state file. This procedure does not delete `data/` or write height `0`. - Do not register again. A quote from an older binary fails as `MrEnclaveMismatch` (“Registering enclave had different code signature”). A new machine uses [Register the node](/operators/register). - Plan `v1.27.2` runs module migrations only. That handler does not add or remove a store. ## Testnet kit Do not point a 1.27.2 binary at `pulsar-3`. A node already on the upgraded testnet: `cd testnet && sudo ./install.sh`. Testnet measurement: `5b5cd3cd181938c0eb6b1321a9d05fd5d5cc0124bc25943e98f057d13527fd02`. | Asset | SHA-256 | | --- | --- | | `secretnetwork_1.27.2_TRINITY_goleveldb_amd64_ubuntu-22.04.deb` | `5ce31f1be3350b8d5d8757eec8c068adfc1b2e34c9aeaf6d8a3ff1eb9e252a1a` | | `secretnetwork_1.27.2_TRINITY_goleveldb_amd64_ubuntu-24.04.deb` | `de19050e32b7704b463876fa085289ca05c26fcdcb60711d8ef0249d78b05eeb` | After a seeded mainnet upgrade, use the health checks on [Sync](/operators/full-node). # Upgrade to 1.27.3 > Install the 1.27.3 package after the chain reaches the halt height. The signed enclave does not change. Do not register again. Source: https://docs.scrt.network/operators/upgrade/v1.27.3/ · Markdown: https://docs.scrt.network/operators/upgrade/v1.27.3/index.md | | | | --- | --- | | Version | 1.27.3 | | Scheduled | 9:00 America/New_York on 13 October 2026 (13:00 UTC) | | Proposal | [381](https://secretnodes.com/governance/381) | | Release | [v1.27.3](https://github.com/Secret3dev/SecretNetwork/releases/tag/v1.27.3) | | Halt height | 27595508 | | Mainnet measurement | `f0d59dd2561b1c86de88ef27b8b9146bcc2c1b02875ba3c48db48a32bb20d90b` | | Mainnet deb SHA-256, Ubuntu 22.04 | `07110981e133a0af37dd5bc191f985bf6e9dd318fa645970c84ce3cf928f86e5` | | Mainnet deb SHA-256, Ubuntu 24.04 | `fdfbd52d792aafffd947660903c8218adc1ee6cafd76ce4bb4b04914ce36c3a2` | | Testnet measurement | `5b5cd3cd181938c0eb6b1321a9d05fd5d5cc0124bc25943e98f057d13527fd02` | | Testnet deb SHA-256, Ubuntu 22.04 | `594e521b307aeec6459b4e8c741c94c3555c53b227474f9ae458dd76945ec6bc` | | Testnet deb SHA-256, Ubuntu 24.04 | `2260de7650380636aea149cada882d41b59a08b13f2ad4822df83e80863b6de1` | Scheduled for 9:00 America/New_York on 13 October 2026 (13:00 UTC). The chain halts at height `27595508` for plan `v1.27.3`. Do not install before that height. Host binary only. The signed enclave does not change. Do not register again. Use this when the home already has `new_seed.json` or `seed.json`. If this node signs, it must be the only signer. Stop the process before the swap. SGX has to already work. ## Install Two ways. Same files. Same order. Do not start until the node has halted at `27595508`. `secretd version` prints `1.27.2` before the halt and `1.27.3` after the restart. ### By hand 1. Wait for the halt. The `secret-node` journal contains `UPGRADE "v1.27.3" NEEDED`. A node still below `27595508` stays on 1.27.2. 2. Pick the one file for this machine. `secret-4` uses `MAINNET`. `trinity-b` uses `TRINITY`. Ubuntu comes from `/etc/os-release` (`22.04` or `24.04`). The other three files are wrong for this machine. | Machine | File | SHA-256 | | --- | --- | --- | | secret-4, Ubuntu 22.04 | `secretnetwork_1.27.3_MAINNET_goleveldb_amd64_ubuntu-22.04.deb` | `07110981e133a0af37dd5bc191f985bf6e9dd318fa645970c84ce3cf928f86e5` | | secret-4, Ubuntu 24.04 | `secretnetwork_1.27.3_MAINNET_goleveldb_amd64_ubuntu-24.04.deb` | `fdfbd52d792aafffd947660903c8218adc1ee6cafd76ce4bb4b04914ce36c3a2` | | trinity-b, Ubuntu 22.04 | `secretnetwork_1.27.3_TRINITY_goleveldb_amd64_ubuntu-22.04.deb` | `594e521b307aeec6459b4e8c741c94c3555c53b227474f9ae458dd76945ec6bc` | | trinity-b, Ubuntu 24.04 | `secretnetwork_1.27.3_TRINITY_goleveldb_amd64_ubuntu-24.04.deb` | `2260de7650380636aea149cada882d41b59a08b13f2ad4822df83e80863b6de1` | 3. Download that file from the [v1.27.3 release](https://github.com/Secret3dev/SecretNetwork/releases/tag/v1.27.3) and check the hash. This example is secret-4. For trinity-b, change the file name and the hash to the matching row. ```bash set -euo pipefail . /etc/os-release case "${VERSION_ID:-}" in 22.04) deb=secretnetwork_1.27.3_MAINNET_goleveldb_amd64_ubuntu-22.04.deb hash=07110981e133a0af37dd5bc191f985bf6e9dd318fa645970c84ce3cf928f86e5 ;; 24.04) deb=secretnetwork_1.27.3_MAINNET_goleveldb_amd64_ubuntu-24.04.deb hash=fdfbd52d792aafffd947660903c8218adc1ee6cafd76ce4bb4b04914ce36c3a2 ;; *) echo "Ubuntu 22.04 or 24.04"; exit 1 ;; esac curl -fL -o "/tmp/$deb" \ "https://github.com/Secret3dev/SecretNetwork/releases/download/v1.27.3/$deb" echo "$hash /tmp/$deb" | sha256sum -c - ``` `sha256sum` must print `OK`. 4. As root, stop, install, and start. `dpkg` replaces `/etc/systemd/system/secret-node.service` with the stock unit. Save that file yourself first if you changed it. ```bash sudo systemctl stop secret-node sudo dpkg -i "/tmp/$deb" sudo systemctl daemon-reload sudo systemctl restart secret-node secretd version ``` `secretd version` must print `1.27.3`. Do not register again. ### Script Save this and run it as root: `sudo bash upgrade.sh`. It picks the file from the chain id and Ubuntu version, and it exits if the halt height has not been reached. ```bash #!/bin/bash # Secret Network v1.27.3 host install. # Run as root, on the node, after the upgrade height. set -euo pipefail PLAN_NAME=v1.27.3 PLAN_HEIGHT=27595508 BASE=https://github.com/Secret3dev/SecretNetwork/releases/download/v1.27.3 SHA_MAINNET_2204=07110981e133a0af37dd5bc191f985bf6e9dd318fa645970c84ce3cf928f86e5 SHA_MAINNET_2404=fdfbd52d792aafffd947660903c8218adc1ee6cafd76ce4bb4b04914ce36c3a2 SHA_TRINITY_2204=594e521b307aeec6459b4e8c741c94c3555c53b227474f9ae458dd76945ec6bc SHA_TRINITY_2404=2260de7650380636aea149cada882d41b59a08b13f2ad4822df83e80863b6de1 die() { echo "stop: $*" >&2; exit 1; } [ "$(id -u)" -eq 0 ] || die "run as root" case "$PLAN_HEIGHT" in ''|*[!0-9]*) die "halt height is not set" ;; esac . /etc/os-release case "${VERSION_ID:-}" in 22.04|24.04) ;; *) die "need Ubuntu 22.04 or 24.04" ;; esac genesis="" for f in "$HOME/.secretd/config/genesis.json" /root/.secretd/config/genesis.json /opt/secret/.secretd/config/genesis.json; do if [ -f "$f" ]; then genesis=$f break fi done [ -n "$genesis" ] || die "genesis.json not found" chain="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1])).get("chain_id",""))' "$genesis")" case "$chain" in secret-4) net=MAINNET ;; trinity-b) net=TRINITY ;; *) die "chain id ${chain:-missing} is not secret-4 or trinity-b" ;; esac case "${net}_${VERSION_ID}" in MAINNET_22.04) want="$SHA_MAINNET_2204" ;; MAINNET_24.04) want="$SHA_MAINNET_2404" ;; TRINITY_22.04) want="$SHA_TRINITY_2204" ;; TRINITY_24.04) want="$SHA_TRINITY_2404" ;; esac if systemctl show -p ExecStart --value secret-node 2>/dev/null | grep -q -- '--unsafe-skip-upgrades'; then die "secret-node.service contains --unsafe-skip-upgrades" fi height="" if curl -fsS --max-time 5 http://127.0.0.1:26657/status -o /tmp/v1273-status.json; then height="$(python3 -c 'import json; d=json.load(open("/tmp/v1273-status.json")); print((d.get("result") or d).get("sync_info",{}).get("latest_block_height",""))')" fi rm -f /tmp/v1273-status.json info_name="" info_height="" for f in "$HOME/.secretd/data/upgrade-info.json" /root/.secretd/data/upgrade-info.json /opt/secret/.secretd/data/upgrade-info.json; do [ -f "$f" ] || continue parsed="$(python3 -c 'import json,sys d=json.load(open(sys.argv[1])) p=d.get("plan") or d print((p.get("name") or d.get("name") or ""), (p.get("height") or d.get("height") or ""))' "$f")" info_name="${parsed%% *}" info_height="${parsed##* }" [ -n "$info_height" ] && break done halted=0 if journalctl -u secret-node -n 400 --no-pager 2>/dev/null | grep -F "UPGRADE \"${PLAN_NAME}\" NEEDED" >/dev/null; then halted=1 fi if [ -n "$height" ]; then [ "$height" -ge "$PLAN_HEIGHT" ] || die "height ${height} is before ${PLAN_HEIGHT}. Do not install yet." else [ "$halted" -eq 1 ] || die "local RPC is down and secret-node has not halted for ${PLAN_NAME}" [ "$info_name" = "$PLAN_NAME" ] || die "upgrade-info name is ${info_name:-missing}" [ "$info_height" = "$PLAN_HEIGHT" ] || die "upgrade-info height ${info_height:-missing} is not ${PLAN_HEIGHT}" fi deb="secretnetwork_1.27.3_${net}_goleveldb_amd64_ubuntu-${VERSION_ID}.deb" tmp="/tmp/${deb}" curl -fL -o "$tmp" "${BASE}/${deb}" echo "${want} ${tmp}" | sha256sum -c - unit=/etc/systemd/system/secret-node.service if [ -f "$unit" ]; then cp -a "$unit" /tmp/secret-node.service.bak fi if systemctl is-active --quiet secret-node; then systemctl stop secret-node fi dpkg -i "$tmp" if [ -f /tmp/secret-node.service.bak ]; then cp -a /tmp/secret-node.service.bak "$unit" fi systemctl daemon-reload systemctl restart secret-node ver="$(secretd version 2>&1 || true)" printf '%s\n' "$ver" case "$ver" in *1.27.3*) ;; *) die "secretd version is not 1.27.3" ;; esac echo "installed ${deb}" echo "do not register again" ``` `dpkg` replaces `/etc/systemd/system/secret-node.service` on every install. The script saves that file and puts it back before restart. By hand, save it yourself if you changed it. Run one process only. Stop, swap, start. Do not run the old and new binaries together on the same consensus key. The upgrade does not rewrite `app.toml`. If you set archive pruning, check `pruning` is still `"nothing"` on [Archive node](/operators/archive). Existing bind addresses, CORS, and `api.enable` stay. Read them on [RPC and LCD](/operators/rpc-lcd) before you publish. ## Still on 1.26.0 Do not install this package for that move. A node still on 1.26.0 uses [Upgrade a seeded node](/operators/upgrade/v1.27.2/). ## Warnings - Do not set `UNSAFE_SKIP_BACKUP`. Do not run `secretd tendermint unsafe-reset-all`. - If this machine is a validator, leave the key file and the state file. This procedure does not delete `data/` or write height `0`. - Do not register again. A new machine uses [Register the node](/operators/register). - Plan `v1.27.3` runs module migrations only. The handler does not add or remove a store. - `MAINNET` and `TRINITY` packages are not interchangeable. Ubuntu 22.04 and 24.04 packages are not interchangeable. - Do not use `--unsafe-skip-upgrades`. - Cosmovisor auto-download is not supported. Keep `DAEMON_ALLOW_DOWNLOAD_BINARIES=false`. ## Testnet Do not point a 1.27.3 binary at `pulsar-3`. Testnet measurement: `5b5cd3cd181938c0eb6b1321a9d05fd5d5cc0124bc25943e98f057d13527fd02`. | Asset | SHA-256 | | --- | --- | | `secretnetwork_1.27.3_TRINITY_goleveldb_amd64_ubuntu-22.04.deb` | `594e521b307aeec6459b4e8c741c94c3555c53b227474f9ae458dd76945ec6bc` | | `secretnetwork_1.27.3_TRINITY_goleveldb_amd64_ubuntu-24.04.deb` | `2260de7650380636aea149cada882d41b59a08b13f2ad4822df83e80863b6de1` | After a seeded mainnet upgrade, use the health checks on [Sync](/operators/full-node). # Validator > Sign with one consensus key after the node is caught up on secret-4. Do not rewind a key that has signed. Source: https://docs.scrt.network/operators/validator/ · Markdown: https://docs.scrt.network/operators/validator/index.md Wait until the node is caught up on `secret-4`, then sign with one consensus key. Finish [SGX prerequisites](/operators/sgx), [Sync](/operators/full-node), and [Register the node](/operators/register) against the consensus key already in `priv_validator_key.json`. Require `catching_up` false. Use an account key that can pay fees and the self-bond. That account is not the consensus key. :::caution Two live copies of one consensus key double-sign. Stop the old process before the new one signs. ::: ## Two keys | Key | Store | Algorithm | Prefix | Role | | --- | --- | --- | --- | --- | | Account key | Keyring under `~/.secretd` | secp256k1 | `secret` | Signs `create-validator`, `edit-validator`, `delegate`, `unjail`, commission withdraw | | Consensus | `config/priv_validator_key.json` | ed25519 | `secretvalcons` | Signs votes and proposals. One live copy. | Set the prefixes before any command: account `secret`, validator `secretvaloper`, consensus `secretvalcons`. Coin type `529`, purpose `44`. The SDK constant `sdk.CoinType` is still `118`. `keys add` defaults to the sealed coin type, so a normal software key is `529`. `--ledger` without `--legacy-hd-path` also forces `529`. `--legacy-hd-path` forces `118`. ```bash secretd keys show EXAMPLE_KEY --bech val -a secretd tendermint show-validator secretd tendermint show-node-id ``` `--bech` accepts `acc`, `val`, or `cons`. `val` prints `secretvaloper`. `show-validator` loads the key file and the state file. A missing state file makes it exit. `tendermint` is an alias of `comet` and `cometbft`. `show-node-id` reads `config/node_key.json` and is the P2P id, not a validator id. Keyring backends: `os` (compiled default), `file`, `kwallet`, `pass`, `test`, `memory`. `test` stores the key unencrypted. Do not use `test` for the account key that creates the validator. `keys export` prints the armored private key to stderr. `secretd` or `secretcli` both work if they use the same home and keyring. The process that signs blocks is `secretd`. ## Files | Path | Backup | Second live process | | --- | --- | --- | | `config/priv_validator_key.json` | Yes. Losing it means a new consensus key and a new validator. | Never. | | `data/priv_validator_state.json` | Yes, after the signer has stopped. Last height, round, and step. Mode `0600`. | Never as a second signer. | | Account mnemonic or `keys export` armor | Yes, offline. | You may keep the keyring on a laptop that only broadcasts. Keep another copy. | | `config/node_key.json` | Optional. Losing it changes the peer id. | Do not run two nodes with the same file. That collides the peer id. It does not tombstone. | | `genesis.json`, `config.toml` | Operational copies. | Fine. | | `new_seed.json`, `/opt/secret/.sgx_secrets/*`, `node-master-key.txt` | Registration page. Not the consensus key. | Do not publish. Do not treat them as a validator backup. | `priv_validator_laddr` switches the node to a remote signer. If that is set, do not also run the same key file in a local `secretd`. This binary does not ship a TMKMS config. ## Steps 1. Consensus key exists, from `init` on this home or copied from the machine you are replacing, and the old process is stopped. 2. Finish registration against that same key. Do not use `auto-register`. The quote is bound to the ed25519 key already on disk unless you passed `--unbound-attestation`. 3. `catching_up` false on `secret-4`. Creating while `catching_up` is true does not jail by itself. A bonded validator that is still catching up will miss blocks. Wait. Re-read `/status`. 4. Fund the account key: ```bash secretd q bank balances $(secretd keys show -a EXAMPLE_KEY) \ --node https://rpc.secret.mainnet.secret3.dev ``` 5. Back up the consensus key, the state file, and the account mnemonic before the create transaction. 6. Send `create-validator` once. A second create with the same account or the same consensus pubkey is rejected. 7. Confirm, then watch `signing-info` if the validator bonded. Broadcast `create-validator` from any machine that has the account key and the pubkey JSON. The laptop does not need the consensus key file. The process that signs blocks must be the one whose pubkey you submitted. ## create-validator One JSON file. ```bash secretd tx staking create-validator ./validator.json \ --from EXAMPLE_KEY \ --chain-id secret-4 \ --node https://rpc.secret.mainnet.secret3.dev \ --gas 700000 \ --gas-prices 0.1uscrt ``` `--from` is required. `--chain-id` is not marked required. Pass `secret-4`. `--node` defaults to `tcp://localhost:26657`. `--gas` defaults to `200000` if omitted, not `auto`. `--gas-adjustment` defaults to `1.0` and is ignored when `--gas` is a number. `--gas-prices` defaults to `0.25uscrt`. Supply `--fees` or `--gas-prices`. `1.3` is an example adjustment. The node’s own `minimum-gas-prices` should be `0.1uscrt` (the package default is `0.0125uscrt`). `--ip` and `--node-id` only affect a memo, and only with `--generate-only`, and only if a p2p port is also set. This command does not register `--p2p-port`, so those two flags do not register a peer. `validator.json`. Strings below are examples except the pubkey shape. `pubkey` is the object `show-validator` prints. ```json { "pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"EXAMPLE_BASE64_FROM_show-validator"}, "amount": "1000000uscrt", "moniker": "EXAMPLE_MONIKER", "identity": "", "website": "", "security": "", "details": "", "commission-rate": "0.10", "commission-max-rate": "0.20", "commission-max-change-rate": "0.01", "min-self-delegation": "1" } ``` Empty `moniker` is rejected. Amount and the three commission strings are required. Denom is `uscrt`. 1 SCRT = 1,000,000 uscrt. `1000000uscrt` is an example of 1 SCRT, not a governance minimum. `min-self-delegation` is an integer in uscrt. `"1"` means 1 uscrt. It must be positive, and `amount` must be at least that integer. Consensus power is `tokens / 1_000_000`. The bonded-set walk stops at the first validator whose power is 0 and does not bond it. A self-bond under 1 SCRT has power 0. `min-self-delegation` `"1"` is 1 uscrt. Commission at create, decimals in `[0, 1]`: `rate` ≤ `max-rate`, `max-change-rate` ≤ `max-rate`, `rate` ≥ on-chain `min_commission_rate`. `max-rate` and `max-change-rate` cannot be changed later. Live `min_commission_rate` is `0`, so 0% is legal. Description limits, bytes: moniker 70, identity 3000, website 140, security contact 140, details 280. Pubkey type must be in the consensus param. Live value is `ed25519` only. Rejected creates: `ErrValidatorOwnerExists`, `ErrValidatorPubKeyExists`. There is no delete-validator transaction. ```bash secretd q staking validator $(secretd keys show EXAMPLE_KEY --bech val -a) \ --node https://rpc.secret.mainnet.secret3.dev ``` Prefer that query over grepping every moniker. ## Active set | Field | Value | | --- | --- | | `bond_denom` | `uscrt` | | `max_validators` | `80` | | `unbonding_time` | `1814400s` (21 days) | | `max_entries` | `7` | | `historical_entries` | `10000` | | `min_commission_rate` | `0` | | Bonded count that day | `23` | Under 80, every jailed-false validator with power greater than 0 is bonded. Query the set again before you rely on a stake floor. More self-bond later. `1000000uscrt` is an example: ```bash secretd tx staking delegate secretvaloper1EXAMPLE 1000000uscrt \ --from EXAMPLE_KEY --chain-id secret-4 \ --node https://rpc.secret.mainnet.secret3.dev \ --gas 700000 --gas-prices 0.1uscrt ``` ## edit-validator Omit any description flag you do not want to change. The default for each is `[do-not-modify]`. The flag is `--security-contact`, not a positional. `--commission-rate` is the only commission flag on edit. ```bash secretd tx staking edit-validator \ --from EXAMPLE_KEY \ --chain-id secret-4 \ --node https://rpc.secret.mainnet.secret3.dev \ --gas 700000 --gas-prices 0.1uscrt \ --new-moniker "EXAMPLE_NEW" \ --identity "EXAMPLE" \ --website "https://example.invalid" \ --security-contact "security@example.invalid" \ --details "EXAMPLE" \ --commission-rate "0.05" \ --min-self-delegation "1000000" ``` Rules: at most one commission change per 24 hours, including the first edit after create. New rate in `[0, 1]`, at least `min_commission_rate`, at most the max rate frozen at create. An increase larger than `max-change-rate` is rejected. A decrease is not limited by `max-change-rate`. The 24-hour rule still applies. `--min-self-delegation` on edit must be a positive integer strictly greater than the current minimum, and at most `validator.Tokens` (total stake, not only your self-bond). Raising it does not jail in that function. If you set the minimum above your self-bond while other stake keeps `Tokens` high enough for the edit to pass, you cannot unjail until you self-bond back up. ## Signing `FilePV` stores the last signed height, round, and step. `CheckHRS` errors on a regression. The same height, round, and step with the same sign-bytes reuses the stored signature. Different sign-bytes at the same step return `conflicting data` and do not produce a second vote signature. The watermark is local to the file. A second process with the same key and its own state file does not see it. Height `0` is an empty watermark. `secretd tendermint unsafe-reset-all` keeps the key if the key file exists, then calls `Reset` on the state. Do not run it on a mainnet key that has signed. If the key file is absent, the same command generates a new key. `reset-state` deletes block and app databases and does not touch the key or the state file. `unsafe-reset-priv-validator` resets the watermark the same way. A missing state file does not become height `0` by itself. `LoadFilePV` exits if either file is missing. Vote extensions are off. Live `vote_extensions_enable_height` is `0`. ## Moving the signer Stop the old process. Copy `priv_validator_key.json` and `data/priv_validator_state.json`. Remove the key from the old disk. Start the new process only after its block height is at least the height in the copied state file. If the new node is behind that height, `CheckHRS` refuses to sign until it catches up (missed blocks, not a double sign). If the copied state is older than blocks this key already signed, the new process will sign those heights again. Register the new machine before `secretd start` will load a seed, and bind the quote to this same key. Follow [Register the node](/operators/register) after the key is in place. If the hardware change changes the PPID, follow [Allowlist and machine replacement](/operators/allowlist). ## Sentry Default P2P listens on `tcp://0.0.0.0:26656`, `pex` true, `addr_book_strict` true. On the validator: ```toml persistent_peers = "SENTRY_NODE_ID@10.0.0.1:26656,SENTRY_NODE_ID@10.0.0.2:26656" pex = false ``` `SENTRY_NODE_ID` and the addresses are examples. Leave `seeds` empty if the only peers should be those sentries. On each sentry, `private_peer_ids` is a comma-separated list of node ids, not `id@ip:port`. `unconditional_peer_ids` is the same id list. Peer id command is `secretd tendermint show-node-id`. Restart is `sudo systemctl restart secret-node` when that unit runs the process. A fresh home leaves `persistent_peers` empty. Put your sentry ids in that field. ## Slashing | Field | Value | | --- | --- | | `signed_blocks_window` | `22500` | | `min_signed_per_window` | `0.5` | | `downtime_jail_duration` | `600s` | | `slash_fraction_downtime` | `0.0001` (0.01%) | | `slash_fraction_double_sign` | `0.05` (5%) | Downtime fires when missed blocks in the window exceed `11250`, and only once `height > start_height + 22500`. The first window after bonding is a grace period. The bitmap is sliding, not consecutive hours. A jailed validator is not charged further misses. On jail the counter and the bitmap are cleared. `start_height` is set when the validator bonds, not when `create-validator` is accepted. ```bash secretd q slashing signing-info '{"@type":"/cosmos.crypto.ed25519.PubKey","key":"EXAMPLE"}' \ --node https://rpc.secret.mainnet.secret3.dev ``` The autocli also accepts a consensus address. Watch `missed_blocks_counter`, `jailed_until`, and `tombstoned`. Downtime: slash 0.01%, jail for `600s` of block time, no rewards while jailed. Unjail is manual and has no positional argument: ```bash secretd tx slashing unjail \ --from EXAMPLE_KEY \ --chain-id secret-4 \ --node https://rpc.secret.mainnet.secret3.dev \ --gas 700000 \ --gas-prices 0.1uscrt ``` Unjail fails if there is no self-delegation, if self-bond tokens are below `min_self_delegation`, if the validator is not jailed, if `tombstoned` is true, or if block time is still before `jailed_until`. Sync before unjail. If you undelegate and your tokens fall below `min_self_delegation`, the validator is jailed without the downtime slash fraction. Delegate back above the minimum, then `unjail`. Double sign: slash 5% of stake (including unbonding and redelegations at the infraction height), jail, `jailed_until` `253402300799` (9999-12-31), tombstone. `unjail` returns an error while `tombstoned` is true. `RevertTombstone` is not a CLI command. You cannot unjail, reuse the consensus pubkey, or `create-validator` again from the same account. Delegators move with `redelegate` (at most `max_entries` 7) or unbond and wait `1814400s`. A new validator is a new account and a new ed25519 key, on a registered node. ## Rewards Not required to validate. Live distribution params: `community_tax` `0`, `secret_foundation_tax` `0`, `withdraw_addr_enabled` true, `base_proposer_reward` `0`, `bonus_proposer_reward` `0`, plus `minimum_restake_threshold` `10000000` and `restake_period` `1000`. ```bash secretd tx distribution withdraw-rewards secretvaloper1EXAMPLE \ --from EXAMPLE_KEY --commission --chain-id secret-4 \ --node https://rpc.secret.mainnet.secret3.dev \ --gas 700000 --gas-prices 0.1uscrt ``` ## Upgrade If you already validate, follow [Upgrade a seeded node](/operators/upgrade/v1.27.2). Run one process. Confirm `secretd version` is `1.27.2`. Do not wait for a halt before `create-validator` on a chain that is already upgraded. Do not run `unsafe-reset-all` as an upgrade step. # Overview > The public chain is the record every program is checked against. A chain vote approves the operating system image all programs run on. A validator with a public seat registers a new program without a vote and becomes its owner, and the owner chooses which version runs until a chain vote makes the program tax-eligible, when chain votes take over. A program's computer gets its keys only after its hardware proves it is running exactly that image and version. Source: https://docs.scrt.network/secret-zone/ · Markdown: https://docs.scrt.network/secret-zone/index.md :::note[Details pending] :::

{"The public chain is the record every program is checked against. A chain vote approves the operating system image all programs run on. A validator with a public seat registers a new program without a vote and becomes its owner, and the owner chooses which version runs until a chain vote makes the program tax-eligible, when chain votes take over. A program's computer gets its keys only after its hardware proves it is running exactly that image and version."}

{"Secret Zone is where you sign in and manage your sites, apps and storage, with one sign-in and one interface."}

{"The edge is the public front door for every site and app, Accounts, the Scheduler and Secret Money. The computers behind it have no public address, so everything reaches them through the edge."}

{"Accounts handles sign-in. Your login is sealed to Accounts before it reaches the edge, so the edge passes it on without being able to read it."}

{"Key machines are a group run separately from the validators. A program's keys are released only when the required number of them agree (n of m, with the numbers set by chain vote), and only to a computer that proves it's running an approved program. The rules they follow are public on the chain."}

{"Secret Money is the network's money program, and the only program that can move its coins. A chain vote names the software it runs and which validators' machines may run it. Every other program runs on its own computer and can't touch Secret Money's coins or records."}

{"Moving coins into or out of Secret Money is a public chain transaction. Transfers inside it happen off the chain. Each one is sealed to Secret Money before it reaches the edge, so only Secret Money can read it, and it shows as sent only after Secret Money confirms it."}

Edge[Edge] subgraph Computers[Computers with no public address] Accounts[Accounts] Apps[Sites and apps] Scheduler[Scheduler] Money[Secret Money] end Edge --> Accounts Edge --> Apps Edge --> Scheduler Edge --> Money Chain[Public chain] -->|rules| Keys[Key machines, n of m] Keys -->|keys after hardware proof| Computers`} /> ## In this section - [User journey](/secret-zone/user-journey) - [Builder journey](/secret-zone/builder-journey) - [Secret Programs](/secret-zone/programs-and-sdk) - [Network programs](/secret-zone/network-programs) # Builder journey > To put a site on Secret Zone, you claim a name and connect a git repository, along with the command that builds it and the folder it outputs. Source: https://docs.scrt.network/secret-zone/builder-journey/ · Markdown: https://docs.scrt.network/secret-zone/builder-journey/index.md :::note[Details pending] :::

{"To put a site on Secret Zone, you claim a name and connect a git repository, along with the command that builds it and the folder it outputs."}

{"Every push to the repository starts a build. The Scheduler queues it, and a Builder runs your command on a confidential computer. The files go to your site, and a receipt and build log go to your account."}

{"Every build gets its own preview address, "}{"name--branch--build.secret.express"}{". The two newest builds on each of up to three branches stay available as previews."}

{"Your site goes live at "}{"name.secret.express"}{" when you pick which build to publish. A build never publishes itself."}

{"You can add your own domain by following the DNS steps your account shows. Until that domain reaches the edge and has its certificate, the site keeps serving at "}{"name.secret.express"}{". After that, the "}{"secret.express"}{" address sends visitors to your domain."}

|push| Edge[Edge] Edge --> Scheduler[Scheduler] Scheduler --> Builder[Builder] Builder -->|files| Site[your site] Builder -->|receipt and build log| Account[your account]`} /> # Network programs > A network program is a Secret Program the whole network depends on, so chain votes approve how it runs. Secret Money is a network program. Source: https://docs.scrt.network/secret-zone/network-programs/ · Markdown: https://docs.scrt.network/secret-zone/network-programs/index.md :::note[Details pending] :::

{"A network program is a Secret Program the whole network depends on, so chain votes approve how it runs. Secret Money is a network program."}

{"A chain vote names the software Secret Money runs and which validators' machines may run it."}

{"One of those machines at a time holds the right to write Secret Money's records. The others stay ready to take over."}

{"Secret Money regularly records a checkpoint of its state on the chain, and the chain accepts it only from the machine currently writing."}

{"No other program can move Secret Money's coins, hold its funds, or read its records."}

|names the software and machines| Machines[Approved validator machines] Machines --> Writer[Machine currently writing] Machines --> Standby[Machines ready to take over] Writer -->|checkpoint| Chain[Public chain]`} /> # Secret Programs > A Secret Program is a program the chain knows by name. Each one runs on its own confidential computer, separate from every other program. Secret Money, Accounts and Secret Zone's own services are Secret Programs. Source: https://docs.scrt.network/secret-zone/programs-and-sdk/ · Markdown: https://docs.scrt.network/secret-zone/programs-and-sdk/index.md :::note[Details pending] :::

{"A Secret Program is a program the chain knows by name. Each one runs on its own confidential computer, separate from every other program. Secret Money, Accounts and Secret Zone's own services are Secret Programs."}

{"An app is something you deploy through Secret Zone as a compose file. It runs on a Secret Zone program, so you don't register anything on the chain to launch it."}

{"Before a program's computer gets its keys, the key machines check its hardware proof against the chain. The proof shows it is genuine confidential hardware running the approved operating system image and the approved version, on a machine its operator registered to their seat on the chain. The key machines repeat these checks on every key release, so a revoked machine or version is cut off on its next request."}

{"Programs that keep records store them using the Secret SDK."}

{"Who can add a new Secret Program, and in which cases a chain vote is needed, is still being determined."}

|hardware proof| Keys[Key machines, n of m] Keys -->|checks against| Chain[Public chain] Keys -->|keys, checked on every release| Computer`} /> # User journey > You sign up for Secret Zone with an email and a password. Your browser proves you know the password without sending it, and the login is sealed to Accounts before it reaches the edge, so the edge can't read it. Source: https://docs.scrt.network/secret-zone/user-journey/ · Markdown: https://docs.scrt.network/secret-zone/user-journey/index.md :::note[Details pending] :::

{"You sign up for Secret Zone with an email and a password. Your browser proves you know the password without sending it, and the login is sealed to Accounts before it reaches the edge, so the edge can't read it."}

{"When you sign in, your browser gets a sign-in permit that lasts one hour, and each program checks it on every request. You can add a passkey to sign in without your password and link a wallet to your account. If you forget your password, your linked wallet lets you set a new one. Without the wallet, a code sent to your email does."}

{"Secret Money uses your chain wallet as its account, so there's no sign-up, and your account key stays in your wallet. To see your balance, your wallet signs a viewing permit, which your browser keeps for one hour."}

{"Moving coins into Secret Money is a public chain transaction that locks them, and Secret Money credits you once it verifies that lock against the chain. Moving coins out is also a public chain transaction."}

{"When you send Secret Money, your wallet seals the transfer to Secret Money before it reaches the edge, so the edge passes it on without reading it. The payment shows as pending until Secret Money's next chain checkpoint covers it, then as sent."}

{"Secret Wallet is the app for holding and sending Secret Money. Secret Market will be a confidential exchange built on Secret Money."}

Edge[Edge] Wallet[Wallet] --> Edge Edge --> Accounts[Accounts] Edge --> Money[Secret Money]`} />