Setup

This guide will show you setup a new Curio cluster or migrate to Curio from Lotus-Miner

Setup YugabyteDB

For this guide, we’re setting up a single node YugaByteDB. However, you must set up multiple YugaByteDB instances in a cluster to enable high availability.

Ensure that you have the following available before we install and set up YugabyteDB:

  1. One of the following operating systems:

    • CentOS 7 or later

    • Ubuntu 16.04 or later

    For other operating systems, Docker or Kubernetes. Please check out the YugabyteDB documentation.

  2. Python 3. To check the version, execute the following command:

    python --version
    Python 3.7.3

    If you encounter a Command 'python' not found error, you might not have an unversioned system-wide python command.

    • Starting from Ubuntu 20.04, python is no longer available. To fix this, run sudo apt install python-is-python3.

    • For CentOS 8, set python3 as the alternative for python by running sudo alternatives --set python /usr/bin/python3

    Once these dependencies have been installed, we can run the install script:

    wget https://downloads.yugabyte.com/releases/2.21.0.1/yugabyte-2.21.0.1-b1-linux-x86_64.tar.gz
    tar xvfz yugabyte-2.21.0.1-b1-linux-x86_64.tar.gz && cd yugabyte-2.21.0.1/
    ./bin/post_install.sh
    ./bin/yugabyted start --advertise_address 127.0.0.1  --master_flags rpc_bind_addresses=127.0.0.1 --tserver_flags rpc_bind_addresses=127.0.0.1
    +----------------------------------------------------------------------------------------------------------+
    |                                                yugabyted                                                 |
    +----------------------------------------------------------------------------------------------------------+
    | Status              :                                                                                    |
    | Replication Factor  : None                                                                               |
    | YugabyteDB UI       : http://127.0.0.1:15433                                                             |
    | JDBC                : jdbc:postgresql://127.0.0.1:5433/yugabyte?user=yugabyte&password=yugabyte          |
    | YSQL                : bin/ysqlsh   -U yugabyte -d yugabyte                                               |
    | YCQL                : bin/ycqlsh   -u cassandra                                                          |
    | Data Dir            : /root/var/data                                                                     |
    | Log Dir             : /root/var/logs                                                                     |
    | Universe UUID       : 411422ee-4c17-4f33-996e-ced847d10f5c                                               |
    +----------------------------------------------------------------------------------------------------------+

You can adjust the --advertise_address, --rpc_bind_addresses and --tserver_flags according to your own configuration and needs.

Migrating from Lotus-miner to Curio

Curio provides a utility to users onboard quickly. Please run the below command on your lotus-miner node and follow the os-screen instructions. It communicates in English (en), Chinese (zh), and Korean (ko).

Once the migration is complete, you can shut down all of your workers and miner processes. You can start curio process to replace them with correct configuration layer.

If you entered non-default in step 3 then please export the relevant details in your ~/.bashrc file as Curio command needs access to the Database. This step is different from the

Env Variable
UseCase

CURIO_DB_HOST

YugabyteDB SQL IP

CURIO_DB_NAME

YugabyteDB Name

CURIO_DB_USER

DB user for connection

CURIO_DB_PASSWORD

User’s password

CURIO_DB_PORT

YugabyteDB’s SQL port

CURIO_REPO_PATH

Curio’s default repo path

Please proceed to curio service configuration for the first node. Once you have completed the service and storage configuration, you can come back to this page and proceed with testing the setup.

Testing the setup

You can confirm that the curio process is able to schedule and compute WindowPoSt by running a WindowPoSt test computation:

From the output we can confirm that a WindowPoSt gets inserted to the database, and is being picked up by the Curio process running with the wdpost configuration layer.

Initiating a new Curio cluster

To create a new Curio cluster, a Lotus daemon node is required.

Wallet setup

Initiating a new miner ID on the Filecoin network requires an owner, worker and sender address. These address can be same or different depending on the user’s choice. Users must create these wallet on Lotus node before running the Curio commands.

Once new wallet are created, we must send some funds to them.

Creating new miner ID

Curio provides a utility for users to onboard quickly. Please run the below command on your new Curio node, choose Create a new miner option and follow the on-screen instructions. It communicates in English (en), Chinese (zh), and Korean (ko).

  1. Start the guided setup.

  2. Choose “Create a new miner” option.

  3. Enter your YugabyteDB details.

  4. Enter the wallet details be used for “create miner” message.

  5. Wait for new miner actor to get created.

  6. We request you to please share the basic data about your miner with us to help us improve Curio.

  7. Finish the initialisation.

    1. If you entered non-default in step 3 then please export the relevant details via your ~/.bashrc file before running the Curio command.

      Env Variable
      UseCase

      CURIO_DB_HOST

      YugabyteDB SQL IP

      CURIO_DB_NAME

      YugabyteDB Name

      CURIO_DB_USER

      DB user for connection

      CURIO_DB_PASSWORD

      User’s password

      CURIO_DB_PORT

      YugabyteDB’s SQL port

      CURIO_REPO_PATH

      Curio’s default repo path

  8. Try running Curio with only GUI first.

  9. If the curio process starts successfully, please proceed with GUI and verify that you can access all the pages. Once, verified, please proceed to curio service configuration.

Last updated