Filecoin Mining Getting Started Guide: From Node Installation to Transaction Proof

Filecoin Mining Getting Started Guide: From Node Installation to Transaction Proof
eb43ee87f2a5eeb28ee4fe9ecbdd62c5

Loading

How to participate in the popular Filecoin mining? Here is a detailed mining process.

Original title: “The Force Research | Mining Guide (1): Filecoin network construction logic and the dilemma of innovators”
Written by: Tony

The “anti-fragility” defined by Taleb in his book “Anti-fragility” is the characteristics of things that not only benefit from chaos and fluctuations, but also require such chaos and fluctuations to survive and achieve prosperity. However, after the performance of the space race in the past few days, we can see that small miners are in dire straits, mainly due to the slow growth of computing power and low storage success rate. How to “anti-fragile” growth has become an urgent problem to be solved. .

What can’t kill me will only make me stronger.

-Nietzsche

Although Filecoin’s latest official release of ” Creating the Filecoin Economy ” white paper mentions a simple casting, it involves a concept-anti-fragility, which is to allow miners to achieve it at an early stage. Because technology and funding are likely to be difficult to achieve, the Force Zone has once again upgraded the global partnership program to help miners with temporarily backward technical strength, empowering the entire network to achieve a “200%” growth that meets the baseline requirements, and shaping the distribution The scale of storage is implemented.

This article will introduce how to deal with the mining process and the current dilemma of some miners in the space race.

Briefly before the article: Through the performance of this round of space competition, many miners are not only not large enough in computing power, but also because they can’t keep up with the height, Worker’s P1 and P2 frequently fail, and there is no miner to assist in winning packaging. The storage demand side provided orders, difficult to produce blocks, etc., which made it difficult for some miners to increase their computing power in the early stage and the success rate of block explosions was low. From a micro point of view, the miner may not be able to obtain the space race rewards. From a macro point of view, it is difficult for the network to grow further.

Filecoin overview map: mining, storage and retrieval

Many people and friends will ask, what is the meaning of IPFS in the era of the craze , the new global digital era and the rise of new infrastructure in China ? Where is the focus of Filecoin? What enabling behavior does Filecoin mining actually participate in?

IPFS is equivalent to an upgraded version of the BT protocol, but it is not only limited to the exchange of content storage, but also involves applications in all fields. It can be understood as an international, non-centralized, high-security, and high-secret new Internet network. The significance of the times is not limited to the comprehensive upgrade of network infrastructure services, but also to humanity’s pursuit of privacy and freedom.

And Filecoin is a value medium that maintains the fair and orderly progress of the IPFS network, which is equivalent to the formulation and supervisor of the “law” of the free economy, using economic means to reasonably supervise and sanction every rational economic person. In short, IPFS is the manifestation of the value of Filecoin mapping, and the macroscopic significance of IPFS will be greater. Filecoin belongs to the value manifestation of the network.

The significance of BTC mining is to maintain and supervise the decentralized ledger, which is the basis for the establishment of consensus. It adopts the PoW consensus mechanism and forms consensus through proof of work. The overall value of BTC is the consensus, thus forming the largest cryptocurrency. Payment tokens.

In addition to maintaining the ledger, the essence of Filecoin mining can also provide storage and retrieval of basic data services. Therefore, Filecoin mining will give more practical value to the network and provide a network architecture for services.

Force Research | Mining Guide (1): Filecoin network construction logic and the dilemma of innovatorsFilecoin mining overview map, source: IPFS Force Zone, 2020-08-28

As can be seen from the above figure, our miners will involve three activities in participating in the Filecoin network: block packaging, data storage and data retrieval. The introduction is as follows:

  • Block packaging (explosive block reward). Miners produce miner IDs by building nodes, creating wallets, applying for faucets, etc., and then supporting the entire network through some hardware devices, completing data encapsulation and time and space certification, so as to obtain packaging permissions and obtain explosive block rewards.
  • Data storage (on the chain). After the customer and the storage miner confirm the order, the miner guarantees the data service by copying the proof and the time-space proof, so as to obtain the corresponding storage service charge.
  • Data retrieval (off-chain). After the client sends a search request, it provides search services after retrieving the miner’s activity order, thereby paying the corresponding search service to the miners.

So how do we become a miner?

How to become a miner

Many users don’t really understand how to become a miner. In fact, from an operational perspective, we can also become a qualified miner based on official and network information, but there may be a certain difference in revenue, so this piece needs to be professional The power of operation and maintenance allows us to better obtain higher returns. Not much to say, the miners’ operating guidelines are as follows:

  • Build a Filecoin test node
  • Wallet creation and token faucet acquisition
  • Configuration operation of storage provider (miner)
  • Storage demander (user) configuration operation
  • Retrieve the market and retrieve miners
  • How to deploy multi-node clusters on a single machine and design ideas for mining pools
  • Proof of transaction, proof of copy and proof of time and space

Build a Filecoin test node

First, we can try to build Filecoin test nodes on macOS and Linux servers. The main steps for building test nodes are as follows: install Filecoin installation package, run and check Filecoin software, node naming, activate nodes, and add network statistics.

Install Filecoin

There are two ways to obtain the release installation package, one is to self-compile through the source code, and the other is to download the official release installation package. Both methods have advantages and disadvantages.

The advantage of self-compiled release installation package : the customizable source code compilation link can clearly see the entire Filecoin process from synchronizing data, mining, creating miners, issuing orders to receiving orders; the disadvantage: the compilation preparation link is more complicated , Requires strong Debug and operation and maintenance capabilities, while compiling takes a long time and requires higher machine CPU performance.

The self-compiled release installation package needs to go through the process of building, installing, and testing the self-compiled package, so as to better cater to the development, but in the early stage, it will be rebuilt and adjusted with the official version adjustment. This method is more suitable for teams with strong operation and maintenance capabilities .

Get the official release installation package. Teams that are not very capable of operation and maintenance can use the officially developed version, but the officially announced version is more suitable for individual investors; its advantage is that it bypasses the complicated and long source code compilation process and can be used directly; its disadvantage is that the latest The code package is difficult to keep up with the latest official website adjustments in time, and the real-time performance is lagging behind.

You can download the latest version of the official release installation package through Github .

Force Research | Mining Guide (1): Filecoin network construction logic and the dilemma of innovatorsThe official release installation package, from: official website, 2020-08-28

After installation, you can check the installation of the Go-filecoin testnet, initialize and run the filecoin node, configure the node name (the Filecoin network can configure the node alias), and finally you can check the visual monitoring of the node and the network, and you can see yourself The nodes are on the global network.

Wallet creation and token faucet acquisition

Miners are active participants in promoting the consensus processing process of the Filecoin network, as well as block proposers who expect consensus (EC). It can be either a miner or a storage demander. Miners need to be online at any time, waiting to accept storage orders from customers, provide storage services, and seal sector data to earn FIL. Not only that, it also needs to continuously perform proof of time (PoSt) in the process to prove whether it can participate in the block election.

Force Research | Mining Guide (1): Filecoin network construction logic and the dilemma of innovatorsSource: official website, 2020

Wallet construction and access to faucets

Wallet construction

Filecoin wallet, like many blockchain wallets, as a carrier of encrypted assets, is a part of the blockchain system, and is generally asymmetrically encrypted public and private keys. Here, the wallet address is automatically initialized and generated by the node. The address information is very important, and it is necessary to check the balance, export and import.

Faucet

FIL Faucet is a token faucet that allows some early-participating Filecoin node users to obtain a certain amount of FIL tokens in advance to participate in early market activities. It is only used in the test phase and does not have transfer and equity value. Obtain the test FIL tokens to distribute through GitHub accounts. In the space race stage, each account has 100 FILs, mainly for mortgage mining.

After establishing the wallet, we have to distinguish the node ID, account, wallet address, miner ID, and content ID.

Force Research | Mining Guide (1): Filecoin network construction logic and the dilemma of innovatorsSource: IPFS Force Zone, 2019

  • The node ID can be a storage client or a miner, and the ID is the unique identification of the node, just like the name of Facebook, it will never be repeated;
  • The account ID corresponds to the node ID one-to-one. The account can store multiple wallet addresses, which are mainly directly linked to FIL. The node ID is biased towards the identification attribute, the account ID is biased towards the asset attribute, and the node is automatically initialized and generated;
  • The miner ID is mainly related to the income of the miner, so after the Filecoin node is deployed, the miner needs to manually create a command to produce the miner ID through the node ID;
  • The content ID is linked to the files stored on the network, and each file will produce a unique ID, mainly for the convenience of quick indexing of data.

Configuration operation of storage provider (miner)

To become a storage miner, you need to accept the rules and EC consensus of the Filecoin storage market before you can conduct mining, because in the blockchain world, code is the law.

The storage provider mainly promises to provide storage services. After the order is negotiated, communicated and confirmed, the service is proved by copying and space-time proof. The overall cycle can be as follows:

  • Store proof of transaction. Establish identity, submit mortgage and storage capacity, and become a storage miner;
  • Production Order. Create blocks, create Ask orders, and trade with user nodes;
  • Stop mining. Seal the data and submit the copy certificate, update the status of the order to complete the transaction, and keep the space-time proof data stored;
  • Proof of improving the ability to burst blocks. Storage miners continue to prove with their mobile phones, create posts, and increase storage power and provable power to increase the probability of block explosions.

Create miner ID

After creating the identity of the miner and obtaining the ID, you also need to promise to provide proof of storage services, but the test network is different for different groups: for ordinary users, the sector is 256MB, for developer users, the sector is 1KB, and the standards for different main groups are different. The latter is more time-consuming to close the sector, but it is not mandatory, and it is adjusted according to the respective hardware configuration and operation and maintenance level.

Set up and send Ask order configuration

The storage provider initially sets an Ask order to start mining rewards, and store order revenue. In the latter case, the network can freely adjust the price according to the order to match the market.

Ask order configuration problem: Miner worker address, mainly to complete all external things, including participation in Ask order submission proof, sealing data, etc. Workers are often migrated and changed, and the security level is low; miner owner address is suitable for cold storage of private keys , The security level is higher; FIL/byte/block is the unit price; the time to generate a block; the FIL cost value required for a single gas combustion; the total number of gas limit.

In the early stage, miners need to fill themselves with data. This process is mainly to meet the needs of miners to reach a certain data volume in the early stage. There are three ways:

  • Accept the order, the current stage is to automatically accept the order;
  • Sealing process, data encapsulation;
  • Time and space proof, after time and space proof, it can continue to prove that the data is stored stably.

After the transaction of the storage order is successful, the two important parameters of storage computing power (effective computing power) and provable storage capacity (sector success rate) are directly linked to the probability of block production.

At present, many small-scale miners are stuck in this step. There are four main points: it is highly difficult to synchronize, it is difficult to match orders, and it is difficult for miners to pack.

  • Highly difficult to synchronize. Due to technical reasons, many miners are in the process of doing Sector, the P1 and P2 phases are unstable, and the failure rate is too high (the following figure, many failure rates are as high as 90%), which makes it difficult to achieve data storage and fail.

Force Research | Mining Guide (1): Filecoin network construction logic and the dilemma of innovatorsSector inspection statistics of the entire network (partial), source: IPFS Force Zone, 2020-08-27

  • It is difficult to match orders. The main reason is that the current space race stage is different from the testnet stage. The settlement of the testnet is to automatically take orders, and the space race is an optional stage. As a result, small miners may not be able to produce orders, fail to complete the subsequent storage miner steps, and cannot obtain the income of storage orders. And it can’t increase the probability of exploding blocks.
  • Difficult to pack. For small-scale miners, after completing windows and winning time-space proofs, no miners assist in packaging and broadcasting the network, resulting in block generation failure; instead, multi-cluster miners can assist each other.
  • It is difficult to produce a block. With the increase in computing power and the increase in storage scale, especially for miners above 1PB, block generation requires random access to some sectors of the entire storage, which poses a big challenge to response time. Miners who cannot complete data reading within 30 seconds will waste a block generation opportunity, and the corresponding revenue will be reduced.

Force Research | Mining Guide (1): Filecoin network construction logic and the dilemma of innovatorsForce zone winning time and space proof time (average 6 seconds), IPFS force zone, 2020-08-27

Thinking back about it, for storage providers, we actually need data demanders to complete the entire matchmaking service. So how do they operate?

Storage demander (user) configuration operation

The demander and the provider can be the same entity, that is, the node can be both a miner and a storage demander. So how does the demander accomplish this? The main steps can be divided into: import data resources and obtain CID, view the Ask order pool, and select the matching storage service.

Import data resources and obtain CID

The demander needs to import the data it wants to store into the Filecoin client, and then split and encrypt the data in accordance with the data encryption form of the IPFS network to generate a content ID. At the same time, this step may need to reversely verify whether it is successful everywhere, using CID to verify.

View the Ask order pool

Query the Ask order pool of the entire network, and select the transaction object based on the storage end (miner) quotation. This network phase is automatically matched during the test network phase, but it is freely matched at the beginning of the space race.

Choose a matching storage service

After selecting the appropriate order and miner ID, you can select the matching service content. Through the content ID, we can check the number of blocks experienced by the mining pool. At the same time, we need to prepare sufficient balance to match specific services (depending on FIL/byte/block); whether there is instability in the storage state of the miner stage; whether the relationship between the node network and the cluster is connected; unit data unit service Can miners support and so on.

Source link: mp.weixin.qq.com