Accept a genesis.json file
See original GitHub issueThe genesis.json
file format specifies an initial state for the blockchain, including balances of account numbers.
This could be very useful for development environments where a client has a wallet on it, and we want them to have a balance even on the simulated blockchain.
Lets clients operate in the development environment with nothing but the RPC address and an account that they’ve generated.
(I’m talking about Metamask here).
The basic format is this:
{
"nonce": "0x0000000000000042",
"difficulty": "0x400000000",
"alloc": {
"3282791d6fd713f1e94f4bfd565eaa78b3a0599d": {
"balance": "1337000000000000000000"
}
},
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",
"gasLimit": "0x1388"
}
The part I care the most about is the alloc
hash, which includes a map of accounts to an object containing their initial balance
.
An aside: A lot of pre-sale purchasers picked 1337...
as their initial balance 😃
Issue Analytics
- State:
- Created 8 years ago
- Reactions:10
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Beginners guide to Ethereum (3) — explain the genesis file ...
This tutorial serves as a complete guide that combines all the information you will need about a genesis file, including some of the...
Read more >Genesis JSON - Klaytn Docs
Genesis JSON File Structure ; coinbase. An address to which miner receives the reward. This field is only used for Clique consensus engine....
Read more >Create a genesis file - GoQuorum - 22.7.0 - ConsenSys
Configuring a network using a genesis file. ... Create a JSON genesis file, then specify the genesis file when initalizing GoQuorum with:.
Read more >What does each genesis.json parameter mean?
mixhash: What is this? coinbase: Ethereum address for coinbase, right? alloc: first ether allocation. Sample genesis json file from How To ...
Read more >Tutorial: Operating a Private Network - CoreGeth Documentation
First, you'll need to create the genesis state of your networks, which all nodes need to be aware of and agree upon. This...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Going to just ping this here, I think this is still a good idea 👍 , is there any major blocker to this?
Is anyone trying to work on this? I’m in the scenario described by @aakilfernandes , trying to test a pre-deployed contract. Having to spin up a real chain each time is a pain!