testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd
2024-08-07 15:54:12 +05:30
..
README.md Modify readme to join the testnet as a validator 2024-08-07 15:54:12 +05:30
stack.yml Rename laconic2d container and services to laconicd (#8) 2024-07-23 12:55:38 +00:00

testnet-laconicd

Instructions for running a laconicd testnet full node and joining as a validator

Prerequisites

  • Minimum hardware requirements:

    RAM: 8-16GB
    Disk space: 200GB
    CPU: 2 cores
    
  • Testnet genesis file and peer node address

  • Register your laconic address as a participant on the Laconic network using the Onboarding App

    • Read and accept the Terms and Conditions

    • Connect testnet-onboarding app to the wallet:

      • Click on CONNECT WALLET button on the testnet-onboarding app

      • Click on the WalletConnect icon on the top right corner in the wallet

        • If using the wallet Android app, scan the QR code from the onboarding app

        • If using the wallet website, enter WalletConnect URI for pairing

    • In the onboarding app, choose Alice's nitro and laconicd account to onboard

      • Use nitro accounts for which ledger channels have been created on L2
    • Sign using the nitro key

      • Approve sign request on Wallet
    • Perform the user verification steps

    • Select the desired participant role (Validator or Participant) and accept the onboarding terms and conditions

    • In the next step, fund your laconic account by clicking on the REQUEST TOKENS FROM FAUCET button; ensure that the displayed balance is updated

    • Send transaction request to the wallet

      • From wallet, approve and send transaction to laconicd chain

Setup

  • Clone the stack repo:

    laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack
    
  • Clone required repositories:

    laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd setup-repositories --pull
    
    # If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories and re-run the command
    
  • Build the container images:

    laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd build-containers
    
    This should create the following docker images locally:
    
    * `cerc/laconicd`
    
    

Create a deployment

  • Create a spec file for the deployment:

    laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd deploy init --output testnet-laconicd-spec.yml
    
  • Edit network in the spec file to map container ports to host ports as required:

    # testnet-laconicd-spec.yml
    ...
    network:
      ports:
        laconicd:
          - '6060:6060'
          - '26657:26657'
          - '26656:26656'
          - '9473:9473'
          - '9090:9090'
          - '1317:1317'
    
  • Create the deployment from the spec file:

    laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd deploy create --spec-file testnet-laconicd-spec.yml --deployment-dir testnet-laconicd-deployment
    
  • Copy over the published testnet genesis file (.json) to data directory in deployment (testnet-laconicd-deployment/data/laconicd-data/tmp):

    # Example
    mkdir -p testnet-laconicd-deployment/data/laconicd-data/tmp
    cp genesis.json testnet-laconicd-deployment/data/laconicd-data/tmp/genesis.json
    

Configuration

  • Inside the testnet-laconicd-deployment deployment directory, open config.env file and set following env variables:

    # Comma separated list of nodes to keep persistent connections to
    # Example: "node-1-id@laconicd.laconic.com:26656"
    # Use the provided node id
    CERC_PEERS=""
    
    # A custom human readable name for this node (default: TestnetNode)
    CERC_MONIKER=
    

Start the deployment

laconic-so deployment --dir testnet-laconicd-deployment start

Check status

  • To list down and monitor the running containers:

    # With status
    docker ps -a
    
    # Follow logs for laconicd container
    laconic-so deployment --dir testnet-laconicd-deployment logs laconicd -f
    
  • Check the sync status of your node:

    laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd status | jq .sync_info"
    
    # `catching_up: false` indicates that node is completely synced
    

Join as testnet validator

  • Open the onboarding app : https://loro-signup.laconic.com/validator

  • Select your laconic address

  • Get your validator node's public key:

    laconic-so deployment --dir testnet-laconicd-deployment exec laconicd 'laconicd cometbft show-validator' | jq '.key'
    
    # Example response
    # "av1WrE11aXWdmv1umCzzM03r0/VwTHNaWH+Fw7kRnIw="
    
  • Paste the public key in the Validator Public Key field in the onboarding app.

  • Set the node moniker in the Moniker field in the onboarding app.

  • Check the transaction details

  • Click on SEND TRANSACTION to approve it. Sign the transaction using the wallet.

  • After successful transaction, view the staking validators:

    laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd query staking validators"
    
    • Check that in the list of validators, your node moniker exists

Clean up

  • Stop all testnet-laconicd services running in the background:

    # Stop the docker containers
    laconic-so deployment --dir testnet-laconicd-deployment stop
    
  • To stop all services and also delete data:

    # Stop the docker containers
    laconic-so deployment --dir testnet-laconicd-deployment stop --delete-volumes
    
    # Remove deployment directory (deployment will have to be recreated for a re-run)
    rm -r testnet-laconicd-deployment