2

My private ethereum showing log "starting Geth on Ethereum mainnet.." here are the full logs

INFO [08-27|09:14:02.302] Starting Geth on Ethereum mainnet... 
INFO [08-27|09:14:02.302] Bumping default cache on mainnet         provided=1024 updated=4096
WARN [08-27|09:14:02.302] Sanitizing cache to Go's GC limits       provided=4096 updated=2645
INFO [08-27|09:14:02.305] Maximum peer count                       ETH=50 LES=0 total=50
WARN [08-27|09:14:02.305] The flag --rpc is deprecated and will be removed in the future, please use --http 
WARN [08-27|09:14:02.305] The flag --rpcaddr is deprecated and will be removed in the future, please use --http.addr 
WARN [08-27|09:14:02.305] The flag --rpcport is deprecated and will be removed in the future, please use --http.port 
WARN [08-27|09:14:02.305] The flag --rpccorsdomain is deprecated and will be removed in the future, please use --http.corsdomain 
WARN [08-27|09:14:02.305] The flag --rpcapi is deprecated and will be removed in the future, please use --http.api 
INFO [08-27|09:14:02.305] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
ERROR[08-27|09:14:02.306] Failed to enumerate USB devices          hub=ledger vendor=11415 failcount=1 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[08-27|09:14:02.306] Failed to enumerate USB devices          hub=trezor vendor=21324 failcount=1 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[08-27|09:14:02.306] Failed to enumerate USB devices          hub=trezor vendor=4617  failcount=1 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[08-27|09:14:02.306] Failed to enumerate USB devices          hub=ledger vendor=11415 failcount=2 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[08-27|09:14:02.306] Failed to enumerate USB devices          hub=trezor vendor=21324 failcount=2 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[08-27|09:14:02.306] Failed to enumerate USB devices          hub=trezor vendor=4617  failcount=2 err="failed to initialize libusb: libusb: unknown error [code -99]"
WARN [08-27|09:14:02.307] The flag --targetgaslimit is deprecated and will be removed in the future, please use --miner.gastarget 
WARN [08-27|09:14:02.307] The flag --gasprice is deprecated and will be removed in the future, please use --miner.gasprice 
INFO [08-27|09:14:02.307] Starting peer-to-peer node               instance=Geth/ _node_1/v1.9.14-stable-6d74d1e5/linux-amd64/go1.14.2
INFO [08-27|09:14:02.307] Allocated trie memory caches             clean=396.00MiB dirty=661.00MiB
INFO [08-27|09:14:02.307] Allocated cache and file handles         database=/home/blockchain3/node2/geth/chaindata cache=1.29GiB handles=524288
INFO [08-27|09:14:02.350] Opened ancient database                  database=/home/blockchain3/node2/geth/chaindata/ancient
INFO [08-27|09:14:02.350] Initialised chain configuration          config="{ChainID: 1919 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: 0 Petersburg: 0 Istanbul: 0, Muir Glacier: <nil>, Engine: clique}"
INFO [08-27|09:14:02.351] Initialising Ethereum protocol           versions="[65 64 63]" network=1 dbversion=7
INFO [08-27|09:14:02.352] Loaded most recent local header          number=3 hash="c16c84…0380b2" td=7 age=1w21h6m
INFO [08-27|09:14:02.352] Loaded most recent local full block      number=1 hash="c489b9…4d9893" td=3 age=1mo2w6d
INFO [08-27|09:14:02.352] Loaded most recent local fast block      number=3 hash="c16c84…0380b2" td=7 age=1w21h6m
INFO [08-27|09:14:02.354] Regenerated local transaction journal    transactions=0 accounts=0
WARN [08-27|09:14:02.354] Switch sync mode from fast sync to full sync 
INFO [08-27|09:14:02.385] New local node record                    seq=11 id=29b23ef718418689 ip=127.0.0.1 udp=0 tcp=30305
INFO [08-27|09:14:02.385] Started P2P networking                   self="enode://enodeaddress@127.0.0.1:30305?discport=0"
INFO [08-27|09:14:02.385] IPC endpoint opened                      url=/home/blockchain3/node2/geth.ipc
ERROR[08-27|09:14:02.385] Unavailable modules in HTTP API list     unavailable="[db shh]" available="[admin debug web3 eth txpool personal clique miner net]"
INFO [08-27|09:14:02.386] HTTP endpoint opened                     url=http://[::]:8546/                       cors=* vhosts=localhost
ERROR[08-27|09:14:03.318] Failed to enumerate USB devices          hub=trezor vendor=4617  failcount=3 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[08-27|09:14:03.318] Failed to enumerate USB devices          hub=trezor vendor=21324 failcount=3 err="failed to initialize libusb: libusb: unknown error [code -99]"
ERROR[08-27|09:14:03.318] Failed to enumerate USB devices          hub=ledger vendor=11415 failcount=3 err="failed to initialize libusb: libusb: unknown error [code -99]"
INFO [08-27|09:14:03.562] Unlocked account                         address= 0x903xxxxxxxxxxxxxxxxxxxxxxxxxxx6022917d
INFO [08-27|09:14:03.562] Transaction pool price threshold updated price=80000000000
WARN [08-27|09:14:03.562] The flag --minerthreads is deprecated and will be removed in the future, please use --miner.threads 
INFO [08-27|09:14:03.562] Transaction pool price threshold updated price=80000000000
INFO [08-27|09:14:03.562] Etherbase automatically configured       address= 0x903xxxxxxxxxxxxxxxxxxxxxxxxxxx6022917d
INFO [08-27|09:14:03.563] Commit new mining work                   number=2 sealhash="4e5f7d…34e750" uncles=0 txs=0 gas=0 fees=0 elapsed="154.706µs"
INFO [08-27|09:14:03.563] Sealing paused, waiting for transactions 
INFO [08-27|09:14:58.538] Setting new local account                address= 0x903xxxxxxxxxxxxxxxxxxxxxxxxxxx6022917d
INFO [08-27|09:14:58.538] Submitted transaction                    fullhash=0x55d8b4744a094860a8d65427e117843e1b595261b49b8772bdef930e37276b0a recipient=0x0c2dxxxxxxxxxxxxxxxxxxE2E280

Script of node

GLOBAL_ARGS="--nodiscover --gasprice 0 --targetgaslimit 470000000000 --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,net,shh,txpool,personal,web3  --mine --minerthreads 2"
echo "Starting node.....!"

nohup /usr/bin/geth --port 30305 --datadir=$pwd  $GLOBAL_ARGS --rpcport 8546 --rpccorsdomain "*" --identity "node_1" --allow-insecure-unlock --unlock "0x903xxxxxxxxxxxxxxxxxxxxxxxxxxx6022917d" --password pwd.txt &

echo "Node started successfully"

Genesis File

{
  "config": {
    "chainId": 1919,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0,
    "clique": {
      "period": 0,
      "epoch": 30000
    }
  },
  "nonce": "0x0",
  "timestamp": "0x5f04700a",
  "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000447c4bcd61d828b13e084724dcd21ef00",
  "gasLimit": "0x82f79cd9000",
  "difficulty": "0x1",
  "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "coinbase": "0x0000000000000000000000000000000000000000",

When connecting node

> admin.nodeInfo

protocols: {
eth: {
  config: {
    byzantiumBlock: 0,
    chainId: 1919,
    clique: {...},
    constantinopleBlock: 0,
    eip150Block: 0,
    eip150Hash: "0x0000000000000000000000000000000000000000000000000000000000000000",
    eip155Block: 0,
    eip158Block: 0,
    homesteadBlock: 0,
    istanbulBlock: 0,
    petersburgBlock: 0
  },
  difficulty: 3,
  genesis: "0xa8a906a1f2f9ea21567b95234299803228d7c2d981dfa145cea9bd5a745df5f6",
  head: "0xc489b9bfc546923bb515e64cfba83f86fa32128871d57c6f1917a98d7f4d9893",
  network: 1
}

Geth information

Geth
Version: 1.9.14-stable
Git Commit: 6d74d1e5f762e06a6a739a42261886510f842778
Architecture: amd64
Protocol Versions: [65 64 63]
Go Version: go1.14.2
Operating System: linux
GOPATH=
GOROOT=/build/ethereum-hL1NP5/.go
5
  • How are you sure it mining the Mainnnet? This looks like a dev chain to me
    – 0xsegfault
    Aug 27, 2020 at 12:45
  • When I start the node, the it shows INFO Starting Geth on Ethereum mainnet.... I have also found ethash folder generated on the machine, I have deleted it and now it's not being generated @SamuelDare
    – Div
    Aug 27, 2020 at 12:49
  • nodeInfo output chainId 1919, on logs it's reported the same (Initialised chain configuration line), try to clean all folders and do init again, seems all corrects.
    – Dibi91
    Aug 27, 2020 at 14:58
  • @Dibi91 The issue is, my chain was running fine, there was a space issue, I have checked and found ethash folder consuming 29GB, searched online, and found safe to delete that file. Deleted and start node again...it shows block-height 1 and all transaction goes into pending. I can't my previous blocks and data...
    – Div
    Aug 27, 2020 at 16:29
  • Sorry, did not read carefully the starting command, see the answer :)
    – Dibi91
    Aug 28, 2020 at 10:11

1 Answer 1

1

You should add at the starting command the networkid flag.

From the geth help command:

--networkid value    Network identifier (integer, 1=Frontier, 3=Ropsten, 4=Rinkeby, 5=Görli) (default: 1)

So without value, it get 1 as default and goes on mainnet

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.