Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
blockscout/apps/explorer
Luke Imhoff 9880ae72ce Use sequence for log factory index to prevent collisions 6 years ago
..
benchmarks/explorer/chain Denormalize blocks.number into transasctions.block_number 7 years ago
config Eliminate unused statistics context and gen_server and move statistics function into Chain context. 6 years ago
lib token_id needs to be able to hold 14251919818366649780 6 years ago
priv token_id needs to be able to hold 14251919818366649780 6 years ago
test Use sequence for log factory index to prevent collisions 6 years ago
.sobelow-conf Add code_compiler to sobelow ignored files 7 years ago
README.md Replace POA Explorer with Blockscout 6 years ago
coveralls.json Use configuration to conditionally start processes (#178) 7 years ago
mix.exs Replace poanetwork/poa-explorer urls with poanetwork/blockscout 6 years ago
package-lock.json Replace poanetwork/poa-explorer urls with poanetwork/blockscout 6 years ago
package.json Replace poanetwork/poa-explorer urls with poanetwork/blockscout 6 years ago

README.md

BlockScout

This is a tool for inspecting and analyzing the POA Network blockchain.

Machine Requirements

  • Erlang/OTP 20.2+
  • Elixir 1.5+
  • Postgres 10.0

Required Accounts

  • Github for code storage

Setup Instructions

Development

To get BlockScout up and running locally:

  • Set up some default configuration with: $ cp config/dev.secret.exs.example config/dev.secret.exs
  • Install dependencies with $ mix do deps.get, local.rebar, deps.compile, compile
  • Create and migrate your database with $ mix ecto.create && mix ecto.migrate
  • Run IEx (Interactive Elixir) to access the index and explore: $ iex -S mix

Testing

  • Format the Elixir code: $ mix format
  • Run the test suite with coverage: $ mix coveralls.html
  • Lint the Elixir code: $ mix credo --strict
  • Run the dialyzer: mix dialyzer --halt-exit-status
  • Check the Elixir code for vulnerabilities: $ mix sobelow --config

Variant and Chain

By default, mox will be used to mock the EthereumJSONRPC.Transport and EthereumJSONRPC.HTTP behaviours. The mocked behaviours returns differ based on the EthereumJSONRPC.Variant.

EthereumJSONRPC.Variant EthereumJSONRPC.Transport EthereumJSONRPC.HTTP url Command Usage(s)
EthereumJSONRPC.Parity EthereumJSONRPC.Mox EthereumJSONRPC.HTTP.Mox N/A mix test Local, circleci/config.yml test_parity_mox job
EthereumJSONRPC.Parity EthereumJSONRPC.HTTP EthereumJSONRPC.HTTP.HTTPoison https://trace-sokol.poa.network ETHEREUM_JSONRPC_VARIANT=EthereumJSONRPC.Parity ETHEREUM_JSONRPC_TRANSPORT=EthereumJSONRPC.HTTP ETHEREUM_JSONRPC_HTTP=EthereumJSONRPC.HTTP.HTTPoison ETHEREUM_JSONRPC_HTTP_URL=https://sokol-trace.poa.network mix test --exclude no_parity .circleci/config.yml test_parity_http job
EthereumJSONRPC.Geth EthereumJSONRPC.Mox EthereumJSONRPC.HTTP.Mox N/A ETHEREUM_JSONRPC_VARIANT=EthereumJSONRPC.Geth mix test --exclude no_geth .circleci/config.yml test_geth_http job
EthereumJSONRPC.Geth EthereumJSONRPC.HTTP EthereumJSONRPC.HTTP.HTTPoison https://mainnet.infura.io/8lTvJTKmHPCHazkneJsY ETHEREUM_JSONRPC_VARIANT=EthereumJSONRPC.Geth ETHEREUM_JSONRPC_TRANSPORT=EthereumJSONRPC.HTTP ETHEREUM_JSONRPC_HTTP=EthereumJSONRPC.HTTP.HTTPoison ETHEREUM_JSONRPC_HTTP_URL=https://mainnet.infura.io/8lTvJTKmHPCHazkneJsY mix test --exclude no_geth .circleci/config.yml test_geth_http job

Benchmarking

Explorer.Chain.recent_collated_transactions/0

  • Reset the test database: MIX_ENV=test mix do ecto.drop, ecto.create, ecto.migrate
  • Change tag in benchmarks/explorer/chain/recent_collated_transactions.exs to a new value, so that it will compare against the old values saved in benchmarks/explorer/chain/recent_collated_transactions.benchee
  • Run the benchmark: MIX_ENV=test mix run benchmarks/explorer/chain/recent_collated_transactions.exs