Skip to content

Commit 9e955b7

Browse files
committed
asio-grpc submodule
1 parent af456b3 commit 9e955b7

36 files changed

+166
-33
lines changed

Diff for: .gitmodules

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[submodule "asio-grpc"]
2+
path = third_party/asio-grpc/asio-grpc
3+
url = https://github.com/Tradias/asio-grpc.git
14
[submodule "evmone"]
25
path = third_party/evmone/evmone
36
url = https://github.com/erigontech/evmone.git
@@ -46,6 +49,6 @@
4649
path = third_party/execution-apis
4750
url = https://github.com/ethereum/execution-apis.git
4851
branch = main
49-
[submodule "third_party/eest-fixtures/BlockchainTests"]
52+
[submodule "BlockchainTests"]
5053
path = third_party/eest-fixtures/BlockchainTests
5154
url = https://github.com/erigontech/eest-fixtures

Diff for: cmake/conan.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
147147
list(APPEND CONAN_SETTINGS "build_type=${CMAKE_BUILD_TYPE}")
148148
# most Windows packages on ConanCenter are built for cppstd=14, but some packages require at least cppstd=17
149149
# (otherwise report "Invalid" status)
150-
list(APPEND CONAN_SETTINGS "asio-grpc/*:compiler.cppstd=17")
151150
list(APPEND CONAN_SETTINGS "magic_enum/*:compiler.cppstd=17")
152151
list(APPEND CONAN_SETTINGS "tomlplusplus/*:compiler.cppstd=17")
153152
endif()

Diff for: conanfile.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ def requirements(self):
3030
return
3131

3232
self.requires('abseil/20240116.2', override=True)
33-
self.requires('asio-grpc/2.9.2')
3433
self.requires('benchmark/1.6.1')
3534
self.requires('boost/1.83.0', override=True)
3635
self.requires('cli11/2.2.0')
3736
self.requires('gmp/6.2.1')
38-
self.requires('grpc/1.67.1', override=True)
37+
self.requires('grpc/1.67.1')
3938
self.requires('gtest/1.12.1')
4039
self.requires('jwt-cpp/0.6.0')
4140
self.requires('libtorrent/2.0.10')
@@ -49,8 +48,6 @@ def requirements(self):
4948
self.requires('tomlplusplus/3.3.0')
5049

5150
def configure(self):
52-
self.options['asio-grpc'].local_allocator = 'boost_container'
53-
5451
if (self.settings.os == 'Linux') and (self.settings.compiler == 'clang'):
5552
self.options['grpc'].with_libsystemd = False
5653

Diff for: silkworm/db/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ include("${SILKWORM_MAIN_DIR}/cmake/common/targets.cmake")
1919
add_subdirectory(datastore)
2020

2121
find_package(absl REQUIRED)
22-
find_package(asio-grpc REQUIRED)
2322
find_package(Boost REQUIRED COMPONENTS headers)
2423
find_package(gRPC REQUIRED)
2524
find_package(magic_enum REQUIRED)

Diff for: silkworm/db/kv/grpc/client/remote_client.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include "remote_client.hpp"
1818

19-
#include <agrpc/client_rpc.hpp>
19+
#include <asio-grpc-wrap/client_rpc.hpp>
2020
#include <boost/asio/steady_timer.hpp>
2121
#include <boost/asio/use_awaitable.hpp>
2222
#include <grpcpp/grpcpp.h>

Diff for: silkworm/db/kv/grpc/client/remote_transaction.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
#include <silkworm/infra/concurrency/task.hpp>
2525

26-
#include <agrpc/client_rpc.hpp>
27-
#include <agrpc/grpc_context.hpp>
26+
#include <asio-grpc-wrap/client_rpc.hpp>
27+
#include <asio-grpc-wrap/grpc_context.hpp>
2828
#include <grpcpp/grpcpp.h>
2929

3030
#include <silkworm/db/chain/providers.hpp>

Diff for: silkworm/db/kv/grpc/client/rpc.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#pragma once
1818

19-
#include <agrpc/client_rpc.hpp>
19+
#include <asio-grpc-wrap/client_rpc.hpp>
2020
#include <boost/asio/use_awaitable.hpp>
2121

2222
#include <silkworm/interfaces/remote/kv.grpc.pb.h>

Diff for: silkworm/db/kv/grpc/server/kv_calls.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include "kv_calls.hpp"
1818

19-
#include <agrpc/asio_grpc.hpp>
19+
#include <asio-grpc-wrap/asio_grpc.hpp>
2020
#include <boost/asio/as_tuple.hpp>
2121
#include <boost/asio/dispatch.hpp>
2222
#include <boost/asio/experimental/awaitable_operators.hpp>

Diff for: silkworm/db/test_util/kv_test_base.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include <memory>
2020

21-
#include <agrpc/test.hpp>
21+
#include <asio-grpc-wrap/test.hpp>
2222
#include <gmock/gmock.h>
2323

2424
#include <silkworm/infra/grpc/test_util/grpc_responder.hpp>

Diff for: silkworm/execution/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
include("${SILKWORM_MAIN_DIR}/cmake/common/targets.cmake")
1818

19-
find_package(asio-grpc REQUIRED)
2019
find_package(gRPC REQUIRED)
2120
find_package(GTest REQUIRED)
2221
find_package(nlohmann_json REQUIRED)

Diff for: silkworm/execution/grpc/server/server.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include <utility>
2020

21-
#include <agrpc/grpc_context.hpp>
21+
#include <asio-grpc-wrap/grpc_context.hpp>
2222

2323
#include <silkworm/infra/common/log.hpp>
2424
#include <silkworm/infra/grpc/server/call.hpp>

Diff for: silkworm/infra/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
include("${SILKWORM_MAIN_DIR}/cmake/common/targets.cmake")
1818

1919
find_package(absl REQUIRED)
20-
find_package(asio-grpc REQUIRED)
2120
find_package(Boost REQUIRED COMPONENTS headers container thread)
2221
find_package(Catch2 REQUIRED)
2322
find_package(gRPC REQUIRED)

Diff for: silkworm/infra/grpc/client/call.hpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@
2525

2626
#include <silkworm/infra/concurrency/task.hpp>
2727

28+
#pragma GCC diagnostic push
29+
#pragma GCC diagnostic ignored "-Wsign-conversion"
2830
#include <agrpc/detail/rpc.hpp>
29-
#include <agrpc/grpc_context.hpp>
31+
#pragma GCC diagnostic pop
32+
3033
#include <agrpc/rpc.hpp>
34+
#include <asio-grpc-wrap/grpc_context.hpp>
3135
#include <boost/asio/bind_executor.hpp>
3236
#include <boost/asio/use_awaitable.hpp>
3337
#include <grpcpp/grpcpp.h>

Diff for: silkworm/infra/grpc/client/client_context_pool.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <functional>
2121
#include <memory>
2222

23-
#include <agrpc/asio_grpc.hpp>
23+
#include <asio-grpc-wrap/asio_grpc.hpp>
2424
#include <boost/asio/executor_work_guard.hpp>
2525
#include <grpcpp/grpcpp.h>
2626

Diff for: silkworm/infra/grpc/server/call.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <stdexcept>
2323
#include <utility>
2424

25-
#include <agrpc/repeatedly_request.hpp>
25+
#include <asio-grpc-wrap/repeatedly_request.hpp>
2626
#include <grpcpp/grpcpp.h>
2727
#include <grpcpp/impl/codegen/async_stream.h>
2828
#include <grpcpp/impl/codegen/async_unary_call.h>

Diff for: silkworm/infra/grpc/server/server_context_pool.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <functional>
2121
#include <memory>
2222

23-
#include <agrpc/asio_grpc.hpp>
23+
#include <asio-grpc-wrap/asio_grpc.hpp>
2424
#include <grpcpp/grpcpp.h>
2525

2626
#include <silkworm/infra/concurrency/context_pool.hpp>

Diff for: silkworm/infra/grpc/test_util/grpc_actions.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
#include <utility>
2020

21-
#include <agrpc/grpc_context.hpp>
22-
#include <agrpc/test.hpp>
21+
#include <asio-grpc-wrap/grpc_context.hpp>
22+
#include <asio-grpc-wrap/test.hpp>
2323
#include <grpcpp/grpcpp.h>
2424

2525
namespace silkworm::rpc::test {

Diff for: silkworm/infra/grpc/test_util/test_runner.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include <memory>
2020

21-
#include <agrpc/asio_grpc.hpp>
21+
#include <asio-grpc-wrap/asio_grpc.hpp>
2222
#include <boost/asio/executor_work_guard.hpp>
2323

2424
#include "../../test_util/task_runner.hpp"

Diff for: silkworm/node/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ add_subdirectory(execution/block)
2020
add_subdirectory(stagedsync/stages)
2121

2222
find_package(absl REQUIRED COMPONENTS strings)
23-
find_package(asio-grpc REQUIRED)
2423
find_package(Boost REQUIRED COMPONENTS headers)
2524
find_package(gRPC REQUIRED)
2625
find_package(GTest REQUIRED)

Diff for: silkworm/node/remote/ethbackend/grpc/server/backend_calls.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#include <silkworm/infra/concurrency/task.hpp>
2525

26-
#include <agrpc/asio_grpc.hpp>
26+
#include <asio-grpc-wrap/asio_grpc.hpp>
2727
#include <grpcpp/grpcpp.h>
2828

2929
#include <silkworm/core/chain/config.hpp>

Diff for: silkworm/rpc/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
include("${SILKWORM_MAIN_DIR}/cmake/common/targets.cmake")
1818

1919
find_package(absl REQUIRED)
20-
find_package(asio-grpc REQUIRED)
2120
find_package(Boost REQUIRED COMPONENTS headers container)
2221
find_package(gRPC REQUIRED)
2322
find_package(GTest REQUIRED)

Diff for: silkworm/rpc/commands/net_api_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include "net_api.hpp"
1818

19-
#include <agrpc/test.hpp>
19+
#include <asio-grpc-wrap/test.hpp>
2020
#include <catch2/catch_test_macros.hpp>
2121
#include <grpcpp/grpcpp.h>
2222

Diff for: silkworm/rpc/engine/remote_execution_engine.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#pragma once
1818

19-
#include <agrpc/asio_grpc.hpp>
19+
#include <asio-grpc-wrap/asio_grpc.hpp>
2020

2121
#include <silkworm/execution/grpc/client/remote_client.hpp>
2222

Diff for: silkworm/rpc/ethbackend/remote_backend.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <string>
2121
#include <vector>
2222

23-
#include <agrpc/grpc_context.hpp>
23+
#include <asio-grpc-wrap/grpc_context.hpp>
2424
#include <evmc/evmc.hpp>
2525

2626
#include <silkworm/interfaces/remote/ethbackend.grpc.pb.h>

Diff for: silkworm/rpc/txpool/miner.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#include <silkworm/infra/concurrency/task.hpp>
2323

24-
#include <agrpc/grpc_context.hpp>
24+
#include <asio-grpc-wrap/grpc_context.hpp>
2525
#include <evmc/evmc.hpp>
2626
#include <grpcpp/grpcpp.h>
2727
#include <intx/intx.hpp>

Diff for: silkworm/rpc/txpool/transaction_pool.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#include <silkworm/infra/concurrency/task.hpp>
2626

27-
#include <agrpc/grpc_context.hpp>
27+
#include <asio-grpc-wrap/grpc_context.hpp>
2828
#include <evmc/evmc.hpp>
2929
#include <grpcpp/grpcpp.h>
3030

Diff for: silkworm/rpc/txpool/transaction_pool_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <string>
2020
#include <utility>
2121

22-
#include <agrpc/test.hpp>
22+
#include <asio-grpc-wrap/test.hpp>
2323
#include <catch2/catch_test_macros.hpp>
2424
#include <evmc/evmc.hpp>
2525
#include <gmock/gmock.h>

Diff for: silkworm/sentry/grpc/server/server.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#include <silkworm/infra/concurrency/task.hpp>
2222

23-
#include <agrpc/grpc_context.hpp>
23+
#include <asio-grpc-wrap/grpc_context.hpp>
2424

2525
#include <silkworm/infra/common/log.hpp>
2626
#include <silkworm/infra/grpc/server/call.hpp>

Diff for: third_party/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ add_subdirectory(evmone) # depends on ethash, intx
2626

2727
# please keep the list sorted
2828
if(NOT SILKWORM_CORE_ONLY)
29+
add_subdirectory(asio-grpc)
2930
add_subdirectory(cbor-cpp)
3031
add_subdirectory(cpp-base64)
3132
add_subdirectory(erigon-mdbx-go)

Diff for: third_party/asio-grpc/CMakeLists.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#[[
2+
Copyright 2025 The Silkworm Authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
]]
16+
17+
set(ASIO_GRPC_USE_BOOST_CONTAINER YES)
18+
19+
add_subdirectory(asio-grpc)
20+
21+
target_include_directories(asio-grpc INTERFACE "${CMAKE_CURRENT_LIST_DIR}")

Diff for: third_party/asio-grpc/asio-grpc

Submodule asio-grpc added at 82a4d40

Diff for: third_party/asio-grpc/asio-grpc-wrap/asio_grpc.hpp

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
Copyright 2025 The Silkworm Authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
#pragma once
18+
19+
#pragma GCC diagnostic push
20+
#pragma GCC diagnostic ignored "-Wsign-conversion"
21+
#pragma GCC diagnostic ignored "-Wshadow"
22+
#include <agrpc/asio_grpc.hpp>
23+
#pragma GCC diagnostic pop

Diff for: third_party/asio-grpc/asio-grpc-wrap/client_rpc.hpp

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
Copyright 2025 The Silkworm Authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
#pragma once
18+
19+
#pragma GCC diagnostic push
20+
#pragma GCC diagnostic ignored "-Wsign-conversion"
21+
#include <agrpc/client_rpc.hpp>
22+
#pragma GCC diagnostic pop
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
Copyright 2025 The Silkworm Authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
#pragma once
18+
19+
#pragma GCC diagnostic push
20+
#pragma GCC diagnostic ignored "-Wsign-conversion"
21+
#include <agrpc/grpc_context.hpp>
22+
#pragma GCC diagnostic pop

0 commit comments

Comments
 (0)