Mining Guide On Conflux Network

Get started mining on Conflux Network!

This guide is separated into 6 parts:

  1. Preparation — Obtaining a Public Wallet Address
  2. Install Conflux Network on Windows
  3. Install Conflux Network on Mac
  4. Install Conflux Network on Linux
  5. Synchronizing the latest code from the testnet
  6. Mining Log Information
  • Conflux Network Mainnet Phase II - Oceanus was officially launched on the 18th of July 2020, the current version (at publication): v0.6.1.
  • Conflux’s current Testnet is called “Conflux Testnet”, the current version (at publication): v0.6.0-rc-3. All data on Conflux Testnet is test data
  • Conflux Bounty Program was launched in August 2019. The Bounty Program will have a series of tasks to obtain FanCoins (FC), which can be swapped to the Conflux Network Mainnet Token CFX on a 1:1 ratio once the final mainnet is launched
  • Conflux Testnet is in a stable version. The necessary files for mining on different operating systems can be found on Github. This guide is for everyone, even without prior coding knowledge.

!!! Important Notice!!!

Conflux Network has updated the wallet creation rules so that all normal wallet addresses start with “0x1" and all smart contract wallet addresses start with “0x8”. The first character of a normal wallet address after the prefix “0x” is now automatically changed to “1”. This does not affect private keys! For example, if a normal wallet address was ‘0x7b5c….’, after the current update, the normal wallet address is now changed to ‘0x1b5c…’. Please be aware of this change especially when transferring CFX or FC!

1. Preparation — Obtaining a Public Wallet Address

Since web wallets contain security risks, we recommend using ConfluxPortal. ConfluxPortal is a browser extension to access Conflux Network Ecosystem DApps from your preferred browser. Please use the following link for instructions on how to install ConfluxPortal.

2. Install Conflux Network on Windows

Download the latest release of Oceanus

Click here to find the latest release of Oceanus. Click on Assets and download the current version for your OS. (current version at publication: v0.6.1)

Image for post
Image for post

Preparations:

Extract downloaded file

  • Open up: C-Drive → User → <UserName>
  • Create Folder: conflux
  • Extract downloaded file into the newly created folder: conflux

⚠️ The directory structure should be as such:

conflux 
└── run
├── conflux
├── default.toml
└── log.yaml

Configurations:

1. Modify Configurations

Open up: C-Drive → User → <UserName> → conflux → run

Open default.toml using the notepad software, and:

  • Configure the code line start_mining=true to enable mining:
Remove the “#” at the beginning of this line to enable mining.
Image for post
Image for post
  • Configure the code line mining_author to receive your mining rewards:
Remove the 0x prefix when entering your wallet address.
Find your account address under “Address” in your Conflux wallet.

For example, if the account address is 0x14aa17059a0f2dbf539d1cdec662177af963a078,

the final configuration should be: mining_author=“14aa17059a0f2dbf539d1cdec662177af963a078”

Remove the “#” at the beginning of this line.
Image for post
Image for post
  • Configure your public_address by replacing the xx.xx.xx.xx with your public IP address:
Image for post
Image for post
Add “:32323” at the end of your IP address. The final result should be in this format: xx.xx.xx.xx:32323.

To obtain your IP address, just search for “IP” on Google as seen in the figure below:

Image for post
Image for post

For example, if your search result is 52.175.9.183
then your final configuration should be 52.175.9.183:32323

  • Save the changes you made and exit

Start mining:

  • Press the “Start” button
  • Search for cmd and open it
  • Copy the following code into the cmd window, and press “Enter”:
cd conflux\run
  • Copy the following code into the cmd window, and press “Enter”:
conflux --config default.toml --full 2>stderr.txt

Stop mining:

  • Click on the opened cmd window and press Ctrl+C, or
  • Directly close the cmd window, or
  • Open task manager, select detail information — find conflux, select it and end process

3. Install Conflux Network on Mac

Download the latest release of Conflux Oceanus

Click here to find the latest release of Oceanus. Click on Assets and download the current version for your OS. (current version at publication: v0.6.1)

Image for post
Image for post

Preparations:

There are three basic requirements for easy mining on Mac:

Requirement 1: The downloaded latest release of Oceanus is in the Downloads folder of your Mac

Requirement 2: The file of the latest release of Oceanus is called "conflux_mac_v0.6.1"

Requirement 3: The downloaded “conflux_mac_v0.6.1” file will extract into a folder called run. To simplify the file management: create a conflux folder and move the run folder into it.

⚠️ The directory structure should be as such:

conflux  
└── run
├── conflux.exe
├── default.toml
├── log.yaml
└── throttling.toml

Notice: The following commands only apply if the three requirements above are met!

  1. Download the latest release of Oceanus is in the Downloads folder of your Mac
  2. Open Terminal on your Mac (Press: Command + Enter; Type in “Terminal”; Press Enter)
Image for post
Image for post

3. Copy the following lines of code into the Terminal window, and press “Enter”:

cd ~/Downloads && mkdir -p confluxunzip conflux_mac_v0.6.1.zip -d confluxcd conflux/run

Code Explanation

- Go into the Downloads folder and create a conflux folder (requirement 1)
- Unzip the downloaded latest release of the testnet into the conflux folder (requirement 2-3)
- change directory

This way you will have a new folder in your native Downloads folder called “conflux”. And in the new “conflux” folder is a folder called “run”. The directory structure is:

Downloads
└──conflux
└──run
├── conflux
├── default.toml
├── log.yaml
└── throttling.toml

Configurations:

1. Modify Configurations

Open: Finder → Downloads → conflux → run → default.toml

Open default.toml using the notepad software and:

  • Configure the line forstart_mining=true to enable mining:
Remove the “#” at the beginning of this line to enable mining.
Image for post
Image for post
  • Configure the line formining_author to receive your mining rewards:
Remove the 0x prefix when entering your wallet address.
Find your account address under “Address” in your Conflux wallet.

For example, if the account address is 0x14aa17059a0f2dbf539d1cdec662177af963a078,

the final configuration should be: mining_author=”14aa17059a0f2dbf539d1cdec662177af963a078”

Remove the “#” at the beginning of this line.
Image for post
Image for post
  • Configure your public_address by replacing the xx.xx.xx.xx with your public IP address:
Image for post
Image for post
Add “:32323” at the end of your IP address. The final result should be in this format: xx.xx.xx.xx:32323.

To obtain your IP address, just search for “IP” on Google as seen in the figure below:

Image for post
Image for post

For example, if your search result is 52.175.9.183
then your final configuration should be 52.175.9.183:32323

  • Save the changes you made and exit

Start mining:

  1. Open Terminal on your Mac (Click: Command + Enter; Type in “Terminal”; Press Enter)
  • Copy the following lines:
cd ~/Downloads/conflux/runulimit -n 10000./conflux --config default.toml --full 2>stderr.txt

Insert the copied lines into Terminal, and press “Enter”.

If you extracted the latest testnet release elsewhere, please adjust accordingly!
For example, if you extracted the latest release on your Desktop (without any extra configuration), then adjust your terminal input to:

cd ~/Desktop/run./conflux --config default.toml

Stop mining:

  1. Open Terminal on your Mac (Press: Command + Enter; Type in “Terminal”; Press Enter)
  • Press: Control + C, or
  • Close the Terminal window

4. Install Conflux Network on Linux

Download the latest release of Conflux Oceanus

Click here to find the latest release of the testnet. Click on Assets and download the current version for your OS. (current version at publication: v0.6.1)

Image for post
Image for post

Preparations:

  • Extract the downloaded latest release of the network
  • Open Terminal
  • Copy the following line into Terminal and press “Enter”
mkdir -p conflux
  • Copy the following lines into Terminal and press “Enter”
unzip conflux_linux_v0.6.1.zip -d conflux && cd conflux/run

⚠️ The directory structure should be as such:

conflux 
└── run
├── conflux
├── default.toml
├── log.toml
└── throttling.yaml

Configurations:

1. Modify Configurations

Open up: Finder → Downloads → conflux → run → default.toml

Open default.toml using the notepad software, and:

  • Configure the line forstart_mining=true to enable mining:
Remove the “#” at the beginning of this line to enable mining.
Image for post
Image for post
  • Configure the line for mining_author to receive your mining rewards:
Remove the 0x prefix when entering your wallet address.
Find your account address under “Address” in your Conflux wallet.

For example, if the account address is 0x14aa17059a0f2dbf539d1cdec662177af963a078,

the final configuration should be: mining_author=”14aa17059a0f2dbf539d1cdec662177af963a078”

Remove the “#” at the beginning of this line.
Image for post
Image for post
  • Configure your public_address by replacing the xx.xx.xx.xx with your public IP address:
Image for post
Image for post
Add “:32323” at the end of your IP address. The final result should be in this format: xx.xx.xx.xx:32323.

To obtain your IP address, just search for “IP” on Google as seen in the figure below:

Image for post
Image for post

For example, if your search result is 52.175.9.183
then your final configuration should be 52.175.9.183:32323

  • Save the changes you made and exit

Start mining:

./conflux --config default.toml --full 2>stderr.txt

5. Synchronizing the latest code from the testnet

Please check the latest version Oceanus first →(github.com/Conflux-Chain

1. Delete the old local file

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

2. Get the latest pre-build executable package

  • Go to github.com/Conflux-Chain and download the latest release package for your OS (version at publication: v0.6.1)
  • Extract files
  • Copy the conflux file and replace with the previous one
  • Properly check the configuration of default.toml, especially: public_address, start_mining=true, and mining_author.

3. Run Conflux

cd run   - Mac: ulimit -n 10000./conflux --config default.toml --full 2>stderr.txt    - Linux:  ./conflux --config default.toml --full 2>stderr.txt- Windows:    conflux --config default.toml --full 2>stderr.txt

6. Mining Log Information

Image for post
Image for post
1) Statistics: StatisticsInner { sync_graph: SyncGraphStatistics { inserted_block_count: xxx }, consensus_graph: ConsensusGraphStatistics { inserted_block_count: yyy, processed_block_count: yyy } }
  • When xxx is increasing, it means that the block synchronization is working properly, especially when it’s the first time connecting
  • Remark 1 - mode: false means that the network data catch-up synchronization process is completed and that mining is ongoing
  • Remark 2 - epoch:424480 means that you are mining in the 424480th epoch
  • Remark 3 - when the numbers behind the word epoch are increasing continuously, the mining process is on-going

About Conflux Network

The most endorsed DLT project in China, Conflux Network is an open-source, layer-1 blockchain protocol delivering heightened scalability, security, and extensibility for the next generation of open commerce, decentralized applications, financial enterprises, and Web 3.0. Conflux Network is overseen by a global team of world-class engineers and innovative computer scientists. Fostering entrepreneurship and innovation, Conflux unites startups and enterprises across industries and continents to promote decentralized collaboration in advancing blockchain technologies for real-world solutions. Founded in 2018, Conflux has raised $35 million in capital from prominent investors including Sequoia China, Metastable, Baidu Ventures, F2Pool, Huobi, IMO Ventures, and the Shanghai Municipal Science and Technology Commission.

To discuss Conflux Network and join our community, visit our official channels:

Twitter | Discord | Telegram | GitHub

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