Interactive Solo Gnosis staking guide for Ubuntu OS

One-page interactive complete guide to stake one as well as thousands of validators in a single staking node. Simply made, well explained, allowing running multiple chains on a single node. Focused on gnosis.

Disclaimer

This guide is for informational purposes only. The author nor website owner does not guarantee accuracy of the information in this guide and is not responsible for any damages or losses incurred by following the guide.

Prerequisites for this guide

  1. Installed and synced Execution and Consensus client

    Install Execution and Consensus Client

Integration

  1. Creating a Vault

  2. Installing StakeWise client on the node server

    1. Download the binary file for your node

      Download the client
      cd ~/downloads && curl -LO https://github.com/stakewise/v3-operator/releases/download/v2.1.4/operator-v2.1.4-linux-amd64.tar.gz
      Unpack the client and remove its packed file
      tar xvf operator-v2.1.4-linux-amd64.tar.gz && rm operator-v2.1.4-linux-amd64.tar.gz
    2. Move the client to /usr/local/bin

      sudo cp ~/downloads/operator-v2.1.4-linux-amd64/operator /usr/local/bin/stakewise-operator && rm -r ~/downloads/operator-v2.1.4-linux-amd64
    3. Create a directory for stakewise service

      sudo mkdir /srv/stakewise
  3. Maua way - Generate validator keys

    • Init

      sudo /usr/local/bin/stakewise-operator init --data-dir /srv/stakewise
      Response is
      done.
      Successfully initialized configuration for vault 0xXXXX...

      There's created file config.json at /srv/stakewise/<vaultAddress>/config.json. File content:

      {"network": "gnosis", "mnemonic_next_index": 0, "first_public_key": "0xXXXXXXX....."}
    • Create keys

      sudo /usr/local/bin/stakewise-operator create-keys --data-dir /srv/stakewise
      Response is:
      Done. Generated 8 keys for 0xXXXX... vault.
      Keystores saved to /srv/stakewise/0xXXXX.../keystores file
      Deposit data saved to /srv/stakewise/0xXXXX.../deposit_data.json file
      Keystores password is at nano /srv/stakewise/0xXXXX.../keystores/password.txt
    • Create Hot wallet

      sudo /usr/local/bin/stakewise-operator create-wallet --data-dir /srv/stakewise

      Response is

      Done. The wallet and password saved to /srv/stakewise/0xXXXX.../wallet directory. The wallet address is: 0xXXXX...
    • On offline PC, generate deposit keys with the Vault withdrawal's address
    • Upload deposit file to the Vault
    • Create Hot wallet...
  4. Upload deposit file to the vault

    Download deposit_data file through scp

    scp -P PORT -i ~/.ssh/file -r userName@IP:/srv/stakewise/0xXXXX.../deposit_data.json deposit_data.json

    Copy the deposit fril from disk and uplaod it over web - click on "Settings" and open the "Deposit Data" tab.

  5. Create a StakeWise Operator service

    sudo useradd --system --no-create-home --shell /bin/false stakewise-v1
    sudo mkdir -p /var/lib/stakewise/0xXXXX...
    sudo chown -R stakewise-v1:stakewise-v1 /srv/stakewise/0xXXXX...
    sudo chown -R stakewise-v1:stakewise-v1 /var/lib/stakewise/0xXXXX...

    Configurate the service

    sudo nano /etc/systemd/system/stakewise-v1.service
    [Unit]
    Description=Stakewise service - vault 1 (Gnossis Mainnet)
    After=network.target
    Wants=network.target
    
    [Service]
    User=stakewise-v1
    Group=stakewise-v1
    Type=simple
    Restart=always
    RestartSec=5
    ExecStart=/usr/local/bin/stakewise-operator start \
      --network gnosis \
      --vault 0x10A2b1CC775eEbF6a7a0A5e733f809626142a3f5 \
      --data-dir /srv/stakewise \
      --database-dir /var/lib/stakewise/0xXXXX... \
      --execution-jwt-secret /var/lib/jwtsecret/jwt.hex \
      --consensus-endpoints http://127.0.0.1:9596 \
      --execution-endpoints http://127.0.0.1:8545
    
    [Install]
    WantedBy=default.target
    sudo systemctl daemon-reload
  6. Start the service

    sudo systemctl start stakewise-v1

    Check the service

    systemctl status stakewise-v1

    Monitor the service

    journalctl -fu stakewise-v1

    Output:

    2024-07-27 17:20:45 INFO     Starting operator service, version v2.1.4
    INFO     Checking connection to database...
    INFO     Connected to database /var/lib/stakewise/0xXXXX.../operator.db.
    INFO     Checking connection to consensus nodes...
    INFO     Connected to consensus node at http://127.0.0.1:9596. Finalized epoch: 1038841
    INFO     Checking connection to execution nodes...
    INFO     Connected to execution node at http://127.0.0.1:8545. Current block number: 35182233
    INFO     Checking vault address 0xXXXX......
    INFO     Vault withdrawable assets: 0.00 GNO
    INFO     Checking hot wallet balance 0xXXXX... ...
    INFO     Checking connection to ipfs nodes...
    
    INFO     Connected to ipfs nodes at https://stakewise-v3.infura-ipfs.io, http://cloudflare-ipfs.com, https://gateway.pinata.cloud, https://ipfs.io.
    INFO     Checking connection to oracles set...
    INFO     Connected to oracles at https://gno-stakewise-v3-oracle.pn.prod.fcstech.de, https://gnosis-oracle.stakewise.io, https://stakewise-oracle-gnosis.chorus.one, https://stakewise-oracle-gno-mainnet-1.gateway.fm, https://sw-oracle-gno.axol.io, https://stakewise-oracle-gc.gnosischain.com, https://gnosis-oracle.stakewise.dsrvlabs.net, https://gnosis-oracle-b.stakewise.io, https://stakewise-oracle-v3-gnosis.bitfly.at, https://stakewise-oracle-gc-2.gnosischain.com, https://stakewise-oracle-gnosis.senseinode.com
    INFO     Checking deposit data file...
    INFO     Found deposit data file /srv/stakewise/0xXXXX.../deposit_data.json
    INFO     Checking keystores dir...
    INFO     Found keystores dir
    INFO     Loading keys from /srv/stakewise/0xXXXX.../keystores...
    INFO     Loaded 8 keys
    INFO     Loaded deposit data file /srv/stakewise/0xXXXX.../deposit_data.json
    INFO     Syncing network validator events...
    INFO     Updating oracles cache...
    INFO     Started operator service
    
  7. Enable auto launch on OS startup

    sudo systemctl enable stakewise-v1