Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

the CustomGenesis.json have some problem #424

Open
leweihe opened this issue Jan 18, 2018 · 3 comments
Open

the CustomGenesis.json have some problem #424

leweihe opened this issue Jan 18, 2018 · 3 comments

Comments

@leweihe
Copy link

leweihe commented Jan 18, 2018

in page test-networks.html the CustomGenesis.json
{
"nonce": "0x0000000000000042", "timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x0", "gasLimit": "0x8000000", "difficulty": "0x400",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333", "alloc": { }
}
throws exception Fatal: invalid genesis file: json: cannot unmarshal hex string of odd length into Go struct field Genesis.extraData of type hexutil.Bytes

I change the "timestamp": "0x0", "extraData": "0x0" to "extraData": "0x00" "timestamp": "0x00", then it works.

@pirapira
Copy link
Member

Can you file a pull-request, applying the change?

@tommystanton
Copy link

tommystanton commented Jun 4, 2018

Making the changes as described by @leweihe did fix the same issue that I had on my machine, but upon further investigation, the current documentation (particularly the change to the documentation in commit ebe69e4) has a CustomGenesis.json example that works just fine.

It seems that it's only extraData that needs to be 0x00 (instead of 0x0). That was fixed in commit 7f5a193.

In conclusion, the documentation online simply needs to be republished (I now realize that there is a wiki on the 'ethereum' GitHub account that is preferred over ethdocs.org).

@tommystanton
Copy link

This issue also seems to be related to ethereum/go-ethereum#14356.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants