Skip to content

execution: direct client + gRPC client and server #2004

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

Merged
merged 18 commits into from
May 15, 2024

Conversation

canepat
Copy link
Member

@canepat canepat commented May 7, 2024

This PR defines the following abstractions wrapped around the internal execution interface:

  • gRPC client and server
  • direct (i.e. in-process, gRPC-free) client implementation

This PR adds the client/server bindings for such interface, but does not yet uses them. Another PR will follow to put these bindings in play refactoring the current implementation in stagedsync package and its usage in sync module.

Extras
Some more bits have been added or touched to accommodate the needed changes:

  • convenience function concurrency::co_spawn_and_await to spawn a coroutine using co_spawn_sw and awaiting its completion asynchronously
  • new type alias TaskExecutor
  • optional stack_size parameter in rpc::Server::async_run
  • support for missing safe_block_hash in stagedsync::Fork and stagedsync::ExtendingFork

@canepat canepat requested review from JacekGlen and lupin012 May 7, 2024 19:05
@canepat canepat marked this pull request as draft May 8, 2024 10:28
canepat and others added 10 commits May 8, 2024 17:30
fix H2048_from_string
improve signature of deserialize_hex_as_bytes
fix fork_choice_from_response
add test fixture facility
refactoring to extract sample data
fix block number and hash in server-side GetBody RPC
unit tests for server-side checkers and getters
some cleanup
add unit tests for server-side insertion
@canepat canepat marked this pull request as ready for review May 10, 2024 15:17
Copy link
Contributor

@JacekGlen JacekGlen left a comment

Choose a reason for hiding this comment

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

Approving with some minor comments. This will be fixed in subsequent PRs.
Otherwise this change should not break any functionality.

@JacekGlen JacekGlen merged commit c872f0e into master May 15, 2024
@JacekGlen JacekGlen deleted the execution_api_grpc_client_server branch May 15, 2024 09:26
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.

3 participants