Skip to content

Add Avalanche method spec with eth_baseFee - #274

Open
pxlvre wants to merge 1 commit into
drpcorg:mainfrom
pxlvre:avalanche-eth-basefee-spec
Open

pxlvre wants to merge 1 commit into
drpcorg:mainfrom
pxlvre:avalanche-eth-basefee-spec

Conversation

@pxlvre

@pxlvre pxlvre commented Sep 21, 2026

Copy link
Copy Markdown

Summary

Fixes #273.

Avalanche's chains.yaml entry had no method-spec override, so it fell back to the bare eth spec, which never listed eth_baseFee — a real, documented Avalanche C-Chain JSON-RPC extension for the next block's base fee (docs). Every configured upstream serves the method correctly; only the spec-level allowlist was missing it, so nodecore refused to route it to any upstream and returned -32601 method does not exist with response-provider: NoUpstream.

This mirrors the existing fantom pattern (which adds ftm_effectiveBaseFee the same way) rather than introducing anything new:

  • pkg/methods/specs/avalanche.json (new) — "spec-imports": ["eth"], adds eth_baseFee as a non-cacheable method (it reflects the next block, so caching it would be wrong for the same reason eth_gasPrice and ftm_effectiveBaseFee are also cacheable: false)
  • chains.yaml — sets method-spec: "avalanche" on the avalanche entry
  • docs/method-specs.md — lists avalanche alongside the other plain, eth-importing specs
  • pkg/methods/methods_spec_test.go — new TestAvalancheSpecLoads

Test plan

  • go test ./... passes (full repo suite, including the new test)
  • Sanity-checked end-to-end against a local drpcorg/nodecore checkout (go.mod replace pointing at this branch): specs.GetSpecMethodsByConnectors("avalanche", ...) now includes eth_baseFee alongside the inherited eth methods (e.g. eth_blockNumber), and does not leak ftm_effectiveBaseFee or other unrelated chain extensions

Avalanche's chain entry had no method-spec override, so it fell back
to the bare eth spec, which never listed eth_baseFee - a real,
documented Avalanche C-Chain JSON-RPC extension for the next block's
base fee. Every configured upstream serves the method correctly; only
the spec-level allowlist was missing it, so nodecore refused to route
it to any upstream and returned "method does not exist" instead.

Give avalanche its own spec (mirrors fantom's ftm_effectiveBaseFee
pattern): import eth, then add eth_baseFee as a non-cacheable method.
@pxlvre pxlvre changed the title Add avalanche method spec with eth_baseFee Add Avalanche method spec with eth_baseFee Sep 21, 2026
@pxlvre pxlvre closed this Sep 22, 2026
@pxlvre pxlvre reopened this Sep 22, 2026
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.

Avalanche C-Chain missing method-spec override → eth_baseFee unroutable via nodecore

1 participant