Digital Currency News >FIL > Learn more about the FIL token and the Actors in the Filecoin network

Related Articles

ViewFILAll Articles
0
FIL
0
Step 1: Enter the FIL/USDT spot trading page
0
Step 2: Enter the order unit and quantity, then click Buy/Sell

Learn more about the FIL token and the Actors in the Filecoin network

2024-08-30 19:55:36

In today's blockchain technology, Filecoin, as a decentralized storage network, has attracted the attention of many developers and users. One of its core technologies is Actors. These smart contracts run on the Filecoin Virtual Machine (FVM) and are responsible for managing, querying and updating the status of the Filecoin network. This article will take an in-depth look at how Actors work and their importance in the Filecoin network.


Basic concepts of Actors

Actors are small self-executing blocks, similar to smart contracts in the Ethereum Virtual Machine (EVM). In the Filecoin network, Actors are divided into two types:

Built-in Actors: These are hard-coded programs pre-written by network engineers that manage and coordinate key sub-processes and subsystems in the Filecoin network.

User Actors: These are code implemented by any developer that interacts with the Filecoin Virtual Machine (FVM).


Built-in Actors roles

Built-in Actors are the primary way the Filecoin network manages and updates global state. The global state of each epoch can be viewed as a set of blocks reached through network consensus. This global state is represented as a state tree, mapping each Actor to its corresponding state. Each actor state describes the actor's current condition, such as its FIL balance and nonce value.

In Filecoin, Actors trigger state transitions by sending messages. Each block can be viewed as a proposed global state, where the block selected by network consensus sets the new global state. Each block contains a sequence of messages and a checkpoint of the current global state after applying these messages.


Filecoin Virtual Machine (FVM) Features

The Filecoin Virtual Machine (FVM) is the Filecoin network component responsible for executing all actor code. It ensures that all operations can be performed according to the designed logic and that requests from different Actors can be handled efficiently.

Storage provider reward mechanism: The storage provider reward mechanism is a basic example of how Actors operate in the Filecoin network. The specific process is as follows:

Storage providers obtain storage rights based on the validity of their storage certificates.

During block validation, the StoragePowerActor state is read, which contains information about the storage power assigned to each storage provider.

Using state information, the consensus mechanism randomly allocates block rewards to the storage provider with the most storage power, and the RewardActor sends FIL to the storage provider.


Block structure

Each block in the Filecoin chain contains the following parts:

Inline data for the current block height.

Pointer to the current state tree.

Pointer to the set of messages that generated the current state tree.

Operation of the state tree: The state tree uses Merkle directed acyclic graph (Merkle DAG) to map the state tree and message set. Nodes in the status tree contain the following information:

Actors' FIL balance, nonce value, and pointer to Actor state data (CID).

Messages in the current block.


The structure of the message

Similar to the state tree, the message set is also mapped using a Merkle DAG. Each message's nodes may contain the following information:

The Actor that sends the message.

The Actor that receives the message.

The target method to call.

Cryptographic signature for verification.

The number of FILs transferred between Actors.

Execution of Actors code: Actors code is the core of the Filecoin network and is responsible for executing all logical operations. These codes not only handle storage requests, but also perform various calculations and state updates. Developers can write user actors according to their own needs to further expand the capabilities of the Filecoin network.


in conclusion

The Actors system of the Filecoin network provides powerful support for decentralized storage, ensuring the efficient operation and security of the network. Through the collaborative work of built-in Actors and user Actors, Filecoin can effectively manage its global state and provide a fair reward mechanism for storage providers. As more developers join this ecosystem, we can expect Filecoin to achieve more innovations and applications in the future.

Disclaimer:

1. The information does not constitute investment advice, and investors should make independent decisions and bear the risks themselves

2. The copyright of this article belongs to the original author, and it only represents the author's own views, not the views or positions of HiBT