0

when I run the geth as a private chain node it shows error below:

C:\tools\src\github.com\ethereum\go-ethereum\geth.exe init C:\tools\src\github.com\ethereum\go-ethereum\genesis.json #gosetup
INFO [09-14|14:23:29.550] Maximum peer count                       ETH=50 LES=0 total=50
INFO [09-14|14:23:30.116] Set global gas cap                       cap=25000000
INFO [09-14|14:23:30.171] Allocated cache and file handles         database=C:\Users\root\AppData\Roaming\Ethereum\geth\chainda
ta cache=16.00MiB handles=16
ERROR[09-14|14:23:30.330] Invalid block header RLP                 hash="f7973e…d25ea5" err="rlp: input string too short for c
ommon.Hash, decoding into (types.Header).Root"
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x54 pc=0x7b2e77]

goroutine 1 [running]:
github.com/ethereum/go-ethereum/core.SetupGenesisBlock(0x12af540, 0xc00000a000, 0xc0000d0160, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc00000
a000, 0x0)
        C:/tools/src/github.com/ethereum/go-ethereum/core/genesis.go:178 +0x397
main.initGenesis(0xc000202420, 0x0, 0x0)
        C:/tools/src/github.com/ethereum/go-ethereum/cmd/geth/chaincmd.go:251 +0x809
github.com/ethereum/go-ethereum/cmd/utils.MigrateFlags.func1(0xc000202420, 0x0, 0xc000202420)
        C:/tools/src/github.com/ethereum/go-ethereum/cmd/utils/flags.go:1899 +0xc7
gopkg.in/urfave/cli%2ev1.HandleAction(0xeafaa0, 0xc00004ed70, 0xc000202420, 0xc00013ce00, 0x0)
        C:/tools/pkg/mod/gopkg.in/urfave/cli.v1@v1.20.0/app.go:490 +0x89
gopkg.in/urfave/cli%2ev1.Command.Run(0x1078a71, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10b026e, 0x2c, 0x0, ...)
        C:/tools/pkg/mod/gopkg.in/urfave/cli.v1@v1.20.0/command.go:210 +0x9fb
gopkg.in/urfave/cli%2ev1.(*App).Run(0xc0000641a0, 0xc000098000, 0x3, 0x4, 0x0, 0x0)
        C:/tools/pkg/mod/gopkg.in/urfave/cli.v1@v1.20.0/app.go:255 +0x768
main.main()
        C:/tools/src/github.com/ethereum/go-ethereum/cmd/geth/main.go:273 +0x6a

Process finished with exit code 2 the genesis.json is :

{
  "config": {
    "chainId": 10,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0
  },
  "alloc": {},
  "coinbase": "0x0000000000000000000000000000000000000000",
  "difficulty": "0x20000",
  "extraData": "",
  "gasLimit": "0x47e7c4",
  "nonce": "0x0000000000000042",
  "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp": "0x00"
}

C:\tools\src\github.com\ethereum\go-ethereum>geth.exe version
Geth
Version: 1.9.22-unstable
Architecture: amd64
Protocol Versions: [65 64 63]
Go Version: go1.15.2
Operating System: windows
GOPATH=C:\tools
GOROOT=C:\Go\

So how to solve it? thank you very much !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.