-
Notifications
You must be signed in to change notification settings - Fork 20.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Genesis file working anyone? I'm always getting "wrong genesis block in database" #14352
Comments
in your |
according the error, there is already a genesis block in the |
Thanks for the quick reply. Yes, I did it to generate the account I use to inject in the genesis file for the initial allocation of ethereum. |
@joeb000 You are right. Its a typo while writing the issue. It was late I was tired, sorry :) |
The error messages states that your chain data already was inited with a genesis block and you are trying to overwrite it with a different one. This might lead to loss of data, and hence is prohibited (starting from Geth 1.6.0). You cannot reinit a chain with a different genesis unless you delete your old I'll leave this issue open though as quite a lot of people hung up on this so we should probably have a better error message there. |
I am also getting this error but under different circumstances. genesis.json:
First I run
Then I run
I do not see how I'm initializing the blockchain twice. I'm not trying to create an account or anything before running |
I just updated to 1.6.1 and I have the more detailed output saying |
Don't use --testnet, that forces Ropsten
…On May 10, 2017 02:15, "coreyog" ***@***.***> wrote:
I just updated to 1.6.1 and I have the more detailed output saying Error
starting protocol stack: database already contains an incompatible genesis
block (have 6650a0ac6c5e8054, new e5be92145a301820) but I don't have a
clue what's incompatible.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#14352 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAH6GQoZiNOUS1HSoVLlWa-3VP7tzOieks5r4PORgaJpZM4NCMRH>
.
|
I switched from --testnet to --dev and get the same error. I removed it entirely and the node started successfully. Is it possible to use either of those flags and specify a genesis block? |
@coreyog It basically says there is already info in DB about an other blockchain, clean db by calling : |
@coreyog met the same problem, still don't know how to solve it |
@Othmanbench geth removedb won't work, I just tried |
I am having same issue. rm -r /tmp/ethereum_dev_mode/geth geth --dev --ipcdisable --rpc --rpcapi="db,eth,net,web3,personal,miner,admin" --networkid 777 |
Same problem here, stuck... :-) |
I am having the same problem for my local private network. Normally, I was first initiating geth with a genesis block without any accounts, then creating some accounts and go back to the genesis file and add some initial ethers in these accounts. It was working without any problem when I go back to geth. Now, if I delete the chain data, as suggested above, how can I create accounts and add some balances to them? |
{ } I am using this info in custom genesis.json file. It is initialising blockchain as below: WARN [06-05|17:03:31] No etherbase set and no accounts found as default But when I fire miner command at console, mining is not accomplished accordingly.
as you see miner.start(1) returns null So what else data I need to add to genesis file and in what format so that it should start mining. If Anyone having idea about this....plz help me...It is my humble request. |
"Solved" (???) error |
Thanks @karalabe for that tip. |
if |
new genesis blocks should have this structure |
Starting mining operation |
Removing --dev will solve the problem. Probably because networkid != 1 already assumes its private network |
$ ~/.ethereum/geth/chaindata |
@jay-dee7 - this doesn't solve the problem. |
After trying |
somebody help me..
I try to remove database. but this error repeat... help.. |
removing ~/.ethereum_private/geth/lightchaindata. resolved for me |
Removing the |
Hello,total newbie here! Can someone tell me the best solution on the error. Fatal: Failed to write genesis block: database already contains an incompatible genesis block (have d4e56740f876aef8, new d1a12dd8ee31c1b4) I read some of the comments and i guess i am to stupid to understand what to do lol. |
geth --dev init genesis.json worked for me |
in one line, or get the pid with: Is it dev networkid!=1? |
@AlexandreRoba |
I have the same issues. |
System information
Geth
Version: 1.6.0-stable
Git Commit: facc47c
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.8.1
Operating System: darwin
GOPATH=/Users/aroba/golang
GOROOT=/usr/local/opt/go/libexec
Expected behaviour
I'm trying to setup a custom genesis file but I'm always getting an error
Actual behaviour
Steps to reproduce the behaviour
I start by creating an empty folder
mkdir ~/ethcustgen
I then create a new account
geth --datadir ~/ethcustgen account new
It returns the new account address
I then use this address to update a custom genesis file with the same structure as described here:
https://github.com/ethereum/go-ethereum/wiki/Private-network
I then try to init the genesis file
geth --datadir ~/ethcustgen init genesis.json
But I'm always getting this error:
any idea
Backtrace
The text was updated successfully, but these errors were encountered: