Skip to content

rpc: extract api config pkg more - #22680

Merged
AskAlexSharov merged 4 commits into
mainfrom
lupin012/extract_api_config_pkg_more
Jul 24, 2026
Merged

AskAlexSharov merged 4 commits into
mainfrom
lupin012/extract_api_config_pkg_more

Conversation

@lupin012

Copy link
Copy Markdown
Contributor

Follow-up to #22609.
Extends the same pattern (BaseApiConfig/EthApiConfig) to the remaining APIs:

  • NewPrivateDebugAPI
  • NewTraceAPI
  • NewGraphQLAPI
  • NewOverlayAPI

constructors no longer take loose scalar parameters, but a dedicated config defined in rpc/rpccfg

@lupin012
lupin012 marked this pull request as ready for review July 22, 2026 21:03
Comment thread cmd/evm/zkevmrunner.go Outdated

baseApi := jsonrpc.NewBaseApi(nil, m.StateCache, m.BlockReader, m.Engine, nil, &rpccfg.BaseApiConfig{Dirs: m.Dirs})
debugApi := jsonrpc.NewPrivateDebugAPI(baseApi, m.DB, nil, 0, false)
debugApi := jsonrpc.NewPrivateDebugAPI(baseApi, m.DB, nil, &rpccfg.DebugApiConfig{})

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

i guess better pass some existing "defaults" object

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a rpccfg.DefaultDebugApiConfig() helper that returns a DebugApiConfig with a non-zero default GasCap (DefaultGasCap = 50M, matching the rpcdaemon default), so it's reusable. In this call site (zkevmrunner, which only calls ExecutionWitness) the GasCap value doesn't actually matter — ExecutionWitness never reads it

@lupin012
lupin012 added this pull request to the merge queue Jul 23, 2026
@lupin012
lupin012 removed this pull request from the merge queue due to a manual request Jul 23, 2026
@lupin012
lupin012 added this pull request to the merge queue Jul 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 23, 2026
@AskAlexSharov
AskAlexSharov added this pull request to the merge queue Jul 24, 2026
Merged via the queue into main with commit df89565 Jul 24, 2026
95 checks passed
@AskAlexSharov
AskAlexSharov deleted the lupin012/extract_api_config_pkg_more branch July 24, 2026 08:53
AskAlexSharov added a commit that referenced this pull request Jul 24, 2026
Resolve APIList conflict from #22680 (rpc: extract api config pkg more):
adopt main's config-object constructors NewPrivateDebugAPI(...DebugApiConfig)
and NewTraceAPI(...TraceApiConfig), keeping debugImpl.witnessCache wiring.
Update the witness builder + its tests to the new NewPrivateDebugAPI signature.
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.

2 participants