Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I get 5000000000000000000 wei from eth.getBalance(eth.accounts[0]), but metamask and etherscan only have 0 wei #26329

Closed
LeftH0ok opened this issue Dec 8, 2022 · 2 comments

Comments

@LeftH0ok
Copy link

LeftH0ok commented Dec 8, 2022

my command

geth console

miner.start(n)

miner.stop()

eth.getBalance(eth.accounts[0])

5000000000000000000

other info

> admin.nodeInfo
{
  enode: "enode://eaa060201315abd56b97ae1bee780078d149f512d54058c4b0ade2a0234768b45a134c24bca9d7c50d7984f27dd6c40f29c12dfafdb63f382c16bfd607a11e98@113.116.33.137:30303",
  enr: "enr:-Ka4QIlu_7P5_ZW-twy-sClnoqg0iyHe_XPELKZntg9zcgN4f846OkG3gVhxK4YMn_l7Um8X4n-kGPMU_ora_19xTZmGAYTg_t22g2V0aMrJhPxk7ASDEYwwgmlkgnY0gmlwhHF0IYmJc2VjcDI1NmsxoQLqoGAgExWr1WuXrhvueAB40Un1EtVAWMSwreKgI0dotIRzbmFwwIN0Y3CCdl-DdWRwgnZf",
  id: "92493d7eb3fd38e865bad06272ea6fa5121d2c9df514d17599dd60d81a795ffb",
  ip: "113.116.33.137",
  listenAddr: "[::]:30303",
  name: "Geth/v1.10.26-stable-e5eb32ac/linux-amd64/go1.18.5",
  ports: {
    discovery: 30303,
    listener: 30303
  },
  protocols: {
    eth: {
      config: {
        arrowGlacierBlock: 13773000,
        berlinBlock: 12244000,
        byzantiumBlock: 4370000,
        chainId: 1,
        constantinopleBlock: 7280000,
        daoForkBlock: 1920000,
        daoForkSupport: true,
        eip150Block: 2463000,
        eip150Hash: "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0",
        eip155Block: 2675000,
        eip158Block: 2675000,
        ethash: {},
        grayGlacierBlock: 15050000,
        homesteadBlock: 1150000,
        istanbulBlock: 9069000,
        londonBlock: 12965000,
        muirGlacierBlock: 9200000,
        petersburgBlock: 7280000,
        terminalTotalDifficulty: 5.875e+22,
        terminalTotalDifficultyPassed: true
      },
      difficulty: 34351349760,
      genesis: "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",
      head: "0x7538e0ccb20ceadf067eb4cdf21473239452a9dd7b9fe1fb59f01b8eea287896",
      network: 1
    },
    snap: {}
  }
}

------------------------------

> web3.version.getNetwork(function(err, version) {console.log(version);})
1
undefined
@LeftH0ok
Copy link
Author

LeftH0ok commented Dec 8, 2022

what should i do

@karalabe
Copy link
Member

karalabe commented Dec 8, 2022

Your chain has nit finished syncing, so you just mined block #1 :) You need to syn first before "mining". Also, Ethereum switched over to PoS, so there's no PoW mining any more on mainnet.

@karalabe karalabe closed this as completed Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@karalabe @LeftH0ok and others