current position:Home>How to use the etheric currency allocated by Ethereum Genesis block

How to use the etheric currency allocated by Ethereum Genesis block

2022-02-03 20:53:13 Q & A of Denglian community

How to use the etheric currency allocated by Genesis block

This is my Genesis block configuration file , I allocated the balance to two accounts

{  "config": {    "chainId":1024 ,    "homesteadBlock": 0,    "eip150Block": 0,    "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",    "eip155Block": 0,    "eip158Block": 0,    "byzantiumBlock": 0,    "constantinopleBlock": 0,    "petersburgBlock": 0,    "istanbulBlock": 0,    "ethash": {}  },  "nonce": "0x0",  "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",  "gasLimit": "0x47b760",  "difficulty": "0x00002",  "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",  "coinbase": "0x0000000000000000000000000000000000000000",  "alloc": {     "000d836201318ec6899a67540690382780743280": {      "balance": "0xad78ebc5ac6200000"    },    "093f59f1d91017d30d8c2caa78feb5beb0d2cfaf": {      "balance": "0xad78ebc5ac6200000"    }  },  "number": "0x0",  "gasUsed": "0x0",  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"}

init later , I use geth Started a private chain , The order is as follows :

geth --rpc --rpcport "7545" --rpcaddr "0.0.0.0" --rpccorsdomain="*" --rpcapi eth,web3,admin,personal,net --datadir data --port "30303" --nodiscover --networkid 1024 console 2>>geth.log

I try to

eth.accounts

The result is null, and then I directly check the account balance

eth.getBalance("000d836201318ec6899a67540690382780743280")

Found a balance . Then I checked keystore Directory found to be empty .

My understanding is that I don't have a corresponding account keystore, therefore eth.accounts Return to empty , But I started this private chain , I assigned ether to this account in Genesis block , So it means that I should master this account , Otherwise, distribution is meaningless , How should I use this account ?




Take the answer 1:

When Genesis block is configured , want Pay attention to the effective management of the assigned account number Next .

These accounts either have private keys , Or mnemonic words , Or there is keystore file , That's the only way to show control .

In the genesis block, this account is assigned ether , It doesn't mean you have control .

The general operation is like this , First in geth The console generates an account ( Other ways can also ), Then configure the generated account balance .

After having control , You can transfer money normally .






Other answers 1:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032053105088.html

Random recommended