Search code examples
ethereum

Ethereum private network - dynamic genesis.json alloc


I created a genesis.json file - private network(Ethereum).

for some reason, I want to allocate new ETH to new Addresses(like I did before at the genesis file).

my question: if I change the genesis file and re-create the network, are all the eth that transferred to other wallets will be lost? (all the database will be lost?) OR there is a way to dynamically upgrade the genesis.json file?

if there is a way in the PoA/PoS/PoW Ethereum network please let me know


Solution

  • You can't.

    The genesis.json describes the chain state at the beginning. Once blocks are mined on top of this chainstate, it cannot be altered, or it would render the entire chain (all the blocks) invalid, and you would be on a brand new network.

    In a PoA network, you are supposed to pre-allocate as much ether as required, and use regular transactions to send that to new addresses as needed. It is a good idea to overallocate at the start, and set up a faucet system to make distribution easier.