The Filecoin blockchain is an intricate distributed database shared among a network of computer nodes. Each node holds a copy of the blockchain, ensuring that every transaction and contractual obligation in the network is recorded and immutable. This provides a reliable and secure ledger of all activities within the Filecoin ecosystem.
Actors on Filecoin’s blockchain serve as the equivalent of smart contracts in the Ethereum Virtual Machine. Each actor encapsulates a set of state variables and methods to interact with the Filecoin network. They are essentially the agents that perform actions on the blockchain, such as managing storage deals or facilitating transactions.
Filecoin’s network is powered by several built-in system actors that handle essential functions:
As the Filecoin Virtual Machine (FVM) matures, developers have the opportunity to write and deploy their own actors, similar to smart contracts on other blockchains. These user-programmable actors can interact with the built-in actors through exported APIs, enabling a wide range of applications and services to be built on top of the Filecoin network.
Distributed Randomness in Filecoin
Filecoin utilizes a distributed and publicly verifiable randomness protocol known as Drand as the source of randomness for leader election during block production. This randomness is essential to ensure that the process is unpredictable, unbiased, and verifiable, maintaining the fairness and security of the mining process.
Nodes on the Filecoin network are primarily classified by the services they provide:
Addresses in Filecoin are alphanumeric strings that uniquely identify actors or users on the network, facilitating interactions such as transactions and smart contract executions. These addresses come in several forms, reflecting the different types of actors they represent:
Filecoin’s blockchain deviates from the norm of a linear sequence of blocks. Here, blocks are grouped into ‘tipsets’, which can be thought of as snapshots of the network state at each epoch, or a fixed time interval in blockchain parlance. This model allows for a more flexible and efficient blockchain by enabling multiple valid blocks to be produced at the same time.
Each block in Filecoin is a bundle containing a header and a series of messages that represent the actions taken by actors, such as transactions or contractual agreements. The block header includes metadata like the miner’s address, the ticket (proof of work), and the parent blocks’ CIDs. The messages are the meat of the block, recording state changes such as token transfers and contract calls. Blocks are linked to at least one parent block, forming a continuous chain back to the genesis block.
Blocktime in Filecoin is set at an average of 30 seconds. This interval was strategically chosen to balance between the responsiveness of the network and the practicalities of its operation. A shorter blocktime could increase the speed of the network, but it would also impose greater hardware demands and could lead to more frequent blocktime failures. The 30-second blocktime allows storage providers sufficient time to perform necessary operations, such as sealing sectors and generating proofs, without overtaxing their hardware.
In a given epoch, it’s possible for multiple storage providers to successfully mine blocks. Filecoin’s tipset structure accommodates this by bundling all valid blocks with the same height and parent into a single group. This means that all valid work contributes to the network’s state and is rewarded, an important feature that encourages participation and collaboration among miners. It also ensures that the network can efficiently handle forks, rapidly reaching consensus on the canonical chain.
It’s worth noting that with the integration of the Filecoin EVM runtime and the adoption of Ethereum JSON-RPC standards, the notion of ‘tipset’ becomes even more user-friendly. In this context, when we talk about a ‘block hash’ in the Ethereum JSON-RPC, we’re actually referring to the hash of a tipset, which encompasses the combined state changes from all blocks within that tipset.
As we continue to explore Filecoin’s blockchain, we’ll see how these components interplay to create a decentralized storage network that is robust, efficient, and poised for future growth.
Filecoin’s consensus mechanism, known as Expected Consensus (EC), represents a cornerstone in its decentralized storage network. This chapter aims to provide an introduction to EC, delving into its operational principles, technical specifications, and the role it plays in maintaining the integrity and reliability of the Filecoin network.
Filecoin operates on a unique consensus mechanism termed Expected Consensus (EC). Unlike traditional blockchain protocols that often rely on Proof of Work (PoW) or Proof of Stake (PoS), EC blends elements of randomness, storage power, and probabilistic Byzantine fault tolerance. At its core, EC is designed to align incentives with the primary objective of Filecoin: to efficiently and reliably store data.
EC’s operational framework revolves around several key components, each playing a vital role in the network’s functionality.
The technical underpinnings of EC are where its innovative nature truly shines. Here, we explore some of the key specifications that define this consensus mechanism:
Randomness via DRAND:
Verifiable Random Function (VRF):
ElectionProof and VRF Chain:
Storage Power and WinCount:
Security and fairness are paramount in EC, with several mechanisms in place to safeguard these principles:
Consensus Faults and Penalties:
EC defines specific types of consensus faults (e.g., Double-Fork Mining, Time-Offset Mining) and imposes penalties to deter malicious behavior.
Source of the images: Filecoin’s Documentation here: https://spec.filecoin.io/algorithms/expected_consensus/
Chain Weighting and Selection:
Soft Finality:
Drand (Distributed Randomness) is a critical component of Filecoin’s consensus mechanism, providing an unbiasable source of entropy essential for the network’s secret leader election process. It’s a publicly verifiable random beacon protocol designed to generate a series of deterministic, verifiable random values.
Drand Value Format: Filecoin nodes obtain drand values in a specific format. Key components include:
Proofs in Filecoin serve to validate that storage providers are properly storing data as per the network’s standards. These proofs are critical for maintaining the integrity and trustworthiness of the decentralized storage system.
Filecoin’s consensus mechanism, with its unique blend of EC, Drand, and cryptographic proofs, forms the backbone of a robust and reliable decentralized storage network. These elements work in concert to ensure that the network remains secure, efficient, and fair, fostering an environment where data integrity is paramount. As we delve deeper into the nuances of Filecoin’s blockchain, the ingenuity and sophistication of its consensus model become increasingly evident, underscoring the network’s potential to revolutionize the landscape of digital storage.
The Filecoin blockchain is an intricate distributed database shared among a network of computer nodes. Each node holds a copy of the blockchain, ensuring that every transaction and contractual obligation in the network is recorded and immutable. This provides a reliable and secure ledger of all activities within the Filecoin ecosystem.
Actors on Filecoin’s blockchain serve as the equivalent of smart contracts in the Ethereum Virtual Machine. Each actor encapsulates a set of state variables and methods to interact with the Filecoin network. They are essentially the agents that perform actions on the blockchain, such as managing storage deals or facilitating transactions.
Filecoin’s network is powered by several built-in system actors that handle essential functions:
As the Filecoin Virtual Machine (FVM) matures, developers have the opportunity to write and deploy their own actors, similar to smart contracts on other blockchains. These user-programmable actors can interact with the built-in actors through exported APIs, enabling a wide range of applications and services to be built on top of the Filecoin network.
Distributed Randomness in Filecoin
Filecoin utilizes a distributed and publicly verifiable randomness protocol known as Drand as the source of randomness for leader election during block production. This randomness is essential to ensure that the process is unpredictable, unbiased, and verifiable, maintaining the fairness and security of the mining process.
Nodes on the Filecoin network are primarily classified by the services they provide:
Addresses in Filecoin are alphanumeric strings that uniquely identify actors or users on the network, facilitating interactions such as transactions and smart contract executions. These addresses come in several forms, reflecting the different types of actors they represent:
Filecoin’s blockchain deviates from the norm of a linear sequence of blocks. Here, blocks are grouped into ‘tipsets’, which can be thought of as snapshots of the network state at each epoch, or a fixed time interval in blockchain parlance. This model allows for a more flexible and efficient blockchain by enabling multiple valid blocks to be produced at the same time.
Each block in Filecoin is a bundle containing a header and a series of messages that represent the actions taken by actors, such as transactions or contractual agreements. The block header includes metadata like the miner’s address, the ticket (proof of work), and the parent blocks’ CIDs. The messages are the meat of the block, recording state changes such as token transfers and contract calls. Blocks are linked to at least one parent block, forming a continuous chain back to the genesis block.
Blocktime in Filecoin is set at an average of 30 seconds. This interval was strategically chosen to balance between the responsiveness of the network and the practicalities of its operation. A shorter blocktime could increase the speed of the network, but it would also impose greater hardware demands and could lead to more frequent blocktime failures. The 30-second blocktime allows storage providers sufficient time to perform necessary operations, such as sealing sectors and generating proofs, without overtaxing their hardware.
In a given epoch, it’s possible for multiple storage providers to successfully mine blocks. Filecoin’s tipset structure accommodates this by bundling all valid blocks with the same height and parent into a single group. This means that all valid work contributes to the network’s state and is rewarded, an important feature that encourages participation and collaboration among miners. It also ensures that the network can efficiently handle forks, rapidly reaching consensus on the canonical chain.
It’s worth noting that with the integration of the Filecoin EVM runtime and the adoption of Ethereum JSON-RPC standards, the notion of ‘tipset’ becomes even more user-friendly. In this context, when we talk about a ‘block hash’ in the Ethereum JSON-RPC, we’re actually referring to the hash of a tipset, which encompasses the combined state changes from all blocks within that tipset.
As we continue to explore Filecoin’s blockchain, we’ll see how these components interplay to create a decentralized storage network that is robust, efficient, and poised for future growth.
Filecoin’s consensus mechanism, known as Expected Consensus (EC), represents a cornerstone in its decentralized storage network. This chapter aims to provide an introduction to EC, delving into its operational principles, technical specifications, and the role it plays in maintaining the integrity and reliability of the Filecoin network.
Filecoin operates on a unique consensus mechanism termed Expected Consensus (EC). Unlike traditional blockchain protocols that often rely on Proof of Work (PoW) or Proof of Stake (PoS), EC blends elements of randomness, storage power, and probabilistic Byzantine fault tolerance. At its core, EC is designed to align incentives with the primary objective of Filecoin: to efficiently and reliably store data.
EC’s operational framework revolves around several key components, each playing a vital role in the network’s functionality.
The technical underpinnings of EC are where its innovative nature truly shines. Here, we explore some of the key specifications that define this consensus mechanism:
Randomness via DRAND:
Verifiable Random Function (VRF):
ElectionProof and VRF Chain:
Storage Power and WinCount:
Security and fairness are paramount in EC, with several mechanisms in place to safeguard these principles:
Consensus Faults and Penalties:
EC defines specific types of consensus faults (e.g., Double-Fork Mining, Time-Offset Mining) and imposes penalties to deter malicious behavior.
Source of the images: Filecoin’s Documentation here: https://spec.filecoin.io/algorithms/expected_consensus/
Chain Weighting and Selection:
Soft Finality:
Drand (Distributed Randomness) is a critical component of Filecoin’s consensus mechanism, providing an unbiasable source of entropy essential for the network’s secret leader election process. It’s a publicly verifiable random beacon protocol designed to generate a series of deterministic, verifiable random values.
Drand Value Format: Filecoin nodes obtain drand values in a specific format. Key components include:
Proofs in Filecoin serve to validate that storage providers are properly storing data as per the network’s standards. These proofs are critical for maintaining the integrity and trustworthiness of the decentralized storage system.
Filecoin’s consensus mechanism, with its unique blend of EC, Drand, and cryptographic proofs, forms the backbone of a robust and reliable decentralized storage network. These elements work in concert to ensure that the network remains secure, efficient, and fair, fostering an environment where data integrity is paramount. As we delve deeper into the nuances of Filecoin’s blockchain, the ingenuity and sophistication of its consensus model become increasingly evident, underscoring the network’s potential to revolutionize the landscape of digital storage.