• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..13-May-2020-

cmd/dbtool/H13-May-2020-967654

ffldb/H13-May-2020-7,3784,462

internal/treap/H13-May-2020-3,0061,931

testdata/H03-May-2022-

README.mdH A D13-May-20202.3 KiB5842

doc.goH A D13-May-20203.9 KiB921

driver.goH A D13-May-20203 KiB9044

driver_test.goH A D13-May-20204.2 KiB13786

error.goH A D13-May-20206.9 KiB19870

error_test.goH A D13-May-20202.7 KiB9881

example_test.goH A D13-May-20205.4 KiB17889

export_test.goH A D13-May-2020640 182

interface.goH A D13-May-202021.2 KiB46755

log.goH A D13-May-2020898 3819

README.md

1database
2========
3
4[![Build Status](http://img.shields.io/travis/btcsuite/btcd.svg)](https://travis-ci.org/btcsuite/btcd)
5[![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
6[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/btcsuite/btcd/database)
7
8Package database provides a block and metadata storage database.
9
10Please note that this package is intended to enable btcd to support different
11database backends and is not something that a client can directly access as only
12one entity can have the database open at a time (for most database backends),
13and that entity will be btcd.
14
15When a client wants programmatic access to the data provided by btcd, they'll
16likely want to use the [rpcclient](https://github.com/btcsuite/btcd/tree/master/rpcclient)
17package which makes use of the [JSON-RPC API](https://github.com/btcsuite/btcd/tree/master/docs/json_rpc_api.md).
18
19However, this package could be extremely useful for any applications requiring
20Bitcoin block storage capabilities.
21
22The default backend, ffldb, has a strong focus on speed, efficiency, and
23robustness.  It makes use of leveldb for the metadata, flat files for block
24storage, and strict checksums in key areas to ensure data integrity.
25
26## Feature Overview
27
28- Key/value metadata store
29- Bitcoin block storage
30- Efficient retrieval of block headers and regions (transactions, scripts, etc)
31- Read-only and read-write transactions with both manual and managed modes
32- Nested buckets
33- Iteration support including cursors with seek capability
34- Supports registration of backend databases
35- Comprehensive test coverage
36
37## Installation and Updating
38
39```bash
40$ go get -u github.com/btcsuite/btcd/database
41```
42
43## Examples
44
45* [Basic Usage Example](http://godoc.org/github.com/btcsuite/btcd/database#example-package--BasicUsage)
46  Demonstrates creating a new database and using a managed read-write
47  transaction to store and retrieve metadata.
48
49* [Block Storage and Retrieval Example](http://godoc.org/github.com/btcsuite/btcd/database#example-package--BlockStorageAndRetrieval)
50  Demonstrates creating a new database, using a managed read-write transaction
51  to store a block, and then using a managed read-only transaction to fetch the
52  block.
53
54## License
55
56Package database is licensed under the [copyfree](http://copyfree.org) ISC
57License.
58