An open source block explorer written in node.js.
- Demo - Demo site running with Razor; Market pages (mintpal, bittrex), Top 100 (received, balance)
- HeavyChain - HeavyCoin block explorer; Heavy reward/votes page, Top 100 (received, balance)
- node.js >= 0.10.28
- mongodb >= 2.6.0
- *coind
git clone https://github.com/custom/explorer explorer
cd explorer && npm install
cp ./settings.json.template ./settings.json
Make required changes in settings.json
npm start
note: mongod must be running to start the explorer
sync.js (located in scripts/) is used for updating the local databases. This script must be called from the explorers root directory.
Usage: node scripts/sync.js [database] [mode]
database: (required)
index [mode] Main index: coin info/stats, transactions & addresses
market Market data: summaries, orderbooks, trade history & chartdata
mode: (required for index database only)
update Updates index from last sync to current block
check checks index for (and adds) any missing transactions/addresses
reindex Clears index then resyncs from genesis to current block
notes:
* 'current block' is the latest created block when script is executed.
* The market database only supports (& defaults to) reindex mode.
* If check mode finds missing data(ignoring new data since last sync),
index_timeout in settings.json is set too low.
It is recommended to have this script launched via a cronjob at 1+ min intervals.
crontab
Example crontab; update index every minute and market data every 2 minutes
*/1 * * * * cd /path/to/explorer && /usr/bin/node scripts/sync.js index update > /dev/null 2>&1
*/2 * * * * cd /path/to/explorer && /usr/bin/node scripts/sync.js market > /dev/null 2>&1
custom Explorer is intended to be generic so it can be used with any wallet following the usual standards(PoW). The wallet must be running with atleast the following flags
-daemon -txindex
BTC: 168hdKA3fkccPtkxnX8hBrsxNubvk4udJi
Current version: 1.3.3
Next planned: 1.3.4
- Cryptsy (markets)
- PoS extraction page
1.4.0
- Additional database support
exceeding stack size
RangeError: Maximum call stack size exceeded
Nodes default stack size may be too small to index addresses with many tx's. If you experience the above error while running sync.js the stack size needs to be increased.
To determine the default setting run
node --v8-options | grep -B0 -A1 stack_size
To run sync.js with a larger stack size launch with
node --stack-size=[SIZE] scripts/sync.js index update
Where [SIZE] is an integer higher than the default.
note: SIZE will depend on which blockchain you are using, you may need to play around a bit to find an optimal setting
Copyright (c) 2014, custom Technology
Copyright (c) 2014, Luke Williams
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
Neither the name of custom Technology nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.