0

On go-ethereum souce code at core\genesis_alloc.go(19):

...
package core

// Constants containing the genesis allocation of built-in genesis blocks.
// Their content is an RLP-encoded list of (address, balance) tuples.
// Use mkalloc.go to create/update them.

// nolint: misspell
const mainnetAllocData = "\xfa\x04]X\u0793\r..."
const testnetAllocData = "\xf9\x03\xa4\u0080..."
const rinkebyAllocData = "\xf9\x03\xb7\u0080..."
const goerliAllocData = "\xf9\x04\x06\u0080..."

what are all these? pre-funded wallets? I thought pre-funded wallets were specified on genesis block like this:

"alloc": {"2sa2a321h8353vba12as8965r3340huk3s6a2h6e": { "balance": "10" }, ...

where can I find the code that implements the call to AddBalance() for genesis block allocation? Thx!

1 Answer 1

1
+50

I thought pre-funded wallets were specified on genesis block like this:...

I'm not certain (and someone can correct me), but I was always under the impression that each time you start a new Geth client from scratch, it generates itself the both the genesis block and genesis file from the data you've pointed to. (i.e. You won't find the genesis.json file in the go-ethereum repository as it doesn't exist until it's generated.)

where can I find the code that implements the call to AddBalance() for genesis block allocation?

You want the ToBlock() function in genesis.go.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.