Skip to content

Isolate indexes #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Feb 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
.env
data/
node_modules/
package-lock.json
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@

An external [bitcoind](https://github.com/bitcoin/bitcoin) index management service.


## Indexes
By default, this module maintains script, spents, transaction block, txout and block indexes.
By default, this module includes a script, spents, transaction block, txout, tx, median time past and fee indexes.
The module uses `getblockheader`, `getblockhash`, `getblock` and `getbestblockhash` RPC methods for blockchain synchronization; and `getrawmempool` for mempool synchronization.

`-txindex` is not required for this module; but is still useful for individual transaction lookup (aka `txHex`).
See https://github.com/bitcoinjs/indexd/issues/6 if you think an independent transaction index should be added.


## Usage
Assumes [`yajrpc`](https://github.com/dcousens/yajrpc) is used for the bitcoind RPC; and [`leveldown`](https://github.com/level/leveldown) for the database.
See the [example](#example) for usage.
Assumes [`yajrpc`](https://github.com/dcousens/yajrpc) is used for the provided bitcoind RPC object; and [`leveldown`](https://github.com/level/leveldown) for the database object.
See the [example server](https://github.com/bitcoinjs/private-bitcoin) for an example of an express HTTP API using `indexd`.


### Conventions
When conveying block height, `-1` represents unconfirmed (in the mempool).
`null` represents unknown or missing.

## Example
The [`example/`](https://github.com/bitcoinjs/indexd/tree/master/example) is a functioning [express](https://www.npmjs.com/package/express) REST HTTP API server.
For example, the height of the transaction `ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff` in the Bitcoin blockchain is `null` (it doesn't exist!).

* Requires a running `bitcoind` node
* with `-txindex`, and
* ZMQ (`-zmqpubhashtx=tcp://127.0.0.1:30001 -zmqpubhashblock=tcp://127.0.0.1:30001`)
* Assumes `--testnet` ports/configuration, see `example/.env` for configuration.
* Change `-rpcworkqueue` from `16` to `32` for increased throughput [in some scenarios]

## License [ISC](LICENSE)
## LICENSE [ISC](LICENSE)
158 changes: 0 additions & 158 deletions adapter.js

This file was deleted.

Loading