Mining guidance on Conflux Testnet(V0.1.6)

How to Set Up Conflux

  1. Install Conflux on Mac
  2. Install Conflux on Windows
  3. Install Conflux on Linux
  4. Synchronizing the latest code on the Testnet

Notes:

  • Testnet of Conflux and its Mainnet are different, which means coins from Testnet mining cannot be used via the Mainnet. The Testnet will often restart during the testing period and the coins in your wallet will be cleared after each restarting.
  • Conflux Bounty Program will be launched in early August and will include a series of tasks related to mining. You can earn “fans token” after completing these tasks and exchange it into token on Mainnet via smart contract after launching of Mainnet.

Here is a step by step guide on how to build Conflux from the source code and get a node running.

1. Installation on Mac OS

Install Build Dependencies

1. Conflux requires the latest stable Rust version to build.

We recommend installing Rust through rustup. If you don’t already have rustup, you can install it with:

curl https://sh.rustup.rs -sSf | sh

2. Install llvm.

a) You may need to install brew to install llvm. Install brew with:

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

b) Install llvm

brew install llvm

Build from Source Code

  1. Extract code and compile

Check out the latest version of Testnet first https://github.com/Conflux-Chain/conflux-rust/releases

git clone https://github.com/Conflux-Chain/conflux-rust

cd conflux-rust

git checkout tags/v0.1.6(the latest version mentioned above)

cargo build — release

If you encounter a long time stuck and a problem similar to the following figure appears:

You can check out this document➡️click here

This will generate the executable binary file: target/release/conflux

Configure and Run Conflux

1. Accessing wallet website

Create a new wallet account and set the password: download Keystore file, and set a password for your wallet

Entering wallet: upload Keystore file, input wallet password

Please read carefully the following words while creating a new wallet

If you lose Keystore file, you will not restore it.

2. Modify Configurations

This is the place where you modify run/default.toml (find conflux-rust folder, and click “run” file, open default.toml with a notepad software)

  • public_address : xx.xx.xx.xx:32323

Find your public IP address by searching “ip” in Google or Baidu, and replace the xx.xx.xx.xx with your public IP address. Add “:32323” at the end of your IP address. The final result should be in this format: xx.xx.xx.xx:32323

For example, if your search result is the following:

then your final configuration should be 52.175.9.183:32323

  • #start_mining=true

Remove the “#” at the beginning of this line to enable mining.

  • mining_author, this is the address which will receive mining rewards.

Find your account address under “Address” in your Conflux wallet. To use the account as the receiving address for mining rewards, remove the 0x prefix.

For example, if the account address is 0xb4aa17059a0f2dbf539d1cdec662177af963a078,

then final configuration should be: mining_author=”b4aa17059a0f2dbf539d1cdec662177af963a078”

Remove the “#” at the beginning of this code after input the wallet address.

3. Run conflux

#cd $HOME/conflux-rust/run

../target/release/conflux — config default.toml &

4. Stop mining

kill `ps -ef | awk ‘/conflux/ && !/awk/ {print $2}’`

2. Installation on Windows

Install Build Dependencies

1. Make sure you have Visual Studio 2019 installed.

  • Download: Visual Studio Download
  • Install the 2019 Community, select “Desktop development with C++”
  • Double click to “Install”

2. Install rust

Download link here

Double click to install

Pop-up box interaction: Enter “1” in the pop-up box (Default installation), enter 2 to customerized installation and enter 3 to cancel.

3. Install and start msvc

In the cmd command line, input the following:

rustup default stable-x86_64-pc-windows-msvc

4. Install clang

  • clang can be installed with LLVM. Pre-built binaries can be downloaded through the following links:

Version: Windows 64-bit and Windows 32-bit

  • Make sure to add LLVM to the system PATH as instructed. Double click to install

5. Install git

1. Download link here. Choose the 32/64-bit version based on your configuration

2. Double click to install

Build from Source Code

  1. Extract code and compile

Check out the latest version of Testnet first https://github.com/Conflux-Chain/conflux-rust/releases

git clone https://github.com/Conflux-Chain/conflux-rust.git

cd conflux-rust

git checkout tags/0.1.6(the latest version mentioned above)

cargo build -–release

If you undergo a long time stuck and a problem similar to the following appears,

Check this out in the document ➡️click here

This will generate the executable binary file: target\release\conflux.exe

Configure and Run Conflux

1. Accessing wallet website

Create a new wallet account and set the password: download Keystore file, and set a password for your wallet

Entering wallet: upload Keystore file, input wallet password

Please read carefully the following words while creating a new wallet

If you lose Keystore file, you will not restore it.

2. Modify Configurations

The configuration file is conflux-rust/run/default.toml which can be found under the conflux-rust folder. Open with the notepad software.

  • public_address : xx.xx.xx.xx:32323

Find your public IP address by searching “ip” in Google or Baidu, and replace the xx.xx.xx.xx with your public IP address. Add “:32323” at the end of your IP address. The final result should be in this format: xx.xx.xx.xx:32323

For example, if your search result is the following:

then your final configuration should be 52.175.9.183:32323

  • #start_mining=true

Remove the “#” at the beginning of this line to enable mining.

  • mining_author : this is the address which will receive mining rewards.

Find your account address under “Address” in your Conflux wallet. To use the account as the receiving address for mining rewards, remove the 0x prefix.

For example, if the account address is 0xb4aa17059a0f2dbf539d1cdec662177af963a078,

then final configuration should be: mining_author=”b4aa17059a0f2dbf539d1cdec662177af963a078”

Remove the “#” at the beginning of this line.

3. Run conflux

cd \Users\xxx\conflux-rust\run

#xxx is your computer’s username

..\target\release\conflux.exe — config default.toml

4. Stop mining

To stop mining, press Ctrl+C; or

Directly close cmd window; or

Open task manager: detail information — find conflux, select it and end process.

3. Installation on Linux

Install Build Dependencies

  1. Conflux requires the latest stable Rust version to build.

We recommend installing Rust through rustup. If you don’t have rustup, you can install it with:

curl https://sh.rustup.rs -sSf | sh

  1. clang can be installed with:
  • CentOS/Redhat: yum install clang
  • Ubuntu: apt-get install clang

3. Environmental Variable

export PATH=$HOME/.cargo/bin:$PATH

4. Install C++

CentOS/Redhat:

sudo yum -y install gcc-c++

Ubuntu:

sudo apt-get install g++

2. Build from Source Code

  1. Extract code and compile

Check out the latest version of Testnet first https://github.com/Conflux-Chain/conflux-rust/releases

git clone https://github.com/Conflux-Chain/conflux-rust

cd conflux-rust

git checkout tags/v0.1.6 (the latest version mentioned above)

cargo build -–release

If you undergo a long time stuck and a problem similar to the following appears,

Check this out in the document ➡️click here

This will generate the executable binary file: target/release/conflux

Configure and Run Conflux

1. Accessing wallet website

Create a new wallet account and set the password: download Keystore file, and set a password for your wallet

Entering wallet: upload Keystore file, input wallet password

Please read carefully the following words while creating a new wallet

If you lose Keystore file, you will not restore it.

2. Modify Configurations

The configuration file is /run/default.toml

  • public_address : xx.xx.xx.xx:32323

Find your public IP address by searching “ip” in Google or Baidu, and replace the xx.xx.xx.xx with your public IP address. Add “:32323” at the end of your IP address. The final result should be in this format: xx.xx.xx.xx:32323

For example, if your search result is the following:

then your final configuration should be 52.175.9.183:32323

  • #start_mining=true

Remove the “#” at the beginning of this line to enable mining.

  • mining_author : this is the address which will receive mining rewards.

Find your account address under “Address” in your Conflux wallet. To use the account as the receiving address for mining rewards, remove the 0x prefix.

For example, if the account address is 0xb4aa17059a0f2dbf539d1cdec662177af963a078,

then final configuration should be: mining_author=”b4aa17059a0f2dbf539d1cdec662177af963a078”

Remove the “#” at the beginning of this line.

3. Run conflux

cd run

..\target\release\conflux — config default.toml

4. Synchronizing the latest Testnet code

Please check the latest version of the Testnet first.➡(github.com/Conflux-Chain )

  1. Delete the old local file

Find the folder conflux-rust, delete all under the category “run”.

2. Extract code.

cd conflux-rust

git reset — hard

git pull — all

git checkout tags/v0.1.6(the latest version mentioned above)

cargo build — release

3. Modify Configurations

The configuration file is conflux-rust/run/default.toml which can be found under the conflux-rust folder. Open with the notepad software.

  • public_address : xx.xx.xx.xx:32323

Find your public IP address by searching “ip” in Google or Baidu, and replace the xx.xx.xx.xx with your public IP address. Add “:32323” at the end of your IP address. The final result should be in this format: xx.xx.xx.xx:32323

For example, if your search result is the following:

then your final configuration should be 52.175.9.183:32323

  • #start_mining=true

Remove the “#” at the beginning of this line to enable mining.

  • mining_author : this is the address which will receive mining rewards.

Find your account address under “Address” in your Conflux wallet. To use the account as the receiving address for mining rewards, remove the 0x prefix.

For example, if the account address is 0xb4aa17059a0f2dbf539d1cdec662177af963a078,

then final configuration should be: mining_author=”b4aa17059a0f2dbf539d1cdec662177af963a078”

Remove the “#” at the beginning of this line.

cd run Mac or Linux: ../target/release/conflux — config default.toml

Windows: ..\target\release\conflux.exe — config default.toml

Author: Conflux Chinese community

Original link: https://juejin.im/post/5cbd2629f265da03761e8986

Contributors: Juejin, Evelyn S

Written by

Powering Decentralized Commerce | A Public Blockchain For a New World of DApps, Web 3.0 and Finance

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store