• Stars
    star
    117
  • Rank 292,398 (Top 6 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created almost 5 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Hedera Mirror Node archives data from consensus nodes and serves it via an API

Build codecov Discord

Hedera Mirror Node

The Hedera Mirror Node acts as an archive node and stores historical data for the Hedera network.

Overview

Mirror nodes receive information from the Hedera nodes and can provide value-added services such as APIs, auditing, analytics, visibility services, security threat modeling, data monetization services, etc. Mirror nodes can also run additional business logic to support applications built using the Hedera network.

While mirror nodes receive information from the main nodes, they do not contribute to consensus on the network, and their votes are not counted. Only the votes from the main nodes are counted for determining consensus. The trust of the Hedera network is derived based on the consensus reached by the main nodes. That trust is transferred to the mirror nodes using cryptographic signatures on a chain of files.

Eventually, the mirror nodes will be able to run the same code as the Hedera nodes so that they can see the transactions in real time. To make the initial deployments easier, the mirror node strives to take away the burden of running a full Hedera node through creation of periodic files that contain processed information (such as account balances or transaction records), and have the full trust of the main nodes. The mirror node software reduces the processing burden by receiving pre-constructed files from the network, validating those, populating a database, and providing APIs to expose the data. This approach provides the following advantages:

  • Lower compute and bandwidth requirements
  • Allows users to only save the data that they care about (lower storage requirement)
  • Easy searchable database so the users can add value quickly
  • Easy to consume APIs to make integrations faster

Architecture

Main Nodes

  • When a transaction reaches consensus, Hedera nodes add the transaction and its associated record to a record file.
  • Record files contain the hash of the previous record file, thus creating an unbreakable validation chain.
  • The file is closed on a regular cadence and a signature file is generated by the node for the record file.
  • The record and signature files from each node are then uploaded to Amazon S3 and Google Cloud Storage.

Mirror Nodes

  • This mirror node software downloads signature files from cloud storage.
  • The signature files are verified using the corresponding node's public key from the address book (stored in a 0.0.102 file).
  • The verified signature files are checked to ensure at least 1/3 have the same record file hash.
  • For each valid signature file, the corresponding record file is then downloaded from cloud storage and its hash verified against the hash contained in the signature file.
  • The downloaded record file contains a previous hash that is validated against the last processed file to verify the hash chain.
  • Record files can then be processed and transactions and records processed for long term storage.

In addition, nodes regularly generate a balance file and an event file. The balance file contains the list of Hedera accounts and their corresponding HBAR and token balances. The event file contains events that were gossiped between nodes. Both of these files are processed by the mirror node in a similar fashion as outlined above.

Getting Started

Technologies

Multiple technologies are utilized in the mirror node. The following topics are areas where basic knowledge is valuable to understanding the mirror node operations.

Prerequisite Tools

Ensure these tools are installed (note minimum versions) prior to running the mirror node:

Running

For production use, we recommend using Kubernetes and to deploy using our Helm chart. Hedera managed mirror nodes use Kubernetes and Helm for their deployments, and this process is considered the most production-ready. As an alternative for local development, Docker Compose can be used to run the mirror node. See the installation document for more details on configuring and running with Docker Compose. To get up and running quickly with Docker Compose execute the following commands in your terminal:

git clone https://github.com/hashgraph/hedera-mirror-node.git
cd hedera-mirror-node
docker compose up

NOTE: This defaults to a bucket setup for demonstration purposes. See the next section for more details.

Data Access

Demo

The free option utilizes a bucket setup for demonstration purposes. This is not a real Hedera network but simply a dummy bucket populated with a day's worth of past testnet data. This is the default option and requires no additional steps. Once you've verified your deployment works against the demo bucket, remember to configure it with a public network then wipe the database and restart the mirror node.

Public Networks

To access data from real Hedera networks, AWS or GCS requester pays credentials must be used. The charges associated with the downloading of stream files are paid for by the requester and not the bucket owner.

Documentation

Releasing

To perform a new release, run the Automated Release GitHub workflow.

Support

If you have a question on how to use the product, please see our support guide.

Contributing

Contributions are welcome. Please see the contributing guide to see how you can get involved.

Code of Conduct

This project is governed by the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to [email protected].

License

Apache License 2.0

More Repositories

1

awesome-hashgraph

Hashgraph is a superior consensus mechanism / data structure alternative to blockchain.
282
star
2

hedera-services

Crypto, token, consensus, file, and smart contract services for the Hedera public ledger
Java
260
star
3

hedera-sdk-js

Hederaâ„¢ Hashgraph SDK for JavaScript/TypeScript
JavaScript
251
star
4

hedera-sdk-java

Hederaâ„¢ Hashgraph SDK for Java
Java
202
star
5

hedera-improvement-proposal

Hedera Improvement Proposal
Solidity
131
star
6

guardian

The Guardian is an innovative open-source platform that streamlines the creation, management, and verification of digital environmental assets. It leverages a customizable Policy Workflow Engine and Web3 technology to ensure transparent and fraud-proof operations, making it a key tool for transforming sustainability practices and carbon markets.
TypeScript
91
star
7

hedera-sdk-go

Hederaâ„¢ Hashgraph SDK for Go
Go
88
star
8

hedera-hts-demo

This is a demonstration UI for the Hedera Token Service. Written in JavaScript and Vue.JS
Vue
72
star
9

MyHbarWallet

🟩 MyHbarWallet is a free, client-side interface helping you interact with Hedera™ Hashgraph.
Vue
64
star
10

hedera-docs

Welcome to the official Hedera documentation repository.
Shell
57
star
11

hl-mercury

Hashgraph implementation of functionality similar to Hyperledger
Java
48
star
12

hedera-local-node

Run your own local Hedera network for development purposes.
TypeScript
45
star
13

hedera-json-rpc-relay

Implementation of Ethereum JSON-RPC APIs for Hedera
TypeScript
43
star
14

hedera-smart-contracts

Contains Hedera Smart Contract Service supporting files
TypeScript
38
star
15

hedera-protobufs-java

The protobuf message files defining the Hedera Hashgraph API
Shell
32
star
16

hedera-platform

Swirlds Hashgraph Platform SDK open source code.
Java
32
star
17

hedera-nft-minter

Mintbar is an open source NFT minter webapp for the Hedera ecosystem.
TypeScript
23
star
18

hedera-sdk-rust

The Hederaâ„¢ Rust SDK
Rust
23
star
19

hedera-proof-of-action-microservice

Hederaâ„¢ Hashgraph Proof-of-Action Microservice
Java
22
star
20

did-sdk-js

Javascript SDK for managing DID Documents & Verifiable Credentials
TypeScript
21
star
21

hedera-nft-auction-demo

Demo NFT auction
Java
21
star
22

hedera-hcs-chat-js

An example chat application, which uses the Hedera Consensus Service for pub-sub messaging.
JavaScript
19
star
23

hedera-hcs-sxc-java

The HCS SXC (SDK eXtension Components) is a set of pre-built components that aim to provide additional functionality over and above the java SDK for HCS to make it easier and quicker to develop applications. This repository is only intended for demo purposes and not production applications.
Java
18
star
24

hedera-stable-coin-solidity-ethereum

Hedera Stable Coin implementation as a Solidity smart contract for Ethereum
Solidity
17
star
25

stablecoin-studio

All-in-one stablecoin configuration, issuance, and management
TypeScript
17
star
26

hedera-protobufs

Authoritative source of Hedera protobufs
Shell
16
star
27

hedera-smart-contract-starter

This smart contract starter on Hedera helps developers create upgradeable contracts using a proxy pattern for seamless upgrades. Includes a sample contract and documentation for a quick start.
TypeScript
15
star
28

did-sdk-java

Support for the Hedera Hashgraph DID Method and Verifiable Credentials on the Hedera Java SDK
Java
14
star
29

hedera-mirror-node-explorer

Hedera Mirror Node Explorer for the Hedera Hashgraph DLT.
TypeScript
14
star
30

did-method

Hedera Hashgraph Decentralized Identifier (DID) method specification
11
star
31

ledger-app-hedera

Hedera wallet application for Ledger Nano S
C
11
star
32

hedera-sdk-swift

Hederaâ„¢ SDK for Swift
Swift
10
star
33

hedera-wallet-connect-js

This package is a messaging relay between decentralized applications and wallets in Hedera network based on Wallet Connect relays.
TypeScript
10
star
34

corda-notary-hedera

Java
10
star
35

hedera-heroes

Contribute programming tutorials on the Hedera blog. Get rewarded.
10
star
36

pbj

A performance optimized Google Protocol Buffers code generator, parser, and Gradle module.
Java
9
star
37

hedera-sdk-cpp

C++ SDK for Hedera
C++
8
star
38

hedera-stable-coin-demo

Java
8
star
39

hedera-fee-tool-js

Tool to calculate price of transactions on Hedera network
JavaScript
8
star
40

hedera-cli

Hedera command line tools for developers
TypeScript
8
star
41

hedera-hcs-token-example

This is a sample implementation of an ERC20 like token in a Hedera Consensus Service(HCS) decentralised application
JavaScript
8
star
42

hedera-accelerator-defi-dex-ui

TypeScript
7
star
43

hedera-smart-contracts-libs-lab

Smart contract examples in various languages showing use of Hedera SDKs in tandem with public libraries
JavaScript
7
star
44

hedera-stablecoin-demo-archived

JavaScript
6
star
45

hedera-hcs-erc721-sample

Hedera ERC-721 Equivalent Contract for Hedera Consensus Service.
Java
6
star
46

hedera-transaction-tool-demo

The Hedera Transaction Tool demo application.
Java
6
star
47

hedera-hardhat-hethers

DEPRECATED Hardhat plugin for integration with hethers.js.
TypeScript
5
star
48

hedera-proof-of-action-demo-pasteboard

Showcases the Hederaâ„¢ Proof-of-Action (PoA) API via a toy image pasteboard.
Vue
5
star
49

hedera-sdk-reference

Hedera SDK specification repository.
HTML
5
star
50

hedera-accelerator-defi-dex

TypeScript
5
star
51

hedera-stable-coin

Java
5
star
52

hedera-nft-utilities

Hedera NFT Utilities SDK for JavaScript
TypeScript
5
star
53

log4j2-hedera

Provides Log4j 2.x support for Hederaâ„¢ via an Appender that records logged events using the Hederaâ„¢ Consensus Service (HCS).
Java
5
star
54

hedera-protobufs-go

Generated protobufs in Go for interacting with Hederaâ„¢ Hashgraph
Go
4
star
55

hedera-hardhat-example-project

An example Hedera Hardhat project where you can use an instance of the Hedera JSON RPC Relay to test and deploy a smart contract.
JavaScript
4
star
56

hashgraph-defi-alliance

TypeScript
4
star
57

partners-handbook

Onboarding handbook for Hedera Partners
3
star
58

fabric-samples-hcs

Shell
3
star
59

hedera-subgraph-example

The Hedera Subgraph Example Project demonstrates how to create and deploy a subgraph to a local graph node using The Graph Protocol.
TypeScript
3
star
60

fabric-hcs

Go
3
star
61

hedera-theft-prevention-demo

Demonstrates a theft prevention use case using proof of action
Vue
3
star
62

hello-hedera-audit-log-go

Contributed by the AdsDax team. This demo application was created using the Hedera Go SDK that shows the end-to-end process as events are tracked, sent to the Hedera network and then collected after being processed by the Consensus Service.
Go
3
star
63

hedera-hcs-s3-monitor-java

Lambda function which monitors an S3 bucket and creates HCS transactions on changes made to files in the bucket
Java
3
star
64

hedera-sourcify

Tools for verifying Hedera smart contracts using standard open source libraries.
TypeScript
3
star
65

hedera-wallet-connect

This package is a messaging relay between decentralized applications and wallets in Hedera network based on Wallet Connect relays.
TypeScript
3
star
66

hedera-metamask-snaps

Metamask snaps offer the ability to create npm package that can be used to enhance the wallet capabilities for chains and DApps.
TypeScript
3
star
67

hedera-grpcWeb-proxy

Envoy proxy docker and docker-compose for Hedera testnet and mainnet consensus nodes
JavaScript
2
star
68

hedera-hcs-corda-demo

Integrating R3 Corda IOU Demo with the Hedera Consensus Service.
Java
2
star
69

.github

Default GitHub configuration for the Hashgraph organization
2
star
70

hedera-exchange-rate-tool

Hedera Exchange Rate Tool to send median of HBAR/USD exchange rate from various Exchanges to Hedera Network
Java
2
star
71

logstash-output-hedera

Java
2
star
72

full-stack-testing

JUnit 5 extensions and supporting libraries for performing Full Stack Testing of the Hedera Services application.
Java
2
star
73

hcscli

This is a temporary tool developed during integrating Hedera Consensus Service with Hyperledger Fabric.
Go
1
star
74

hedera-sdk-tck

A TCK (Technology Compatibility Kit) used to verify compliant implementations of a Hedera SDK
JavaScript
1
star
75

hedera-state-proof-verifier-go

State Proof Verifier library for Hedera in Go lang
Go
1
star
76

solo

An opinionated CLI tool to deploy and manage standalone test networks.
JavaScript
1
star