kaspad/database
Ori Newman 6d765f58ba [NOD-570] Separate genesis variables for different netwroks (#578)
* [NOD-570] Separate genesis variables for different netwroks

* [NOD-570] Make Testnet genesis

* [NOD-570] Make simnet and regtest genesis

* [NOD-570] Remake devnet genesis

* [NOD-570] Rename regNet -> regTest testnet->testNet

* [NOD-570] Change network names to one word instead of camel case

* [NOD-570] Change network names to one word instead of camel case

* [NOD-570] Fix test names

* [NOD-570] Fix TestGHOSTDAG

Co-authored-by: Dan Aharoni <dereeno@protonmail.com>
2020-01-08 18:42:47 +02:00
..
2020-01-02 16:57:43 +02:00
2019-12-16 17:37:17 +02:00

database

ISC License GoDoc

Package database provides a block and metadata storage database.

Please note that this package is intended to enable kaspad to support different database backends and is not something that a client can directly access as only one entity can have the database open at a time (for most database backends), and that entity will be kaspad.

When a client wants programmatic access to the data provided by kaspad, they'll likely want to use the rpcclient package which makes use of the JSON-RPC API.

The default backend, ffldb, has a strong focus on speed, efficiency, and robustness. It makes use of leveldb for the metadata, flat files for block storage, and strict checksums in key areas to ensure data integrity.

Feature Overview

  • Key/value metadata store
  • Kaspa block storage
  • Efficient retrieval of block headers and regions (transactions, scripts, etc)
  • Read-only and read-write transactions with both manual and managed modes
  • Nested buckets
  • Iteration support including cursors with seek capability
  • Supports registration of backend databases
  • Comprehensive test coverage