Ocean blockchain explorer using MongoDB. Built with Node.js, express, bootstrap-v4.
- List of recent blocks
- Browse blocks by height, in ascending or descending order
- View block details
- View transaction details, with navigation "backward" via spent transaction outputs
- View raw JSON output used to generate most pages
- Search to directly navigate to transactions or blocks
- Mempool summary, showing unconfirmed transaction counts by fee level
Install Ocean with full transaction indexing enabled. Connect the Ocean node to the CommerceBlock blockchain.
Install MongoDB. Start the mongod daemon.
- Clone this repo
npm installto install all required dependencies- Specify connection info for
ocean,mongoandattestation APIin env.js - Sync the database with the blockchain by running the script
scripts/dbbuilder.js- Run using
scripts/dbbuilder.js init clear- Clear all collections/indices
- Load all blockchain data from genesis block to latest block
- Run using
scripts/dbbuilder.js init- Find latest block stored from the Block collection
- Continue loading blockchain data up to latest block
- To be used in case initial loading failed and need to continue from where it stopped
- Run using
scripts/dbbuilder.js check- Go through all data from genesis block to latest block and store anything that is missing
- Run using
scripts/dbbuilder.js update- Find latest block stored from the Info collection
- Load latest blockchain data
- To be used for quick periodic updates as it assumes that Info/Block are up to date
- Run using
npm startto start the local server- Navigate to http://127.0.0.1:3002/