Switching to BlueWallet-based ElectrumX connector which is a maintained fork of old ElectrumX connection code. Seems that some extra effort has been put into reconnecting and this also drops some manual error handling that my old code incorporated.
Stop using type=boolean for args via cli since they force the default value false. Rather, use the default-setting code in config.js for both cli args and env vars.
Also add some additional logging to help debugging issues like this in the future
- highlight coinbase spends
- highlight very old (5+ year) UTXO spends
To do this, when summarizing tx details store whether it's a coinbase spend and the time of input txs
Prefix keys with a data version (v0 currently) and a bitcoind node host:port indicator. This allows multiple btc-rpc-explorer instances (e.g. mainnet+testnet on same server) to share a single redis instance peacefully.
- RPC api now throws errors up to callers on RpcError results
- More consistent handling of errors from baseActionRouter
- Add some missing rejection handlers
- Tweak UI for display of errors
- Handle missing block data on /block pages (in UI) so that error info can be displayed cleanly (rather than the template error showing because data is missing)
- Cache key prefixing only for redis keys - this data is persistent across app executions, thus the need for versioning, and limiting prefixes to here avoids wasting app memory for in-memory cache-key prefixes
- Tiered caching when both memory and redis caching is active (memory cache tried first, fall back to redis cache, fall back to RPC)
- Cleaner setup/configuration of caches
- new tool /difficulty-history: show graph of diff changes over time for fun
- new "Network Summary" item: Block time for current difficulty epoch, with estimate of difficulty change for next epoch
- more resilient layouts for tools card on homepage and /tools page
- remove some unused code
- major memory usage improvements for loading txs with inputs: appropriate input-vouts are now extracted from their source txs and summarized (asm/hex are dropped since they're never used), rather than keeping the whole of input-txs in memory; this dramatically improves memory usage (and avoids crashing due to OOMEs), particularly when loading txs with "heavy" inputs (i.e. many, large input txs); this is relevant for /tx/TXID pages, and particularly important for the new /block-analysis pages which necessarily load many, many txs
- cache-key prefixes for coreApi's caching functionality: to avoid loading old-format data from a persistent cache and barfing on it
- several important code-reuse fixes: there were almost-duplicate chunks of code that were essentially calls to getRawTransactionWithInputs - now just use that function
- new minor /admin page for showing memory usage
- on homepage Network Summary: show full tx count (non abbreviated)
- use new domain everywhere
- new /tools landing page for tools
- include subsidy and fees in volume value in blocks lists (homepage and /blocks), for consistency
- reorganize and cleanup changelog entry for 2.0
- misc minor frontend work
- for huge tx: shrink input/output index numbers and don't include thousands separator
- move JSON displays into cards for UI consistency
- tons of frontend code consistency cleanup
- updated bootstrap with thinner column gutters (to avoid the col-lg-left/col-lg-right business I was hacking)
- remove npm links from demo homepage banner
- new /block-analysis tool for summarizing data for all tx within a given block
- include subsidy and tx fees in volume displays (on homepage network summary and on block details pages)
- misc minor styling and frontend ux tweaks
- /block-stats: more stats (totalfee, mediantime, txs, utxo_increase), 2-col layout, graphs in cards, checkboxes for toggling, reset checkbox state on page refresh, +-100 blocks instead of 70 for preconfigureds
- /tx-stats: graphs in cards, graph style/color consistency improvements
- /mining-summary: +-100 blocks instead of 70 for preconfigureds
- /rpc-browser: styling consistency/cleanup fixes
- /mempool-summary: getmempoolinfo data is made available but currently unused
- testnet: manual blockstats for genesis block (rpc returns error)
- couple of roadmap items
- /mempool-summary - switch to be a dynamic page with loading progress bar like /mining-summary and /block-stats
- more options for block ranges on /mining-summary and /block-stats
- "unsupported" alert on /block-stats for node versions below 0.17.0
- frontend improvements for dynamic pages to better display currency values (matching non-dynamic pages)
- re-order tools lists
- miner config for block #9 (satoshi)...for fun
- clean up spacing on homepage
- fix bug where miner info wasn't showing on tx pages
- Include "Volume (24hr)" in homepage summary
- Include block output volume in blocks list (0.17.0+)
- Show "%Full" in blocks lists (with fullness icon) instead of weight with progress bar
- Hide "Date" column on homepage blocks list (Age+TTM) is plenty for the recent blocks)
- Fix to pull UTXO set after RPC connection is established
- Fix for abbreviating "month" to "mo" instead of "m" which can be confused with minutes
- Tweak width of data columns on 1200 screens to avoid some wrapping of title labels
- More consistently "smallify" display of units
- Armor on block-content template for missing blockstats values (identified issue by looking at genesis block, added manual data for that block since RPC returns error, but armor is still probably valuable)
- Tweaks to timestamps "time ago" displays in several places trying to make more consistent and user friendly
- Explicit acknowledgement of "nonstandard" output type
* New data in "Summary" on Block pages (supported for bitcoind v0.17.0+)
* Fee percentiles
* Min / Max fees
* Input / Output counts
* Outputs total value
* UTXO count change
* Min / Max tx sizes
* Start of RPC API versioning support
Changelog additions:
* Optional querying of UTXO set summary
* Note: this is disabled by default to protect slow nodes. Set 'BTCEXP_SLOW_DEVICE_MODE' to false in your `.env` file to enjoy this feature.
* More data in homepage "Network Summary":
* Fee estimates (estimatesmartfee) for 1, 6, 144, 1008 blocks
* Hashrate estimate for 1+7 days
* New item for 'Chain Rewrite Days', using 7day hashrate
* New data based on optional UTXO set summary (see note above):
* UTXO set size
* Total coins in circulation
* Market cap
* Tweaks to data in blocks lists:
* Simpler timestamp formatting for easy reading
* Include "Time-to-Mine" (TTM) for each block (with green/red highlighting for "fast"/"slow" (<5min/>15min) blocks)
* Display average fee in sat/vB
* Add total fees display
* Demote display of "block size" value to hover
* Show weight in kWu instead of Wu
* Zero-indexing for tx inputs/outputs (#173)
* Labels for transaction output types
* Configurable UI "sub-header" links
* Tweaked styling
- Also lots of frontend code cleanup (moving to more consistent pug-style class designations)
* display chain/network in header if not mainnet
* indicate active chain/network in startup log
* specify which chain/network "fun" items apply to and only show them for that chain
* don't display exchange rates for testnet/regtest
* use block interval of 150 for regtest halving
* regtest hacks: since getblockchaininfo.blocks=0 on a default regtest node despite the genesis block existing, hack in a couple of places in order to display the genesis block
* fix /peers page to not throw error with no connections