Setup

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

Setup YugabyteDB

If you have already set up a YugabyteDB for Boost then you can reuse the same YugabyteDB instance for Curio. You must ensure that YugabyteDB is multiple node cluster for HA. You can skip directly to migrating from Lotus-Miner to Curio or Initializing new Curio Miner.

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:

Do not use ZFS as the backing drive for YugabyteDB because of advanced filesystem commands so-far is unavailable.

  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).

curio guided-setup

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.

Testing the setup

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

curio test window-post task

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.

Once the test is successful, please proceed to curio service configuration.

Initiating a new Curio cluster

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

The Lotus daemon node must be part of the same network as Curio being setup.

Example: A calibration network daemon cannot be used with mainnet Curio cluster.

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.

lotus wallet new bls
lotus wallet new bls

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

lotus send <WALLET 1> 5
lotus send <WALLET 2> 5

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.

    curio guided-setup
  2. Choose “Create a new miner” option.

    Defaulting to English. Please reach out to the Curio team if you would like to have additional language support.
    Use the arrow keys to navigate: ↓ ↑ → ←
    ? I want to::
    Migrate from existing Lotus-Miner
    ▸ Create a new miner
  3. Enter your YugabyteDB details.

    This process is partially idempotent. Once a new miner actor has been created and subsequent steps fail, the user need to run 'curio config new-cluster < miner ID >' to finish the configuration.
    
    Use the arrow keys to navigate: ↓ ↑ → ←
    ? Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/):
    ▸ Host: 127.0.0.1
    Port: 5433
    Username: yugabyte
    Password: yugabyte
    Database: yugabyte
    Continue to connect and update schema.
    
    ✔ Step Complete: Pre-initialization steps complete
  4. Enter the wallet details be used for “create miner” message.

    Initializing a new miner actor.
    Use the arrow keys to navigate: ↓ ↑ → ←
    ? Enter the info to create a new miner:
    ▸ Owner Address: <empty>  <------ Enter wallet 1 here
    Worker Address: <empty>  <------ Enter wallet 2 here
    Sender Address: <empty>  <------ Enter wallet 1 here
    Sector Size: 0  <--------------- Sector Size (32 G/GiB/GB)
    Confidence epochs: 0
    Continue to verify the addresses and create a new miner actor.
    Initializing a new miner actor.
    ✔ Owner Address: <empty>
    Enter the owner address: t3weiymrx3iyivzeuub5l232gb62ocu7zbjtztudiipm6wkkmsehdydrdddm6cdrflxir26cmrz4xui6t5gruq
    ✔ Worker Address: <empty>
    Enter worker address: t3xhmgfxurecrusgubzdgme4t2ecxbiyny5uanfzvcrrihzhia654f6gp2ynugpiyp5xe7ibg6fqly76kowfva
    ✔ Sender Address: <empty>
    Enter sender address: t3weiymrx3iyivzeuub5l232gb62ocu7zbjtztudiipm6wkkmsehdydrdddm6cdrflxir26cmrz4xui6t5gruq
    ✔ Sector Size: 0
    Enter the sector size: 8 MiB
    ✔ Confidence epochs: 0
    Confidence epochs: 0
    Pushed CreateMiner message: bafy2bzacebu3mhaj6chnz5frjo2sbxduebnh4e7e37fwm3jd7xhvhla7t6ylu
    Waiting for confirmation
  5. Wait for new miner actor to get created.

    New miners address is: t01004 (t2cmgqvicpcil5zlp6bqsffmjjfz7ix66k4zaojay)
    ✔ Step Complete: Miner t01004 created successfully
    
    ✔ Step Complete: Configuration 'base' was updated to include this miner's address
  6. We request you to please share the basic data about your miner with us to help us improve Curio.

    The Curio team wants to improve the software you use. Tell the team you're using `curio`.
    Use the arrow keys to navigate: ↓ ↑ → ←
    ? Select what you want to share with the Curio team.:
    ▸ Individual Data: Miner ID, Curio version, chain (mainnet or calibration). Signed.
    Aggregate-Anonymous: version, chain, and Miner power (bucketed).
    Hint: I am someone running Curio on whichever chain.
    Nothing.
  7. Finish the initialisation.

    ✔ Step Complete: New Miner initialization complete.
    
    Try the web interface with curio run --layers=gui for further guided improvements.
  8. If you entered non-default in step 3 then please export the relevant details before running the Curio command.

  9. Try running Curio with only GUI first.

    curio run --layers gui
  10. 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