Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 47 additions & 90 deletions crates/bridges/evm/erigon-bridge/src/generated/custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ pub mod trie_backend_client {
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
clippy::let_unit_value
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
use tonic::codegen::*;
/// TrieBackend service provides access to Merkle Patricia Trie data from CommitmentDomain
#[derive(Debug, Clone)]
pub struct TrieBackendClient<T> {
Expand Down Expand Up @@ -168,9 +168,8 @@ pub mod trie_backend_client {
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
<T as tonic::codegen::Service<http::Request<tonic::body::Body>>>::Error:
Into<StdError> + std::marker::Send + std::marker::Sync,
{
TrieBackendClient::new(InterceptedService::new(inner, interceptor))
}
Expand Down Expand Up @@ -209,22 +208,12 @@ pub mod trie_backend_client {
pub async fn get_state_root(
&mut self,
request: impl tonic::IntoRequest<super::GetStateRootRequest>,
) -> std::result::Result<
tonic::Response<super::GetStateRootReply>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
) -> std::result::Result<tonic::Response<super::GetStateRootReply>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/custom.TrieBackend/GetStateRoot",
);
let path = http::uri::PathAndQuery::from_static("/custom.TrieBackend/GetStateRoot");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("custom.TrieBackend", "GetStateRoot"));
Expand All @@ -238,43 +227,30 @@ pub mod trie_backend_client {
tonic::Response<tonic::codec::Streaming<super::CommitmentNodeBatch>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/custom.TrieBackend/StreamCommitmentNodes",
);
let path =
http::uri::PathAndQuery::from_static("/custom.TrieBackend/StreamCommitmentNodes");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("custom.TrieBackend", "StreamCommitmentNodes"));
req.extensions_mut().insert(GrpcMethod::new(
"custom.TrieBackend",
"StreamCommitmentNodes",
));
self.inner.server_streaming(req, path, codec).await
}
/// Get specific nodes by hash (for filling gaps)
pub async fn get_nodes_by_hash(
&mut self,
request: impl tonic::IntoRequest<super::GetNodesByHashRequest>,
) -> std::result::Result<
tonic::Response<super::GetNodesByHashReply>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
) -> std::result::Result<tonic::Response<super::GetNodesByHashReply>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/custom.TrieBackend/GetNodesByHash",
);
let path = http::uri::PathAndQuery::from_static("/custom.TrieBackend/GetNodesByHash");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("custom.TrieBackend", "GetNodesByHash"));
Expand Down Expand Up @@ -404,10 +380,10 @@ pub mod block_data_backend_client {
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
clippy::let_unit_value
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
use tonic::codegen::*;
/// BlockDataBackend service provides blockchain data as RLP-encoded bytes
/// This service streams data from both snapshots (frozen blocks) and live database
#[derive(Debug, Clone)]
Expand Down Expand Up @@ -453,9 +429,8 @@ pub mod block_data_backend_client {
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
<T as tonic::codegen::Service<http::Request<tonic::body::Body>>>::Error:
Into<StdError> + std::marker::Send + std::marker::Sync,
{
BlockDataBackendClient::new(InterceptedService::new(inner, interceptor))
}
Expand Down Expand Up @@ -498,18 +473,12 @@ pub mod block_data_backend_client {
tonic::Response<tonic::codec::Streaming<super::BlockBatch>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/custom.BlockDataBackend/StreamBlocks",
);
let path =
http::uri::PathAndQuery::from_static("/custom.BlockDataBackend/StreamBlocks");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("custom.BlockDataBackend", "StreamBlocks"));
Expand All @@ -523,23 +492,17 @@ pub mod block_data_backend_client {
tonic::Response<tonic::codec::Streaming<super::TransactionBatch>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/custom.BlockDataBackend/StreamTransactions",
);
let path =
http::uri::PathAndQuery::from_static("/custom.BlockDataBackend/StreamTransactions");
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("custom.BlockDataBackend", "StreamTransactions"),
);
req.extensions_mut().insert(GrpcMethod::new(
"custom.BlockDataBackend",
"StreamTransactions",
));
self.inner.server_streaming(req, path, codec).await
}
/// Execute blocks in range and stream RLP receipts (slow: executes blocks, generates receipts)
Expand All @@ -551,18 +514,12 @@ pub mod block_data_backend_client {
tonic::Response<tonic::codec::Streaming<super::ReceiptBatch>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/custom.BlockDataBackend/ExecuteBlocks",
);
let path =
http::uri::PathAndQuery::from_static("/custom.BlockDataBackend/ExecuteBlocks");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("custom.BlockDataBackend", "ExecuteBlocks"));
Expand Down
Loading