forked from erigontech/erigon
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from bitfinity-network/use_incremental_trie_up…
…date Use incremental trie update
- Loading branch information
Showing
7 changed files
with
119 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Introduction | ||
|
||
Block importer is a process that periodically polls the blocks from the EVMC canister and writes it into a file-based erigon db. It can be used to launch a blockhain explorer that introspects the EMVC blockchain. | ||
|
||
The code of the blockimporter is in `cmd/blockimporter`. | ||
|
||
# Archiving historical data | ||
|
||
``` | ||
blockimporter [--evm <EVMC_CANISTER_URL>] [--db <DATABASE_PATH>] [--secondary-blocks-url <PATH TO A SECONDARY SOURCE OF BLOCKS>] | ||
``` | ||
|
||
# Serving rpcdaemon (EVM JSON RPC) | ||
|
||
You can use rpcdaemon to setup an endpoint with JSON RPC server to access the blockchain state from blockimporter. | ||
|
||
To build the project just run in the project folder. | ||
|
||
``` | ||
git checkout origin/evmc_importer | ||
make | ||
``` | ||
|
||
The binary artifacts can be found in `build/bin` folder. | ||
|
||
Now you can run two processes together sharing the same Db path: | ||
|
||
``` | ||
build/bin/blockimporter --evm <EVMC_CANISTER_URL> --db <DB_PATH> &\ | ||
build/bin/rpcdaemon --datadir <DB_PATH> --http.corsdomain * --http.api=eth,erigon,ots | ||
``` | ||
|
||
In this case the JSON RPC API can be accessed by address localhost:8545 (which is a default setting for the `rpcdaemon` that can be changed by passing `--http.port` argument). For more options run `build/bin/rpcdaemon --help` | ||
|
||
# Setting up the otterscan block explorer | ||
|
||
Otterscan can be run with `blockimporter` using the integration via rpcdaemon: | ||
|
||
``` | ||
build/bin/blockimporter --evm <EVMC_CANISTER_URL> --db <DB_PATH> &\ | ||
build/bin/rpcdaemon --datadir <DB_PATH> --http.corsdomain * --http.api=eth,erigon,ots &\ | ||
docker run --rm -p 5100:80 --name otterscan -d --env ERIGON_URL=localhost:8545 otterscan/otterscan:v1.29.0 | ||
``` | ||
|
||
Another option is to us the docker-compose file: | ||
|
||
``` | ||
cd docker | ||
mkdir ./db | ||
chmod 777 ./db | ||
docker-compose up | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters