Welcome to the BlockchainDB documentation. This guide provides comprehensive information about the BlockchainDB project, its components, usage, and API reference.
- Introduction
- Installation
- Core Components
- Usage Examples
- API Reference
- Performance Considerations
- Testing
BlockchainDB is a specialized key-value database designed for blockchain applications. It provides efficient storage and retrieval of data with features specifically tailored for blockchain use cases.
BlockchainDB is written in Go and can be installed using Go modules:
go get github.com/AccumulateNetwork/BlockchainDBBlockchainDB consists of several core components:
KVShard- the main database interface: a sharded store ofKV2instances, each with an immutable (Perm) and a mutable (Dyna) layerSegmentStore- the storage layer both layers are built on: sealed, hashed segments that double as the sync transport. See Segments as storage- Buffered File (BFile) - Efficient file I/O operations
- Bloom Filter - Efficient membership testing
The design notes in design/ are the current description of how the database works:
See the examples directory for code samples demonstrating how to use BlockchainDB.
Detailed API documentation for each component can be found in the API Reference section.
For information about optimizing performance and understanding the trade-offs in different usage scenarios, see the Performance Guide.
For information about the testing approach used in BlockchainDB, including what works well and areas for improvement, see the Testing Documentation.