@openstfoundation/openst-block-scanner
Block scanner for ethereum-based block chains.
Last updated a year ago by alpeshvmodi .
LGPL-3.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @openstfoundation/openst-block-scanner 
SYNC missed versions from official npm registry.

openst-block-scanner

Block scanner for ethereum-based block chains.

Different shard types

  • Shared tables:

    • Chain table.
    • Shard table.
    • Economy table.
    • ShardByBlock table.
    • ShardByEconomy table.
    • ShardByEconomyAddress table.
    • ShardByTransaction table.
  • Sharded tables:

    • Block table (sharded by block).
    • Economy Address Balance table (sharded by economy).
    • Economy Address Transaction table (sharded by economy address).
    • Economy Address Transfer table (sharded by economy address).
    • Token Transfer table (sharded by transaction).
    • Transaction table (sharded by transaction).

Setup openst-block-scanner

  • You will need following for development environment setup.

  • Run following command to start Dynamo DB.

    > java -Djava.library.path=~/dynamodb_local_latest/DynamoDBLocal_lib/ -jar ~/dynamodb_local_latest/DynamoDBLocal.jar -sharedDb -dbPath 
    
  • Create all the shared tables by running the following script:

    export CONFIG_STRATEGY_PATH=$(pwd)/config.json
    node tools/initialSetup.js --configFile $CONFIG_STRATEGY_PATH
    
  • Run the addChain service and pass all the necessary parameters:

    export CONFIG_STRATEGY_PATH=$(pwd)/config.json
    node tools/addChain.js --chainId 1000 --networkId 1 --blockShardCount 2 --economyShardCount 2 --economyAddressShardCount 2 --transactionShardCount 2 --configFile $CONFIG_STRATEGY_PATH
    
    • Mandatory parameters: chainId, networkId, configFile
    • Optional parameters (defaults to 1): blockShardCount, economyShardCount, economyAddressShardCount, transactionShardCount

Running individual services.

  • Add shards for a new chain:
    export CONFIG_STRATEGY_PATH=$(pwd)/config.json
    node tools/addChain.js --chainId 1000 --networkId 1 --blockShardCount 1 --economyShardCount 1 --economyAddressShardCount 1 --transactionShardCount 1 --configFile $CONFIG_STRATEGY_PATH
    
  • Add block(sharded) shards for existing chain:
    export CONFIG_STRATEGY_PATH=$(pwd)/config.json
    node tools/createShards/byBlock.js --chainId 1000 --shardCount 1 --configFile $CONFIG_STRATEGY_PATH
    
  • Add chainId shard for existing chain:
    export CONFIG_STRATEGY_PATH=$(pwd)/config.json
    node tools/createShards/byChainId.js --chainId 1000 --configFile $CONFIG_STRATEGY_PATH
    
  • Add economy(sharded) shards for existing chain:
    export CONFIG_STRATEGY_PATH=$(pwd)/config.json
    node tools/createShards/byEconomy.js --chainId 1000 --shardCount 1 --configFile $CONFIG_STRATEGY_PATH
    
  • Add economy address(sharded) shards for existing chain:
    export CONFIG_STRATEGY_PATH=$(pwd)/config.json
    node tools/createShards/byEconomyAddress.js --chainId 1000 --shardCount 1 --configFile $CONFIG_STRATEGY_PATH
    
  • Add transactions(sharded) shards for existing chain:
    export CONFIG_STRATEGY_PATH=$(pwd)/config.json
    node tools/createShards/byTransaction.js --chainId 1000 --shardCount 1 --configFile $CONFIG_STRATEGY_PATH
    

Block Scanner Executable

  • Running Block Scanner.

    export CONFIG_STRATEGY_PATH=$(pwd)/config.json
    node executables/blockScanner.js --chainId 1000 --configFile $CONFIG_STRATEGY_PATH --startBlockNumber 0 --endBlockNumber 100
    

Running tests

  • Start Dynamo

    java -Djava.library.path=~/dynamodb_local_latest/DynamoDBLocal_lib/ -jar ~/dynamodb_local_latest/DynamoDBLocal.jar -sharedDb -dbPath .
    
  • Run tests with npm test.

Current Tags

  • 0.0.1-beta.66                                ...           beta (a year ago)
  • 0.0.1-beta.1                                ...           latest (a year ago)

66 Versions

  • 0.0.1-beta.66                                ...           a year ago
  • 0.0.1-beta.65                                ...           a year ago
  • 0.0.1-beta.64                                ...           a year ago
  • 0.0.1-beta.63                                ...           a year ago
  • 0.0.1-beta.62                                ...           a year ago
  • 0.0.1-beta.61                                ...           a year ago
  • 0.0.1-beta.60                                ...           a year ago
  • 0.0.1-beta.59                                ...           a year ago
  • 0.0.1-beta.58                                ...           a year ago
  • 0.0.1-beta.57                                ...           a year ago
  • 0.0.1-beta.56                                ...           a year ago
  • 0.0.1-beta.55                                ...           a year ago
  • 0.0.1-beta.54                                ...           a year ago
  • 0.0.1-beta.53                                ...           a year ago
  • 0.0.1-beta.52                                ...           a year ago
  • 0.0.1-beta.51                                ...           a year ago
  • 0.0.1-beta.50                                ...           a year ago
  • 0.0.1-beta.49                                ...           a year ago
  • 0.0.1-beta.48                                ...           a year ago
  • 0.0.1-beta.47                                ...           a year ago
  • 0.0.1-beta.46                                ...           a year ago
  • 0.0.1-beta.45                                ...           a year ago
  • 0.0.1-beta.44                                ...           a year ago
  • 0.0.1-beta.43                                ...           a year ago
  • 0.0.1-beta.42                                ...           a year ago
  • 0.0.1-beta.41                                ...           a year ago
  • 0.0.1-beta.40                                ...           a year ago
  • 0.0.1-beta.39                                ...           a year ago
  • 0.0.1-beta.38                                ...           a year ago
  • 0.0.1-beta.37                                ...           a year ago
  • 0.0.1-beta.36                                ...           a year ago
  • 0.0.1-beta.35                                ...           a year ago
  • 0.0.1-beta.34                                ...           a year ago
  • 0.0.1-beta.33                                ...           a year ago
  • 0.0.1-beta.32                                ...           a year ago
  • 0.0.1-beta.31                                ...           a year ago
  • 0.0.1-beta.30                                ...           a year ago
  • 0.0.1-beta.29                                ...           a year ago
  • 0.0.1-beta.28                                ...           a year ago
  • 0.0.1-beta.27                                ...           a year ago
  • 0.0.1-beta.26                                ...           a year ago
  • 0.0.1-beta.25                                ...           a year ago
  • 0.0.1-beta.24                                ...           a year ago
  • 0.0.1-beta.23                                ...           a year ago
  • 0.0.1-beta.22                                ...           a year ago
  • 0.0.1-beta.21                                ...           a year ago
  • 0.0.1-beta.20                                ...           a year ago
  • 0.0.1-beta.19                                ...           a year ago
  • 0.0.1-beta.18                                ...           a year ago
  • 0.0.1-beta.17                                ...           a year ago
  • 0.0.1-beta.16                                ...           a year ago
  • 0.0.1-beta.15                                ...           a year ago
  • 0.0.1-beta.14                                ...           a year ago
  • 0.0.1-beta.13                                ...           a year ago
  • 0.0.1-beta.12                                ...           a year ago
  • 0.0.1-beta.11                                ...           a year ago
  • 0.0.1-beta.10                                ...           a year ago
  • 0.0.1-beta.9                                ...           a year ago
  • 0.0.1-beta.8                                ...           a year ago
  • 0.0.1-beta.7                                ...           a year ago
  • 0.0.1-beta.6                                ...           a year ago
  • 0.0.1-beta.5                                ...           a year ago
  • 0.0.1-beta.4                                ...           a year ago
  • 0.0.1-beta.3                                ...           a year ago
  • 0.0.1-beta.2                                ...           a year ago
  • 0.0.1-beta.1                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |