Calling getrawmempool with true is slow because the node needs to pull all tx mempool details before returning anything. This change instead calls getrawmempool with false, followed by individual requests for tx mempool entries which we submit in parallel up to the configured concurrency limit. This provides some safety against running into the RPC timeout that was previously common (when calling getrawmempool(true)) with large mempools. In addition to greater reliability in large-mempool scenarios, this change significantly improves the performance of the /unconfirmed-tx page in particular - because that page only cares about 20 tx mempool entries at a time; previously we were waiting for the node to query all mempool tx entries and throwing away the vast majority of the returned data.
Fixes#127
Move closer to the original vision of supporting any address-querying implementation desired. Current options include ElectrumX (as before) and now blockchain.com and blockcypher.com since they were easy to support and are publicly/easily available (though ridiculously neither is yet to support bc1 addresses).
- new env var option BTCEXP_ADDRESS_API, value can be electrumx, blockchain.com, blockcypher.com
- update ElectrumX client connect to request v1.4 of API as all clients are now supposed to do
- misc frontend improvements/cleanup for addresses
- support for configurable RPC concurrency level (default 10, to be under bitcoind default "rpcworkqueue=16")
- queue up requests to prevent overloading RPC work queue of bitcoind
- simplify / cleanup rpcApi
- pull in chart.js and add integrity attribute
- move common tx-stats code to utils
- use bootstrap progress bars for block fullness in blocks-lists (moving away from radial progress which includes too much css and can be finicky)
- clean / reorg frontend code for graphs and homepage network summary
- configure electrumX servers with the same mechanisms as everything else
- include _PORT and _ELECTRUMX_SERVERS configs in .env-sample
- drop support for overriding configs via app/credentials.js, and use that filename for the new, dynamic, env-based credentials config file
This makes the protocol (either `tcp` or `tls`) for the electrum server
configurable, to allow communicating with an electrum server without tls
encryption.
before this change, searching for a 64-char string that didn't correspond to a block hash would fail due to lack of proper error handling on the RpcError response when running the interpret-string-as-blockhash step
- in tx history, request/display all inputs to get correct gain/loss values
- cross referencing for txid history from electrum
- include genesis coinbase values for genesis coinbase output address (electrum ignores the genesis coinbase TX and +50 value, but for consistency with the rest of this tool they're included)
- banner describing the electrum trust model
- ui tweaks including showing gain/loss for each address tx history item