v2.0.0
V2 changes:
- Ability to bootstrap from a remote full firehose endpoint
- Pruning of lightproof-db
- support for state history plugin (SHIP)
Instructions
Clone the repo and install dependencies
git clone https://github.com/CryptoMechanics/lightproof-db.git
cd lightproof-db
git checkout v2.0.0
npm install
Configuration
-
cp .env.example .env -
edit the
.envfile variables
# host port to use for http (consumed by ibc-proof-server)
PORT=8285
# Used to get required blocks for bootstapping lightproof-db from a full firehose
BOOTSTRAP=true
BOOT_GRPC_ADDRESS=eos.firehose.eosnation.io:9000
BOOT_GRPC_INSECURE=false
# block to bootstrap until, must be irreversible and HISTORY_PROVIDER must have the blocks after it
START_SYNC_HEIGHT=293690288
# firehose or ship
HISTORY_PROVIDER=firehose
# Firehose GRPC address and mode (if using firehose)
GRPC_ADDRESS=eos.firehose.eosnation.io:9000
GRPC_INSECURE=false
# SHIP websocket address (if using SHIP)
SHIP_WS=ws://localhost:8080
# EXPERIMENTAL - Automatically prune lightproof-db records that are PRUNING_CUTOFF blocks from last written block to the db
PRUNING_CUTOFF=0
# force indexing to start from a certain block
# FORCE_START_BLOCK=BLOCK_NUMBER
# DB_PATH="lightproof-data"
# FIREHOSE_SERVICE=v2
Run
node index.js
API
http://localhost:8285/status
http://localhost:8285/?blocks=20,21,22