0.0.1-beta.1 • Published 5 years ago

@openstfoundation/openst-block-scanner v0.0.1-beta.1

Weekly downloads
-
License
LGPL-3.0
Repository
github
Last release
5 years ago

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.

0.0.1-beta.66

5 years ago

0.0.1-beta.65

5 years ago

0.0.1-beta.64

5 years ago

0.0.1-beta.63

5 years ago

0.0.1-beta.62

5 years ago

0.0.1-beta.61

5 years ago

0.0.1-beta.60

5 years ago

0.0.1-beta.59

5 years ago

0.0.1-beta.58

5 years ago

0.0.1-beta.57

5 years ago

0.0.1-beta.56

5 years ago

0.0.1-beta.55

5 years ago

0.0.1-beta.54

5 years ago

0.0.1-beta.53

5 years ago

0.0.1-beta.52

5 years ago

0.0.1-beta.51

5 years ago

0.0.1-beta.50

5 years ago

0.0.1-beta.49

5 years ago

0.0.1-beta.48

5 years ago

0.0.1-beta.47

5 years ago

0.0.1-beta.46

5 years ago

0.0.1-beta.45

5 years ago

0.0.1-beta.44

5 years ago

0.0.1-beta.43

5 years ago

0.0.1-beta.42

5 years ago

0.0.1-beta.41

5 years ago

0.0.1-beta.40

5 years ago

0.0.1-beta.39

5 years ago

0.0.1-beta.38

5 years ago

0.0.1-beta.37

5 years ago

0.0.1-beta.36

5 years ago

0.0.1-beta.35

5 years ago

0.0.1-beta.34

5 years ago

0.0.1-beta.33

5 years ago

0.0.1-beta.32

5 years ago

0.0.1-beta.31

5 years ago

0.0.1-beta.30

5 years ago

0.0.1-beta.29

5 years ago

0.0.1-beta.28

5 years ago

0.0.1-beta.27

5 years ago

0.0.1-beta.26

5 years ago

0.0.1-beta.25

5 years ago

0.0.1-beta.24

5 years ago

0.0.1-beta.23

5 years ago

0.0.1-beta.22

5 years ago

0.0.1-beta.21

5 years ago

0.0.1-beta.20

5 years ago

0.0.1-beta.19

5 years ago

0.0.1-beta.18

5 years ago

0.0.1-beta.17

5 years ago

0.0.1-beta.16

5 years ago

0.0.1-beta.15

5 years ago

0.0.1-beta.14

5 years ago

0.0.1-beta.13

5 years ago

0.0.1-beta.12

5 years ago

0.0.1-beta.11

5 years ago

0.0.1-beta.10

5 years ago

0.0.1-beta.9

5 years ago

0.0.1-beta.8

5 years ago

0.0.1-beta.7

5 years ago

0.0.1-beta.6

5 years ago

0.0.1-beta.5

5 years ago

0.0.1-beta.4

5 years ago

0.0.1-beta.3

5 years ago

0.0.1-beta.2

5 years ago

0.0.1-beta.1

5 years ago