Skip to content

Cannot parse 32 bytes enodes in TOML configuration file #21156

@DefiCake

Description

@DefiCake

System information

Geth
Version: 1.9.14-stable
Git Commit: 6d74d1e
Git Commit Date: 20200513
Architecture: amd64
Protocol Versions: [65 64 63]
Go Version: go1.14.2
Operating System: linux
GOPATH=
GOROOT=/usr/local/go

Expected behaviour

I expect to be able to run geth with a TOML config file.

Actual behaviour

Unable to start geth with a config file where bootnodes are specified in the 32 bytes format (don't know if 64 bytes format works). My current guess is this change #17643 wasn't propagated to the config parser, but have not taken a look into the sources.

Steps to reproduce the behaviour

Take any TOML file with bootnodes specified, for example the following one:

[Eth]
NetworkId = 19080880
SyncMode = "fast"
NoPruning = false
NoPrefetch = false
LightPeers = 100
UltraLightFraction = 75
DatabaseCache = 512
DatabaseFreezer = ""
TrieCleanCache = 256
TrieDirtyCache = 256
TrieTimeout = 3600000000000
EnablePreimageRecording = false
EWASMInterpreter = ""
EVMInterpreter = ""

[Eth.Miner]
Etherbase = "0xdcf7baece1802d21a8226c013f7be99db5941bea"
GasFloor = 15000000
GasCeil = 8000000
GasPrice = 0
Recommit = 3000000000
Noverify = false

[Eth.Ethash]
CacheDir = "ethash"
CachesInMem = 2
CachesOnDisk = 3
DatasetDir = "/home/mad/.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 = "/datadir"
omitempty = ""
NoUSB = true
IPCPath = "geth.ipc"
HTTPPort = 8545
HTTPVirtualHosts = ["localhost"]
HTTPModules = ["net", "web3", "eth", "shh"]
WSPort = 8546
WSModules = ["net", "web3", "eth", "shh"]
GraphQLPort = 8547
GraphQLVirtualHosts = ["localhost"]

[Node.P2P]
MaxPeers = 50
NoDiscovery = true
BootstrapNodes = ["enode://de2bff7934321b702bd9b657874ba7095b93a54cb4007049c100bf430d3026ea@172.0.254.129:30303"]
BootstrapNodesV5 = []
StaticNodes = []
TrustedNodes = []
ListenAddr = ":30303"
EnableMsgEvents = false

[Node.HTTPTimeouts]
ReadTimeout = 30000000000
WriteTimeout = 30000000000
IdleTimeout = 120000000000

And try to run geth, geth --config /config/config.toml --nousb.

Backtrace

INFO [06-01|10:26:56.549] Maximum peer count                       ETH=50 LES=0 total=50
INFO [06-01|10:26:56.549] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
ERROR[06-01|10:26:56.549] Failed to enumerate USB devices          hub=ledger vendor=11415 failcount=1 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-01|10:26:56.549] Failed to enumerate USB devices          hub=trezor vendor=21324 failcount=1 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-01|10:26:56.549] Failed to enumerate USB devices          hub=trezor vendor=4617  failcount=1 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-01|10:26:56.550] Failed to enumerate USB devices          hub=ledger vendor=11415 failcount=2 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-01|10:26:56.550] Failed to enumerate USB devices          hub=trezor vendor=21324 failcount=2 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[06-01|10:26:56.550] Failed to enumerate USB devices          hub=trezor vendor=4617  failcount=2 err="failed to initialize libusb: libusb: unknown error [code -99]"
INFO [06-01|10:26:56.575] Starting Geth on Ethereum mainnet... 
INFO [06-01|10:26:56.575] Bumping default cache on mainnet         provided=1024 updated=4096
Fatal: /config/config.toml, line 72: (p2p.Config.BootstrapNodes) invalid public key (wrong length, want 128 hex chars)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions