all: rename blockchain option #31925
Open
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.
In this pull request, the original
CacheConfig
has been renamed toBlockchainOptions
.Over time, more fields have been added to
CacheConfig
to support blockchain configuration.Such as
ChainHistoryMode
, which clearly extends beyond just caching concerns.Additionally, adding new parameters to the blockchain constructor has become increasingly
complicated, since it’s initialized across multiple places in the codebase. A natural solution
is to consolidate these arguments into a dedicated configuration struct.
As a result, the existing
CacheConfig
has been redefined asBlockchainOptions
. Some parameters,such as (a)
VmConfig
, (b)TxLookupLimit
, and (c)ChainOverrides
have been moved intoBlockchainOptions
to simplify the blockchain configuration. Besides, a few fields inBlockchainOptions
is renamed, specifically:
TrieCleanNoPrefetch
->NoPrefetch
TrieDirtyDisabled
->ArchiveMode
Notably, this change won't affect the command line flags or the toml configuration file.
It's just an internal refactoring and fully backward-compatible.