Skip to content

fix(config): respect ethereum.local default_provider overrides#2760

Open
sanjaysudagani wants to merge 1 commit intoApeWorX:mainfrom
sanjaysudagani:codex/fix-local-default-provider-config
Open

fix(config): respect ethereum.local default_provider overrides#2760
sanjaysudagani wants to merge 1 commit intoApeWorX:mainfrom
sanjaysudagani:codex/fix-local-default-provider-config

Conversation

@sanjaysudagani
Copy link

@sanjaysudagani sanjaysudagani commented Mar 2, 2026

What I did

Updated the config model so project/global overrides for ethereum.local.default_provider are reflected in EthereumConfig.local.

fixes: #2490

How I did it

  • read the raw local override from the plugin extras instead of always constructing a hard-coded local config
  • merged the configured local values with the existing local defaults before validating as NetworkConfig
  • added regression coverage for ethereum.local.default_provider override behavior

How to verify it

pytest tests/functional/test_config.py -k ethereum_local_network_config_override -q
pytest tests/functional/test_network_api.py -k "gas_limit_defaults or gas_limit_configured_max or base_fee_multiplier or config_custom_networks_default or config_custom_networks" -q

Checklist

  • All changes are completed
  • Change is covered in tests
  • Documentation is complete; no user-facing docs update was needed for this internal config-model fix

Copy link
Member

@fubuloubu fubuloubu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much!

@fubuloubu fubuloubu enabled auto-merge (squash) March 4, 2026 03:59
if not (override := (self.__pydantic_extra__ or {}).get("local")):
return default_local

if isinstance(override, NetworkConfig):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we also want to merge here (like we do for dict)? just have to dump it first if that's the case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

project.config.ethereum.local.default_provider has a different value than networks.ethereum.local.default_provider

3 participants