forked from ethereum/go-ethereum
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/geth, cmd/utils/flags, eth/ethconfig: add http rpc timeout option (…
- Loading branch information
Martin
committed
Aug 28, 2021
1 parent
ffae204
commit 9fe21a2
Showing
11 changed files
with
155 additions
and
6 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,16 @@ | ||
package main | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestTomlHTTPRpcTimeout(t *testing.T) { | ||
var cfg gethConfig | ||
err := loadConfig("testdata/config.toml", &cfg) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
if cfg.Eth.HTTPRpcTimeout.Seconds() != 20 { | ||
t.Errorf("HTTPRpcTimeout should be 20 seconds") | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
[Eth] | ||
NetworkId = 1 | ||
SyncMode = "snap" | ||
EthDiscoveryURLs = ["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"] | ||
SnapDiscoveryURLs = ["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"] | ||
NoPruning = false | ||
NoPrefetch = false | ||
TxLookupLimit = 2350000 | ||
LightPeers = 100 | ||
UltraLightFraction = 75 | ||
DatabaseCache = 512 | ||
DatabaseFreezer = "" | ||
TrieCleanCache = 154 | ||
TrieCleanCacheJournal = "triecache" | ||
TrieCleanCacheRejournal = 3600000000000 | ||
TrieDirtyCache = 256 | ||
TrieTimeout = 3600000000000 | ||
SnapshotCache = 102 | ||
Preimages = false | ||
EnablePreimageRecording = false | ||
RPCGasCap = 50000000 | ||
RPCTxFeeCap = 1e+00 | ||
HTTPRpcTimeout = 20000000000 | ||
|
||
[Eth.Miner] | ||
GasFloor = 8000000 | ||
GasCeil = 8000000 | ||
GasPrice = 1000000000 | ||
Recommit = 3000000000 | ||
Noverify = false | ||
|
||
[Eth.Ethash] | ||
CacheDir = "ethash" | ||
CachesInMem = 2 | ||
CachesOnDisk = 3 | ||
CachesLockMmap = false | ||
DatasetDir = "/home/mr/.ethash" | ||
DatasetsInMem = 1 | ||
DatasetsOnDisk = 2 | ||
DatasetsLockMmap = false | ||
PowMode = 0 | ||
NotifyFull = false | ||
|
||
[Eth.TxPool] | ||
Locals = [] | ||
NoLocals = false | ||
Journal = "transactions.rlp" | ||
Rejournal = 3600000000000 | ||
PriceLimit = 1 | ||
PriceBump = 10 | ||
AccountSlots = 16 | ||
GlobalSlots = 5120 | ||
AccountQueue = 64 | ||
GlobalQueue = 1024 | ||
Lifetime = 10800000000000 | ||
|
||
[Eth.GPO] | ||
Blocks = 20 | ||
Percentile = 60 | ||
MaxPrice = 500000000000 | ||
IgnorePrice = 2 | ||
|
||
[Node] | ||
DataDir = ".dev" | ||
IPCPath = "geth.ipc" | ||
HTTPHost = "" | ||
HTTPPort = 8545 | ||
HTTPVirtualHosts = ["localhost"] | ||
HTTPModules = ["net", "web3", "eth"] | ||
WSHost = "" | ||
WSPort = 8546 | ||
WSModules = ["net", "web3", "eth"] | ||
GraphQLVirtualHosts = ["localhost"] | ||
|
||
[Node.P2P] | ||
MaxPeers = 50 | ||
NoDiscovery = false | ||
StaticNodes = [] | ||
TrustedNodes = [] | ||
ListenAddr = ":30303" | ||
EnableMsgEvents = false | ||
|
||
[Node.HTTPTimeouts] | ||
ReadTimeout = 30000000000 | ||
WriteTimeout = 30000000000 | ||
IdleTimeout = 120000000000 | ||
|
||
[Metrics] | ||
HTTP = "127.0.0.1" | ||
Port = 6060 | ||
InfluxDBEndpoint = "http://localhost:8086" | ||
InfluxDBDatabase = "geth" | ||
InfluxDBUsername = "test" | ||
InfluxDBPassword = "test" | ||
InfluxDBTags = "host=localhost" |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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