Skip to content

Commit 361e52c

Browse files
authored
refactor: remove gRPC reflection v1-alpha support (#1795)
1 parent 6ec5279 commit 361e52c

File tree

5 files changed

+1
-44
lines changed

5 files changed

+1
-44
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
- Removed `chain_tip` requirement from mempool subscription request ([#1771](https://github.com/0xMiden/node/pull/1771)).
3535
- Moved bootstrap procedure to `miden-node validator bootstrap` command ([#1764](https://github.com/0xMiden/node/pull/1764)).
3636
- NTX Builder now deactivates network accounts which crash repeatedly (configurable via `--ntx-builder.max-account-crashes`, default 10) ([#1712](https://github.com/0xMiden/miden-node/pull/1712)).
37+
- Removed gRPC reflection v1-alpha support ([#1795](https://github.com/0xMiden/node/pull/1795)).
3738

3839

3940
### Fixes

crates/block-producer/src/server/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,6 @@ impl BlockProducerRpcServer {
250250
.build_v1()
251251
.context("failed to build reflection service")?;
252252

253-
// This is currently required for postman to work properly because
254-
// it doesn't support the new version yet.
255-
//
256-
// See: <https://github.com/postmanlabs/postman-app-support/issues/13120>.
257-
let reflection_service_alpha = tonic_reflection::server::Builder::configure()
258-
.register_file_descriptor_set(block_producer_api_descriptor())
259-
.build_v1alpha()
260-
.context("failed to build reflection service")?;
261-
262253
// Build the gRPC server with the API service and trace layer.
263254

264255
tonic::transport::Server::builder()
@@ -268,7 +259,6 @@ impl BlockProducerRpcServer {
268259
.layer(TraceLayer::new_for_grpc().make_span_with(grpc_trace_fn))
269260
.add_service(api_server::ApiServer::new(self))
270261
.add_service(reflection_service)
271-
.add_service(reflection_service_alpha)
272262
.serve_with_incoming(TcpListenerStream::new(listener))
273263
.await
274264
.context("failed to serve block producer API")

crates/rpc/src/server/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,6 @@ impl Rpc {
6060
.build_v1()
6161
.context("failed to build reflection service")?;
6262

63-
// This is currently required for postman to work properly because
64-
// it doesn't support the new version yet.
65-
//
66-
// See: <https://github.com/postmanlabs/postman-app-support/issues/13120>.
67-
let reflection_service_alpha = server::Builder::configure()
68-
.register_file_descriptor_set(rpc_api_descriptor())
69-
.build_v1alpha()
70-
.context("failed to build reflection service")?;
71-
7263
info!(target: COMPONENT, endpoint=?self.listener, store=%self.store_url, block_producer=?self.block_producer_url, "Server initialized");
7364

7465
let rpc_version = env!("CARGO_PKG_VERSION");
@@ -99,7 +90,6 @@ impl Rpc {
9990
.add_service(api_service)
10091
// Enables gRPC reflection service.
10192
.add_service(reflection_service)
102-
.add_service(reflection_service_alpha)
10393
.serve_with_incoming(TcpListenerStream::new(self.listener))
10494
.await
10595
.context("failed to serve RPC API")

crates/store/src/server/mod.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,6 @@ impl Store {
123123
.build_v1()
124124
.context("failed to build reflection service")?;
125125

126-
// This is currently required for postman to work properly because
127-
// it doesn't support the new version yet.
128-
//
129-
// See: <https://github.com/postmanlabs/postman-app-support/issues/13120>.
130-
let reflection_service_alpha = tonic_reflection::server::Builder::configure()
131-
.register_file_descriptor_set(store_rpc_api_descriptor())
132-
.register_file_descriptor_set(store_ntx_builder_api_descriptor())
133-
.register_file_descriptor_set(store_block_producer_api_descriptor())
134-
.build_v1alpha()
135-
.context("failed to build reflection service")?;
136-
137126
info!(target: COMPONENT, "Database loaded");
138127

139128
let mut join_set = JoinSet::new();
@@ -159,7 +148,6 @@ impl Store {
159148
.layer(TraceLayer::new_for_grpc().make_span_with(grpc_trace_fn))
160149
.add_service(rpc_service)
161150
.add_service(reflection_service.clone())
162-
.add_service(reflection_service_alpha.clone())
163151
.serve_with_incoming(TcpListenerStream::new(self.rpc_listener)),
164152
);
165153

@@ -170,7 +158,6 @@ impl Store {
170158
.layer(TraceLayer::new_for_grpc().make_span_with(grpc_trace_fn))
171159
.add_service(ntx_builder_service)
172160
.add_service(reflection_service.clone())
173-
.add_service(reflection_service_alpha.clone())
174161
.serve_with_incoming(TcpListenerStream::new(self.ntx_builder_listener)),
175162
);
176163

@@ -182,7 +169,6 @@ impl Store {
182169
.layer(TraceLayer::new_for_grpc().make_span_with(grpc_trace_fn))
183170
.add_service(block_producer_service)
184171
.add_service(reflection_service)
185-
.add_service(reflection_service_alpha)
186172
.serve_with_incoming(TcpListenerStream::new(self.block_producer_listener)),
187173
);
188174

crates/validator/src/server/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,23 +70,13 @@ impl Validator {
7070
.build_v1()
7171
.context("failed to build reflection service")?;
7272

73-
// This is currently required for postman to work properly because
74-
// it doesn't support the new version yet.
75-
//
76-
// See: <https://github.com/postmanlabs/postman-app-support/issues/13120>.
77-
let reflection_service_alpha = tonic_reflection::server::Builder::configure()
78-
.register_file_descriptor_set(validator_api_descriptor())
79-
.build_v1alpha()
80-
.context("failed to build reflection service")?;
81-
8273
// Build the gRPC server with the API service and trace layer.
8374
tonic::transport::Server::builder()
8475
.layer(CatchPanicLayer::custom(catch_panic_layer_fn))
8576
.layer(TraceLayer::new_for_grpc().make_span_with(grpc_trace_fn))
8677
.timeout(self.grpc_options.request_timeout)
8778
.add_service(api_server::ApiServer::new(ValidatorServer::new(self.signer, db)))
8879
.add_service(reflection_service)
89-
.add_service(reflection_service_alpha)
9080
.serve_with_incoming(TcpListenerStream::new(listener))
9181
.await
9282
.context("failed to serve validator API")

0 commit comments

Comments
 (0)