Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

capi: export RpcDaemon configuration settings #1968

Merged
merged 9 commits into from
Apr 19, 2024
Merged

Conversation

canepat
Copy link
Member

@canepat canepat commented Apr 15, 2024

This PR exports our Silkworm RPC Daemon configuration settings in the C API interface. The following options can be customised (all of them are opt-in, default values provide a meaningful configuration):

  • number of I/O execution contexts to use in concurrency mode
  • configuration options for interface log of Execution JSON-RPC end-point
  • host address for Execution JSON-RPC end-point
  • listening port number for Execution JSON-RPC end-point
  • API namespace specification (comma-separated list of API namespaces)
  • number of threads in worker pool (for long-run tasks)
  • list of CORS domains
  • path to the JWT file in UTF-8
  • flag indicating if JSON-RPC strict compatibility w/ Erigon is supported
  • flag indicating if WebSocket support is enabled
  • flag indicating if compression of WebSocket messages is supported
  • flag indicating if compression of HTTP messages is supported

Extras

This PR also adds the logging verbosity level as Silkworm instance global setting. This is necessary to make Silkworm emit logs with the same verbosity as the C API client code, if needed.

canepat and others added 2 commits April 15, 2024 16:11
rpcdaemon: extract and reuse some default values
@canepat canepat added enhancement New feature or improvement c api The C API exposed for Erigon labels Apr 15, 2024
@battlmonstr battlmonstr removed their request for review April 16, 2024 06:57
silkworm/capi/common.cpp Outdated Show resolved Hide resolved
silkworm/capi/silkworm.h Outdated Show resolved Hide resolved
silkworm/capi/silkworm.cpp Outdated Show resolved Hide resolved
@canepat canepat marked this pull request as ready for review April 17, 2024 16:08
@canepat canepat requested a review from JacekGlen April 18, 2024 16:56
@canepat canepat merged commit 66e333b into master Apr 19, 2024
4 checks passed
@canepat canepat deleted the capi_rpcdaemon_settings branch April 19, 2024 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c api The C API exposed for Erigon enhancement New feature or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants