Blockchain is a topic that's talked about in every industry throughout the globe. It's decentralized and secure nature makes it a great use case for future innovation and development. In order to leverage any blockchain architecture, the end user needs to be able to verify data in a decentralised fashion and not rely on centralized entities such as Google to supply the information that sits on the blockchain.
Webinar Recording here:
https://www.youtube.com/watch?v=Jb-EgQG3F2k&t=0s&list=PLWbHc_FXPo2jN8cLhwLg7frCx6fJ-GPwM&index=2
3. POA Network
POA Network. 2018
|> Independent Network with a unique state
|> Ethereum Sidechain
|> 2nd Layer Scalability Solution
|> Production Bridges released in April 2018 connecting POA
to Ethereum Network
5. What is BlockScout
POA Network. 2018
|> Open Source EVM Block Explorer
|> Tool for analyzing blockchains
|> Read and Write (WIP) Smart Contract functions
6. Why we built it
POA Network. 2018
|> Etherscan is not available to sidechains/forks
|> Source code is not public
|> Decentralized solution to view the blockchain
|> Off-chain data is not available to the public
12. Umbrella Applications
POA Network. 2018
1. block_scount_web - front end UI/UX
2. ethereum_jsonrpc - Ethereum JSON RPC client
3. explorer - import processes to Postgres or ETS
4. Indexer - Fetches data from the blockchain
13. POA Network. 2018
Realtime Indexer
Looks for new blocks being added
to the blockchain. Fetches and
imports the data.
Catch-up Indexer
Works from the tip of the chain and works
backwards.
14. Realtime Indexer
POA Network. 2018
apps/indexer/lib/indexer/block/realtime/fetcher.ex
@impl GenServer
def handle_info(
{subscription, {:ok, %{"number" => quantity}}},
%__MODULE__{
block_fetcher: %Block.Fetcher{} = block_fetcher,
subscription: %Subscription{} = subscription,
previous_number: previous_number
} = state
)
when is_binary(quantity) do
number = quantity_to_integer(quantity)
start_fetch_and_import(number, block_fetcher, previous_number)
15. Catchup Indexer
POA Network. 2018
apps/indexer/lib/indexer/block/catchup/fetcher.ex
# realtime indexer gets the current latest block
first = latest_block_number - 1
last = 0
missing_ranges = Chain.missing_block_number_ranges(first..last)
range_count = Enum.count(missing_ranges)
missing_block_count =
missing_ranges
|> Stream.map(&Enum.count/1)
|> Enum.sum()
Logger.debug(fn ->
"#{missing_block_count} missed blocks in #{range_count} ranges between #{first} and #{last}"
end)
17. Ethereum JSON RPC Client
POA Network. 2018
|> Receives requests from the indexer
|> Sends Requests to the blockchain
|> Receives data back
|> Maps and prepares the data for import
|> Final data is sent to the Explorer App for Import
18. Ethereum Client Processes
POA Network. 2018
|> eth_getBlockByNumber - returns information related to a block
|> eth_getTransactionReceipt - returns the receipt of a transaction by transaction hash
|> extract token transfers - fetch the token balances by the contract address
|> logs/events
|> eth_getBalance - returns the balance of given address at a given block number
Client Specific Calls
|> Parity - trace_replayTransaction - fetches internal transactions for Parity
|> Geth - debug_traceTransaction - fetches internal transactions for Geth
19. Explorer Umbrella App
POA Network. 2018
|> Handles all the calls to/from Postgres
|> Handles all outgoing API calls (coin prices)
|> Manages accounts (admin/users)
|> Handles ETS tables (Erlang Term Storage)
20. Block Scout Web Umbrella App
POA Network. 2018
|> Frontend
|> Real-time Events
|> GraphQL
|> RPC API
|> Contract Verification and Interaction
28. Data Export
POA Network. 2018
|> Download Transactions via CSV
|> Download Tokens via CSV
|> Download Balance History via CSV
29. Other Roadmap Items
POA Network. 2018
|> GraphQL
|> ERC721 Data Attribute Support
|> Decode Transaction Input by the Contract ABI
|> Decode Logs by the Contract ABI