Hi! 👋 My name is Phill and I am Blockchain Tech Lead at The Fabricant and a Community Rep for Flow. You can find me on:
In this article we will be diving into what keeps Flow running - specifically, the various types of nodes! We will investigate the different types of nodes on Flow, what their roles are and why they are important, and how you can run them yourself. We will also touch on the consensus algorithm used by Flow, and why it was recently updated!
So let's get to it! 🏋️
📖 So What are Blockchain Nodes?
As we all know, a blockchain network is a decentralized system, maintained by a multitude of computers, known as nodes. These nodes are responsible for validating and recording transactions on the blockchain. Depending on the blockchain's architecture, nodes can have specific roles and responsibilities, such as validating transactions, storing data, or creating new blocks.
Flow has an innovative multi-node architecture, dividing tasks among specialized node types to enhance scalability and efficiency.
Regardless of their type, nodes are crucial in maintaining the integrity, security, and decentralization of a blockchain network. In this post, we will talk about the different types of nodes that can be found on Flow, and we'll also touch on why you might want to run each type!
💡 Understanding the Role of Nodes in Flow
On Flow, nodes are integral components that maintain the distributed ledger and facilitate various network operations. They ensure the network's scalability, security, and decentralization, playing a crucial role in the overall system.
The team at Flow developed a unique architecture that divides the labour among different types of nodes rather than assigning all tasks to every node. This results in a highly scalable and secure decentralized architecture that can process many transactions per second (ie 'high transactions per second' value).
The types of nodes that we can find on Flow include Collection, Consensus, Execution, Verification, Access, Light, and Archive nodes. Each has a distinct role in the network, contributing to the overall efficiency and functionality of Flow.
Before we dive any deeper, let's take a quick look at a summary of each node, their pros, cons and requirements for running them:
|Aspect||Light Node||Access Node||Collection Node||Consensus Node||Execution Node||Verification Node||Archive Node|
|Simplified Description||Provides a verified copy of block data, serving the Access API.||Entry point to the Flow network, providing APIs for data reading and transaction submission.||Aggregates and stores transactions from the Access Nodes.||Participates in the consensus process and proposes blocks.||Processes and computes the results of transactions.||Verifies the work of Execution Nodes and ensures correct transaction execution.||Stores historical data, ensuring long-term data availability.|
|Pros||- Ensures data integrity and availability for dApp developers.||- Facilitates user interaction with the blockchain.|
- Ensures transaction availability. | - Enhances network scalability by distributing workload. | - Key to maintaining network security and decentralization. | - Critical for transaction processing efficiency. | - Guarantees the correctness of transaction execution. | - Preserves blockchain history for audit and analysis. | | Cons | - Limited interaction with transaction processing. | - High demand on resources due to frequent access. | - Requires efficient management to handle transaction volumes. | - High responsibility and need for robust security measures. | - Requires significant computational resources. | - High demand for accuracy and reliability. | - Requires substantial storage capacity. | | Staking Required | Does not require staking. | Requires staking (100 FLOW) but does not participate in the core Flow protocol and thus does not receive any staking rewards. | 250,000 FLOW | 500,000 FLOW | 1,250,000 FLOW | 135,000 FLOW | No staking required | | Hardware Requirements | Standard computing resources. | High-speed internet, reliable computing resources. | Efficient data handling and storage capacity. | Robust and secure computing infrastructure. | High-performance computing resources. | Reliable and robust computing resources. | Extensive storage capacity. |
Now let's check out the different types of nodes!
👀 Light Node
Light Nodes provide a locally accessible, continuously updated, verified copy of the block data. They serve the Access API, which is an essential part of the Flow ecosystem that facilitates interaction between dApps and Flow.
These nodes play a critical role in expanding the reach of Flow's blockchain. They are especially beneficial to dApp developers who need access to the latest block data available locally. For instance, a wallet application that needs to track the latest block ID and height would find an Light Node extremely useful.
Unlike other node types, Light Nodes do not require staking, which means they don't demand a security deposit in the network's native token, FLOW. This makes Light Nodes permissionless and open to anyone, increasing the accessibility and decentralization of the network.
Light Nodes also provide an additional layer of security to the network. As mentioned above, they maintain an up-to-date and verified copy of the block data, thereby ensuring the integrity of the information on the blockchain. The Light Nodes verify each block received, ensuring that it is a valid extension of the chain.
Light Nodes continuously receive blocks that are being added to the chain either directly from the Access Node or from other Light Nodes that are part of the public network. In the diagram below, we can see the relationship between dApps, Light Nodes and Access Nodes. Notice how Light Nodes combine with Access Nodes to create the public network, providing global access to both dApps and users.
In addition to their security role, Light Nodes also help scale the performance of the network. Access node operators can spin up geographically dispersed Light Nodes that can communicate with their staked Access Nodes and with each other, hence enhancing the network's robustness and load distribution.
Running an Light Node does not require high-end hardware, making it a cost-effective option for participants. Any consumer-grade computer with a decent network connection and sufficient disk space can operate an Light Node.
In conclusion, Flow's Light Nodes play a crucial role in ensuring the network's security, scalability, and accessibility. They act as the network's watchdog, maintaining the blockchain's integrity while also contributing to the network's performance.
⬆️ Access Node
If you have spent any amount of time developing on Flow, you will have heard of Access Nodes!
Access nodes serve as the entry point to Flow, acting as a bridge between external applications and the blockchain. They provide APIs to read data from Flow and send transactions to it. The robust and permissionless nature of these nodes makes them a crucial component of Flow's architecture, enabling high accessibility and facilitating interaction with Flow.
Access nodes come with the ability to provide local access to protocol state data such as blocks, collections, and transactions. This means that dApp developers, chain explorers, chain analytics, and other users who require exclusive access to chain data can run an access node without having to rely on community nodes. They can access data independent of community access node rate limits, increasing efficiency and user experience. Several projects run their own Access Nodes for this exact reason 💪
Despite being a staked node, an access node does not participate in the core Flow protocol. This means that while it contributes to the decentralization and robustness of the network, it does not receive any staking rewards. Its primary purpose lies in enabling effective data access and transaction submission to the network.
As you may have guessed from the previous section, Access Nodes are capable of scaling their endpoints by spinning up Light nodes. These Light nodes can communicate with staked Access Nodes and each other, providing geographically dispersed access points. This aspect of the access node architecture further enhances the scalability and efficiency of Flow.
In summary, access nodes play an essential role in maintaining the openness and accessibility of Flow. They ensure that developers and users alike can interact with Flow with ease, contributing to the network's overall versatility and user-centric design.
🥋Collection, Consensus, Verification and Execution Nodes: The Core Contributors
On Flow, the tasks typically handled by a single type of node in traditional blockchains are divided among four specialized types of nodes: Collection nodes, Consensus nodes, Verification nodes, and Execution nodes. These nodes form the backbone of the Flow network, each playing a crucial role in processing and validating transactions.
Collection Nodes are the first point of contact in the transaction process. They manage the transaction pool and collect well-structured transactions to propose to the Consensus Nodes. In the animation above, we can see the representation of a Collection Node in the top left, where it gathers the transactions, represented by coloured balls. The collected transactions are then formed into Collections and a Collection Guarantee is submitted to the Consensus nodes, ensuring the availability of data and speeding up the network's overall performance.
Consensus Nodes are tasked with forming and proposing blocks. Using the HotStuff consensus algorithm, they create a globally consistent chain of blocks. They validate the signed collection hashes submitted by Collection Nodes and assemble the transactions into blocks, as illustrated in the centre of the animation above. The high degree of Byzantine fault tolerance provided by the large number of Consensus nodes ensures the security of the network.
Execution Nodes are the most resource-intensive nodes on Flow, and are shown in the bottom right of the animation. They are responsible for executing transactions and maintaining the Execution State. By computing the outputs of the blocks, the Execution Nodes significantly contribute to Flow's scalability and efficiency. Despite their high hardware requirements, the revenue per node compensates for their high operating costs due to the small number of these nodes.
Verification Nodes, visible in the bottom left of the animation, act as auditors of the work done by Execution Nodes. They confirm the correctness of the computation performed, ensuring that no node can easily manipulate the system. Even if there are substantial errors in the Verification Node pool, the Consensus Nodes are still required to approve the transactions they signed, ensuring the overall security of the system.
In summary, these four types of nodes work in harmony to create a system of checks and balances on Flow. Their specialization and division of labour allow for higher throughput, greater decentralization, and increased security, providing the foundation for a future-proof, consumer-scale blockchain protocol like Flow.
🙋 Why Run a Node on Flow: The Benefits and Impact
Running a node on the Flow blockchain offers numerous benefits and can positively impact the network's performance and decentralization.
Flow's multirole architecture provides several node types that users can operate, each having its unique role, thus contributing differently to the network. This design makes the network more scalable and helps balance load distribution.
Choosing to run a node on Flow is a decision that not only benefits the user but also contributes to the robustness and performance of the entire network. The varied node types mean there is an opportunity for everyone, regardless of their needs or resources.
Light nodes and Access nodes are primarily concerned with providing users and applications with access to blockchain data. You can find the official documentation on running an Light Node here, and for an Access Node the docs are here.
Collection, Consensus, Verification, and Execution nodes are the types to run if you want your node to participate in the core workings of the Flow protocol. These roles are staked and receive staking rewards, making them a great choice for those looking to contribute significantly to the network and earn rewards. If you would like to run one of these nodes, visit the official documentation here.
👓 Light Node
The Light Node is one of the easiest to spin up and is ideal for dApp developers needing the latest block data locally. It supports dApps and can also be used by access node operators to scale their nodes' endpoints. Unlike Access Nodes, Light Nodes are not staked, and yet they provide the same API as Access Nodes. Running an Light Node is a great place to start if you would like to learn more about the inner workings of Flow blockchain through a practical project!
An individual or business might run an Light Node for several reasons:
1. Local Access to Block Data: The Light Node provides a locally accessible, continuously updated, verified copy of the block data. This is useful for applications that need to track the latest block ID and height, eg a wallet application.
2. Geographical Scaling: For Access Node operators who want to scale their Access Node endpoints geographically, they can spin up geographically dispersed Light Nodes. These nodes can communicate with their staked Access nodes.
3. No Staking Required: Unlike many other node types, Light Nodes do not need to be staked. This makes it easier for anyone to run an Light Node without having to invest in tokens.
4. Easy Setup: Light Nodes can be run on any consumer-grade computer with a decent network connection and sufficient disk space, making them relatively easy to set up and maintain.
5. Unthrottled Access: By running their own Light Node, users can have unthrottled access to current Flow blockchain data, which can be beneficial for high-traffic apps with lots of user activity.
6. Decentralization: Running an Light Node contributes to the decentralization of the Flow network.
🔓 Access Node
The Access Node is for users who want local access to protocol state data and do not want to rely on community Access Nodes. It's especially beneficial for dApp developers, chain explorers, and chain analytics who need exclusive access to chain data. This is especially useful for projects that do not want to be restricted by rate limits found on community nodes. For example, the team behind the .find project* on Flow run their own Access Node. An Access Node is staked, contributing to the network's security, but it does not participate in the core Flow protocol, hence it does not receive any staking rewards.
\ .find is a project that allows you to "Buy, sell, mint and showcase NFTs on the Flow blockchain with a named wallet and profile that brings an identity to your crypto life". Using .find, you can assign a human-readable name to your wallet, making account addressing and management even easier! Check out the project at [find.xyz*](http://find.xyz)
Operating an Access Node provides several advantages:
1. Independence: Running your own node gives you direct access to the network, eliminating the need to rely on third-party providers. This is especially useful for dApp developers or businesses that require exclusive access to chain data.
2. Privacy and Security: By operating your own node, you can better secure the privacy of your interactions with the Flow network. This can be particularly important for businesses dealing with sensitive data.
3. Contribution to Network Health: Running an Access Node also helps contribute to the overall health, security, and decentralization of the Flow network.
However, it's important to note that while Access Nodes require staking, they do not participate in the core Flow protocol and thus, do not receive any staking rewards.
💐 Collection Node
Running a Collection Node on Flow can offer several benefits. These nodes are responsible for managing the transaction pool and collecting well-formed transactions to propose to consensus nodes.
In terms of benefits, running a collection node allows you to:
1. Participate directly in the operation of the Flow blockchain: This can be beneficial for businesses or individuals who have a vested interest in the functioning and success of the network.
2. Contribute to the security and decentralization of the network: This can be particularly rewarding for those invested in the principles of blockchain technology.
3. Potentially earn rewards: Collection nodes are staked and can receive staking rewards.
However, running a collection node also comes with challenges and responsibilities. For instance, you would need to:
1. Stake a minimum of 250,000 FLOW: This is necessary to be a confirmed node operator.
2. Ensure your node is always online: A node that is not online can cause severe degradation of network performance and may result in a slashing of rewards.
3. Be responsible for storing collection content: All transactions for any collection that they guarantee during the current epoch and the first 1000 blocks of the next epoch must be stored.
4. Respond to any collection request: You must respond to any collection request from staked execution, verification, and consensus nodes in a timely manner.
5. Deal with potential challenges: If a node doesn't respond to a request or submits invalid collection content, it can be challenged and potentially penalized.
To operate a collection node, you would need to go through the application process on the Flow website, ensure you have the required stake, and follow the setup steps to provision the machine, generate and register your node identity, and start your node. Regular checks and updates are also necessary to ensure your node is running correctly.
✈️ Consensus Node
Operating a Consensus Node can have several benefits for an individual or business. Here are some details:
Network Contribution: Consensus Nodes play a crucial role in the operation of the Flow network. They are responsible for forming and proposing blocks, using the HotStuff consensus algorithm to create a globally consistent chain of blocks.
Rewards: Consensus Nodes, like other staked nodes, are eligible for rewards.
Increased Decentralization: The more Consensus Nodes there are, the more decentralized the network becomes. This enhances the security and resilience of the blockchain against attacks and benefits the community as a whole.
Learning Opportunity: Running a Consensus Node provides a practical learning experience about how blockchain networks operate. This can be particularly beneficial for businesses that want to understand the technology more deeply.
However, running a Consensus Node comes with its challenges and responsibilities:
Technical Requirements: Consensus Nodes have minimal bandwidth and computation requirements. However, they still require a stable internet connection and a minimum level of computational resources.
Staking Requirement: To be a confirmed Consensus Node operator, you are required to stake a minimum of 500,000 FLOW tokens. This is a form of commitment to the network and protection against malicious behaviour.
Maintenance and Upkeep: Running a Consensus Node means you're responsible for its operation and maintenance. This includes keeping the node online, updating the software when needed, and troubleshooting any potential issues.
The process of running a Consensus node can be found on the Flow website.
✅ Verification Node
Operating a Verification Node on the Flow network is a critical role that involves confirming the accuracy of computations performed by Execution Nodes. While this role is crucial for maintaining the overall integrity and functionality of the network, it comes with its own set of advantages and potential drawbacks.
The advantages of running a Verification node are:
Contribute to security and integrity: Verification Nodes contribute to the security and integrity of the Flow network by checking the correctness of the work done by execution nodes.
Moderate hardware requirements: They have moderate hardware requirements and hence are less resource-intensive to run compared to some other node types. This makes it more feasible for individuals and businesses to participate in the network.
Staking rewards: These nodes are staked and receive staking rewards, providing a potential income source for the operator.
Contribute to decentralization: By running a Verification Node, operators contribute to the decentralization and security of the whole network, which is a core principle of blockchain technology.
The challenges of running a Verification node are:
Staking: Operators need to stake a minimum of 135,000 FLOW tokens to be a confirmed node operator. This may not be feasible for all individuals or businesses.
Hardware might be an issue: While the hardware requirements are moderate relative to some other node types, there is still a requirement for sufficient computational resources and a stable internet connection.
Uptime: Node operators need to keep their node online consistently. Any downtime can impact network performance and may lead to the slashing of rewards.
Technical understanding: It requires some technical knowledge to set up and maintain the node.
The process of running a Verification node can be found on the Flow website.
👨💻 Execution Node
Running an Execution Node on the Flow blockchain can be a strategic decision for individuals or businesses for several reasons. Execution Nodes are responsible for running the computations of each block as quickly as possible and maintaining the Execution State, a cryptographically-verifiable data store for all user accounts and smart contract states. This role is critical and offers unique benefits, but it also presents certain challenges and requirements.
Benefits of running an Execution Node:
- High potential revenue: Given the high-performance nature of these nodes and the smaller number of them, the revenue per node can be significant, helping to compensate for the high capital costs of operation.
Challenges associated with running an Execution Node:
High resource requirements: Execution Nodes are the most resource-intensive nodes on the Flow network, requiring significant hardware capabilities for processor speed and bandwidth.
High stake requirements: To operate an Execution Node, a minimum stake of 1,250,000 FLOW is required. This high stake requirement could be a barrier for some potential node operators.
The process of running an Execution Node can be found on the Flow website.
🗃️ Archive Node
The Archive Node in the Flow architecture provides a scalable and efficient way to access the history of the Flow protocol and the execution state for the current spork. It allows retrieval of blocks, collections, transactions and events from the genesis of the current spork, and also allows script execution and other read-only queries that require the execution state to be read.
Advantages of running an Archive Node:
Access to Historical Data: Archive Nodes store and index both protocol and execution state from the genesis of the current spork, allowing comprehensive access to the entire history of the Flow protocol.
No Staking Required: Unlike some other types of nodes (like Collection, Consensus, Execution, Verification), Archive Nodes do not require staking, making them relatively easy and cost-effective to set up.
Permissionless: Archive Nodes can be run by anyone without needing to be added to the approved list of nodes. This makes them accessible to all users interested in operating a node.
Data Analysis and Chain Analytics: Businesses or individuals interested in performing data analysis or chain analytics might choose to run an Archive Node to have comprehensive access to the entire history of the Flow protocol.
Building dApps: Developers building decentralized applications (dApps) might choose to run an Archive Node to have direct and complete access to blockchain data, which can be useful for various functionalities in their applications.
Backup and Redundancy: For reasons of data backup and redundancy, businesses, especially those providing infrastructure services or building products on Flow, might choose to run an Archive node.
Auditing and Compliance: For auditing and compliance purposes, it might be necessary to run an Archive node to have access to complete and verifiable historical data.
Disadvantages of running an Archive Node:
Storage Requirement: Given that Archive Nodes store and index the entire history of the Flow blockchain, they require significant storage capacity, which could be a potential disadvantage in terms of cost and infrastructure.
No Staking Rewards: Since Archive Nodes are not involved in block production, they do not earn any staking rewards. This could be a disadvantage for those looking to earn rewards from their participation in the network.
🤓 Flow's Consensus Algorithm
An article on the types of node on Flow blockchain would be amiss without a section on the consensus algorithm! So which algorithm does Flow use and what is it?
Please Note: The following section is a technical summary of the current state of Flow's consensus algorithm. An entire article could be written on the algorithm itself, the incredible engineering that went into it and how it works. For more information, please visit the following links:
Flow blockchain, since its inception in 2020, has been leveraging a consensus algorithm from the HotStuff family of Byzantine-fault-tolerant (BFT) algorithms, known for its properties like deterministic finality, optimistic responsiveness, and pipelined block production (ie confirmations for the previous block are made as the next block is created and proposed).
The HotStuff protocol operates in rounds with a rotating leader for proposing new blocks, requiring a supermajority vote for acceptance. However, the protocol faced challenges, particularly with the Passive Pacemaker component, which, due to its lack of active communication and reliance on local timeouts and exponential-increase timeout functions, led to inefficiencies and potential delays in edge cases.
In January 2023, Flow introduced a significant upgrade with the Jolteon consensus algorithm, originally developed by Meta's blockchain research team and academic collaborators. Jolteon, while following the HotStuff framework, brings two major enhancements: the introduction of an Active Pacemaker and an improved finalization speed.
The Active Pacemaker marks a departure from the passive approach by actively engaging in the recovery mechanism for views (essentially a round of the consensus process) without successful proposals. Nodes, upon timing out, broadcast a timeout message with the current view and last successful proposal information. This active step ensures nodes skip failed views based on collective agreement evidence, maintaining a consistent view across nodes and effectively eliminating view divergence and its negative impacts.
This active communication mechanism significantly impacts the block finalization process. Flow’s previous requirement of three successful confirmations for block finalization is now reduced to two, thanks to the Jolteon upgrade. This change is attributed to the enhanced protocol logic allowing nodes to reach consensus more rapidly.
Overall, the Jolteon upgrade represents a substantial advancement in Flow's blockchain technology. It not only enhances network reliability and reduces the impact of unplanned outages but also accelerates transaction finalization by approximately 33%. These improvements ensure a more robust and efficient platform for both users and developers, marking a pivotal moment in Flow’s evolution in the blockchain landscape.
In conclusion, Flow's innovative multi-node architecture addresses key challenges prevalent in the blockchain industry, particularly scalability, without compromising security or decentralization.
By dividing tasks among specialized nodes, Flow ensures efficiency, speed, and robustness in its operations. This unique approach not only enhances performance but also fosters inclusivity by lowering the barriers to running a node, consequently promoting greater network participation.
The Jolteon consensus algorithm, a significant upgrade on Flow blockchain, introduces the Active Pacemaker and faster block finalization, significantly increasing network reliability and efficiency. This enhancement underscores Flow's commitment to evolving and optimizing its blockchain technology.
Whether you're a developer, consumer, or potential node operator, Flow offers promising opportunities in the ever-evolving world of blockchain technology - time to get involved, so join the Flow Discord now for guidance from real Flow developers or check out the developer docs for more info!