From b4a899cc8cbc7fa9fa45b9fe3ede23a76e032e2a Mon Sep 17 00:00:00 2001 From: nabarun Date: Fri, 13 May 2022 17:25:31 +0530 Subject: [PATCH] Remove WatchedStorageSlots param and local chain.json --- README.md | 25 ++++++++++++++++++++++--- chain.json | 16 ---------------- cmd/util.go | 6 ------ environments/config.toml | 1 - environments/example.toml | 1 - 5 files changed, 22 insertions(+), 27 deletions(-) delete mode 100644 chain.json diff --git a/README.md b/README.md index 545d7c1..7fce5cf 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,27 @@ make build ### Local Setup -* Change values in [chain config file](./chain.json) according to chain config in genesis json file used by local geth. +* Create a chain config file `chain.json` according to chain config in genesis json file used by local geth. + + Example: + ```json + { + "chainId": 41337, + "homesteadBlock": 0, + "eip150Block": 0, + "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "eip155Block": 0, + "eip158Block": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "istanbulBlock": 0, + "clique": { + "period": 5, + "epoch": 30000 + } + } + ``` * Change the following in [config file](./environments/config.toml) @@ -31,7 +51,7 @@ make build ancient = "/path-to-local-geth-data/chaindata/ancient" [ethereum] - chainConfig = "./chain.json" # Path to custom chain config file + chainConfig = "./chain.json" # Path to custom chain config file chainID = 41337 # Same chain ID as in chain.json [database] @@ -112,7 +132,6 @@ An example config file: includeTD = true includeCode = true watchedAddresses = [] - watchedStorageKeys = [] [log] file = "" diff --git a/chain.json b/chain.json deleted file mode 100644 index d2ee2f5..0000000 --- a/chain.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "chainId": 41337, - "homesteadBlock": 0, - "eip150Block": 0, - "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "clique": { - "period": 5, - "epoch": 30000 - } -} diff --git a/cmd/util.go b/cmd/util.go index e2b650b..7a5e4b8 100644 --- a/cmd/util.go +++ b/cmd/util.go @@ -99,12 +99,6 @@ func setupPreRunRanges() []sd.RangeRequest { addrs[i] = common.HexToAddress(addrStr) } preRunParams.WatchedAddresses = addrs - var storageKeyStrs []string - viper.UnmarshalKey("prerun.params.watchedStorageKeys", &storageKeyStrs) - keys := make([]common.Hash, len(storageKeyStrs)) - for i, keyStr := range storageKeyStrs { - keys[i] = common.HexToHash(keyStr) - } var rawRanges []blockRange viper.UnmarshalKey("prerun.ranges", &rawRanges) blockRanges := make([]sd.RangeRequest, len(rawRanges)) diff --git a/environments/config.toml b/environments/config.toml index 589d0b6..b505609 100644 --- a/environments/config.toml +++ b/environments/config.toml @@ -23,7 +23,6 @@ includeTD = true includeCode = true watchedAddresses = [] - watchedStorageKeys = [] [log] file = "" diff --git a/environments/example.toml b/environments/example.toml index 300175a..22aa232 100644 --- a/environments/example.toml +++ b/environments/example.toml @@ -25,7 +25,6 @@ includeTD = true includeCode = true watchedAddresses = [] - watchedStorageKeys = [] [log] file = ""