Skip to content

honeycomb-Technologies/nectar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nectar 🍯

A Cardano blockchain indexer designed for TiDB's distributed architecture.

⚠️ Under Heavy Development

This project is in active development and not yet ready for production use. We're working on indexing the Cardano blockchain into TiDB to enable efficient querying of on-chain data.

What is Nectar?

Nectar indexes Cardano blockchain data into TiDB, making it queryable via SQL. It processes all eras from Byron to Conway, storing transactions, UTXOs, stake pools, delegations, and more.

Why TiDB?

TiDB offers unique advantages for blockchain data:

  • High Availability: No single point of failure. TiKV nodes replicate data across the cluster with Raft consensus
  • Auto-Sharding: Data automatically distributed across nodes without manual partitioning
  • TiFlash: Columnar storage engine for analytical queries on historical blockchain data
  • HTAP: Hybrid transactional/analytical processing - index new blocks while running complex analytics
  • Compressed Storage: TiKV's RocksDB backend efficiently compresses blockchain data
  • Online DDL: Schema changes without downtime as the blockchain evolves
  • Horizontal Scaling: Add nodes to handle growing blockchain data without re-architecting

Traditional databases require complex sharding schemes or struggle with the continuous growth of blockchain data. TiDB handles this transparently.

Current Status

  • Actively syncing Cardano mainnet
  • Processing all transaction types across all eras
  • Building comprehensive indexes for efficient queries
  • Implementing memory optimizations and performance improvements

Contributing

We welcome contributions! This is an open-source project and we're looking for help with:

  • Performance optimizations
  • Additional query indexes
  • Documentation improvements
  • Testing and bug reports
  • Feature suggestions

Please feel free to:

  • Open issues for bugs or feature requests
  • Submit pull requests
  • Join discussions about the project direction
  • Share your use cases and requirements

Development Setup

Requirements

  • Go 1.21+
  • TiDB cluster (or TiUP playground for testing)
  • Cardano node with local socket access
  • 8+ CPU cores, 16GB+ RAM recommended

Quick Start

  1. Clone the repository:
git clone https://github.com/honeycomb-tech/nectar.git
cd nectar
  1. Build:
go build -o nectar .
  1. Configure (create nectar.toml):
[database]
dsn = "root:password@tcp(localhost:4000)/nectar"

[cardano]
node_socket = "/path/to/node.socket"
network_magic = 764824073  # mainnet
  1. Run:
./nectar

Architecture

Nectar uses a modular processor architecture:

  • Block Processor: Orchestrates processing of each block
  • Transaction Processor: Handles all transaction types
  • Certificate Processor: Processes stake pool and delegation certificates
  • Asset Processor: Indexes native tokens and NFTs
  • Metadata Processor: Stores transaction metadata
  • Script Processor: Handles Plutus scripts

See PROJECT_STRUCTURE.md for detailed code organization.

License

Apache 2.0 - See LICENSE for details.

Contact


Built with ❤️ for the Cardano community

About

A Cardano Indexer designed for TiDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •