blockchain//Besu//funding
Funding a private chain is a chicken-and-egg problem: an account needs an address to be funded in the genesis, but the genesis cannot be created until the keys are generated. A two-phase script solves it: it first generates the keys to get the addresses, then builds the genesis file, `genesis.json`, with those addresses in its `alloc` section.
Funding a private chain is a chicken-and-egg problem: an account needs an address to be funded in the genesis, but the genesis cannot be created until the keys are generated. A two-phase script solves it: it first generates the keys to get the addresses, then builds the genesis file, genesis.json, with those addresses in its alloc section.
If Docker mounts a stale genesis.json from a cached path, the nodes get the old version without balances. An admin faucet is a backend that signs funding transactions with a pre-funded private key stored in .env.