HIGUN (Hyper Indexer of General UTXO Network) is a high-performance, universal UTXO network indexer designed to handle multiple blockchain networks simultaneously. As a Bitcoin sidechain, MVC has been committed to expanding Bitcoin's performance. However, there has been a lack of a high-performance UTXO indexer that integrates Bitcoin and other sidechains in the market.
This high-performance universal UTXO network indexer, jointly developed by the MVC technical team and Metalet team, is the first to index both Bitcoin and MVC UTXOs simultaneously in a single indexer, treating these two as an integrated network. It adopts Pebble database instead of traditional databases, and a medium-configuration server can actually process tens of millions of transactions daily in performance tests.
- Multi-Chain Support: Unified indexing for Bitcoin, MVC, and Dogecoin blockchains
- High Performance: Capable of processing tens of millions of transactions daily with medium-configuration servers
- Efficient Storage: Uses Pebble database instead of traditional databases for superior performance
- Comprehensive Indexing:
- UTXO tracking (income/spend)
- FT (Fungible Token) protocol support
- NFT protocol support
- Block information indexing
- Transaction history
- Real-time Monitoring: ZeroMQ integration for live transaction tracking
- Mempool Support: Track unconfirmed transactions
- Reorganization Handling: Automatic blockchain reorganization detection and recovery
- RESTful API: Complete HTTP API for data queries
- Docker Ready: Easy deployment with Docker and Docker Compose
- Architecture
- Supported Chains
- Current Features
- Prerequisites
- Configuration
- Deployment
- API Endpoints
- Troubleshooting
- Contributing
- License
HIGUN adopts a modular architecture with chain adapter pattern to support multiple blockchains:
- ChainAdapter Interface: Defines common blockchain operations
- Specific Adapters: BTC, MVC, and Dogecoin implementations
- Factory Pattern: Dynamically creates adapters based on configuration
- Unified Data Format: All chains return data in standardized format
- Sharded Storage: Multiple Pebble database shards for parallel processing
- Separated Stores:
- UTXO Store: Transaction outputs by hash
- Address Store: Income transactions by address
- Spend Store: Spent transactions by address
- Meta Store: System metadata and state
- FT/NFT Stores: Token-specific data
| Chain | Network | Status | Features |
|---|---|---|---|
| Bitcoin | Mainnet/Testnet | β Stable | UTXO indexing, mempool tracking |
| MVC | Mainnet/Testnet | β Stable | UTXO, FT, NFT, block info |
| Dogecoin | Mainnet/Testnet | β Stable | UTXO indexing with AuxPoW support |
- Bitcoin UTXO Indexing
- MVC UTXO Indexing
- MVC FT Indexing
- Dogecoin UTXO Indexing
- Block Information Indexing
- Mempool Tracking
- Reorganization Handling
Future versions will add support for more asset protocols and more Bitcoin sidechains, including:
- Lightning Network integration
- More sidechain support
- Advanced query capabilities
- WebSocket real-time updates
- OS: Linux (Ubuntu 20.04+ recommended), macOS, or Windows with WSL2
- Memory: Minimum 8GB RAM (16GB+ recommended for production)
- Storage:
- Bitcoin: 500GB+ SSD
- MVC: 200GB+ SSD
- Dogecoin: 100GB+ SSD
- CPU: 4+ cores recommended
- Docker 20.10+
- Docker Compose 1.29+ (optional)
- Go 1.21+ (for development)
- Blockchain Node:
- Bitcoin Core 24.0+
- MVC Node 0.1.1+
- Dogecoin Core 1.14+
For Bitcoin UTXO indexing, use the standard Docker deployment:
MVC UTXO indexing and block information indexing run together in the same service. Use the standard Docker deployment:
# Build the image
docker build -t higun_mvc .
# Run the container
docker run -d --name higun_mvc --network=host --restart=always -m 22g -v /mnt/higun_mvc/utxo_indexer:/app/utxo_indexer -v /mnt/higun_mvc/config.yaml:/app/config.yaml -v /mnt/higun_mvc/latest_block.txt:/app/latest_block.txt -v /mnt/higun_mvc/data:/app/data -v /mnt/higun_mvc/blockinfo_data:/app/blockinfo_data higun_mvcFor MVC FT (Fungible Token) indexing, use the dedicated deployment script:
# Navigate to the deploy directory
cd deploy/
# Run the FT deployment script
./deploy.ft.shThe FT deployment script will:
- Stop and remove existing containers
- Build the FT-specific Docker image
- Start the FT indexer service
- Display service status
FT Indexer Details:
- Container name:
ft-utxo-indexer - Port:
7789 - Configuration: Uses
config_mvc_ft.yamlby default - Resource limits: 4 CPU cores, 8GB memory
Used for Bitcoin UTXO indexing, MVC UTXO indexing, and block information indexing (MVC UTXO and block information run together):
# UTXO Indexer Configuration
network: "mainnet" # mainnet/testnet/regtest
data_dir: "/Volumes/MyData/mvc/test"
shard_count: 2
tx_concurrency: 64 # How many concurrent requests to fetch raw transactions from nodes
workers: 4
batch_size: 20000
cpu_cores: 1 # 4-core CPU
memory_gb: 4 # 64GB memory
high_perf: true # Prefer performance
api_port: "8080"
zmq_address: "tcp://localhost:28336" # ZeroMQ connection address
mempool_clean_start_height: 567 # Mempool cleaning start height, avoid cleaning from the genesis block
max_tx_per_batch: 30000
# Bitcoin RPC Configuration
rpc:
chain: "mvc"
host: "localhost"
port: "9882"
user: ""
password: ""Used for MVC FT indexing:
# MVC MetaContract FT UTXO Indexer Configuration
network: "mainnet" # mainnet/testnet/regtest
data_dir: "data/mainnet"
shard_count: 2
cpu_cores: 4 # CPU cores to use
memory_gb: 8 # Memory allocation in GB
high_perf: true # Performance optimization flag
api_port: "7789"
zmq_address: "tcp://localhost:28333" # ZeroMQ connection address
mempool_clean_start_height: 567 # Mempool cleaning start height, avoid cleaning from the genesis block
max_tx_per_batch: 1000
raw_tx_in_block: true
# MVC RPC Configuration
rpc:
chain: "mvc"
host: "localhost"
port: "9882"
user: ""
password: ""- network: Network type (
mainnet/testnet/regtest) - data_dir: Data storage directory
- shard_count: Number of database shards for performance optimization
- cpu_cores: Number of CPU cores to use
- memory_gb: Memory allocation in GB
- high_perf: Performance optimization flag
- api_port: API service port
- zmq_address: ZeroMQ connection address for real-time transaction monitoring
- mempool_clean_start_height: Starting block height for mempool cleaning
- max_tx_per_batch: Maximum transactions per batch for processing
- raw_tx_in_block: Enable raw transaction processing in blocks (FT specific)
- chain: Blockchain type (
mvcfor MVC,btcfor Bitcoin,dogefor Dogecoin) - host: RPC server host address
- port: RPC server port
- user: RPC authentication username
- password: RPC authentication password
http://localhost:{api_port}
GET /utxos?address={address}&limit={limit}
# Example
curl "http://localhost:8080/utxos?address=1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa&limit=10"POST /check-utxo
Content-Type: application/json
{
"outpoints": ["txid:vout"]
}GET /ft/balance?address={address}&codeHash={codeHash}&genesis={genesis}GET /db/ft/info?codeHash={codeHash}&genesis={genesis}GET /healthPOST /reindex
{
"start_height": 100000,
"end_height": 100100
}For complete API documentation, see CHECK_UTXO_API.md
# Standard indexer logs
docker logs -f mvc-utxo-indexer
# FT indexer logs
docker logs -f ft-utxo-indexer
# Or use docker-compose
docker-compose -f deploy/docker-compose.ft.yml logs -f# Stop standard indexer
docker stop mvc-utxo-indexer
# Stop FT indexer
docker stop ft-utxo-indexer
# Or use docker-compose
docker-compose -f deploy/docker-compose.ft.yml down# Restart standard indexer
docker restart mvc-utxo-indexer
# Restart FT indexer
docker restart ft-utxo-indexer
# Or use docker-compose
docker-compose -f deploy/docker-compose.ft.yml restart-
Shard Configuration
- Increase
shard_countfor high-load scenarios - Recommended: 2-4 shards for most setups
- Increase
-
Batch Processing
- Adjust
batch_sizebased on available memory - Recommended: 10000-30000 transactions
- Adjust
-
Concurrency Settings
tx_concurrency: Number of parallel RPC requestsworkers: Number of processing goroutines
# Increase file descriptor limits
ulimit -n 65536
# Use SSD storage with appropriate mount options
mount -o noatime,nodiratime /dev/sdX /mnt/datahigun/
βββ api/ # HTTP API handlers
βββ blockchain/ # Blockchain clients and adapters
β βββ adapter.go # Chain adapter interface
β βββ adapter_btc.go # Bitcoin implementation
β βββ adapter_mvc.go # MVC implementation
β βββ adapter_doge.go # Dogecoin implementation
β βββ factory.go # Adapter factory
βββ indexer/ # Core indexing logic
β βββ utxo.go # UTXO indexing
β βββ query.go # Query operations
β βββ reorg.go # Reorganization handling
βββ storage/ # Database abstraction
βββ mempool/ # Mempool management
βββ config/ # Configuration
βββ common/ # Shared utilities
βββ deploy/ # Deployment scripts
βββ docs/ # Documentation
βββ main.go # Entry point
# Clone repository
git clone https://github.com/your-org/higun.git
cd higun
# Install dependencies
go mod download
# Build binary
make build
# Run tests
make test
# Build Docker image
make docker-buildSolution: Reduce batch_size and tx_concurrency, increase Docker memory limit
Solution: Verify RPC credentials, check node is running, ensure firewall allows connections
Solution: Enable high_perf: true, increase tx_concurrency, use SSD storage
Solution: Stop indexer, backup data, remove corrupted database, restart
Enable verbose logging:
export LOG_LEVEL=debug
docker run -e LOG_LEVEL=debug higun:latest| Chain | Blocks/sec | Tx/sec | Storage/1M blocks |
|---|---|---|---|
| Bitcoin | 50-100 | 5,000-10,000 | ~300GB |
| MVC | 100-200 | 20,000-50,000 | ~200GB |
| Dogecoin | 100-150 | 10,000-20,000 | ~100GB |
Benchmarks on 4-core CPU, 16GB RAM, SSD storage
Comprehensive documentation is available in the docs/ directory:
- Chain Adapter Design
- Multi-Chain Architecture
- Dogecoin Integration
- Quick Start Guide
- API Documentation
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Submit a pull request
See CONTRIBUTING.md for details.
- Store RPC credentials securely
- Use firewall rules to limit API access
- Regular backups of Pebble database
- Keep blockchain nodes updated
This project is licensed under the MIT License - see the LICENSE file for details.
- MVC Team: Core development and architecture
- Metalet Team: Product design and integration
- Bitcoin Core: Reference implementation
- btcsuite: Go Bitcoin libraries
- Pebble DB: High-performance storage engine
- Issues: GitHub Issues
- Documentation: Check the
docs/directory for detailed guides
- β Bitcoin UTXO indexing
- β MVC UTXO indexing
- β MVC FT/NFT support
- β Dogecoin support
- β Mempool tracking
- π Lightning Network integration
- π Advanced query filters
- π WebSocket support
- π Cross-chain analytics
- π More sidechain support
- π Advanced analytics
- π Inscription protocol support