Merged
Conversation
flywukong
reviewed
Nov 18, 2024
| // startup ancient freeze | ||
| if err = chainDb.SetupFreezerEnv(ðdb.FreezerEnv{ | ||
| freezeDb := chainDb | ||
| if stack.CheckIfMultiDataBase() { |
Contributor
There was a problem hiding this comment.
if stack.CheckIfMultiDataBase() && chainDb.BlockStore() != nil may be better
Contributor
Author
There was a problem hiding this comment.
It is not appropriate to use chainDb.BlockStore() for validation because:
- When multi-database mode is enabled,
chainDb.BlockStore()will return blockDb. - When multi-database mode is disabled,
chainDb.BlockStore()will return chainDb.
zzzckck
approved these changes
Nov 19, 2024
galaio
reviewed
Nov 20, 2024
| trigger: make(chan chan struct{}), | ||
| // After enabling pruneAncient, the ancient data is not retained. In some specific scenarios where it is | ||
| // necessary to roll back to blocks prior to the finalized block, it is mandatory to keep the most recent 90,000 blocks in the database to ensure proper functionality and rollback capability. | ||
| multiDatabase: false, |
Contributor
There was a problem hiding this comment.
Why not remove the multiDatabase field & param? It's useless now.
Contributor
Author
There was a problem hiding this comment.
I'm not entirely sure whether the logic of using the finalized block for processing will be used later. For now, to minimize changes, I disable it.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When multi-database (multi-db) mode is enabled, the freezer's environment (env) is not properly set for the multi-db configuration. This prevents the multi-db chain_freezer from moving block data from the database (db) to the ancient storage (ancient).
Rationale
tell us why we need these changes...
Example
add an example CLI or API response...
Changes
Notable changes: