-
- A SQL template to initialize the DB structure.
-
- A node.js script to index block/uncle/transaction/contract DB into MariaDB from geth, as
blocks
,uncles
,transactions
,contracts
table. - Includes stationkeeper functionality, which keep track the latest block and index them.
- A node.js script to index block/uncle/transaction/contract DB into MariaDB from geth, as
-
- A nods.js script to iterate through all records in the
transactions
table, and records 1st/last appearance on the chain of all accounts asaccounts
table.
- A nods.js script to iterate through all records in the
-
miner_block.js, miner_uncle.js
- Node.js scripts to iterate through the
blocks
anduncles
table to count mined blocks and uncles for every account.
- Node.js scripts to iterate through the
-
- A node.js script to look up through the tx record and fetch the list of accounts to be restored per block.
-
restorelist_all_from_states.js
- A node.js script to look up through the state write record fetch the list of accounts to be restored per block, according to tx record.
- Arguments
node restorelist_all_from_states.js epoch block_start block_end output_file_name
-
- Initialize state access DB and slot log DB.
-
- Parse dumped txsubstate file and index into the DB.
-
- DB wiper.
-
- The original genesis.json for ethereum mainnet.
- Node.js
- MySQL
- MariaDB
- Web3.js
- argparse
- Python 3
- PyMySQL
- web3.py
- TODO
- Install the requirements.
$ pip3 install pymysql web3
- Import the database scheme
- Asseme that DB user is user and DB name is ethereum.
$ mysql -u user ethereum < ethereum.sql
- Insert the state update logs into the DB.
- Assume that the state update logs are created for every 1000 block interval from the first to 10M blocks.
$ python3 txsubstate.py -s 1 -e 10000000 -d ./txsubstate -i 1000
- Fully sync the Geth client up to the latest block, by whatever method. (snap, full, full archive)
- Index block, uncles and tx receipts
- Set
geth_ipc_path
anddb_socket
,db_user
,db_pass
properly before running the code below.
- Set
$ node block_tx_contract.js