go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

all: rename blockchain option

Open rjl493456442 opened this issue 6 months ago • 0 comments

In this pull request, the original CacheConfig has been renamed to BlockchainOptions.

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 as BlockchainOptions. Some parameters, such as (a) VmConfig, (b) TxLookupLimit, and (c) ChainOverrides have been moved into BlockchainOptions to simplify the blockchain configuration. Besides, a few fields in BlockchainOptions 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.

rjl493456442 avatar May 29 '25 02:05 rjl493456442