Skip to content

Instantly share code, notes, and snippets.

@O1ahmad
Created June 4, 2019 02:20
Show Gist options
  • Save O1ahmad/5887dae3cdf4620ca670e3b194d82cba to your computer and use it in GitHub Desktop.
Save O1ahmad/5887dae3cdf4620ca670e3b194d82cba to your computer and use it in GitHub Desktop.
Geth (Go Ethereum) - Example TOML config | `geth dumpconfig`
[Eth]
NetworkId = 1
SyncMode = "fast"
NoPruning = false
LightPeers = 100
DatabaseCache = 512
TrieCleanCache = 256
TrieDirtyCache = 256
TrieTimeout = 3600000000000
MinerGasFloor = 8000000
MinerGasCeil = 8000000
MinerGasPrice = 1000000000
MinerRecommit = 3000000000
MinerNoverify = false
EnablePreimageRecording = false
EWASMInterpreter = ""
EVMInterpreter = ""
[Eth.Ethash]
CacheDir = "ethash"
CachesInMem = 2
CachesOnDisk = 3
DatasetDir = "/Users/ahmadwilson/.ethash"
DatasetsInMem = 1
DatasetsOnDisk = 2
PowMode = 0
[Eth.TxPool]
Locals = []
NoLocals = false
Journal = "transactions.rlp"
Rejournal = 3600000000000
PriceLimit = 1
PriceBump = 10
AccountSlots = 16
GlobalSlots = 4096
AccountQueue = 64
GlobalQueue = 1024
Lifetime = 10800000000000
[Eth.GPO]
Blocks = 20
Percentile = 60
[Shh]
MaxMessageSize = 1048576
MinimumAcceptedPOW = 2e-01
RestrictConnectionBetweenLightClients = true
[Node]
DataDir = "/Users/ahmadwilson/Library/Ethereum"
IPCPath = "geth.ipc"
HTTPPort = 8545
HTTPVirtualHosts = ["localhost"]
HTTPModules = ["net", "web3", "eth", "shh"]
WSPort = 8546
WSModules = ["net", "web3", "eth", "shh"]
[Node.P2P]
MaxPeers = 25
NoDiscovery = false
BootstrapNodes = ["enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:30303", "enode://3f1d12044546b76342d59d4a05532c14b85aa669704bfe1f864fe079415aa2c02d743e03218e57a33fb94523adb54032871a6c51b2cc5514cb7c7e35b3ed0a99@13.93.211.84:30303", "enode://78de8a0916848093c73790ead81d1928bec737d565119932b98c6b100d944b7a95e94f847f689fc723399d2e31129d182f7ef3863f2b4c820abbf3ab2722344d@191.235.84.50:30303", "enode://158f8aab45f6d19c6cbf4a089c2670541a8da11978a2f90dbf6a502a4a3bab80d288afdbeb7ec0ef6d92de563767f3b1ea9e8e334ca711e9f8e2df5a0385e8e6@13.75.154.138:30303", "enode://1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082@52.74.57.123:30303", "enode://979b7fa28feeb35a4741660a16076f1943202cb72b6af70d327f053e248bab9ba81760f39d0701ef1d8f89cc1fbd2cacba0710a12cd5314d5e0c9021aa3637f9@5.1.83.226:30303"]
BootstrapNodesV5 = ["enode://06051a5573c81934c9554ef2898eb13b33a34b94cf36b202b69fde139ca17a85051979867720d4bdae4323d4943ddf9aeeb6643633aa656e0be843659795007a@35.177.226.168:30303", "enode://0cc5f5ffb5d9098c8b8c62325f3797f56509bff942704687b6530992ac706e2cb946b90a34f1f19548cd3c7baccbcaea354531e5983c7d1bc0dee16ce4b6440b@40.118.3.223:30304", "enode://1c7a64d76c0334b0418c004af2f67c50e36a3be60b5e4790bdac0439d21603469a85fad36f2473c9a80eb043ae60936df905fa28f1ff614c3e5dc34f15dcd2dc@40.118.3.223:30306", "enode://85c85d7143ae8bb96924f2b54f1b3e70d8c4d367af305325d30a61385a432f247d2c75c45c6b4a60335060d072d7f5b35dd1d4c45f76941f62a4f83b6e75daaf@40.118.3.223:30307"]
StaticNodes = []
TrustedNodes = []
ListenAddr = ":30303"
EnableMsgEvents = false
[Node.HTTPTimeouts]
ReadTimeout = 30000000000
WriteTimeout = 30000000000
IdleTimeout = 120000000000
[Dashboard]
Host = "localhost"
Port = 8080
Refresh = 5000000000
@gangadhar-sys
Copy link

in line no. 66
how i can allow multiple ports ?

ListenAddr = ":30303"

I have tried :
ListenAddr = [":30303",":60734",":25027",":61883"]

but got the error

@trungtnm
Copy link

I think you should use Nginx as reverse proxy for listening multiple ports and forward to geth listening port.

@ngMinhDan
Copy link

geth --gcmode full --syncmode full --http --http.api eth,web3,debug,net --http.addr 0.0.0.0 --ws --ws.addr 0.0.0.0 --ws.api eth,web3,debug,net --authrpc.jwtsecret /home/BACKEND/jwtsecret.hex [ IF you want dump config dumpconfig /home/config.toml ]

It works for me, if you want to run node by systemd unit : You can run with : geth --config /home/config.toml

@baeyf
Copy link

baeyf commented Jan 27, 2023

How can I add multiple TrustedNodes
for eg
TrustedNodes: ["enode://some-key-1", "enode://some-key-2"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment