-
Notifications
You must be signed in to change notification settings - Fork 19.7k
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
bug: --datadir doesn't respect alternate chain dir organization #19172
Comments
The behavior you're seeing is intentional, but I can understand why it may seem confusing. Let me explain how we ended up with this: If you are using If you are not using Unsure what to do now. We could fix it, for OCD's sake, by choosing a default location outside of the mainnet datadir for non-mainnet chains. Some amount of backwards-compatibility code would be required because people who aren't using |
Gotcha, thanks for the background. So if I'm understanding correctly, the "weird" part of the behavior is actually that
seems like an important thing to have predictable and consistent. Agreed that backwards compatibility is important to keep, but as I've suggested, 'forwards compatibility' is important too; I found this bug because I nearly nuked 200gb of full archive sync thinking that it was somehow scrap development data because it wasn't where I expected it to be. I agree that nested
Both options will need some, probably comparable amount, of backwards-friendly migration logic. Just for sake of a touchpoint w/r/t backwards datadir compat, here's a place where this kind of logic is handled in the code for earlier "datadir migrations". https://github.com/ethereum/go-ethereum/blob/master/node/config.go#L319-L331 There's a small further nitpick noticeable here with the console
to be consistent (even against the "unexpected" custom datadir/chaindir behavior) I think it should be:
Maybe this is worth spinning off into its own issue? |
Yes, you're right, the geth history file belongs in the geth directory. I think the best way forward would be to define alternative locations outside the regular datadir for chain flags, e.g.
|
That's fine with me. As referenced above, it appears that using "old resource paths" are handled like this: c.warnOnce(&c.oldGethResourceWarning, "Using deprecated resource file %s, please move this file to the 'geth' subdirectory of datadir.", oldpath) Will a log warning again be sufficient for this change? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The datadir is, nowadays, an implicit API surface, and various tools may depend on the organization of where data is stored. If we change that now, it might cause problems for a lot of users, so we decided to just leave it as is, since the added value of changing it is not deemed worth the problems it may cause. |
Hello. So in conclusion, we can simply ignore the warning and it will not have a negative impact during the syncing process? Newcomer using geth + prysm. |
This warning does not impact your syncing process, correct. |
OS and program version info
./build/bin/geth version
:Reproduce
Setup
Run
Teardown
Actual result
Expected result
The text was updated successfully, but these errors were encountered: