Skip to content
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

[WIP]cmd, core: resolve scheme from a read-write database #2135

Closed
wants to merge 7 commits into from

Conversation

sysvm
Copy link
Contributor

@sysvm sysvm commented Jan 5, 2024

Description

This pull request solves four pull requests: #2110, #2131, #2141, #2146

  1. The first question: resolve state scheme from a read-write database:

This issue can occur when unclean shutdown happens and freezer tables need to be repair. In database read-only mode, the freezer will only be validated but not repair and terminates the node abnormally.
This pull request moves the scheme check into the Ethereum constructor where the read-write database is already initialized. This approach can avoid opening read-only database in very early stage, to prevent this error totally.

  1. The second question: ancient directory should be compatible with hash and path mode:

Current geth doesn't deal with chain freezer dir in a good way. Therefore, this pr refactors resolveChainFreezerDir to fix in pruned and non-pruned mode.

Rationale

These will influence how should users use pruenancient mode that block data could be replaced in which.

Example

N/A

Changes

Notable changes:

  • N/A

@sysvm sysvm force-pushed the fix-pruneancient branch 2 times, most recently from ef0ac94 to 4da7fbd Compare January 5, 2024 07:19
@sysvm sysvm force-pushed the fix-pruneancient branch 3 times, most recently from 7a5b18c to 27c865b Compare January 5, 2024 13:11
@sysvm sysvm added the r4r ready for review label Jan 5, 2024
@sysvm sysvm force-pushed the fix-pruneancient branch 5 times, most recently from 6f45edd to 2faa0ee Compare January 8, 2024 12:41
@sysvm sysvm force-pushed the fix-pruneancient branch 2 times, most recently from 83ed03c to 54a247e Compare January 8, 2024 14:26
fynnss

This comment was marked as abuse.

@sysvm sysvm force-pushed the fix-pruneancient branch 10 times, most recently from a6619c6 to 5ff3bda Compare January 9, 2024 10:49
@sysvm sysvm force-pushed the fix-pruneancient branch from 5ff3bda to 09cb150 Compare January 9, 2024 11:27
@sysvm sysvm force-pushed the fix-pruneancient branch 7 times, most recently from aac2695 to 7cf9a3b Compare January 10, 2024 03:49
@sysvm sysvm added wip work in process and removed r4r ready for review labels Jan 10, 2024
@sysvm sysvm changed the title cmd, core: resolve scheme from a read-write database [WIP]cmd, core: resolve scheme from a read-write database Jan 10, 2024
@sysvm sysvm force-pushed the fix-pruneancient branch 3 times, most recently from ae3184d to 3d57011 Compare January 10, 2024 09:19
@fynnss fynnss self-requested a review January 10, 2024 09:27
@buddh0 buddh0 self-requested a review January 10, 2024 10:11
@buddh0
Copy link
Collaborator

buddh0 commented Jan 12, 2024

some PRs are from go-ethereum
so I think, we can format this PR:
PR from go-ethereum use cherry-pick and solve conflict
then apply our commit

@zzzckck
Copy link
Collaborator

zzzckck commented Jan 12, 2024

LGTM, would approve once updated to keep the origin commit record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip work in process
Projects
None yet
4 participants