Remove WatchedStorageSlots param and local chain.json

This commit is contained in:
nabarun 2022-05-13 17:25:31 +05:30
parent 4363bf5c07
commit b4a899cc8c
5 changed files with 22 additions and 27 deletions

View File

@ -20,7 +20,27 @@ make build
### Local Setup ### 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) * Change the following in [config file](./environments/config.toml)
@ -31,7 +51,7 @@ make build
ancient = "/path-to-local-geth-data/chaindata/ancient" ancient = "/path-to-local-geth-data/chaindata/ancient"
[ethereum] [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 chainID = 41337 # Same chain ID as in chain.json
[database] [database]
@ -112,7 +132,6 @@ An example config file:
includeTD = true includeTD = true
includeCode = true includeCode = true
watchedAddresses = [] watchedAddresses = []
watchedStorageKeys = []
[log] [log]
file = "" file = ""

View File

@ -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
}
}

View File

@ -99,12 +99,6 @@ func setupPreRunRanges() []sd.RangeRequest {
addrs[i] = common.HexToAddress(addrStr) addrs[i] = common.HexToAddress(addrStr)
} }
preRunParams.WatchedAddresses = addrs 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 var rawRanges []blockRange
viper.UnmarshalKey("prerun.ranges", &rawRanges) viper.UnmarshalKey("prerun.ranges", &rawRanges)
blockRanges := make([]sd.RangeRequest, len(rawRanges)) blockRanges := make([]sd.RangeRequest, len(rawRanges))

View File

@ -23,7 +23,6 @@
includeTD = true includeTD = true
includeCode = true includeCode = true
watchedAddresses = [] watchedAddresses = []
watchedStorageKeys = []
[log] [log]
file = "" file = ""

View File

@ -25,7 +25,6 @@
includeTD = true includeTD = true
includeCode = true includeCode = true
watchedAddresses = [] watchedAddresses = []
watchedStorageKeys = []
[log] [log]
file = "" file = ""