Parallelizable statediffing process that extracts from an offline levelDB
Go to file
Ian Norden 0c630b6e99
Merge pull request #77 from vulcanize/release-v2.0.0
update to use v1.10.15-statediff-2.0.0 geth
2022-01-26 09:27:35 -06:00
.github/workflows Use commit hash to build docker image and publish. 2021-12-23 19:53:53 +05:30
cmd bump version, update license year 2021-12-27 11:49:10 -06:00
environments sanitized prod config 2021-10-27 14:44:37 -05:00
monitoring Add grafana dashboard. 2021-11-01 19:39:00 +05:30
pkg enable configuration of a prerun range by env variable; prerun only mode 2021-10-27 13:36:19 -05:00
version bump version 2022-01-26 09:26:18 -06:00
.gitignore go mod 2020-08-19 01:13:48 -05:00
docker-compose.yml begin docker stuff 2020-08-19 15:37:30 -05:00
Dockerfile Update Dockerfile 2021-10-27 19:57:19 -05:00
go.mod update to use v1.10.15-statediff-2.0.0 geth 2022-01-26 09:22:17 -06:00
go.sum update to use v1.10.15-statediff-2.0.0 geth 2022-01-26 09:22:17 -06:00
LICENSE cobra init 2020-08-18 23:27:37 -05:00
main.go cobra init 2020-08-18 23:27:37 -05:00
Makefile Makefile 2020-11-09 12:19:31 -06:00
README.md doc headers 2020-12-03 10:08:20 +08:00
startup_script.sh make startup_script.sh executable 2021-10-27 20:46:25 -04:00

eth-statediff-service

Go Report Card

standalone statediffing service ontop of leveldb

Purpose:

Stand up a statediffing service directly on top of a go-ethereum leveldb instance. This service can serve historical state data over the same rpc interface as statediffing geth without needing to run a full node

Usage

serve

To serve state diffs over RPC:

eth-statediff-service serve --config=<config path>

Available RPC methods are:

  • statediff_stateTrieAt()
  • statediff_streamCodeAndCodeHash()
  • statediff_stateDiffAt()
  • statediff_writeStateDiffAt()

write

To write state diffs directly to a database:

eth-statediff-service write --config=<config path>

This depends on the database settings being properly configured.

Configuration

An example config file:

[leveldb]
    path = "/Users/user/Library/Ethereum/geth/chaindata"
    ancient = "/Users/user/Library/Ethereum/geth/chaindata/ancient"

[server]
    ipcPath = "~/.vulcanize/vulcanize.ipc"
    httpPath = "127.0.0.1:8545"

[write]
    ranges = [[1, 2], [3, 4]]
[write.params]
    IntermediateStateNodes   = true
    IntermediateStorageNodes = false
    IncludeBlock             = true
    IncludeReceipts          = true
    IncludeTD                = true
    IncludeCode              = false

[statediff]
    workers = 4

[log]
    file = "~/.vulcanize/statediff.log"
    level = "info"

[eth]
    chainID = 1