Crates.io | esplora-tapyrus |
lib.rs | esplora-tapyrus |
version | 0.4.1 |
source | src |
created_at | 2021-04-17 11:20:40.590056 |
updated_at | 2021-04-17 11:20:40.590056 |
description | An efficient re-implementation of Electrum Server in Rust |
homepage | https://github.com/chaintope/esplora-tapyrus |
repository | https://github.com/chaintope/esplora-tapyrus |
max_upload_size | |
id | 385715 |
size | 1,498,354 |
This is forked from Blockstream/electrs. So, features and specifications are almost same with original. You can find documents for extended specification for tapyrus here tapyrus doc.
API documentation is available here.
Documentation for the database schema and indexing process is available here.
Install Rust, Tapyrus Core (no txindex
needed) and the clang
and cmake
packages, then:
$ git clone https://github.com/chaintope/esplora-tapyrus && cd esplora-tapyrus
$ cargo run --release --bin electrs -- -vvvv --daemon-dir ~/.tapyrus/prod-1 --network-id 1
See electrs's original documentation for more detailed instructions. Note that our indexes are incompatible with electrs's and has to be created separately.
The indexes require 610GB of storage after running compaction (as of June 2020), but you'll need to have free space of about double that available during the index compaction process. Creating the indexes should take a few hours on a beefy machine with SSD.
To deploy with Docker, follow the instructions here.
For personal or low-volume use, you may set --lightmode
to reduce disk storage requirements
by roughly 50% at the cost of slower and more expensive lookups.
With this option set, raw transactions and metadata associated with blocks will not be kept in rocksdb
(the T
, X
and M
indexes),
but instead queried from tapyrusd on demand.
HTTP REST API in addition to the Electrum JSON-RPC protocol, with extended transaction information (previous outputs, spending transactions, script asm and more).
Extended indexes and database storage for improved performance under high load:
t
.O
.a
to enable by-prefix address search.X
.M
.With these new indexes, tapyrusd is no longer queried to serve user requests and is only polled periodically for new blocks and for syncing the mempool.
In addition to electrs's original configuration options, a few new options are also available:
--http-addr <addr:port>
- HTTP server address/port to listen on (default: 127.0.0.1:3000
).--lightmode
- enable light mode (see above)--cors <origins>
- origins allowed to make cross-site request (optional, defaults to none).--address-search
- enables the by-prefix address search index.--index-unspendables
- enables indexing of provably unspendable outputs.--utxos-limit <num>
- maximum number of utxos to return per address.--electrum-txs-limit <num>
- maximum number of txs to return per address in the electrum server (does not apply for the http api).--electrum-banner <text>
- welcome banner text for electrum server.Additional options with the liquid
feature:
--parent-network <network>
- the parent network this chain is pegged to.Additional options with the electrum-discovery
feature:
--electrum-hosts <json>
- a json map of the public hosts where the electrum server is reachable, in the server.features
format.--electrum-announce
- announce the electrum server on the electrum p2p server discovery network.See $ cargo run --release --bin electrs -- --help
for the full list of options.
MIT