-
Notifications
You must be signed in to change notification settings - Fork 20.3k
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
Geth does not start in --dev mod with empty blockchain and custom genesis block #24453
Comments
We discussed this issue a bit internally and all agreed that this should not be done. |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done This issue now has a funding of 0.001 ETH (2.71 USD @ $2709.84/ETH) attached to it.
|
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Workers have applied to start work. These users each claimed they can complete the work by 1 month from now. 1) shantanusoni72 has applied to start work (Funders only: approve worker | reject worker). I will first try to reproduce the issue to analyse the issue and will solve the issue. Learn more on the Gitcoin Issue Details page. |
This has surfaced since #24298. The error is thrown because One easy fix is this: diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go
index 6077c43cc..1698ce5db 100644
--- a/cmd/geth/chaincmd.go
+++ b/cmd/geth/chaincmd.go
@@ -206,7 +206,7 @@ func initGenesis(ctx *cli.Context) error {
defer stack.Close()
for _, name := range []string{"chaindata", "lightchaindata"} {
- chaindb, err := stack.OpenDatabase(name, 0, 0, "", false)
+ chaindb, err := stack.OpenDatabaseWithFreezer(name, 0, 0, "", "", false)
if err != nil {
utils.Fatalf("Failed to open database: %v", err)
} With this patch it's business as usual and dev mode starts fine. Or do we want to actively prevent this practice and only display a better error for it? I'm not sure how best to do that yet. |
System information
Geth version:
1.10.16
OS & Version: Ubuntu 21.10 Implish
Expected behaviour
If run
geth starts in develop mode.
Actual behaviour
geth fails with an error:
Steps to reproduce the behaviour
genesis.json
filegeth --datadir /tmp/blockchain/ init genesis.json
geth --datadir /tmp/blockchain --dev
Backtrace
The text was updated successfully, but these errors were encountered: