Copy of Mirror Nodes

Store history and cost-effectively query data

Mirror nodes act as powerful tools within the Hedera Network, offering a means to store and access historical data from the public ledger cost-effectively and efficiently. These nodes contribute to resource optimization by minimizing the utilization of the Hedera Network's resources.

The services provided by mirror nodes extend to all currently available Hedera Network services. They enable the retrieval of the following information:

  • Transactions and Records: Mirror nodes store all transaction data that occurs within the network, along with their accompanying records. This information can be queried for audit purposes, analytics, or network monitoring.

  • Event Files: These are files created by consensus nodes that capture all the events occurring on the Hedera Network. Mirror nodes store these files and make them available for analysis and review.

  • Balance Files: Balance files provide a snapshot of the state of all accounts within the Hedera Network at the time of their creation. These files, which are stored and made accessible by mirror nodes, include details such as account balances and account status information.

By offering a way to access this information, mirror nodes play a crucial role in maintaining transparency and accessibility within the Hedera Network.

Understanding Mirror Nodes

Hedera Mirror Nodes receive information from Hedera Network consensus nodes, either mainnet or testnet, and provide a more effective means to perform:

  • Queries: Mirror nodes allow for comprehensive and efficient querying of historical transaction data and records from the network.

  • Analytics: By maintaining historical data from the network, mirror nodes support detailed analytics, providing insights into network performance, transaction patterns, and trends.

  • Audit Support: Mirror nodes store all transactions and records, enabling complete audits of network activity, which is crucial for transparency and accountability.

  • Monitoring: Through the continuous intake and storage of network data, mirror nodes support real-time network monitoring, ensuring timely detection and response to network events.

While mirror nodes receive information from the consensus nodes, they do not contribute to consensus. The trust Hedera commands stem from the consensus achieved by the consensus nodes. This trust is then extended to mirror nodes through cryptographic signatures, hash chains, and state proofs.

To simplify initial deployments, mirror nodes alleviate the necessity of running a full Hedera node. They achieve this by generating periodic files that encapsulate processed information (e.g., account balances or transaction records), authenticated by the full trust of the Hedera consensus nodes. The mirror node software minimizes the processing load by accepting pre-constructed files from the network, validating these files, populating a database, and offering REST APIs for easy access.

Mirror nodes work by validating the signature files associated with the record, balance, and event files that consensus nodes upload to a cloud storage solution from the network.

As transactions reach consensus on the Hedera Network, either mainnet or testnet, Hedera consensus nodes add the transaction and its associated records to a record file. This file contains a sequence of ordered transactions and their respective records. After a specified time, a record file is closed, and a new one is created. This process repeats as the network continues to receive transactions.

Once a record file is closed, the consensus nodes generate a signature file, which includes a signature for the corresponding record file’s hash. Along with the consensus node's signature file, the record file also contains the hash of the preceding record file, allowing the validation of the former record file by comparing the hash of the previous record file.

Hedera consensus nodes push new record files and signature files to the cloud storage provider – currently, AWS S3 and Google Cloud Storage are supported. Mirror nodes download these files, verify their signatures based on their hashes, and only after successful verification are these files processed and made accessible.

FAQs

How is data stored in a Hedera Mirror Node? Is it a specific type of database, or does it use a unique data structure?

Hedera Mirror Node uses a PostgreSQL database to store the transaction and event data organized in a structure that mirrors the Hedera Network. Once the mirror node receives record files from Hedera Consensus nodes, the data is validated and loaded into the database.

How can I set up and run a mirror node? What are the minimum hardware requirements?

Setting up a Hedera Mirror Node involves both hardware and software components. The hardware requirements can be found here.

Are there costs associated with running a mirror node?

No, Hedera does not charge for running a mirror node. However, there are costs associated with purchasing the hardware, internet connection, and potential cloud service fees. The hardware requirements can be found here.

How can I provide feedback or create an issue to log errors?

To provide feedback or log errors, please refer to the Contributing Guide and submit an issue in the Hedera Docs GitHub repository.

Last updated

Was this helpful?