0

I launched a private network by using geth --datadir data/node1 --http --dev --http.corsdomain "*" --http.api web3,eth,debug,personal,net,miner --allow-insecure-unlock --mine command.

I am able to attach to it geth attach http://localhost:8545

but the balance of the default account is only 1.15 ether:

eth.getBalance(eth.accounts[0]) 1.15792089237316195423570985008687907853269984665640564039457582226449518702905e+77

I'd like to give it more ethers so I run:

miner.start() null And I can see there is a warn in the node log:

INFO [11-28|20:29:38.512] Transaction pool price threshold updated price=1
INFO [11-28|20:29:38.512] Commit new mining work                   number=4 sealhash=73b6e7..5d8b72 uncles=0 txs=0 gas=0 fees=0 elapsed="174.436µs"
WARN [11-28|20:29:38.512] Block sealing failed                     err="sealing paused while waiting for transactions"

I wonder what the issue could be?

Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523

2 Answers2

1

Perhaps you have not previously given permission for the miner to sign the genesis block. POA uses the Clique API to manage the seal list.

> clique.proposals
{}
> clique.propose("0xc077f8420d5b6c125897d9c5e21293ff6f77855c", true)
true
> clique.proposals
{
  0xc077f8420d5b6c125897d9c5e21293ff6f77855c: true
}
> clique.getSnapshot()
{
  hash: "0xfbfe67cd638d21f528036130cc703be8f8fdccb934d871f3f8c2eccda1ed4bf5",
  number: 11,
  recents: {
    10: "0xc077f8420d5b6c125897d9c5e21293ff6f77855c",
    11: "0x726794b16f6c5b0be0b78d7713a876ed3da8be1a"
  },
  signers: {
    0x726794b16f6c5b0be0b78d7713a876ed3da8be1a: {},
    0xc077f8420d5b6c125897d9c5e21293ff6f77855c: {}
  },
  tally: {},
  votes: []
}`enter code here`
enter code here

You can see more details in this manual: https://yenhuang.gitbooks.io/blockchain/content/interact-with-private-chain-on-android/build-the-private-chain.html

You can also top up your balance using:

eth.sendTransaction({from:eth.coinbase, to:eth.accounts[1], value: web3.toWei(0.05, "ether")})
  • Do I need to use genesis? I just use this command to launch the blockchain: `geth --datadir data/node1 --http --dev --http.corsdomain "*" --http.api web3,eth,debug,personal,net,miner --allow-insecure-unlock --mine`. And it doesn't have Clique API. How can I enable it? – Joey Yi Zhao Nov 28 '21 at 22:27
  • In general, it should be bundled with official releases Geth & Tools on the official website https://geth.ethereum.org/downloads/ – Dmitrii Dimtiks Nov 29 '21 at 09:41
0

but the balance of the default account is only 1.15 ether:

eth.getBalance(eth.accounts[0]) 1.15792089237316195423570985008687907853269984665640564039457582226449518702905e+77

I didn’t pay attention to it right away. But this is not 1.15 ETH, this is a huge number of ETH that will not end and you can transfer it from coinbase to other created accounts on your private network in dev mode.