### Prompt for Oasis Sapphire Quickstart Docs via Context7 Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/tools/llms.md Example prompt to fetch Oasis Sapphire quickstart documentation using Context7 MCP. Requires specifying the correct library ID. ```text Use context7 MCP to fetch Oasis Sapphire quickstart docs. Use library ID: llmstxt/oasis_io_llms_txt ``` -------------------------------- ### Start Oasis Node Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/keymanager-node/README.md Command to start the Oasis node with the specified configuration file. ```bash oasis-node --config /node/etc/config.yml ``` -------------------------------- ### Start Web3 Gateway Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/web3.mdx Command to start the Web3 gateway using a specified configuration file. ```shell ./oasis-web3-gateway --config gateway.yml ``` -------------------------------- ### Build and Install Bubblewrap from Source Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/paratime-node.mdx Compiles and installs Bubblewrap from its source tarball. Ensure Bubblewrap is installed under /usr/bin/bwrap as expected by Oasis Node. ```bash tar -xf bubblewrap-0.4.1.tar.xz cd bubblewrap-0.4.1 ./configure --prefix=/usr make sudo make install ``` -------------------------------- ### Start Local Development Server Source: https://github.com/oasisprotocol/docs/blob/main/README.md Starts a local development server for live previewing changes. Access the site at http://localhost:3000/. ```bash yarn start ``` -------------------------------- ### Example Governance Proposal Output Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/reference/upgrade-logs/mainnet.md Example output from the 'list_proposals' command, showing details of an active upgrade proposal. ```yaml [ { "id": 2, "submitter": "oasis1qpydpeyjrneq20kh2jz2809lew6d9p64yymutlee", "state": "active", "deposit": "10000000000000", "content": { "upgrade": { "v": 1, "handler": "mainnet-upgrade-2022-04-11", "target": { "consensus_protocol": { "major": 5 }, "runtime_host_protocol": { "major": 5 }, "runtime_committee_protocol": { "major": 4 } }, "epoch": 13402 } }, "created_at": 12984, "closes_at": 13152 } ] ``` -------------------------------- ### Install and Run Foundryup Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/tools/foundry.mdx Installs Foundry using the official script and ensures it's sourced in your shell. ```shell curl -L https://foundry.paradigm.xyz | bash foundryup source ~/.bashrc ``` -------------------------------- ### Storage Migration Example Output Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/reference/upgrade-logs/mainnet.md This is an example of the output you will see after a successful storage migration, showing the state-root and io-root changes. ```text ... - migrating from v4 to v5... - migrating version 24468... - migrated root state-root:195cf7a9a103e7300b2bb4e537cb9935cbebd83e448e67aa55433861a6ad7426 -> state-root:cea105a5d701deab935b94af9e8e0c5af5dcdb61c242bf434da9f11aa8d110ba - migrated root io-root:0850c5a33ee7f45aa92724b7d5f28c9ac9ae8799b88cc5be9773e8aba9526ca7 -> io-root:19713a2b44e1bf868ebee43c36872baa3058870bb890a5e25d1c4cea2622be77 - migrated root io-root:477391131f60ac2c22bce9167c7e3783a13d4fb81fddd2d388b4ead6a586fe52 -> io-root:f29f86d491303c5fd7b3572e97cbd65b7487b6b4ac519623afd161cc2e4678b7 ``` -------------------------------- ### Setup Python Telegram Bot Environment Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/use-cases/tgbot.mdx Sets up a Python virtual environment and installs the 'python-telegram-bot' dependency. Ensure Python 3.9+ is installed. ```shell python -m venv my_env source my_env/bin/activate echo python-telegram-bot > requirements.txt pip install -r requirements.txt ``` -------------------------------- ### Install Development Tools for Bubblewrap Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/paratime-node.mdx Installs necessary development tools and libcap headers on Ubuntu for building Bubblewrap from source. ```bash sudo apt install build-essential libcap-dev ``` -------------------------------- ### Make Installer Executable Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/reference/upgrade-logs/mainnet.md Make the downloaded Oasis App installer script executable before running it. ```yaml chmod +x installer_s.sh ``` -------------------------------- ### Install ElizaOS CLI and Create Agent Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/use-cases/trustless-agent.mdx Installs the ElizaOS CLI and creates a new Eliza agent project configured for ROFL. Follow the prompts to select a database and configure OpenAI. ```shell bun --version || curl -fsSL https://bun.sh/install | bash bun install -g @elizaos/cli elizaos create -t project rofl-eliza # 1) Select Pqlite database # 2) Select the OpenAI model and enter your OpenAI key cd rofl-eliza elizaos start ``` -------------------------------- ### Docker USER Instruction Example Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/prerequisites/system-configuration.mdx Example of adding a 'USER' instruction to a Dockerfile to specify the user for the Oasis service within a container. ```dockerfile USER oasis ``` -------------------------------- ### Install Node Packages Source: https://github.com/oasisprotocol/docs/blob/main/README.md Installs the necessary Node.js packages for the project. ```bash yarn ``` -------------------------------- ### Install Sapphire Foundry Package Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/tools/foundry.mdx Installs the '@oasisprotocol-sapphire-foundry' package, which provides Sapphire precompiles for Forge tests. ```shell forge soldeer install @oasisprotocol-sapphire-foundry~0.1.1 ``` -------------------------------- ### Show Delegations (Testnet Example) Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/paratime-node.mdx Displays an example of the output from the `oasis account show` command for an entity's account on the Testnet, illustrating staking information. ```shell oasis account show --address --chain.oasis-testnet ``` ```text address: "oasis1qp0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" stake: total: "1000000000000" unbonded: "1000000000000" bonded: - amount: "1000000000000" validator_address: "oasis1qp0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" status: "active" delegated_to: "oasis1qp0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" shares: "1000000000000" slashing_events: 0 ``` -------------------------------- ### Install TDX Quote Generation Service and QEMU Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/prerequisites/set-up-tee.mdx Installs the TDX quote generation service and QEMU utilities required for running guest virtual machines with TDX. ```shell sudo apt install tdx-qgs qemu-utils qemu-system-x86 ``` -------------------------------- ### Install Sapphire Contracts Package Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/tools/foundry.mdx Installs the '@oasisprotocol-sapphire-contracts' package using Foundry's package manager, Soldeer. ```shell forge soldeer install @oasisprotocol-sapphire-contracts~0.2.14 ``` -------------------------------- ### Install SGX RA Service on Ubuntu Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/prerequisites/set-up-tee.mdx Installs the Intel SGX Multi-Package Registration Agent Service on Ubuntu systems. Ensure the Intel SGX apt repository is added beforehand. ```shell sudo apt install sgx-ra-service ``` -------------------------------- ### Install Bubblewrap on Ubuntu Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/prerequisites/oasis-node.md Installs the Bubblewrap package, required for running ParaTimes, on Ubuntu systems. ```shell sudo apt install bubblewrap ``` -------------------------------- ### Install and Compile Smart Contract Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/use-cases/price-oracle.mdx Commands to install dependencies and compile the Oracle smart contract using Hardhat. Ensure you are in the 'oracle' directory. ```shell cd oracle npm install npx hardhat compile ``` -------------------------------- ### Install Rust Toolchain (Nightly) Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/tools/foundry.mdx Installs the Rust toolchain, specifically the nightly version, which is required by the 'oasisprotocol-sapphire-foundry' package. ```shell curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh rustup toolchain install nightly rustup default nightly ``` -------------------------------- ### Unmnemonic Tool Interactive Prompt Example Source: https://github.com/oasisprotocol/docs/blob/main/docs/general/manage-tokens/faq.mdx This example shows the interactive prompts and expected input when using the unmnemonic tool to recover Oasis Network signing keys from mnemonics. ```text unmnemonic - Recover Oasis Network signing keys from mnemonics ? Which algorithm does your wallet use Ledger WARNING: Entering your Ledger device mnemonic into any non-Leger device can COMPROMISE THE SECURITY OF ALL ACCOUNTS TIED TO THE MNEMONIC. Use of this tool is STRONGLY DISCOURAGED. ? Have you read and understand the warning Yes ? How many words is your mnemonic 24 ? Enter word 1 ***** ? Enter word 2 **** ? Enter word 3 **** ? Enter word 4 ****** ? Enter word 5 **** ? Enter word 6 ***** ? Enter word 7 **** ? Enter word 8 ******* ? Enter word 9 ****** ? Enter word 10 ***** ? Enter word 11 *** ? Enter word 12 ***** ? Enter word 13 ***** ? Enter word 14 **** ? Enter word 15 **** ? Enter word 16 ****** ? Enter word 17 **** ? Enter word 18 ***** ? Enter word 19 **** ? Enter word 20 ******* ? Enter word 21 ****** ? Enter word 22 ***** ? Enter word 23 *** ? Enter word 24 ***** ? Wallet index(es) (comma separated) 4 Index[4]: oasis1qqwkm23pyg638xvl2nu00frxhapusjjv8qhh3p77 ? Write the keys to disk Yes ? Output directory /home/oa/tmp/wallet-export-2023-11-28 Index[4]: oasis1qqwkm23pyg638xvl2nu00frxhapusjjv8qhh3p77.private.pem - done Done writing wallet keys to disk, goodbye. ``` -------------------------------- ### Install evm-gateway-contracts Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/opl/router-protocol/interface.md Install the Router Protocol's EVM gateway contracts package using npm or yarn for Hardhat projects. ```shell npm install @routerprotocol/evm-gateway-contracts ``` -------------------------------- ### Systemd User Directive Example Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/prerequisites/system-configuration.mdx Example of adding a 'User' directive to a systemd unit file to specify the user for the Oasis service. ```text User=oasis ``` -------------------------------- ### Local Development Setup Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/use-cases/key-generation.mdx Environment variables and command to run local development smoke tests. Ensure to replace the placeholder secret key. ```shell export ALLOW_LOCAL_DEV=true export LOCAL_DEV_SK=0x<64-hex-dev-secret-key> # DO NOT USE IN PROD npm run smoke-test ``` -------------------------------- ### Install Runtime Dependencies Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/use-cases/key-generation.mdx Installs necessary runtime dependencies including @oasisprotocol/rofl-client, ethers, dotenv, and @types/node, as well as the development dependency tsx. ```shell npm i @oasisprotocol/rofl-client ethers dotenv @types/node npm i -D tsx ``` -------------------------------- ### New Runtime Configuration Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/reference/upgrade-logs/mainnet.md Example of the simplified new configuration structure for runtime settings, utilizing runtime mode and .orc file paths. ```yaml runtime: mode: compute paths: - /path/to/runtime.orc worker: # ... other settings omitted ... p2p: port: 12346 addresses: - "xx.yy.zz.vv:12346" ``` -------------------------------- ### Install SGX AESM Service and Plugins Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/prerequisites/set-up-tee.mdx Install the necessary packages for the AESM service, including plugins for ECDSA and quote generation, and the DCAP default quote provider library on Ubuntu. Ensure you run `apt update` first. ```bash sudo apt update sudo apt install sgx-aesm-service libsgx-aesm-ecdsa-plugin libsgx-aesm-quote-ex-plugin libsgx-dcap-default-qpl ``` -------------------------------- ### Oasis Unmnemonic Tool Interactive Example Source: https://github.com/oasisprotocol/docs/blob/main/docs/general/manage-tokens/faq.mdx Example of the interactive prompts and output when using the unmnemonic tool to recover Oasis Network signing keys from mnemonics. This demonstrates the process of selecting the algorithm, entering mnemonic words, specifying wallet index, and writing keys to disk. ```text unmnemonic - Recover Oasis Network signing keys from mnemonics ? Which algorithm does your wallet use Bitpie ? How many words is your mnemonic 12 ? Enter word 1 ***** ? Enter word 2 ****** ? Enter word 3 ****** ? Enter word 4 ******* ? Enter word 5 ***** ? Enter word 6 ******* ? Enter word 7 ******* ? Enter word 8 **** ? Enter word 9 ***** ? Enter word 10 ****** ? Enter word 11 ***** ? Enter word 12 ****** ? Wallet index(es) (comma separated) 0 Index[0]: oasis1qp8d9kuduq0zutuatjsgltpugxvl38cuaq3gzkmn ? Write the keys to disk Yes ? Output directory /home/user/unmnemonic/wallet-export-2023-05-01 Index[0]: oasis1qp8d9kuduq0zutuatjsgltpugxvl38cuaq3gzkmn.private.pem - done Done writing wallet keys to disk, goodbye. ``` -------------------------------- ### Staking Reward Schedule Example Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/reference/upgrade-logs/testnet.md Example of a staking reward schedule configuration. This schedule specifies the reward scale per epoch until a certain epoch. ```json { "until": 14226, "scale": "1229" } ``` -------------------------------- ### ROFL App Remapping Log Example Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/rofl-node.mdx Example log output showing how a ROFL app ID is remapped to a unique value for running multiple replicas on the same node. This helps in identifying the remapped ID for debugging. ```json { "app_id":"rofl1qrjtky678pd3uchsdlhqtjugnsvtck3wyg7w5324", "component":"rofl.4bd2d31255ae7e5cec31084cde02fb40640d4d678db111d1c6ba53478f5f2fc2", "msg":"starting processor", ... } ``` -------------------------------- ### Install OPL SDK Package Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/opl/opl-sdk/README.md Add the @oasisprotocol/sapphire-contracts NPM package to your Hardhat project. This is required to import OPL.sol. ```shell npm install @oasisprotocol/sapphire-contracts ``` -------------------------------- ### Runit chpst Command for Oasis Node Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/prerequisites/system-configuration.mdx Example of using the 'chpst' command with runit to wrap the oasis-node invocation and set the user. ```shell chpst -u oasis oasis-node ... ``` -------------------------------- ### Install Ledgerblue Python Package Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/reference/upgrade-logs/mainnet.md Install the 'ledgerblue' Python package using pip3, which is a prerequisite for manually installing the Oasis App on Ledger devices. Consider using a virtual environment or user install. ```bash pip3 install --upgrade ledgerblue ``` -------------------------------- ### Sapphire Localnet Output Example Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/tools/localnet.mdx This output shows a typical startup sequence for the Sapphire localnet Docker container, including network details, available accounts, and private keys. Note the warning about ephemeral state. ```console sapphire-localnet 2024-11-29-gite748a1a (oasis-core: 24.3, sapphire-paratime: 0.9.0-testnet, oasis-web3-gateway: 5.1.0) * No ROFLs detected. * Starting oasis-net-runner with sapphire... * Waiting for Postgres to start... * Waiting for Oasis node to start..... * Waiting for Envoy proxy to start. * Starting oasis-web3-gateway... * Bootstrapping network (this might take a minute).... * Waiting for key manager...... * Creating database 'nexus' * Waiting for Nexus to start. * Waiting for Explorer to start. * Populating accounts... Available Accounts ================== (0) 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 (10000 TEST) (1) 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 (10000 TEST) (2) 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC (10000 TEST) (3) 0x90F79bf6EB2c4f870365E785982E1f101E93b906 (10000 TEST) (4) 0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65 (10000 TEST) Private Keys ================== (0) 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 (1) 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d (2) 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a (3) 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6 (4) 0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a HD Wallet ================== Mnemonic: test test test test test test test test test test test junk Base HD Path: m/44'/60'/0'/0/%d WARNING: The chain is running in ephemeral mode. State will be lost after restart! * GRPC listening on http://localhost:8544. * Web3 RPC listening on http://localhost:8545 and ws://localhost:8546. Chain ID: 0x5afd. * Nexus API listening on http://localhost:8547. * Localnet Explorer available at http://localhost:8548. * Container start-up took 69 seconds, node log level is set to warn. ``` -------------------------------- ### Install Bubblewrap on Fedora Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/prerequisites/oasis-node.md Installs the Bubblewrap package, required for running ParaTimes, on Fedora systems. ```shell sudo dnf install bubblewrap ``` -------------------------------- ### Create New Forge Project Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/tools/foundry.mdx Initializes a new Forge project named 'sapphire_demo' and navigates into the project directory. ```shell forge init sapphire_demo cd sapphire_demo ``` -------------------------------- ### Initialize ROFL App Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/use-cases/tgbot.mdx Initializes the basic directory structure for a ROFL application. Navigate into the created directory afterwards. ```shell oasis rofl init rofl-tgbot cd rofl-tgbot ``` -------------------------------- ### Initialize and Create ROFL App Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/use-cases/trustless-agent.mdx Initializes the ROFL environment and creates a new app instance on the Oasis testnet. ```shell oasis rofl init oasis rofl create --network testnet ``` -------------------------------- ### Initialize ROFL App Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/use-cases/key-generation.mdx Initializes a new ROFL app named 'rofl-keygen' using the Oasis CLI. ```shell oasis rofl init rofl-keygen cd rofl-keygen ``` -------------------------------- ### Initialize Hardhat Project Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/tools/other-paratimes/emerald/writing-dapps-on-emerald.mdx Initializes a new Hardhat project with TypeScript support. Select the advanced sample project option for a modern dApp structure. ```bash npx hardhat init ``` -------------------------------- ### Install Ledger udev rules on Debian/Ubuntu Source: https://github.com/oasisprotocol/docs/blob/main/docs/general/manage-tokens/faq.mdx Installs the necessary udev package to grant access to Ledger devices for all users on Debian-based systems. ```shell sudo apt install ledger-wallets-udev ``` -------------------------------- ### Add Intel SGX APT Repository Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/prerequisites/set-up-tee.mdx Add Intel's official SGX APT repository to your Ubuntu system to install SGX components. This involves downloading a key and adding the repository to your sources list. ```bash curl -fsSL https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | sudo gpg --dearmor -o /usr/share/keyrings/intel-sgx-deb.gpg echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx-deb.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/intel-sgx.list > /dev/null ``` -------------------------------- ### Build Oracle Docker Image Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/use-cases/price-oracle.mdx Command to build the Docker image for the ROFL price oracle. ```shell docker compose build ``` -------------------------------- ### Install TDX-enabled Linux Kernel Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/prerequisites/set-up-tee.mdx Installs a special Linux kernel that supports Intel TDX. This is necessary for enabling TDX functionality on the host OS. ```shell sudo apt install linux-image-intel ``` -------------------------------- ### Disable Pruning Configuration Example Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/reference/upgrade-logs/mainnet.md Example of a configuration change to disable pruning of the consensus state by removing the 'consensus.tendermint.abci.prune' key. This is recommended for mainnet upgrades. ```yaml ... # Consensus backend. consensus: # Setting this to true will mean that the node you're deploying will attempt # to register as a validator. validator: true # Tendermint backend configuration. tendermint: core: listen_address: tcp://0.0.0.0:26656 ... ``` -------------------------------- ### Initialize ROFL Provider Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/rofl-node.mdx Use the Oasis CLI to initialize a new ROFL provider. ```shell oasis rofl provider init ``` -------------------------------- ### Install Debug Tools and System Report Script Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/prerequisites/set-up-tee.mdx Install the 'msr-tools' package for accessing Model Specific Registers and clone the TDX system report script for further diagnostics. ```shell apt install msr-tools git clone https://github.com/canonical/tdx && ./tdx/system-report.sh ``` -------------------------------- ### Initialize ROFL App Directory Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/use-cases/price-oracle.mdx Use the Oasis CLI to initialize the directory structure for your ROFL application. ```shell oasis rofl init rofl-price-oracle cd rofl-price-oracle ``` -------------------------------- ### Set Database Password via Environment Variable Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/web3.mdx Demonstrates how to set the database password using an environment variable instead of directly in the configuration file. ```shell DATABASE__PASSWORD=your_password_here ``` -------------------------------- ### Start Hyperlane Relayer Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/opl/hyperlane/relayer.md Start a Hyperlane relayer to monitor and transport messages between specified chains. This command initiates the relayer service, connecting to the provided chain configurations. ```shell hyperlane relayer --chains sapphiretestnet,arbitrumsepolia ``` -------------------------------- ### Web3 Gateway Configuration Example Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/web3.mdx This YAML snippet shows the configuration for the Web3 gateway, including database connection details, chain ID, and HTTP/WS host and port settings. It also includes logging and pruning configurations. ```yaml enable_pruning: false pruning_step: 100000 indexing_start: 0 log: level: debug format: json database: # Change host and port, if PostgreSQL is running somewhere else. host: "127.0.0.1" port: 5432 # Enter your database name, username and password. db: {{ postgresql_db }} user: {{ postgresql_user }} password: {{ postgresql_password }} dial_timeout: 5 read_timeout: 10 write_timeout: 5 max_open_conns: 0 gateway: chain_id: {{ chain_id }} http: # Change host to your external IP address if you have users accessing Web3 from the outside. host: "localhost" # Use different port for each Web3 gateway instance, if all run locally. port: 8545 cors: ["*"] ws: # Change host to your external IP address if you have users accessing Web3 from the outside. host: "localhost" # Use different port for each Web3 gateway instance, if all run locally. port: 8546 origins: ["*"] method_limits: get_logs_max_rounds: 100 ``` -------------------------------- ### Get Network Status via Oasis CLI Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/advanced/sync-node-using-state-sync.md Obtain the latest block height and hash by running the `oasis network status` command. This is a convenient way to get trusted node information. ```bash oasis network status ``` -------------------------------- ### Example Key Manager Policy Output Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/keymanager-node/signing-key-manager-policy.md This is an example of the JSON output when verifying a key manager policy on Oasis Testnet. It shows the serial number, runtime ID, enclave identities, and replication/query permissions. ```json { "serial": 8, "id": "4000000000000000000000000000000000000000000000004a1a53dff2ae482d", "enclaves": { "ZhD5ufyc/MReZD1qMSKNCRxnkNiZ3BtxqcYdx4+M0N9AJdq369ofvsxONjdgbgISFND0HG0EIv03iyqLiIGEWQ==": { "may_query": { "0000000000000000000000000000000000000000000000000000000000000000": [ "c0SidcKhBx3iuonmtXURnFB+qIVkg+nAiaAozAh16ltAJdq369ofvsxONjdgbgISFND0HG0EIv03iyqLiIGEWQ==" ], "000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c": [ "LwbLEQ6dv+R5wv5q5CGRZWiEBWGxgCi/gpphcJFQ5zVAJdq369ofvsxONjdgbgISFND0HG0EIv03iyqLiIGEWQ==" ] }, "may_replicate": [ "jTX8etUcGSQBq3C4WbLlexga7dhQFnwzSJOEmRCPvfRAJdq369ofvsxONjdgbgISFND0HG0EIv03iyqLiIGEWQ==" ] }, "jTX8etUcGSQBq3C4WbLlexga7dhQFnwzSJOEmRCPvfRAJdq369ofvsxONjdgbgISFND0HG0EIv03iyqLiIGEWQ==": { "may_query": { "0000000000000000000000000000000000000000000000000000000000000000": [ "c0SidcKhBx3iuonmtXURnFB+qIVkg+nAiaAozAh16ltAJdq369ofvsxONjdgbgISFND0HG0EIv03iyqLiIGEWQ==" ], "000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c": [ "LwbLEQ6dv+R5wv5q5CGRZWiEBWGxgCi/gpphcJFQ5zVAJdq369ofvsxONjdgbgISFND0HG0EIv03iyqLiIGEWQ==" ] }, "may_replicate": [] } } } ``` -------------------------------- ### Run Enrollment Script for Sapphire Testnet Source: https://github.com/oasisprotocol/docs/blob/main/docs/build/opl/hyperlane/pingpong-example.md Execute the router enrollment script for the Sapphire Testnet network. ```shell pnpm hardhat run scripts/enroll.ts --network sapphire-testnet ``` -------------------------------- ### Sentry Node Configuration Example Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/sentry-node.md An example YAML configuration for an Oasis Sentry node. Replace placeholder variables with your specific network details, including external addresses, seed node addresses, and validator node information. ```yaml mode: client common: data_dir: /node/data log: format: JSON level: cometbft: warn cometbft/context: error # Per-module log levels. Longest prefix match will be taken. Fallback to # "default", if no match. default: debug # By default logs are output to stdout. If you're running this in docker # keep the default #file: /var/log/oasis-node.log consensus: external_address: tcp://{{ external_address }}:26656 listen_address: tcp://0.0.0.0:26656 sentry_upstream_addresses: - {{ validator_tendermint_id }}@{{ validator_private_address }}:26656 genesis: # Path to the genesis file for the current version of the network. file: /node/etc/genesis.json p2p: seeds: # List of seed nodes to connect to. # NOTE: You can add additional seed nodes to this list if you want. - {{ seed_node_address }} sentry: # Port used by validator nodes to query sentry node for registry # information. # IMPORTANT: Only validator nodes protected by the sentry node should have # access to this port. This port should not be exposed on the public # network. control: authorized_pubkeys: - {{ validator_sentry_client_grpc_public_key }} port: 9009 enabled: true ``` -------------------------------- ### Run sgx-detect with Root Permissions Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/troubleshooting.md Execute the sgx-detect tool with root privileges to resolve permission denied errors when accessing the SGX kernel device. ```bash sudo $(which sgx-detect) --verbose ``` -------------------------------- ### Run Oasis Unmnemonic Tool (Windows) Source: https://github.com/oasisprotocol/docs/blob/main/docs/general/manage-tokens/faq.mdx Execute the unmnemonic tool on Windows to convert BitPie mnemonics to Oasis private keys. Ensure you are in the correct directory before running. ```shell unmnemonic_windows_amd64 ``` -------------------------------- ### Migrate Database Separately Source: https://github.com/oasisprotocol/docs/blob/main/docs/node/web3.mdx Command to migrate the database for the Web3 gateway independently of starting the gateway process. ```shell ./oasis-web3-gateway migrate-db --config gateway.yml ``` -------------------------------- ### Checkout Git Submodules Source: https://github.com/oasisprotocol/docs/blob/main/README.md Initializes and updates all Git submodules required for the project. ```bash git submodule update --init ```