rpc: extract api config pkg more - #22680
Merged
Merged
Conversation
lupin012
marked this pull request as ready for review
July 22, 2026 21:03
AskAlexSharov
approved these changes
Jul 23, 2026
|
|
||
| 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{}) |
Collaborator
There was a problem hiding this comment.
i guess better pass some existing "defaults" object
Contributor
Author
There was a problem hiding this comment.
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
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 23, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #22609.
Extends the same pattern (BaseApiConfig/EthApiConfig) to the remaining APIs:
constructors no longer take loose scalar parameters, but a dedicated config defined in rpc/rpccfg