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

Refine BackEnd RPC implementations #618

Merged
merged 20 commits into from
Mar 28, 2022
Merged

Refine BackEnd RPC implementations #618

merged 20 commits into from
Mar 28, 2022

Conversation

canepat
Copy link
Member

@canepat canepat commented Mar 18, 2022

This PR contains the following features:

  • refactor Etherbase RPC implementation
  • refactor NetVersion RPC implementation
  • add NetPeerCount RPC implementation
  • add NodeInfo RPC implementation
  • add EthereumBackEnd implementation and refactor RPC factories to use it
  • add Etherbase command-line option to BackEnd & KV standalone server
  • add async Sentry client [needs convergence with downloader sync Sentry client, see TODOLIST]
  • the BackEnd & KV standalone server runs in numContexts threads, reducing threads from 3 to 1 per context [still WIP see TODOLIST]
  • refactor unit tests

TODOLIST:

  • one PR for adding simple wait strategy for ServerContextPool to avoid CPU waste
  • one PR for sync/async Sentry client convergence, see header downloader Sentry client
  • one or more PR for KV RPC implementation

canepat added 2 commits March 18, 2022 17:22
Add Ethereum BackEnd implementation
Refactor RPC factories to use Ethereum BackEnd
Refactor Etherbase RPC implementation
Refactor unit tests
@codecov
Copy link

codecov bot commented Mar 18, 2022

Codecov Report

Merging #618 (a3a6246) into master (0b5e74a) will increase coverage by 0.39%.
The diff coverage is 96.76%.

@@            Coverage Diff             @@
##           master     #618      +/-   ##
==========================================
+ Coverage   81.76%   82.15%   +0.39%     
==========================================
  Files         170      175       +5     
  Lines       14193    14386     +193     
==========================================
+ Hits        11605    11819     +214     
+ Misses       2588     2567      -21     
Impacted Files Coverage Δ
node/silkworm/rpc/server_config.cpp 72.72% <ø> (-5.85%) ⬇️
node/silkworm/rpc/server_config.hpp 100.00% <ø> (ø)
node/silkworm/rpc/server_context_pool.hpp 50.00% <60.00%> (+50.00%) ⬆️
node/silkworm/rpc/client/call.hpp 67.85% <67.85%> (ø)
node/silkworm/rpc/server_context_pool.cpp 87.75% <90.24%> (+12.50%) ⬆️
node/silkworm/backend/ethereum_backend.cpp 100.00% <100.00%> (ø)
node/silkworm/backend/ethereum_backend.hpp 100.00% <100.00%> (ø)
node/silkworm/rpc/backend_factories.cpp 100.00% <100.00%> (ø)
node/silkworm/rpc/backend_kv_server.cpp 100.00% <100.00%> (ø)
node/silkworm/rpc/backend_kv_server.hpp 100.00% <100.00%> (ø)
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b5e74a...a3a6246. Read the comment docs.

canepat added 17 commits March 20, 2022 11:33
Add Sentry clients in each BackEnd KV factory group
Add client completion queue+runner in each server context
Add RPC client async calls
Initialize Sentry clients from server contexts
Add factory of remote Sentry clients
Temporarily avoid removing Sentry client RPCs
Remove threads waiting on completion queues
Refactor unit tests
Refactor call and call factory hierarchy
Remove io_context::post and execute CQ handler directly
Remove one io_context:: poll_one from execution loop
Update unit tests
Add unit tests for KO scenarios
@canepat canepat marked this pull request as ready for review March 24, 2022 14:25
@canepat canepat requested a review from mriccobene March 24, 2022 14:25
Copy link
Member

@mriccobene mriccobene left a comment

Choose a reason for hiding this comment

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

LGTM

@canepat canepat merged commit d2060eb into master Mar 28, 2022
@canepat canepat deleted the backend_kv_server4 branch March 28, 2022 09:13
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