diff --git a/silkworm/interfaces/3.21.12/remote/ethbackend.grpc.pb.cc b/silkworm/interfaces/3.21.12/remote/ethbackend.grpc.pb.cc index 0e37cbe405..ae32434151 100644 --- a/silkworm/interfaces/3.21.12/remote/ethbackend.grpc.pb.cc +++ b/silkworm/interfaces/3.21.12/remote/ethbackend.grpc.pb.cc @@ -31,6 +31,8 @@ static const char* ETHBACKEND_method_names[] = { "/remote.ETHBACKEND/Subscribe", "/remote.ETHBACKEND/SubscribeLogs", "/remote.ETHBACKEND/Block", + "/remote.ETHBACKEND/CanonicalHash", + "/remote.ETHBACKEND/HeaderNumber", "/remote.ETHBACKEND/TxnLookup", "/remote.ETHBACKEND/NodeInfo", "/remote.ETHBACKEND/Peers", @@ -55,12 +57,14 @@ ETHBACKEND::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel , rpcmethod_Subscribe_(ETHBACKEND_method_names[6], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel) , rpcmethod_SubscribeLogs_(ETHBACKEND_method_names[7], options.suffix_for_stats(),::grpc::internal::RpcMethod::BIDI_STREAMING, channel) , rpcmethod_Block_(ETHBACKEND_method_names[8], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_TxnLookup_(ETHBACKEND_method_names[9], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_NodeInfo_(ETHBACKEND_method_names[10], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_Peers_(ETHBACKEND_method_names[11], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_AddPeer_(ETHBACKEND_method_names[12], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_PendingBlock_(ETHBACKEND_method_names[13], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_BorEvent_(ETHBACKEND_method_names[14], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_CanonicalHash_(ETHBACKEND_method_names[9], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_HeaderNumber_(ETHBACKEND_method_names[10], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_TxnLookup_(ETHBACKEND_method_names[11], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_NodeInfo_(ETHBACKEND_method_names[12], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_Peers_(ETHBACKEND_method_names[13], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_AddPeer_(ETHBACKEND_method_names[14], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_PendingBlock_(ETHBACKEND_method_names[15], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_BorEvent_(ETHBACKEND_method_names[16], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) {} ::grpc::Status ETHBACKEND::Stub::Etherbase(::grpc::ClientContext* context, const ::remote::EtherbaseRequest& request, ::remote::EtherbaseReply* response) { @@ -256,6 +260,52 @@ ::grpc::ClientAsyncResponseReader< ::remote::BlockReply>* ETHBACKEND::Stub::Asyn return result; } +::grpc::Status ETHBACKEND::Stub::CanonicalHash(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::remote::CanonicalHashReply* response) { + return ::grpc::internal::BlockingUnaryCall< ::remote::CanonicalHashRequest, ::remote::CanonicalHashReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_CanonicalHash_, context, request, response); +} + +void ETHBACKEND::Stub::async::CanonicalHash(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest* request, ::remote::CanonicalHashReply* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::remote::CanonicalHashRequest, ::remote::CanonicalHashReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CanonicalHash_, context, request, response, std::move(f)); +} + +void ETHBACKEND::Stub::async::CanonicalHash(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest* request, ::remote::CanonicalHashReply* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CanonicalHash_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::remote::CanonicalHashReply>* ETHBACKEND::Stub::PrepareAsyncCanonicalHashRaw(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::remote::CanonicalHashReply, ::remote::CanonicalHashRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_CanonicalHash_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::remote::CanonicalHashReply>* ETHBACKEND::Stub::AsyncCanonicalHashRaw(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncCanonicalHashRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status ETHBACKEND::Stub::HeaderNumber(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::remote::HeaderNumberReply* response) { + return ::grpc::internal::BlockingUnaryCall< ::remote::HeaderNumberRequest, ::remote::HeaderNumberReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_HeaderNumber_, context, request, response); +} + +void ETHBACKEND::Stub::async::HeaderNumber(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest* request, ::remote::HeaderNumberReply* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::remote::HeaderNumberRequest, ::remote::HeaderNumberReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HeaderNumber_, context, request, response, std::move(f)); +} + +void ETHBACKEND::Stub::async::HeaderNumber(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest* request, ::remote::HeaderNumberReply* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HeaderNumber_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::remote::HeaderNumberReply>* ETHBACKEND::Stub::PrepareAsyncHeaderNumberRaw(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::remote::HeaderNumberReply, ::remote::HeaderNumberRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_HeaderNumber_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::remote::HeaderNumberReply>* ETHBACKEND::Stub::AsyncHeaderNumberRaw(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncHeaderNumberRaw(context, request, cq); + result->StartCall(); + return result; +} + ::grpc::Status ETHBACKEND::Stub::TxnLookup(::grpc::ClientContext* context, const ::remote::TxnLookupRequest& request, ::remote::TxnLookupReply* response) { return ::grpc::internal::BlockingUnaryCall< ::remote::TxnLookupRequest, ::remote::TxnLookupReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_TxnLookup_, context, request, response); } @@ -488,6 +538,26 @@ ETHBACKEND::Service::Service() { AddMethod(new ::grpc::internal::RpcServiceMethod( ETHBACKEND_method_names[9], ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< ETHBACKEND::Service, ::remote::CanonicalHashRequest, ::remote::CanonicalHashReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](ETHBACKEND::Service* service, + ::grpc::ServerContext* ctx, + const ::remote::CanonicalHashRequest* req, + ::remote::CanonicalHashReply* resp) { + return service->CanonicalHash(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + ETHBACKEND_method_names[10], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< ETHBACKEND::Service, ::remote::HeaderNumberRequest, ::remote::HeaderNumberReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](ETHBACKEND::Service* service, + ::grpc::ServerContext* ctx, + const ::remote::HeaderNumberRequest* req, + ::remote::HeaderNumberReply* resp) { + return service->HeaderNumber(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + ETHBACKEND_method_names[11], + ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< ETHBACKEND::Service, ::remote::TxnLookupRequest, ::remote::TxnLookupReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( [](ETHBACKEND::Service* service, ::grpc::ServerContext* ctx, @@ -496,7 +566,7 @@ ETHBACKEND::Service::Service() { return service->TxnLookup(ctx, req, resp); }, this))); AddMethod(new ::grpc::internal::RpcServiceMethod( - ETHBACKEND_method_names[10], + ETHBACKEND_method_names[12], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< ETHBACKEND::Service, ::remote::NodesInfoRequest, ::remote::NodesInfoReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( [](ETHBACKEND::Service* service, @@ -506,7 +576,7 @@ ETHBACKEND::Service::Service() { return service->NodeInfo(ctx, req, resp); }, this))); AddMethod(new ::grpc::internal::RpcServiceMethod( - ETHBACKEND_method_names[11], + ETHBACKEND_method_names[13], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< ETHBACKEND::Service, ::google::protobuf::Empty, ::remote::PeersReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( [](ETHBACKEND::Service* service, @@ -516,7 +586,7 @@ ETHBACKEND::Service::Service() { return service->Peers(ctx, req, resp); }, this))); AddMethod(new ::grpc::internal::RpcServiceMethod( - ETHBACKEND_method_names[12], + ETHBACKEND_method_names[14], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< ETHBACKEND::Service, ::remote::AddPeerRequest, ::remote::AddPeerReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( [](ETHBACKEND::Service* service, @@ -526,7 +596,7 @@ ETHBACKEND::Service::Service() { return service->AddPeer(ctx, req, resp); }, this))); AddMethod(new ::grpc::internal::RpcServiceMethod( - ETHBACKEND_method_names[13], + ETHBACKEND_method_names[15], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< ETHBACKEND::Service, ::google::protobuf::Empty, ::remote::PendingBlockReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( [](ETHBACKEND::Service* service, @@ -536,7 +606,7 @@ ETHBACKEND::Service::Service() { return service->PendingBlock(ctx, req, resp); }, this))); AddMethod(new ::grpc::internal::RpcServiceMethod( - ETHBACKEND_method_names[14], + ETHBACKEND_method_names[16], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< ETHBACKEND::Service, ::remote::BorEventRequest, ::remote::BorEventReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( [](ETHBACKEND::Service* service, @@ -612,6 +682,20 @@ ::grpc::Status ETHBACKEND::Service::Block(::grpc::ServerContext* context, const return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } +::grpc::Status ETHBACKEND::Service::CanonicalHash(::grpc::ServerContext* context, const ::remote::CanonicalHashRequest* request, ::remote::CanonicalHashReply* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status ETHBACKEND::Service::HeaderNumber(::grpc::ServerContext* context, const ::remote::HeaderNumberRequest* request, ::remote::HeaderNumberReply* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + ::grpc::Status ETHBACKEND::Service::TxnLookup(::grpc::ServerContext* context, const ::remote::TxnLookupRequest* request, ::remote::TxnLookupReply* response) { (void) context; (void) request; diff --git a/silkworm/interfaces/3.21.12/remote/ethbackend.grpc.pb.h b/silkworm/interfaces/3.21.12/remote/ethbackend.grpc.pb.h index 86cb830571..4a9323bed6 100644 --- a/silkworm/interfaces/3.21.12/remote/ethbackend.grpc.pb.h +++ b/silkworm/interfaces/3.21.12/remote/ethbackend.grpc.pb.h @@ -109,6 +109,22 @@ class ETHBACKEND final { std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::remote::BlockReply>> PrepareAsyncBlock(::grpc::ClientContext* context, const ::remote::BlockRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::remote::BlockReply>>(PrepareAsyncBlockRaw(context, request, cq)); } + // High-level method - can find block hash by block number + virtual ::grpc::Status CanonicalHash(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::remote::CanonicalHashReply* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::remote::CanonicalHashReply>> AsyncCanonicalHash(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::remote::CanonicalHashReply>>(AsyncCanonicalHashRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::remote::CanonicalHashReply>> PrepareAsyncCanonicalHash(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::remote::CanonicalHashReply>>(PrepareAsyncCanonicalHashRaw(context, request, cq)); + } + // High-level method - can find block number by block hash + virtual ::grpc::Status HeaderNumber(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::remote::HeaderNumberReply* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::remote::HeaderNumberReply>> AsyncHeaderNumber(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::remote::HeaderNumberReply>>(AsyncHeaderNumberRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::remote::HeaderNumberReply>> PrepareAsyncHeaderNumber(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::remote::HeaderNumberReply>>(PrepareAsyncHeaderNumberRaw(context, request, cq)); + } // High-level method - can find block number by txn hash // it doesn't provide consistency virtual ::grpc::Status TxnLookup(::grpc::ClientContext* context, const ::remote::TxnLookupRequest& request, ::remote::TxnLookupReply* response) = 0; @@ -182,6 +198,12 @@ class ETHBACKEND final { // Request fields are optional - it's ok to request block only by hash or only by number virtual void Block(::grpc::ClientContext* context, const ::remote::BlockRequest* request, ::remote::BlockReply* response, std::function) = 0; virtual void Block(::grpc::ClientContext* context, const ::remote::BlockRequest* request, ::remote::BlockReply* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // High-level method - can find block hash by block number + virtual void CanonicalHash(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest* request, ::remote::CanonicalHashReply* response, std::function) = 0; + virtual void CanonicalHash(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest* request, ::remote::CanonicalHashReply* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // High-level method - can find block number by block hash + virtual void HeaderNumber(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest* request, ::remote::HeaderNumberReply* response, std::function) = 0; + virtual void HeaderNumber(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest* request, ::remote::HeaderNumberReply* response, ::grpc::ClientUnaryReactor* reactor) = 0; // High-level method - can find block number by txn hash // it doesn't provide consistency virtual void TxnLookup(::grpc::ClientContext* context, const ::remote::TxnLookupRequest* request, ::remote::TxnLookupReply* response, std::function) = 0; @@ -224,6 +246,10 @@ class ETHBACKEND final { virtual ::grpc::ClientAsyncReaderWriterInterface< ::remote::LogsFilterRequest, ::remote::SubscribeLogsReply>* PrepareAsyncSubscribeLogsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::remote::BlockReply>* AsyncBlockRaw(::grpc::ClientContext* context, const ::remote::BlockRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::remote::BlockReply>* PrepareAsyncBlockRaw(::grpc::ClientContext* context, const ::remote::BlockRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::remote::CanonicalHashReply>* AsyncCanonicalHashRaw(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::remote::CanonicalHashReply>* PrepareAsyncCanonicalHashRaw(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::remote::HeaderNumberReply>* AsyncHeaderNumberRaw(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::remote::HeaderNumberReply>* PrepareAsyncHeaderNumberRaw(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::remote::TxnLookupReply>* AsyncTxnLookupRaw(::grpc::ClientContext* context, const ::remote::TxnLookupRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::remote::TxnLookupReply>* PrepareAsyncTxnLookupRaw(::grpc::ClientContext* context, const ::remote::TxnLookupRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::remote::NodesInfoReply>* AsyncNodeInfoRaw(::grpc::ClientContext* context, const ::remote::NodesInfoRequest& request, ::grpc::CompletionQueue* cq) = 0; @@ -307,6 +333,20 @@ class ETHBACKEND final { std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::remote::BlockReply>> PrepareAsyncBlock(::grpc::ClientContext* context, const ::remote::BlockRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::remote::BlockReply>>(PrepareAsyncBlockRaw(context, request, cq)); } + ::grpc::Status CanonicalHash(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::remote::CanonicalHashReply* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::remote::CanonicalHashReply>> AsyncCanonicalHash(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::remote::CanonicalHashReply>>(AsyncCanonicalHashRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::remote::CanonicalHashReply>> PrepareAsyncCanonicalHash(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::remote::CanonicalHashReply>>(PrepareAsyncCanonicalHashRaw(context, request, cq)); + } + ::grpc::Status HeaderNumber(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::remote::HeaderNumberReply* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::remote::HeaderNumberReply>> AsyncHeaderNumber(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::remote::HeaderNumberReply>>(AsyncHeaderNumberRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::remote::HeaderNumberReply>> PrepareAsyncHeaderNumber(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::remote::HeaderNumberReply>>(PrepareAsyncHeaderNumberRaw(context, request, cq)); + } ::grpc::Status TxnLookup(::grpc::ClientContext* context, const ::remote::TxnLookupRequest& request, ::remote::TxnLookupReply* response) override; std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::remote::TxnLookupReply>> AsyncTxnLookup(::grpc::ClientContext* context, const ::remote::TxnLookupRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::remote::TxnLookupReply>>(AsyncTxnLookupRaw(context, request, cq)); @@ -368,6 +408,10 @@ class ETHBACKEND final { void SubscribeLogs(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::remote::LogsFilterRequest,::remote::SubscribeLogsReply>* reactor) override; void Block(::grpc::ClientContext* context, const ::remote::BlockRequest* request, ::remote::BlockReply* response, std::function) override; void Block(::grpc::ClientContext* context, const ::remote::BlockRequest* request, ::remote::BlockReply* response, ::grpc::ClientUnaryReactor* reactor) override; + void CanonicalHash(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest* request, ::remote::CanonicalHashReply* response, std::function) override; + void CanonicalHash(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest* request, ::remote::CanonicalHashReply* response, ::grpc::ClientUnaryReactor* reactor) override; + void HeaderNumber(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest* request, ::remote::HeaderNumberReply* response, std::function) override; + void HeaderNumber(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest* request, ::remote::HeaderNumberReply* response, ::grpc::ClientUnaryReactor* reactor) override; void TxnLookup(::grpc::ClientContext* context, const ::remote::TxnLookupRequest* request, ::remote::TxnLookupReply* response, std::function) override; void TxnLookup(::grpc::ClientContext* context, const ::remote::TxnLookupRequest* request, ::remote::TxnLookupReply* response, ::grpc::ClientUnaryReactor* reactor) override; void NodeInfo(::grpc::ClientContext* context, const ::remote::NodesInfoRequest* request, ::remote::NodesInfoReply* response, std::function) override; @@ -411,6 +455,10 @@ class ETHBACKEND final { ::grpc::ClientAsyncReaderWriter< ::remote::LogsFilterRequest, ::remote::SubscribeLogsReply>* PrepareAsyncSubscribeLogsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::remote::BlockReply>* AsyncBlockRaw(::grpc::ClientContext* context, const ::remote::BlockRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::remote::BlockReply>* PrepareAsyncBlockRaw(::grpc::ClientContext* context, const ::remote::BlockRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::remote::CanonicalHashReply>* AsyncCanonicalHashRaw(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::remote::CanonicalHashReply>* PrepareAsyncCanonicalHashRaw(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::remote::HeaderNumberReply>* AsyncHeaderNumberRaw(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::remote::HeaderNumberReply>* PrepareAsyncHeaderNumberRaw(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::remote::TxnLookupReply>* AsyncTxnLookupRaw(::grpc::ClientContext* context, const ::remote::TxnLookupRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::remote::TxnLookupReply>* PrepareAsyncTxnLookupRaw(::grpc::ClientContext* context, const ::remote::TxnLookupRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::remote::NodesInfoReply>* AsyncNodeInfoRaw(::grpc::ClientContext* context, const ::remote::NodesInfoRequest& request, ::grpc::CompletionQueue* cq) override; @@ -432,6 +480,8 @@ class ETHBACKEND final { const ::grpc::internal::RpcMethod rpcmethod_Subscribe_; const ::grpc::internal::RpcMethod rpcmethod_SubscribeLogs_; const ::grpc::internal::RpcMethod rpcmethod_Block_; + const ::grpc::internal::RpcMethod rpcmethod_CanonicalHash_; + const ::grpc::internal::RpcMethod rpcmethod_HeaderNumber_; const ::grpc::internal::RpcMethod rpcmethod_TxnLookup_; const ::grpc::internal::RpcMethod rpcmethod_NodeInfo_; const ::grpc::internal::RpcMethod rpcmethod_Peers_; @@ -461,6 +511,10 @@ class ETHBACKEND final { // it doesn't provide consistency // Request fields are optional - it's ok to request block only by hash or only by number virtual ::grpc::Status Block(::grpc::ServerContext* context, const ::remote::BlockRequest* request, ::remote::BlockReply* response); + // High-level method - can find block hash by block number + virtual ::grpc::Status CanonicalHash(::grpc::ServerContext* context, const ::remote::CanonicalHashRequest* request, ::remote::CanonicalHashReply* response); + // High-level method - can find block number by block hash + virtual ::grpc::Status HeaderNumber(::grpc::ServerContext* context, const ::remote::HeaderNumberRequest* request, ::remote::HeaderNumberReply* response); // High-level method - can find block number by txn hash // it doesn't provide consistency virtual ::grpc::Status TxnLookup(::grpc::ServerContext* context, const ::remote::TxnLookupRequest* request, ::remote::TxnLookupReply* response); @@ -654,12 +708,52 @@ class ETHBACKEND final { } }; template + class WithAsyncMethod_CanonicalHash : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_CanonicalHash() { + ::grpc::Service::MarkMethodAsync(9); + } + ~WithAsyncMethod_CanonicalHash() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CanonicalHash(::grpc::ServerContext* /*context*/, const ::remote::CanonicalHashRequest* /*request*/, ::remote::CanonicalHashReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestCanonicalHash(::grpc::ServerContext* context, ::remote::CanonicalHashRequest* request, ::grpc::ServerAsyncResponseWriter< ::remote::CanonicalHashReply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_HeaderNumber : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_HeaderNumber() { + ::grpc::Service::MarkMethodAsync(10); + } + ~WithAsyncMethod_HeaderNumber() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HeaderNumber(::grpc::ServerContext* /*context*/, const ::remote::HeaderNumberRequest* /*request*/, ::remote::HeaderNumberReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHeaderNumber(::grpc::ServerContext* context, ::remote::HeaderNumberRequest* request, ::grpc::ServerAsyncResponseWriter< ::remote::HeaderNumberReply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithAsyncMethod_TxnLookup : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_TxnLookup() { - ::grpc::Service::MarkMethodAsync(9); + ::grpc::Service::MarkMethodAsync(11); } ~WithAsyncMethod_TxnLookup() override { BaseClassMustBeDerivedFromService(this); @@ -670,7 +764,7 @@ class ETHBACKEND final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestTxnLookup(::grpc::ServerContext* context, ::remote::TxnLookupRequest* request, ::grpc::ServerAsyncResponseWriter< ::remote::TxnLookupReply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -679,7 +773,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_NodeInfo() { - ::grpc::Service::MarkMethodAsync(10); + ::grpc::Service::MarkMethodAsync(12); } ~WithAsyncMethod_NodeInfo() override { BaseClassMustBeDerivedFromService(this); @@ -690,7 +784,7 @@ class ETHBACKEND final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestNodeInfo(::grpc::ServerContext* context, ::remote::NodesInfoRequest* request, ::grpc::ServerAsyncResponseWriter< ::remote::NodesInfoReply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -699,7 +793,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_Peers() { - ::grpc::Service::MarkMethodAsync(11); + ::grpc::Service::MarkMethodAsync(13); } ~WithAsyncMethod_Peers() override { BaseClassMustBeDerivedFromService(this); @@ -710,7 +804,7 @@ class ETHBACKEND final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestPeers(::grpc::ServerContext* context, ::google::protobuf::Empty* request, ::grpc::ServerAsyncResponseWriter< ::remote::PeersReply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -719,7 +813,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_AddPeer() { - ::grpc::Service::MarkMethodAsync(12); + ::grpc::Service::MarkMethodAsync(14); } ~WithAsyncMethod_AddPeer() override { BaseClassMustBeDerivedFromService(this); @@ -730,7 +824,7 @@ class ETHBACKEND final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestAddPeer(::grpc::ServerContext* context, ::remote::AddPeerRequest* request, ::grpc::ServerAsyncResponseWriter< ::remote::AddPeerReply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(14, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -739,7 +833,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_PendingBlock() { - ::grpc::Service::MarkMethodAsync(13); + ::grpc::Service::MarkMethodAsync(15); } ~WithAsyncMethod_PendingBlock() override { BaseClassMustBeDerivedFromService(this); @@ -750,7 +844,7 @@ class ETHBACKEND final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestPendingBlock(::grpc::ServerContext* context, ::google::protobuf::Empty* request, ::grpc::ServerAsyncResponseWriter< ::remote::PendingBlockReply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(15, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -759,7 +853,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_BorEvent() { - ::grpc::Service::MarkMethodAsync(14); + ::grpc::Service::MarkMethodAsync(16); } ~WithAsyncMethod_BorEvent() override { BaseClassMustBeDerivedFromService(this); @@ -770,10 +864,10 @@ class ETHBACKEND final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestBorEvent(::grpc::ServerContext* context, ::remote::BorEventRequest* request, ::grpc::ServerAsyncResponseWriter< ::remote::BorEventReply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(14, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(16, context, request, response, new_call_cq, notification_cq, tag); } }; - typedef WithAsyncMethod_Etherbase > > > > > > > > > > > > > > AsyncService; + typedef WithAsyncMethod_Etherbase > > > > > > > > > > > > > > > > AsyncService; template class WithCallbackMethod_Etherbase : public BaseClass { private: @@ -1009,18 +1103,72 @@ class ETHBACKEND final { ::grpc::CallbackServerContext* /*context*/, const ::remote::BlockRequest* /*request*/, ::remote::BlockReply* /*response*/) { return nullptr; } }; template + class WithCallbackMethod_CanonicalHash : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_CanonicalHash() { + ::grpc::Service::MarkMethodCallback(9, + new ::grpc::internal::CallbackUnaryHandler< ::remote::CanonicalHashRequest, ::remote::CanonicalHashReply>( + [this]( + ::grpc::CallbackServerContext* context, const ::remote::CanonicalHashRequest* request, ::remote::CanonicalHashReply* response) { return this->CanonicalHash(context, request, response); }));} + void SetMessageAllocatorFor_CanonicalHash( + ::grpc::MessageAllocator< ::remote::CanonicalHashRequest, ::remote::CanonicalHashReply>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(9); + static_cast<::grpc::internal::CallbackUnaryHandler< ::remote::CanonicalHashRequest, ::remote::CanonicalHashReply>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_CanonicalHash() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CanonicalHash(::grpc::ServerContext* /*context*/, const ::remote::CanonicalHashRequest* /*request*/, ::remote::CanonicalHashReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* CanonicalHash( + ::grpc::CallbackServerContext* /*context*/, const ::remote::CanonicalHashRequest* /*request*/, ::remote::CanonicalHashReply* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_HeaderNumber : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_HeaderNumber() { + ::grpc::Service::MarkMethodCallback(10, + new ::grpc::internal::CallbackUnaryHandler< ::remote::HeaderNumberRequest, ::remote::HeaderNumberReply>( + [this]( + ::grpc::CallbackServerContext* context, const ::remote::HeaderNumberRequest* request, ::remote::HeaderNumberReply* response) { return this->HeaderNumber(context, request, response); }));} + void SetMessageAllocatorFor_HeaderNumber( + ::grpc::MessageAllocator< ::remote::HeaderNumberRequest, ::remote::HeaderNumberReply>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(10); + static_cast<::grpc::internal::CallbackUnaryHandler< ::remote::HeaderNumberRequest, ::remote::HeaderNumberReply>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_HeaderNumber() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HeaderNumber(::grpc::ServerContext* /*context*/, const ::remote::HeaderNumberRequest* /*request*/, ::remote::HeaderNumberReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* HeaderNumber( + ::grpc::CallbackServerContext* /*context*/, const ::remote::HeaderNumberRequest* /*request*/, ::remote::HeaderNumberReply* /*response*/) { return nullptr; } + }; + template class WithCallbackMethod_TxnLookup : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithCallbackMethod_TxnLookup() { - ::grpc::Service::MarkMethodCallback(9, + ::grpc::Service::MarkMethodCallback(11, new ::grpc::internal::CallbackUnaryHandler< ::remote::TxnLookupRequest, ::remote::TxnLookupReply>( [this]( ::grpc::CallbackServerContext* context, const ::remote::TxnLookupRequest* request, ::remote::TxnLookupReply* response) { return this->TxnLookup(context, request, response); }));} void SetMessageAllocatorFor_TxnLookup( ::grpc::MessageAllocator< ::remote::TxnLookupRequest, ::remote::TxnLookupReply>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(9); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(11); static_cast<::grpc::internal::CallbackUnaryHandler< ::remote::TxnLookupRequest, ::remote::TxnLookupReply>*>(handler) ->SetMessageAllocator(allocator); } @@ -1041,13 +1189,13 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithCallbackMethod_NodeInfo() { - ::grpc::Service::MarkMethodCallback(10, + ::grpc::Service::MarkMethodCallback(12, new ::grpc::internal::CallbackUnaryHandler< ::remote::NodesInfoRequest, ::remote::NodesInfoReply>( [this]( ::grpc::CallbackServerContext* context, const ::remote::NodesInfoRequest* request, ::remote::NodesInfoReply* response) { return this->NodeInfo(context, request, response); }));} void SetMessageAllocatorFor_NodeInfo( ::grpc::MessageAllocator< ::remote::NodesInfoRequest, ::remote::NodesInfoReply>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(10); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(12); static_cast<::grpc::internal::CallbackUnaryHandler< ::remote::NodesInfoRequest, ::remote::NodesInfoReply>*>(handler) ->SetMessageAllocator(allocator); } @@ -1068,13 +1216,13 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithCallbackMethod_Peers() { - ::grpc::Service::MarkMethodCallback(11, + ::grpc::Service::MarkMethodCallback(13, new ::grpc::internal::CallbackUnaryHandler< ::google::protobuf::Empty, ::remote::PeersReply>( [this]( ::grpc::CallbackServerContext* context, const ::google::protobuf::Empty* request, ::remote::PeersReply* response) { return this->Peers(context, request, response); }));} void SetMessageAllocatorFor_Peers( ::grpc::MessageAllocator< ::google::protobuf::Empty, ::remote::PeersReply>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(11); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(13); static_cast<::grpc::internal::CallbackUnaryHandler< ::google::protobuf::Empty, ::remote::PeersReply>*>(handler) ->SetMessageAllocator(allocator); } @@ -1095,13 +1243,13 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithCallbackMethod_AddPeer() { - ::grpc::Service::MarkMethodCallback(12, + ::grpc::Service::MarkMethodCallback(14, new ::grpc::internal::CallbackUnaryHandler< ::remote::AddPeerRequest, ::remote::AddPeerReply>( [this]( ::grpc::CallbackServerContext* context, const ::remote::AddPeerRequest* request, ::remote::AddPeerReply* response) { return this->AddPeer(context, request, response); }));} void SetMessageAllocatorFor_AddPeer( ::grpc::MessageAllocator< ::remote::AddPeerRequest, ::remote::AddPeerReply>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(12); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(14); static_cast<::grpc::internal::CallbackUnaryHandler< ::remote::AddPeerRequest, ::remote::AddPeerReply>*>(handler) ->SetMessageAllocator(allocator); } @@ -1122,13 +1270,13 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithCallbackMethod_PendingBlock() { - ::grpc::Service::MarkMethodCallback(13, + ::grpc::Service::MarkMethodCallback(15, new ::grpc::internal::CallbackUnaryHandler< ::google::protobuf::Empty, ::remote::PendingBlockReply>( [this]( ::grpc::CallbackServerContext* context, const ::google::protobuf::Empty* request, ::remote::PendingBlockReply* response) { return this->PendingBlock(context, request, response); }));} void SetMessageAllocatorFor_PendingBlock( ::grpc::MessageAllocator< ::google::protobuf::Empty, ::remote::PendingBlockReply>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(13); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(15); static_cast<::grpc::internal::CallbackUnaryHandler< ::google::protobuf::Empty, ::remote::PendingBlockReply>*>(handler) ->SetMessageAllocator(allocator); } @@ -1149,13 +1297,13 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithCallbackMethod_BorEvent() { - ::grpc::Service::MarkMethodCallback(14, + ::grpc::Service::MarkMethodCallback(16, new ::grpc::internal::CallbackUnaryHandler< ::remote::BorEventRequest, ::remote::BorEventReply>( [this]( ::grpc::CallbackServerContext* context, const ::remote::BorEventRequest* request, ::remote::BorEventReply* response) { return this->BorEvent(context, request, response); }));} void SetMessageAllocatorFor_BorEvent( ::grpc::MessageAllocator< ::remote::BorEventRequest, ::remote::BorEventReply>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(14); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(16); static_cast<::grpc::internal::CallbackUnaryHandler< ::remote::BorEventRequest, ::remote::BorEventReply>*>(handler) ->SetMessageAllocator(allocator); } @@ -1170,7 +1318,7 @@ class ETHBACKEND final { virtual ::grpc::ServerUnaryReactor* BorEvent( ::grpc::CallbackServerContext* /*context*/, const ::remote::BorEventRequest* /*request*/, ::remote::BorEventReply* /*response*/) { return nullptr; } }; - typedef WithCallbackMethod_Etherbase > > > > > > > > > > > > > > CallbackService; + typedef WithCallbackMethod_Etherbase > > > > > > > > > > > > > > > > CallbackService; typedef CallbackService ExperimentalCallbackService; template class WithGenericMethod_Etherbase : public BaseClass { @@ -1326,12 +1474,46 @@ class ETHBACKEND final { } }; template + class WithGenericMethod_CanonicalHash : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_CanonicalHash() { + ::grpc::Service::MarkMethodGeneric(9); + } + ~WithGenericMethod_CanonicalHash() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CanonicalHash(::grpc::ServerContext* /*context*/, const ::remote::CanonicalHashRequest* /*request*/, ::remote::CanonicalHashReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_HeaderNumber : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_HeaderNumber() { + ::grpc::Service::MarkMethodGeneric(10); + } + ~WithGenericMethod_HeaderNumber() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HeaderNumber(::grpc::ServerContext* /*context*/, const ::remote::HeaderNumberRequest* /*request*/, ::remote::HeaderNumberReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template class WithGenericMethod_TxnLookup : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_TxnLookup() { - ::grpc::Service::MarkMethodGeneric(9); + ::grpc::Service::MarkMethodGeneric(11); } ~WithGenericMethod_TxnLookup() override { BaseClassMustBeDerivedFromService(this); @@ -1348,7 +1530,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_NodeInfo() { - ::grpc::Service::MarkMethodGeneric(10); + ::grpc::Service::MarkMethodGeneric(12); } ~WithGenericMethod_NodeInfo() override { BaseClassMustBeDerivedFromService(this); @@ -1365,7 +1547,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_Peers() { - ::grpc::Service::MarkMethodGeneric(11); + ::grpc::Service::MarkMethodGeneric(13); } ~WithGenericMethod_Peers() override { BaseClassMustBeDerivedFromService(this); @@ -1382,7 +1564,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_AddPeer() { - ::grpc::Service::MarkMethodGeneric(12); + ::grpc::Service::MarkMethodGeneric(14); } ~WithGenericMethod_AddPeer() override { BaseClassMustBeDerivedFromService(this); @@ -1399,7 +1581,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_PendingBlock() { - ::grpc::Service::MarkMethodGeneric(13); + ::grpc::Service::MarkMethodGeneric(15); } ~WithGenericMethod_PendingBlock() override { BaseClassMustBeDerivedFromService(this); @@ -1416,7 +1598,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_BorEvent() { - ::grpc::Service::MarkMethodGeneric(14); + ::grpc::Service::MarkMethodGeneric(16); } ~WithGenericMethod_BorEvent() override { BaseClassMustBeDerivedFromService(this); @@ -1608,12 +1790,52 @@ class ETHBACKEND final { } }; template + class WithRawMethod_CanonicalHash : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_CanonicalHash() { + ::grpc::Service::MarkMethodRaw(9); + } + ~WithRawMethod_CanonicalHash() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CanonicalHash(::grpc::ServerContext* /*context*/, const ::remote::CanonicalHashRequest* /*request*/, ::remote::CanonicalHashReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestCanonicalHash(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_HeaderNumber : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_HeaderNumber() { + ::grpc::Service::MarkMethodRaw(10); + } + ~WithRawMethod_HeaderNumber() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HeaderNumber(::grpc::ServerContext* /*context*/, const ::remote::HeaderNumberRequest* /*request*/, ::remote::HeaderNumberReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHeaderNumber(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithRawMethod_TxnLookup : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_TxnLookup() { - ::grpc::Service::MarkMethodRaw(9); + ::grpc::Service::MarkMethodRaw(11); } ~WithRawMethod_TxnLookup() override { BaseClassMustBeDerivedFromService(this); @@ -1624,7 +1846,7 @@ class ETHBACKEND final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestTxnLookup(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -1633,7 +1855,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_NodeInfo() { - ::grpc::Service::MarkMethodRaw(10); + ::grpc::Service::MarkMethodRaw(12); } ~WithRawMethod_NodeInfo() override { BaseClassMustBeDerivedFromService(this); @@ -1644,7 +1866,7 @@ class ETHBACKEND final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestNodeInfo(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -1653,7 +1875,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_Peers() { - ::grpc::Service::MarkMethodRaw(11); + ::grpc::Service::MarkMethodRaw(13); } ~WithRawMethod_Peers() override { BaseClassMustBeDerivedFromService(this); @@ -1664,7 +1886,7 @@ class ETHBACKEND final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestPeers(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -1673,7 +1895,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_AddPeer() { - ::grpc::Service::MarkMethodRaw(12); + ::grpc::Service::MarkMethodRaw(14); } ~WithRawMethod_AddPeer() override { BaseClassMustBeDerivedFromService(this); @@ -1684,7 +1906,7 @@ class ETHBACKEND final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestAddPeer(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(14, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -1693,7 +1915,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_PendingBlock() { - ::grpc::Service::MarkMethodRaw(13); + ::grpc::Service::MarkMethodRaw(15); } ~WithRawMethod_PendingBlock() override { BaseClassMustBeDerivedFromService(this); @@ -1704,7 +1926,7 @@ class ETHBACKEND final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestPendingBlock(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(15, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -1713,7 +1935,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_BorEvent() { - ::grpc::Service::MarkMethodRaw(14); + ::grpc::Service::MarkMethodRaw(16); } ~WithRawMethod_BorEvent() override { BaseClassMustBeDerivedFromService(this); @@ -1724,7 +1946,7 @@ class ETHBACKEND final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestBorEvent(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(14, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(16, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -1927,12 +2149,56 @@ class ETHBACKEND final { ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } }; template + class WithRawCallbackMethod_CanonicalHash : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_CanonicalHash() { + ::grpc::Service::MarkMethodRawCallback(9, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->CanonicalHash(context, request, response); })); + } + ~WithRawCallbackMethod_CanonicalHash() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status CanonicalHash(::grpc::ServerContext* /*context*/, const ::remote::CanonicalHashRequest* /*request*/, ::remote::CanonicalHashReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* CanonicalHash( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_HeaderNumber : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_HeaderNumber() { + ::grpc::Service::MarkMethodRawCallback(10, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->HeaderNumber(context, request, response); })); + } + ~WithRawCallbackMethod_HeaderNumber() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status HeaderNumber(::grpc::ServerContext* /*context*/, const ::remote::HeaderNumberRequest* /*request*/, ::remote::HeaderNumberReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* HeaderNumber( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template class WithRawCallbackMethod_TxnLookup : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawCallbackMethod_TxnLookup() { - ::grpc::Service::MarkMethodRawCallback(9, + ::grpc::Service::MarkMethodRawCallback(11, new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this]( ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->TxnLookup(context, request, response); })); @@ -1954,7 +2220,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawCallbackMethod_NodeInfo() { - ::grpc::Service::MarkMethodRawCallback(10, + ::grpc::Service::MarkMethodRawCallback(12, new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this]( ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->NodeInfo(context, request, response); })); @@ -1976,7 +2242,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawCallbackMethod_Peers() { - ::grpc::Service::MarkMethodRawCallback(11, + ::grpc::Service::MarkMethodRawCallback(13, new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this]( ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Peers(context, request, response); })); @@ -1998,7 +2264,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawCallbackMethod_AddPeer() { - ::grpc::Service::MarkMethodRawCallback(12, + ::grpc::Service::MarkMethodRawCallback(14, new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this]( ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->AddPeer(context, request, response); })); @@ -2020,7 +2286,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawCallbackMethod_PendingBlock() { - ::grpc::Service::MarkMethodRawCallback(13, + ::grpc::Service::MarkMethodRawCallback(15, new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this]( ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->PendingBlock(context, request, response); })); @@ -2042,7 +2308,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawCallbackMethod_BorEvent() { - ::grpc::Service::MarkMethodRawCallback(14, + ::grpc::Service::MarkMethodRawCallback(16, new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this]( ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->BorEvent(context, request, response); })); @@ -2248,12 +2514,66 @@ class ETHBACKEND final { virtual ::grpc::Status StreamedBlock(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::remote::BlockRequest,::remote::BlockReply>* server_unary_streamer) = 0; }; template + class WithStreamedUnaryMethod_CanonicalHash : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_CanonicalHash() { + ::grpc::Service::MarkMethodStreamed(9, + new ::grpc::internal::StreamedUnaryHandler< + ::remote::CanonicalHashRequest, ::remote::CanonicalHashReply>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::remote::CanonicalHashRequest, ::remote::CanonicalHashReply>* streamer) { + return this->StreamedCanonicalHash(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_CanonicalHash() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status CanonicalHash(::grpc::ServerContext* /*context*/, const ::remote::CanonicalHashRequest* /*request*/, ::remote::CanonicalHashReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedCanonicalHash(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::remote::CanonicalHashRequest,::remote::CanonicalHashReply>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_HeaderNumber : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_HeaderNumber() { + ::grpc::Service::MarkMethodStreamed(10, + new ::grpc::internal::StreamedUnaryHandler< + ::remote::HeaderNumberRequest, ::remote::HeaderNumberReply>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::remote::HeaderNumberRequest, ::remote::HeaderNumberReply>* streamer) { + return this->StreamedHeaderNumber(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_HeaderNumber() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status HeaderNumber(::grpc::ServerContext* /*context*/, const ::remote::HeaderNumberRequest* /*request*/, ::remote::HeaderNumberReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedHeaderNumber(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::remote::HeaderNumberRequest,::remote::HeaderNumberReply>* server_unary_streamer) = 0; + }; + template class WithStreamedUnaryMethod_TxnLookup : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_TxnLookup() { - ::grpc::Service::MarkMethodStreamed(9, + ::grpc::Service::MarkMethodStreamed(11, new ::grpc::internal::StreamedUnaryHandler< ::remote::TxnLookupRequest, ::remote::TxnLookupReply>( [this](::grpc::ServerContext* context, @@ -2280,7 +2600,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_NodeInfo() { - ::grpc::Service::MarkMethodStreamed(10, + ::grpc::Service::MarkMethodStreamed(12, new ::grpc::internal::StreamedUnaryHandler< ::remote::NodesInfoRequest, ::remote::NodesInfoReply>( [this](::grpc::ServerContext* context, @@ -2307,7 +2627,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_Peers() { - ::grpc::Service::MarkMethodStreamed(11, + ::grpc::Service::MarkMethodStreamed(13, new ::grpc::internal::StreamedUnaryHandler< ::google::protobuf::Empty, ::remote::PeersReply>( [this](::grpc::ServerContext* context, @@ -2334,7 +2654,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_AddPeer() { - ::grpc::Service::MarkMethodStreamed(12, + ::grpc::Service::MarkMethodStreamed(14, new ::grpc::internal::StreamedUnaryHandler< ::remote::AddPeerRequest, ::remote::AddPeerReply>( [this](::grpc::ServerContext* context, @@ -2361,7 +2681,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_PendingBlock() { - ::grpc::Service::MarkMethodStreamed(13, + ::grpc::Service::MarkMethodStreamed(15, new ::grpc::internal::StreamedUnaryHandler< ::google::protobuf::Empty, ::remote::PendingBlockReply>( [this](::grpc::ServerContext* context, @@ -2388,7 +2708,7 @@ class ETHBACKEND final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_BorEvent() { - ::grpc::Service::MarkMethodStreamed(14, + ::grpc::Service::MarkMethodStreamed(16, new ::grpc::internal::StreamedUnaryHandler< ::remote::BorEventRequest, ::remote::BorEventReply>( [this](::grpc::ServerContext* context, @@ -2409,7 +2729,7 @@ class ETHBACKEND final { // replace default version of method with streamed unary virtual ::grpc::Status StreamedBorEvent(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::remote::BorEventRequest,::remote::BorEventReply>* server_unary_streamer) = 0; }; - typedef WithStreamedUnaryMethod_Etherbase > > > > > > > > > > > > StreamedUnaryService; + typedef WithStreamedUnaryMethod_Etherbase > > > > > > > > > > > > > > StreamedUnaryService; template class WithSplitStreamingMethod_Subscribe : public BaseClass { private: @@ -2438,7 +2758,7 @@ class ETHBACKEND final { virtual ::grpc::Status StreamedSubscribe(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::remote::SubscribeRequest,::remote::SubscribeReply>* server_split_streamer) = 0; }; typedef WithSplitStreamingMethod_Subscribe SplitStreamedService; - typedef WithStreamedUnaryMethod_Etherbase > > > > > > > > > > > > > StreamedService; + typedef WithStreamedUnaryMethod_Etherbase > > > > > > > > > > > > > > > StreamedService; }; } // namespace remote diff --git a/silkworm/interfaces/3.21.12/remote/ethbackend.pb.cc b/silkworm/interfaces/3.21.12/remote/ethbackend.pb.cc index a2545cd79d..4207cfdfd7 100644 --- a/silkworm/interfaces/3.21.12/remote/ethbackend.pb.cc +++ b/silkworm/interfaces/3.21.12/remote/ethbackend.pb.cc @@ -141,6 +141,59 @@ struct ClientVersionReplyDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ClientVersionReplyDefaultTypeInternal _ClientVersionReply_default_instance_; +PROTOBUF_CONSTEXPR CanonicalHashRequest::CanonicalHashRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.block_number_)*/uint64_t{0u} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct CanonicalHashRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR CanonicalHashRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CanonicalHashRequestDefaultTypeInternal() {} + union { + CanonicalHashRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CanonicalHashRequestDefaultTypeInternal _CanonicalHashRequest_default_instance_; +PROTOBUF_CONSTEXPR CanonicalHashReply::CanonicalHashReply( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.hash_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct CanonicalHashReplyDefaultTypeInternal { + PROTOBUF_CONSTEXPR CanonicalHashReplyDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CanonicalHashReplyDefaultTypeInternal() {} + union { + CanonicalHashReply _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CanonicalHashReplyDefaultTypeInternal _CanonicalHashReply_default_instance_; +PROTOBUF_CONSTEXPR HeaderNumberRequest::HeaderNumberRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.hash_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct HeaderNumberRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR HeaderNumberRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~HeaderNumberRequestDefaultTypeInternal() {} + union { + HeaderNumberRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HeaderNumberRequestDefaultTypeInternal _HeaderNumberRequest_default_instance_; +PROTOBUF_CONSTEXPR HeaderNumberReply::HeaderNumberReply( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.number_)*/uint64_t{0u}} {} +struct HeaderNumberReplyDefaultTypeInternal { + PROTOBUF_CONSTEXPR HeaderNumberReplyDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~HeaderNumberReplyDefaultTypeInternal() {} + union { + HeaderNumberReply _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HeaderNumberReplyDefaultTypeInternal _HeaderNumberReply_default_instance_; PROTOBUF_CONSTEXPR SubscribeRequest::SubscribeRequest( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.type_)*/0 @@ -393,7 +446,7 @@ struct BorEventReplyDefaultTypeInternal { }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BorEventReplyDefaultTypeInternal _BorEventReply_default_instance_; } // namespace remote -static ::_pb::Metadata file_level_metadata_remote_2fethbackend_2eproto[28]; +static ::_pb::Metadata file_level_metadata_remote_2fethbackend_2eproto[32]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_remote_2fethbackend_2eproto[1]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_remote_2fethbackend_2eproto = nullptr; @@ -464,6 +517,35 @@ const uint32_t TableStruct_remote_2fethbackend_2eproto::offsets[] PROTOBUF_SECTI ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::remote::ClientVersionReply, _impl_.node_name_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::remote::CanonicalHashRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::remote::CanonicalHashRequest, _impl_.block_number_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::remote::CanonicalHashReply, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::remote::CanonicalHashReply, _impl_.hash_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::remote::HeaderNumberRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::remote::HeaderNumberRequest, _impl_.hash_), + PROTOBUF_FIELD_OFFSET(::remote::HeaderNumberReply, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::remote::HeaderNumberReply, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::remote::HeaderNumberReply, _impl_.number_), + 0, + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::remote::SubscribeRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -618,24 +700,28 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 45, -1, -1, sizeof(::remote::ProtocolVersionReply)}, { 52, -1, -1, sizeof(::remote::ClientVersionRequest)}, { 58, -1, -1, sizeof(::remote::ClientVersionReply)}, - { 65, -1, -1, sizeof(::remote::SubscribeRequest)}, - { 72, -1, -1, sizeof(::remote::SubscribeReply)}, - { 80, -1, -1, sizeof(::remote::LogsFilterRequest)}, - { 90, -1, -1, sizeof(::remote::SubscribeLogsReply)}, - { 105, -1, -1, sizeof(::remote::BlockRequest)}, - { 113, -1, -1, sizeof(::remote::BlockReply)}, - { 121, -1, -1, sizeof(::remote::TxnLookupRequest)}, - { 128, -1, -1, sizeof(::remote::TxnLookupReply)}, - { 135, -1, -1, sizeof(::remote::NodesInfoRequest)}, - { 142, -1, -1, sizeof(::remote::AddPeerRequest)}, - { 149, -1, -1, sizeof(::remote::NodesInfoReply)}, - { 156, -1, -1, sizeof(::remote::PeersReply)}, - { 163, -1, -1, sizeof(::remote::AddPeerReply)}, - { 170, -1, -1, sizeof(::remote::PendingBlockReply)}, - { 177, -1, -1, sizeof(::remote::EngineGetPayloadBodiesByHashV1Request)}, - { 184, -1, -1, sizeof(::remote::EngineGetPayloadBodiesByRangeV1Request)}, - { 192, -1, -1, sizeof(::remote::BorEventRequest)}, - { 199, -1, -1, sizeof(::remote::BorEventReply)}, + { 65, -1, -1, sizeof(::remote::CanonicalHashRequest)}, + { 72, -1, -1, sizeof(::remote::CanonicalHashReply)}, + { 79, -1, -1, sizeof(::remote::HeaderNumberRequest)}, + { 86, 93, -1, sizeof(::remote::HeaderNumberReply)}, + { 94, -1, -1, sizeof(::remote::SubscribeRequest)}, + { 101, -1, -1, sizeof(::remote::SubscribeReply)}, + { 109, -1, -1, sizeof(::remote::LogsFilterRequest)}, + { 119, -1, -1, sizeof(::remote::SubscribeLogsReply)}, + { 134, -1, -1, sizeof(::remote::BlockRequest)}, + { 142, -1, -1, sizeof(::remote::BlockReply)}, + { 150, -1, -1, sizeof(::remote::TxnLookupRequest)}, + { 157, -1, -1, sizeof(::remote::TxnLookupReply)}, + { 164, -1, -1, sizeof(::remote::NodesInfoRequest)}, + { 171, -1, -1, sizeof(::remote::AddPeerRequest)}, + { 178, -1, -1, sizeof(::remote::NodesInfoReply)}, + { 185, -1, -1, sizeof(::remote::PeersReply)}, + { 192, -1, -1, sizeof(::remote::AddPeerReply)}, + { 199, -1, -1, sizeof(::remote::PendingBlockReply)}, + { 206, -1, -1, sizeof(::remote::EngineGetPayloadBodiesByHashV1Request)}, + { 213, -1, -1, sizeof(::remote::EngineGetPayloadBodiesByRangeV1Request)}, + { 221, -1, -1, sizeof(::remote::BorEventRequest)}, + { 228, -1, -1, sizeof(::remote::BorEventReply)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -649,6 +735,10 @@ static const ::_pb::Message* const file_default_instances[] = { &::remote::_ProtocolVersionReply_default_instance_._instance, &::remote::_ClientVersionRequest_default_instance_._instance, &::remote::_ClientVersionReply_default_instance_._instance, + &::remote::_CanonicalHashRequest_default_instance_._instance, + &::remote::_CanonicalHashReply_default_instance_._instance, + &::remote::_HeaderNumberRequest_default_instance_._instance, + &::remote::_HeaderNumberReply_default_instance_._instance, &::remote::_SubscribeRequest_default_instance_._instance, &::remote::_SubscribeReply_default_instance_._instance, &::remote::_LogsFilterRequest_default_instance_._instance, @@ -679,65 +769,73 @@ const char descriptor_table_protodef_remote_2fethbackend_2eproto[] PROTOBUF_SECT "Reply\022\r\n\005count\030\001 \001(\004\"\030\n\026ProtocolVersionR" "equest\"\"\n\024ProtocolVersionReply\022\n\n\002id\030\001 \001" "(\004\"\026\n\024ClientVersionRequest\"\'\n\022ClientVers" - "ionReply\022\021\n\tnode_name\030\001 \001(\t\"/\n\020Subscribe" - "Request\022\033\n\004type\030\001 \001(\0162\r.remote.Event\";\n\016" - "SubscribeReply\022\033\n\004type\030\001 \001(\0162\r.remote.Ev" - "ent\022\014\n\004data\030\002 \001(\014\"{\n\021LogsFilterRequest\022\025" - "\n\rall_addresses\030\001 \001(\010\022\036\n\taddresses\030\002 \003(\013" - "2\013.types.H160\022\022\n\nall_topics\030\003 \001(\010\022\033\n\006top" - "ics\030\004 \003(\0132\013.types.H256\"\372\001\n\022SubscribeLogs" - "Reply\022\034\n\007address\030\001 \001(\0132\013.types.H160\022\037\n\nb" - "lock_hash\030\002 \001(\0132\013.types.H256\022\024\n\014block_nu" - "mber\030\003 \001(\004\022\014\n\004data\030\004 \001(\014\022\021\n\tlog_index\030\005 " - "\001(\004\022\033\n\006topics\030\006 \003(\0132\013.types.H256\022%\n\020tran" - "saction_hash\030\007 \001(\0132\013.types.H256\022\031\n\021trans" - "action_index\030\010 \001(\004\022\017\n\007removed\030\t \001(\010\"E\n\014B" - "lockRequest\022\024\n\014block_height\030\002 \001(\004\022\037\n\nblo" - "ck_hash\030\003 \001(\0132\013.types.H256\"0\n\nBlockReply" - "\022\021\n\tblock_rlp\030\001 \001(\014\022\017\n\007senders\030\002 \001(\014\"1\n\020" - "TxnLookupRequest\022\035\n\010txn_hash\030\001 \001(\0132\013.typ" - "es.H256\"&\n\016TxnLookupReply\022\024\n\014block_numbe" - "r\030\001 \001(\004\"!\n\020NodesInfoRequest\022\r\n\005limit\030\001 \001" - "(\r\"\035\n\016AddPeerRequest\022\013\n\003url\030\001 \001(\t\":\n\016Nod" - "esInfoReply\022(\n\nnodes_info\030\001 \003(\0132\024.types." - "NodeInfoReply\",\n\nPeersReply\022\036\n\005peers\030\001 \003" - "(\0132\017.types.PeerInfo\"\037\n\014AddPeerReply\022\017\n\007s" - "uccess\030\001 \001(\010\"&\n\021PendingBlockReply\022\021\n\tblo" - "ck_rlp\030\001 \001(\014\"D\n%EngineGetPayloadBodiesBy" - "HashV1Request\022\033\n\006hashes\030\001 \003(\0132\013.types.H2" - "56\"F\n&EngineGetPayloadBodiesByRangeV1Req" - "uest\022\r\n\005start\030\001 \001(\004\022\r\n\005count\030\002 \001(\004\"3\n\017Bo" - "rEventRequest\022 \n\013bor_tx_hash\030\001 \001(\0132\013.typ" - "es.H256\"J\n\rBorEventReply\022\017\n\007present\030\001 \001(" - "\010\022\024\n\014block_number\030\002 \001(\004\022\022\n\nevent_rlps\030\003 " - "\003(\014*J\n\005Event\022\n\n\006HEADER\020\000\022\020\n\014PENDING_LOGS" - "\020\001\022\021\n\rPENDING_BLOCK\020\002\022\020\n\014NEW_SNAPSHOT\020\0032" - "\323\007\n\nETHBACKEND\022=\n\tEtherbase\022\030.remote.Eth" - "erbaseRequest\032\026.remote.EtherbaseReply\022@\n" - "\nNetVersion\022\031.remote.NetVersionRequest\032\027" - ".remote.NetVersionReply\022F\n\014NetPeerCount\022" - "\033.remote.NetPeerCountRequest\032\031.remote.Ne" - "tPeerCountReply\0226\n\007Version\022\026.google.prot" - "obuf.Empty\032\023.types.VersionReply\022O\n\017Proto" - "colVersion\022\036.remote.ProtocolVersionReque" - "st\032\034.remote.ProtocolVersionReply\022I\n\rClie" - "ntVersion\022\034.remote.ClientVersionRequest\032" - "\032.remote.ClientVersionReply\022\?\n\tSubscribe" - "\022\030.remote.SubscribeRequest\032\026.remote.Subs" - "cribeReply0\001\022J\n\rSubscribeLogs\022\031.remote.L" - "ogsFilterRequest\032\032.remote.SubscribeLogsR" - "eply(\0010\001\0221\n\005Block\022\024.remote.BlockRequest\032" - "\022.remote.BlockReply\022=\n\tTxnLookup\022\030.remot" - "e.TxnLookupRequest\032\026.remote.TxnLookupRep" - "ly\022<\n\010NodeInfo\022\030.remote.NodesInfoRequest" - "\032\026.remote.NodesInfoReply\0223\n\005Peers\022\026.goog" - "le.protobuf.Empty\032\022.remote.PeersReply\0227\n" - "\007AddPeer\022\026.remote.AddPeerRequest\032\024.remot" - "e.AddPeerReply\022A\n\014PendingBlock\022\026.google." - "protobuf.Empty\032\031.remote.PendingBlockRepl" - "y\022:\n\010BorEvent\022\027.remote.BorEventRequest\032\025" - ".remote.BorEventReplyB\026Z\024./remote;remote" - "protob\006proto3" + "ionReply\022\021\n\tnode_name\030\001 \001(\t\",\n\024Canonical" + "HashRequest\022\024\n\014block_number\030\001 \001(\004\"/\n\022Can" + "onicalHashReply\022\031\n\004hash\030\001 \001(\0132\013.types.H2" + "56\"0\n\023HeaderNumberRequest\022\031\n\004hash\030\001 \001(\0132" + "\013.types.H256\"3\n\021HeaderNumberReply\022\023\n\006num" + "ber\030\001 \001(\004H\000\210\001\001B\t\n\007_number\"/\n\020SubscribeRe" + "quest\022\033\n\004type\030\001 \001(\0162\r.remote.Event\";\n\016Su" + "bscribeReply\022\033\n\004type\030\001 \001(\0162\r.remote.Even" + "t\022\014\n\004data\030\002 \001(\014\"{\n\021LogsFilterRequest\022\025\n\r" + "all_addresses\030\001 \001(\010\022\036\n\taddresses\030\002 \003(\0132\013" + ".types.H160\022\022\n\nall_topics\030\003 \001(\010\022\033\n\006topic" + "s\030\004 \003(\0132\013.types.H256\"\372\001\n\022SubscribeLogsRe" + "ply\022\034\n\007address\030\001 \001(\0132\013.types.H160\022\037\n\nblo" + "ck_hash\030\002 \001(\0132\013.types.H256\022\024\n\014block_numb" + "er\030\003 \001(\004\022\014\n\004data\030\004 \001(\014\022\021\n\tlog_index\030\005 \001(" + "\004\022\033\n\006topics\030\006 \003(\0132\013.types.H256\022%\n\020transa" + "ction_hash\030\007 \001(\0132\013.types.H256\022\031\n\021transac" + "tion_index\030\010 \001(\004\022\017\n\007removed\030\t \001(\010\"E\n\014Blo" + "ckRequest\022\024\n\014block_height\030\002 \001(\004\022\037\n\nblock" + "_hash\030\003 \001(\0132\013.types.H256\"0\n\nBlockReply\022\021" + "\n\tblock_rlp\030\001 \001(\014\022\017\n\007senders\030\002 \001(\014\"1\n\020Tx" + "nLookupRequest\022\035\n\010txn_hash\030\001 \001(\0132\013.types" + ".H256\"&\n\016TxnLookupReply\022\024\n\014block_number\030" + "\001 \001(\004\"!\n\020NodesInfoRequest\022\r\n\005limit\030\001 \001(\r" + "\"\035\n\016AddPeerRequest\022\013\n\003url\030\001 \001(\t\":\n\016Nodes" + "InfoReply\022(\n\nnodes_info\030\001 \003(\0132\024.types.No" + "deInfoReply\",\n\nPeersReply\022\036\n\005peers\030\001 \003(\013" + "2\017.types.PeerInfo\"\037\n\014AddPeerReply\022\017\n\007suc" + "cess\030\001 \001(\010\"&\n\021PendingBlockReply\022\021\n\tblock" + "_rlp\030\001 \001(\014\"D\n%EngineGetPayloadBodiesByHa" + "shV1Request\022\033\n\006hashes\030\001 \003(\0132\013.types.H256" + "\"F\n&EngineGetPayloadBodiesByRangeV1Reque" + "st\022\r\n\005start\030\001 \001(\004\022\r\n\005count\030\002 \001(\004\"3\n\017BorE" + "ventRequest\022 \n\013bor_tx_hash\030\001 \001(\0132\013.types" + ".H256\"J\n\rBorEventReply\022\017\n\007present\030\001 \001(\010\022" + "\024\n\014block_number\030\002 \001(\004\022\022\n\nevent_rlps\030\003 \003(" + "\014*J\n\005Event\022\n\n\006HEADER\020\000\022\020\n\014PENDING_LOGS\020\001" + "\022\021\n\rPENDING_BLOCK\020\002\022\020\n\014NEW_SNAPSHOT\020\0032\346\010" + "\n\nETHBACKEND\022=\n\tEtherbase\022\030.remote.Ether" + "baseRequest\032\026.remote.EtherbaseReply\022@\n\nN" + "etVersion\022\031.remote.NetVersionRequest\032\027.r" + "emote.NetVersionReply\022F\n\014NetPeerCount\022\033." + "remote.NetPeerCountRequest\032\031.remote.NetP" + "eerCountReply\0226\n\007Version\022\026.google.protob" + "uf.Empty\032\023.types.VersionReply\022O\n\017Protoco" + "lVersion\022\036.remote.ProtocolVersionRequest" + "\032\034.remote.ProtocolVersionReply\022I\n\rClient" + "Version\022\034.remote.ClientVersionRequest\032\032." + "remote.ClientVersionReply\022\?\n\tSubscribe\022\030" + ".remote.SubscribeRequest\032\026.remote.Subscr" + "ibeReply0\001\022J\n\rSubscribeLogs\022\031.remote.Log" + "sFilterRequest\032\032.remote.SubscribeLogsRep" + "ly(\0010\001\0221\n\005Block\022\024.remote.BlockRequest\032\022." + "remote.BlockReply\022I\n\rCanonicalHash\022\034.rem" + "ote.CanonicalHashRequest\032\032.remote.Canoni" + "calHashReply\022F\n\014HeaderNumber\022\033.remote.He" + "aderNumberRequest\032\031.remote.HeaderNumberR" + "eply\022=\n\tTxnLookup\022\030.remote.TxnLookupRequ" + "est\032\026.remote.TxnLookupReply\022<\n\010NodeInfo\022" + "\030.remote.NodesInfoRequest\032\026.remote.Nodes" + "InfoReply\0223\n\005Peers\022\026.google.protobuf.Emp" + "ty\032\022.remote.PeersReply\0227\n\007AddPeer\022\026.remo" + "te.AddPeerRequest\032\024.remote.AddPeerReply\022" + "A\n\014PendingBlock\022\026.google.protobuf.Empty\032" + "\031.remote.PendingBlockReply\022:\n\010BorEvent\022\027" + ".remote.BorEventRequest\032\025.remote.BorEven" + "tReplyB\026Z\024./remote;remoteprotob\006proto3" ; static const ::_pbi::DescriptorTable* const descriptor_table_remote_2fethbackend_2eproto_deps[2] = { &::descriptor_table_google_2fprotobuf_2fempty_2eproto, @@ -745,9 +843,9 @@ static const ::_pbi::DescriptorTable* const descriptor_table_remote_2fethbackend }; static ::_pbi::once_flag descriptor_table_remote_2fethbackend_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_remote_2fethbackend_2eproto = { - false, false, 2693, descriptor_table_protodef_remote_2fethbackend_2eproto, + false, false, 3038, descriptor_table_protodef_remote_2fethbackend_2eproto, "remote/ethbackend.proto", - &descriptor_table_remote_2fethbackend_2eproto_once, descriptor_table_remote_2fethbackend_2eproto_deps, 2, 28, + &descriptor_table_remote_2fethbackend_2eproto_once, descriptor_table_remote_2fethbackend_2eproto_deps, 2, 32, schemas, file_default_instances, TableStruct_remote_2fethbackend_2eproto::offsets, file_level_metadata_remote_2fethbackend_2eproto, file_level_enum_descriptors_remote_2fethbackend_2eproto, file_level_service_descriptors_remote_2fethbackend_2eproto, @@ -1473,60 +1571,871 @@ ProtocolVersionRequest::ProtocolVersionRequest(const ProtocolVersionRequest& fro -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ProtocolVersionRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl, - ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl, +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ProtocolVersionRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl, + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl, +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ProtocolVersionRequest::GetClassData() const { return &_class_data_; } + + + + + + + +::PROTOBUF_NAMESPACE_ID::Metadata ProtocolVersionRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, + file_level_metadata_remote_2fethbackend_2eproto[6]); +} + +// =================================================================== + +class ProtocolVersionReply::_Internal { + public: +}; + +ProtocolVersionReply::ProtocolVersionReply(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:remote.ProtocolVersionReply) +} +ProtocolVersionReply::ProtocolVersionReply(const ProtocolVersionReply& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ProtocolVersionReply* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.id_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.id_ = from._impl_.id_; + // @@protoc_insertion_point(copy_constructor:remote.ProtocolVersionReply) +} + +inline void ProtocolVersionReply::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.id_){uint64_t{0u}} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ProtocolVersionReply::~ProtocolVersionReply() { + // @@protoc_insertion_point(destructor:remote.ProtocolVersionReply) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ProtocolVersionReply::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ProtocolVersionReply::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ProtocolVersionReply::Clear() { +// @@protoc_insertion_point(message_clear_start:remote.ProtocolVersionReply) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.id_ = uint64_t{0u}; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ProtocolVersionReply::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint64 id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ProtocolVersionReply::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:remote.ProtocolVersionReply) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint64 id = 1; + if (this->_internal_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:remote.ProtocolVersionReply) + return target; +} + +size_t ProtocolVersionReply::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:remote.ProtocolVersionReply) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint64 id = 1; + if (this->_internal_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ProtocolVersionReply::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ProtocolVersionReply::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ProtocolVersionReply::GetClassData() const { return &_class_data_; } + + +void ProtocolVersionReply::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:remote.ProtocolVersionReply) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_id() != 0) { + _this->_internal_set_id(from._internal_id()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ProtocolVersionReply::CopyFrom(const ProtocolVersionReply& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:remote.ProtocolVersionReply) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ProtocolVersionReply::IsInitialized() const { + return true; +} + +void ProtocolVersionReply::InternalSwap(ProtocolVersionReply* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.id_, other->_impl_.id_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ProtocolVersionReply::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, + file_level_metadata_remote_2fethbackend_2eproto[7]); +} + +// =================================================================== + +class ClientVersionRequest::_Internal { + public: +}; + +ClientVersionRequest::ClientVersionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase(arena, is_message_owned) { + // @@protoc_insertion_point(arena_constructor:remote.ClientVersionRequest) +} +ClientVersionRequest::ClientVersionRequest(const ClientVersionRequest& from) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() { + ClientVersionRequest* const _this = this; (void)_this; + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:remote.ClientVersionRequest) +} + + + + + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ClientVersionRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl, + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl, +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ClientVersionRequest::GetClassData() const { return &_class_data_; } + + + + + + + +::PROTOBUF_NAMESPACE_ID::Metadata ClientVersionRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, + file_level_metadata_remote_2fethbackend_2eproto[8]); +} + +// =================================================================== + +class ClientVersionReply::_Internal { + public: +}; + +ClientVersionReply::ClientVersionReply(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:remote.ClientVersionReply) +} +ClientVersionReply::ClientVersionReply(const ClientVersionReply& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ClientVersionReply* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.node_name_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.node_name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.node_name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_node_name().empty()) { + _this->_impl_.node_name_.Set(from._internal_node_name(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:remote.ClientVersionReply) +} + +inline void ClientVersionReply::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.node_name_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.node_name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.node_name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ClientVersionReply::~ClientVersionReply() { + // @@protoc_insertion_point(destructor:remote.ClientVersionReply) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ClientVersionReply::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.node_name_.Destroy(); +} + +void ClientVersionReply::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ClientVersionReply::Clear() { +// @@protoc_insertion_point(message_clear_start:remote.ClientVersionReply) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.node_name_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ClientVersionReply::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // string node_name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_node_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "remote.ClientVersionReply.node_name")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ClientVersionReply::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:remote.ClientVersionReply) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string node_name = 1; + if (!this->_internal_node_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_node_name().data(), static_cast(this->_internal_node_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "remote.ClientVersionReply.node_name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_node_name(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:remote.ClientVersionReply) + return target; +} + +size_t ClientVersionReply::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:remote.ClientVersionReply) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string node_name = 1; + if (!this->_internal_node_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_node_name()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ClientVersionReply::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ClientVersionReply::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ClientVersionReply::GetClassData() const { return &_class_data_; } + + +void ClientVersionReply::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:remote.ClientVersionReply) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_node_name().empty()) { + _this->_internal_set_node_name(from._internal_node_name()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ClientVersionReply::CopyFrom(const ClientVersionReply& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:remote.ClientVersionReply) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ClientVersionReply::IsInitialized() const { + return true; +} + +void ClientVersionReply::InternalSwap(ClientVersionReply* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.node_name_, lhs_arena, + &other->_impl_.node_name_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ClientVersionReply::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, + file_level_metadata_remote_2fethbackend_2eproto[9]); +} + +// =================================================================== + +class CanonicalHashRequest::_Internal { + public: +}; + +CanonicalHashRequest::CanonicalHashRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:remote.CanonicalHashRequest) +} +CanonicalHashRequest::CanonicalHashRequest(const CanonicalHashRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + CanonicalHashRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.block_number_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.block_number_ = from._impl_.block_number_; + // @@protoc_insertion_point(copy_constructor:remote.CanonicalHashRequest) +} + +inline void CanonicalHashRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.block_number_){uint64_t{0u}} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +CanonicalHashRequest::~CanonicalHashRequest() { + // @@protoc_insertion_point(destructor:remote.CanonicalHashRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CanonicalHashRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void CanonicalHashRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void CanonicalHashRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:remote.CanonicalHashRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.block_number_ = uint64_t{0u}; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CanonicalHashRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint64 block_number = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.block_number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CanonicalHashRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:remote.CanonicalHashRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint64 block_number = 1; + if (this->_internal_block_number() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_block_number(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:remote.CanonicalHashRequest) + return target; +} + +size_t CanonicalHashRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:remote.CanonicalHashRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint64 block_number = 1; + if (this->_internal_block_number() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_block_number()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CanonicalHashRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + CanonicalHashRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CanonicalHashRequest::GetClassData() const { return &_class_data_; } + + +void CanonicalHashRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:remote.CanonicalHashRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_block_number() != 0) { + _this->_internal_set_block_number(from._internal_block_number()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CanonicalHashRequest::CopyFrom(const CanonicalHashRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:remote.CanonicalHashRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CanonicalHashRequest::IsInitialized() const { + return true; +} + +void CanonicalHashRequest::InternalSwap(CanonicalHashRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.block_number_, other->_impl_.block_number_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CanonicalHashRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, + file_level_metadata_remote_2fethbackend_2eproto[10]); +} + +// =================================================================== + +class CanonicalHashReply::_Internal { + public: + static const ::types::H256& hash(const CanonicalHashReply* msg); +}; + +const ::types::H256& +CanonicalHashReply::_Internal::hash(const CanonicalHashReply* msg) { + return *msg->_impl_.hash_; +} +void CanonicalHashReply::clear_hash() { + if (GetArenaForAllocation() == nullptr && _impl_.hash_ != nullptr) { + delete _impl_.hash_; + } + _impl_.hash_ = nullptr; +} +CanonicalHashReply::CanonicalHashReply(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:remote.CanonicalHashReply) +} +CanonicalHashReply::CanonicalHashReply(const CanonicalHashReply& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + CanonicalHashReply* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.hash_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_hash()) { + _this->_impl_.hash_ = new ::types::H256(*from._impl_.hash_); + } + // @@protoc_insertion_point(copy_constructor:remote.CanonicalHashReply) +} + +inline void CanonicalHashReply::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.hash_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +CanonicalHashReply::~CanonicalHashReply() { + // @@protoc_insertion_point(destructor:remote.CanonicalHashReply) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CanonicalHashReply::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.hash_; +} + +void CanonicalHashReply::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void CanonicalHashReply::Clear() { +// @@protoc_insertion_point(message_clear_start:remote.CanonicalHashReply) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.hash_ != nullptr) { + delete _impl_.hash_; + } + _impl_.hash_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CanonicalHashReply::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .types.H256 hash = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_hash(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CanonicalHashReply::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:remote.CanonicalHashReply) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .types.H256 hash = 1; + if (this->_internal_has_hash()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::hash(this), + _Internal::hash(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:remote.CanonicalHashReply) + return target; +} + +size_t CanonicalHashReply::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:remote.CanonicalHashReply) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .types.H256 hash = 1; + if (this->_internal_has_hash()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.hash_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CanonicalHashReply::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + CanonicalHashReply::MergeImpl }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ProtocolVersionRequest::GetClassData() const { return &_class_data_; } +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CanonicalHashReply::GetClassData() const { return &_class_data_; } +void CanonicalHashReply::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:remote.CanonicalHashReply) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + if (from._internal_has_hash()) { + _this->_internal_mutable_hash()->::types::H256::MergeFrom( + from._internal_hash()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} +void CanonicalHashReply::CopyFrom(const CanonicalHashReply& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:remote.CanonicalHashReply) + if (&from == this) return; + Clear(); + MergeFrom(from); +} +bool CanonicalHashReply::IsInitialized() const { + return true; +} +void CanonicalHashReply::InternalSwap(CanonicalHashReply* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.hash_, other->_impl_.hash_); +} -::PROTOBUF_NAMESPACE_ID::Metadata ProtocolVersionRequest::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata CanonicalHashReply::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[6]); + file_level_metadata_remote_2fethbackend_2eproto[11]); } // =================================================================== -class ProtocolVersionReply::_Internal { +class HeaderNumberRequest::_Internal { public: + static const ::types::H256& hash(const HeaderNumberRequest* msg); }; -ProtocolVersionReply::ProtocolVersionReply(::PROTOBUF_NAMESPACE_ID::Arena* arena, +const ::types::H256& +HeaderNumberRequest::_Internal::hash(const HeaderNumberRequest* msg) { + return *msg->_impl_.hash_; +} +void HeaderNumberRequest::clear_hash() { + if (GetArenaForAllocation() == nullptr && _impl_.hash_ != nullptr) { + delete _impl_.hash_; + } + _impl_.hash_ = nullptr; +} +HeaderNumberRequest::HeaderNumberRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:remote.ProtocolVersionReply) + // @@protoc_insertion_point(arena_constructor:remote.HeaderNumberRequest) } -ProtocolVersionReply::ProtocolVersionReply(const ProtocolVersionReply& from) +HeaderNumberRequest::HeaderNumberRequest(const HeaderNumberRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message() { - ProtocolVersionReply* const _this = this; (void)_this; + HeaderNumberRequest* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.id_){} + decltype(_impl_.hash_){nullptr} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.id_ = from._impl_.id_; - // @@protoc_insertion_point(copy_constructor:remote.ProtocolVersionReply) + if (from._internal_has_hash()) { + _this->_impl_.hash_ = new ::types::H256(*from._impl_.hash_); + } + // @@protoc_insertion_point(copy_constructor:remote.HeaderNumberRequest) } -inline void ProtocolVersionReply::SharedCtor( +inline void HeaderNumberRequest::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.id_){uint64_t{0u}} + decltype(_impl_.hash_){nullptr} , /*decltype(_impl_._cached_size_)*/{} }; } -ProtocolVersionReply::~ProtocolVersionReply() { - // @@protoc_insertion_point(destructor:remote.ProtocolVersionReply) +HeaderNumberRequest::~HeaderNumberRequest() { + // @@protoc_insertion_point(destructor:remote.HeaderNumberRequest) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; return; @@ -1534,34 +2443,38 @@ ProtocolVersionReply::~ProtocolVersionReply() { SharedDtor(); } -inline void ProtocolVersionReply::SharedDtor() { +inline void HeaderNumberRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.hash_; } -void ProtocolVersionReply::SetCachedSize(int size) const { +void HeaderNumberRequest::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void ProtocolVersionReply::Clear() { -// @@protoc_insertion_point(message_clear_start:remote.ProtocolVersionReply) +void HeaderNumberRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:remote.HeaderNumberRequest) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.id_ = uint64_t{0u}; + if (GetArenaForAllocation() == nullptr && _impl_.hash_ != nullptr) { + delete _impl_.hash_; + } + _impl_.hash_ = nullptr; _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* ProtocolVersionReply::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +const char* HeaderNumberRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { - // uint64 id = 1; + // .types.H256 hash = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_hash(), ptr); CHK_(ptr); } else goto handle_unusual; @@ -1589,173 +2502,132 @@ const char* ProtocolVersionReply::_InternalParse(const char* ptr, ::_pbi::ParseC #undef CHK_ } -uint8_t* ProtocolVersionReply::_InternalSerialize( +uint8_t* HeaderNumberRequest::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:remote.ProtocolVersionReply) + // @@protoc_insertion_point(serialize_to_array_start:remote.HeaderNumberRequest) uint32_t cached_has_bits = 0; (void) cached_has_bits; - // uint64 id = 1; - if (this->_internal_id() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_id(), target); + // .types.H256 hash = 1; + if (this->_internal_has_hash()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::hash(this), + _Internal::hash(this).GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:remote.ProtocolVersionReply) + // @@protoc_insertion_point(serialize_to_array_end:remote.HeaderNumberRequest) return target; } -size_t ProtocolVersionReply::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:remote.ProtocolVersionReply) +size_t HeaderNumberRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:remote.HeaderNumberRequest) size_t total_size = 0; uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // uint64 id = 1; - if (this->_internal_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_id()); + // .types.H256 hash = 1; + if (this->_internal_has_hash()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.hash_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ProtocolVersionReply::_class_data_ = { +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HeaderNumberRequest::_class_data_ = { ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - ProtocolVersionReply::MergeImpl + HeaderNumberRequest::MergeImpl }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ProtocolVersionReply::GetClassData() const { return &_class_data_; } +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HeaderNumberRequest::GetClassData() const { return &_class_data_; } -void ProtocolVersionReply::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:remote.ProtocolVersionReply) +void HeaderNumberRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:remote.HeaderNumberRequest) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_id() != 0) { - _this->_internal_set_id(from._internal_id()); + if (from._internal_has_hash()) { + _this->_internal_mutable_hash()->::types::H256::MergeFrom( + from._internal_hash()); } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } -void ProtocolVersionReply::CopyFrom(const ProtocolVersionReply& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:remote.ProtocolVersionReply) +void HeaderNumberRequest::CopyFrom(const HeaderNumberRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:remote.HeaderNumberRequest) if (&from == this) return; Clear(); MergeFrom(from); } -bool ProtocolVersionReply::IsInitialized() const { +bool HeaderNumberRequest::IsInitialized() const { return true; } -void ProtocolVersionReply::InternalSwap(ProtocolVersionReply* other) { +void HeaderNumberRequest::InternalSwap(HeaderNumberRequest* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.id_, other->_impl_.id_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ProtocolVersionReply::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[7]); -} - -// =================================================================== - -class ClientVersionRequest::_Internal { - public: -}; - -ClientVersionRequest::ClientVersionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase(arena, is_message_owned) { - // @@protoc_insertion_point(arena_constructor:remote.ClientVersionRequest) -} -ClientVersionRequest::ClientVersionRequest(const ClientVersionRequest& from) - : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() { - ClientVersionRequest* const _this = this; (void)_this; - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:remote.ClientVersionRequest) + swap(_impl_.hash_, other->_impl_.hash_); } - - - - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ClientVersionRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl, - ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl, -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ClientVersionRequest::GetClassData() const { return &_class_data_; } - - - - - - - -::PROTOBUF_NAMESPACE_ID::Metadata ClientVersionRequest::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata HeaderNumberRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[8]); + file_level_metadata_remote_2fethbackend_2eproto[12]); } // =================================================================== -class ClientVersionReply::_Internal { +class HeaderNumberReply::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static void set_has_number(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -ClientVersionReply::ClientVersionReply(::PROTOBUF_NAMESPACE_ID::Arena* arena, +HeaderNumberReply::HeaderNumberReply(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:remote.ClientVersionReply) + // @@protoc_insertion_point(arena_constructor:remote.HeaderNumberReply) } -ClientVersionReply::ClientVersionReply(const ClientVersionReply& from) +HeaderNumberReply::HeaderNumberReply(const HeaderNumberReply& from) : ::PROTOBUF_NAMESPACE_ID::Message() { - ClientVersionReply* const _this = this; (void)_this; + HeaderNumberReply* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.node_name_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.number_){}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.node_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.node_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_node_name().empty()) { - _this->_impl_.node_name_.Set(from._internal_node_name(), - _this->GetArenaForAllocation()); - } - // @@protoc_insertion_point(copy_constructor:remote.ClientVersionReply) + _this->_impl_.number_ = from._impl_.number_; + // @@protoc_insertion_point(copy_constructor:remote.HeaderNumberReply) } -inline void ClientVersionReply::SharedCtor( +inline void HeaderNumberReply::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.node_name_){} + decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.number_){uint64_t{0u}} }; - _impl_.node_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.node_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } -ClientVersionReply::~ClientVersionReply() { - // @@protoc_insertion_point(destructor:remote.ClientVersionReply) +HeaderNumberReply::~HeaderNumberReply() { + // @@protoc_insertion_point(destructor:remote.HeaderNumberReply) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; return; @@ -1763,38 +2635,38 @@ ClientVersionReply::~ClientVersionReply() { SharedDtor(); } -inline void ClientVersionReply::SharedDtor() { +inline void HeaderNumberReply::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.node_name_.Destroy(); } -void ClientVersionReply::SetCachedSize(int size) const { +void HeaderNumberReply::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void ClientVersionReply::Clear() { -// @@protoc_insertion_point(message_clear_start:remote.ClientVersionReply) +void HeaderNumberReply::Clear() { +// @@protoc_insertion_point(message_clear_start:remote.HeaderNumberReply) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.node_name_.ClearToEmpty(); + _impl_.number_ = uint64_t{0u}; + _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* ClientVersionReply::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +const char* HeaderNumberReply::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { - // string node_name = 1; + // optional uint64 number = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_node_name(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_number(&has_bits); + _impl_.number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "remote.ClientVersionReply.node_name")); } else goto handle_unusual; continue; @@ -1814,6 +2686,7 @@ const char* ClientVersionReply::_InternalParse(const char* ptr, ::_pbi::ParseCon CHK_(ptr != nullptr); } // while message_done: + _impl_._has_bits_.Or(has_bits); return ptr; failure: ptr = nullptr; @@ -1821,95 +2694,86 @@ const char* ClientVersionReply::_InternalParse(const char* ptr, ::_pbi::ParseCon #undef CHK_ } -uint8_t* ClientVersionReply::_InternalSerialize( +uint8_t* HeaderNumberReply::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:remote.ClientVersionReply) + // @@protoc_insertion_point(serialize_to_array_start:remote.HeaderNumberReply) uint32_t cached_has_bits = 0; (void) cached_has_bits; - // string node_name = 1; - if (!this->_internal_node_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_node_name().data(), static_cast(this->_internal_node_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "remote.ClientVersionReply.node_name"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_node_name(), target); + // optional uint64 number = 1; + if (_internal_has_number()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_number(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:remote.ClientVersionReply) + // @@protoc_insertion_point(serialize_to_array_end:remote.HeaderNumberReply) return target; } -size_t ClientVersionReply::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:remote.ClientVersionReply) +size_t HeaderNumberReply::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:remote.HeaderNumberReply) size_t total_size = 0; uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string node_name = 1; - if (!this->_internal_node_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_node_name()); + // optional uint64 number = 1; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_number()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ClientVersionReply::_class_data_ = { +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HeaderNumberReply::_class_data_ = { ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - ClientVersionReply::MergeImpl + HeaderNumberReply::MergeImpl }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ClientVersionReply::GetClassData() const { return &_class_data_; } +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HeaderNumberReply::GetClassData() const { return &_class_data_; } -void ClientVersionReply::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:remote.ClientVersionReply) +void HeaderNumberReply::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:remote.HeaderNumberReply) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_node_name().empty()) { - _this->_internal_set_node_name(from._internal_node_name()); + if (from._internal_has_number()) { + _this->_internal_set_number(from._internal_number()); } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } -void ClientVersionReply::CopyFrom(const ClientVersionReply& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:remote.ClientVersionReply) +void HeaderNumberReply::CopyFrom(const HeaderNumberReply& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:remote.HeaderNumberReply) if (&from == this) return; Clear(); MergeFrom(from); } -bool ClientVersionReply::IsInitialized() const { +bool HeaderNumberReply::IsInitialized() const { return true; } -void ClientVersionReply::InternalSwap(ClientVersionReply* other) { +void HeaderNumberReply::InternalSwap(HeaderNumberReply* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.node_name_, lhs_arena, - &other->_impl_.node_name_, rhs_arena - ); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(_impl_.number_, other->_impl_.number_); } -::PROTOBUF_NAMESPACE_ID::Metadata ClientVersionReply::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata HeaderNumberReply::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[9]); + file_level_metadata_remote_2fethbackend_2eproto[13]); } // =================================================================== @@ -2090,7 +2954,7 @@ void SubscribeRequest::InternalSwap(SubscribeRequest* other) { ::PROTOBUF_NAMESPACE_ID::Metadata SubscribeRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[10]); + file_level_metadata_remote_2fethbackend_2eproto[14]); } // =================================================================== @@ -2318,7 +3182,7 @@ void SubscribeReply::InternalSwap(SubscribeReply* other) { ::PROTOBUF_NAMESPACE_ID::Metadata SubscribeReply::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[11]); + file_level_metadata_remote_2fethbackend_2eproto[15]); } // =================================================================== @@ -2603,7 +3467,7 @@ void LogsFilterRequest::InternalSwap(LogsFilterRequest* other) { ::PROTOBUF_NAMESPACE_ID::Metadata LogsFilterRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[12]); + file_level_metadata_remote_2fethbackend_2eproto[16]); } // =================================================================== @@ -3087,7 +3951,7 @@ void SubscribeLogsReply::InternalSwap(SubscribeLogsReply* other) { ::PROTOBUF_NAMESPACE_ID::Metadata SubscribeLogsReply::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[13]); + file_level_metadata_remote_2fethbackend_2eproto[17]); } // =================================================================== @@ -3317,7 +4181,7 @@ void BlockRequest::InternalSwap(BlockRequest* other) { ::PROTOBUF_NAMESPACE_ID::Metadata BlockRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[14]); + file_level_metadata_remote_2fethbackend_2eproto[18]); } // =================================================================== @@ -3560,7 +4424,7 @@ void BlockReply::InternalSwap(BlockReply* other) { ::PROTOBUF_NAMESPACE_ID::Metadata BlockReply::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[15]); + file_level_metadata_remote_2fethbackend_2eproto[19]); } // =================================================================== @@ -3759,7 +4623,7 @@ void TxnLookupRequest::InternalSwap(TxnLookupRequest* other) { ::PROTOBUF_NAMESPACE_ID::Metadata TxnLookupRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[16]); + file_level_metadata_remote_2fethbackend_2eproto[20]); } // =================================================================== @@ -3937,7 +4801,7 @@ void TxnLookupReply::InternalSwap(TxnLookupReply* other) { ::PROTOBUF_NAMESPACE_ID::Metadata TxnLookupReply::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[17]); + file_level_metadata_remote_2fethbackend_2eproto[21]); } // =================================================================== @@ -4115,7 +4979,7 @@ void NodesInfoRequest::InternalSwap(NodesInfoRequest* other) { ::PROTOBUF_NAMESPACE_ID::Metadata NodesInfoRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[18]); + file_level_metadata_remote_2fethbackend_2eproto[22]); } // =================================================================== @@ -4318,7 +5182,7 @@ void AddPeerRequest::InternalSwap(AddPeerRequest* other) { ::PROTOBUF_NAMESPACE_ID::Metadata AddPeerRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[19]); + file_level_metadata_remote_2fethbackend_2eproto[23]); } // =================================================================== @@ -4506,7 +5370,7 @@ void NodesInfoReply::InternalSwap(NodesInfoReply* other) { ::PROTOBUF_NAMESPACE_ID::Metadata NodesInfoReply::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[20]); + file_level_metadata_remote_2fethbackend_2eproto[24]); } // =================================================================== @@ -4694,7 +5558,7 @@ void PeersReply::InternalSwap(PeersReply* other) { ::PROTOBUF_NAMESPACE_ID::Metadata PeersReply::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[21]); + file_level_metadata_remote_2fethbackend_2eproto[25]); } // =================================================================== @@ -4872,7 +5736,7 @@ void AddPeerReply::InternalSwap(AddPeerReply* other) { ::PROTOBUF_NAMESPACE_ID::Metadata AddPeerReply::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[22]); + file_level_metadata_remote_2fethbackend_2eproto[26]); } // =================================================================== @@ -5070,7 +5934,7 @@ void PendingBlockReply::InternalSwap(PendingBlockReply* other) { ::PROTOBUF_NAMESPACE_ID::Metadata PendingBlockReply::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[23]); + file_level_metadata_remote_2fethbackend_2eproto[27]); } // =================================================================== @@ -5258,7 +6122,7 @@ void EngineGetPayloadBodiesByHashV1Request::InternalSwap(EngineGetPayloadBodiesB ::PROTOBUF_NAMESPACE_ID::Metadata EngineGetPayloadBodiesByHashV1Request::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[24]); + file_level_metadata_remote_2fethbackend_2eproto[28]); } // =================================================================== @@ -5469,7 +6333,7 @@ void EngineGetPayloadBodiesByRangeV1Request::InternalSwap(EngineGetPayloadBodies ::PROTOBUF_NAMESPACE_ID::Metadata EngineGetPayloadBodiesByRangeV1Request::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[25]); + file_level_metadata_remote_2fethbackend_2eproto[29]); } // =================================================================== @@ -5668,7 +6532,7 @@ void BorEventRequest::InternalSwap(BorEventRequest* other) { ::PROTOBUF_NAMESPACE_ID::Metadata BorEventRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[26]); + file_level_metadata_remote_2fethbackend_2eproto[30]); } // =================================================================== @@ -5913,7 +6777,7 @@ void BorEventReply::InternalSwap(BorEventReply* other) { ::PROTOBUF_NAMESPACE_ID::Metadata BorEventReply::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fethbackend_2eproto_getter, &descriptor_table_remote_2fethbackend_2eproto_once, - file_level_metadata_remote_2fethbackend_2eproto[27]); + file_level_metadata_remote_2fethbackend_2eproto[31]); } // @@protoc_insertion_point(namespace_scope) @@ -5959,6 +6823,22 @@ template<> PROTOBUF_NOINLINE ::remote::ClientVersionReply* Arena::CreateMaybeMessage< ::remote::ClientVersionReply >(Arena* arena) { return Arena::CreateMessageInternal< ::remote::ClientVersionReply >(arena); } +template<> PROTOBUF_NOINLINE ::remote::CanonicalHashRequest* +Arena::CreateMaybeMessage< ::remote::CanonicalHashRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::remote::CanonicalHashRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::remote::CanonicalHashReply* +Arena::CreateMaybeMessage< ::remote::CanonicalHashReply >(Arena* arena) { + return Arena::CreateMessageInternal< ::remote::CanonicalHashReply >(arena); +} +template<> PROTOBUF_NOINLINE ::remote::HeaderNumberRequest* +Arena::CreateMaybeMessage< ::remote::HeaderNumberRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::remote::HeaderNumberRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::remote::HeaderNumberReply* +Arena::CreateMaybeMessage< ::remote::HeaderNumberReply >(Arena* arena) { + return Arena::CreateMessageInternal< ::remote::HeaderNumberReply >(arena); +} template<> PROTOBUF_NOINLINE ::remote::SubscribeRequest* Arena::CreateMaybeMessage< ::remote::SubscribeRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::remote::SubscribeRequest >(arena); diff --git a/silkworm/interfaces/3.21.12/remote/ethbackend.pb.h b/silkworm/interfaces/3.21.12/remote/ethbackend.pb.h index 0206884f13..b2c3c2ef13 100644 --- a/silkworm/interfaces/3.21.12/remote/ethbackend.pb.h +++ b/silkworm/interfaces/3.21.12/remote/ethbackend.pb.h @@ -67,6 +67,12 @@ extern BorEventReplyDefaultTypeInternal _BorEventReply_default_instance_; class BorEventRequest; struct BorEventRequestDefaultTypeInternal; extern BorEventRequestDefaultTypeInternal _BorEventRequest_default_instance_; +class CanonicalHashReply; +struct CanonicalHashReplyDefaultTypeInternal; +extern CanonicalHashReplyDefaultTypeInternal _CanonicalHashReply_default_instance_; +class CanonicalHashRequest; +struct CanonicalHashRequestDefaultTypeInternal; +extern CanonicalHashRequestDefaultTypeInternal _CanonicalHashRequest_default_instance_; class ClientVersionReply; struct ClientVersionReplyDefaultTypeInternal; extern ClientVersionReplyDefaultTypeInternal _ClientVersionReply_default_instance_; @@ -85,6 +91,12 @@ extern EtherbaseReplyDefaultTypeInternal _EtherbaseReply_default_instance_; class EtherbaseRequest; struct EtherbaseRequestDefaultTypeInternal; extern EtherbaseRequestDefaultTypeInternal _EtherbaseRequest_default_instance_; +class HeaderNumberReply; +struct HeaderNumberReplyDefaultTypeInternal; +extern HeaderNumberReplyDefaultTypeInternal _HeaderNumberReply_default_instance_; +class HeaderNumberRequest; +struct HeaderNumberRequestDefaultTypeInternal; +extern HeaderNumberRequestDefaultTypeInternal _HeaderNumberRequest_default_instance_; class LogsFilterRequest; struct LogsFilterRequestDefaultTypeInternal; extern LogsFilterRequestDefaultTypeInternal _LogsFilterRequest_default_instance_; @@ -141,12 +153,16 @@ template<> ::remote::BlockReply* Arena::CreateMaybeMessage<::remote::BlockReply> template<> ::remote::BlockRequest* Arena::CreateMaybeMessage<::remote::BlockRequest>(Arena*); template<> ::remote::BorEventReply* Arena::CreateMaybeMessage<::remote::BorEventReply>(Arena*); template<> ::remote::BorEventRequest* Arena::CreateMaybeMessage<::remote::BorEventRequest>(Arena*); +template<> ::remote::CanonicalHashReply* Arena::CreateMaybeMessage<::remote::CanonicalHashReply>(Arena*); +template<> ::remote::CanonicalHashRequest* Arena::CreateMaybeMessage<::remote::CanonicalHashRequest>(Arena*); template<> ::remote::ClientVersionReply* Arena::CreateMaybeMessage<::remote::ClientVersionReply>(Arena*); template<> ::remote::ClientVersionRequest* Arena::CreateMaybeMessage<::remote::ClientVersionRequest>(Arena*); template<> ::remote::EngineGetPayloadBodiesByHashV1Request* Arena::CreateMaybeMessage<::remote::EngineGetPayloadBodiesByHashV1Request>(Arena*); template<> ::remote::EngineGetPayloadBodiesByRangeV1Request* Arena::CreateMaybeMessage<::remote::EngineGetPayloadBodiesByRangeV1Request>(Arena*); template<> ::remote::EtherbaseReply* Arena::CreateMaybeMessage<::remote::EtherbaseReply>(Arena*); template<> ::remote::EtherbaseRequest* Arena::CreateMaybeMessage<::remote::EtherbaseRequest>(Arena*); +template<> ::remote::HeaderNumberReply* Arena::CreateMaybeMessage<::remote::HeaderNumberReply>(Arena*); +template<> ::remote::HeaderNumberRequest* Arena::CreateMaybeMessage<::remote::HeaderNumberRequest>(Arena*); template<> ::remote::LogsFilterRequest* Arena::CreateMaybeMessage<::remote::LogsFilterRequest>(Arena*); template<> ::remote::NetPeerCountReply* Arena::CreateMaybeMessage<::remote::NetPeerCountReply>(Arena*); template<> ::remote::NetPeerCountRequest* Arena::CreateMaybeMessage<::remote::NetPeerCountRequest>(Arena*); @@ -1539,6 +1555,621 @@ class ClientVersionReply final : }; // ------------------------------------------------------------------- +class CanonicalHashRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:remote.CanonicalHashRequest) */ { + public: + inline CanonicalHashRequest() : CanonicalHashRequest(nullptr) {} + ~CanonicalHashRequest() override; + explicit PROTOBUF_CONSTEXPR CanonicalHashRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CanonicalHashRequest(const CanonicalHashRequest& from); + CanonicalHashRequest(CanonicalHashRequest&& from) noexcept + : CanonicalHashRequest() { + *this = ::std::move(from); + } + + inline CanonicalHashRequest& operator=(const CanonicalHashRequest& from) { + CopyFrom(from); + return *this; + } + inline CanonicalHashRequest& operator=(CanonicalHashRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CanonicalHashRequest& default_instance() { + return *internal_default_instance(); + } + static inline const CanonicalHashRequest* internal_default_instance() { + return reinterpret_cast( + &_CanonicalHashRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(CanonicalHashRequest& a, CanonicalHashRequest& b) { + a.Swap(&b); + } + inline void Swap(CanonicalHashRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CanonicalHashRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CanonicalHashRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CanonicalHashRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CanonicalHashRequest& from) { + CanonicalHashRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CanonicalHashRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "remote.CanonicalHashRequest"; + } + protected: + explicit CanonicalHashRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBlockNumberFieldNumber = 1, + }; + // uint64 block_number = 1; + void clear_block_number(); + uint64_t block_number() const; + void set_block_number(uint64_t value); + private: + uint64_t _internal_block_number() const; + void _internal_set_block_number(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:remote.CanonicalHashRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + uint64_t block_number_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_remote_2fethbackend_2eproto; +}; +// ------------------------------------------------------------------- + +class CanonicalHashReply final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:remote.CanonicalHashReply) */ { + public: + inline CanonicalHashReply() : CanonicalHashReply(nullptr) {} + ~CanonicalHashReply() override; + explicit PROTOBUF_CONSTEXPR CanonicalHashReply(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CanonicalHashReply(const CanonicalHashReply& from); + CanonicalHashReply(CanonicalHashReply&& from) noexcept + : CanonicalHashReply() { + *this = ::std::move(from); + } + + inline CanonicalHashReply& operator=(const CanonicalHashReply& from) { + CopyFrom(from); + return *this; + } + inline CanonicalHashReply& operator=(CanonicalHashReply&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CanonicalHashReply& default_instance() { + return *internal_default_instance(); + } + static inline const CanonicalHashReply* internal_default_instance() { + return reinterpret_cast( + &_CanonicalHashReply_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(CanonicalHashReply& a, CanonicalHashReply& b) { + a.Swap(&b); + } + inline void Swap(CanonicalHashReply* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CanonicalHashReply* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CanonicalHashReply* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CanonicalHashReply& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CanonicalHashReply& from) { + CanonicalHashReply::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CanonicalHashReply* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "remote.CanonicalHashReply"; + } + protected: + explicit CanonicalHashReply(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHashFieldNumber = 1, + }; + // .types.H256 hash = 1; + bool has_hash() const; + private: + bool _internal_has_hash() const; + public: + void clear_hash(); + const ::types::H256& hash() const; + PROTOBUF_NODISCARD ::types::H256* release_hash(); + ::types::H256* mutable_hash(); + void set_allocated_hash(::types::H256* hash); + private: + const ::types::H256& _internal_hash() const; + ::types::H256* _internal_mutable_hash(); + public: + void unsafe_arena_set_allocated_hash( + ::types::H256* hash); + ::types::H256* unsafe_arena_release_hash(); + + // @@protoc_insertion_point(class_scope:remote.CanonicalHashReply) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::types::H256* hash_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_remote_2fethbackend_2eproto; +}; +// ------------------------------------------------------------------- + +class HeaderNumberRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:remote.HeaderNumberRequest) */ { + public: + inline HeaderNumberRequest() : HeaderNumberRequest(nullptr) {} + ~HeaderNumberRequest() override; + explicit PROTOBUF_CONSTEXPR HeaderNumberRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + HeaderNumberRequest(const HeaderNumberRequest& from); + HeaderNumberRequest(HeaderNumberRequest&& from) noexcept + : HeaderNumberRequest() { + *this = ::std::move(from); + } + + inline HeaderNumberRequest& operator=(const HeaderNumberRequest& from) { + CopyFrom(from); + return *this; + } + inline HeaderNumberRequest& operator=(HeaderNumberRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const HeaderNumberRequest& default_instance() { + return *internal_default_instance(); + } + static inline const HeaderNumberRequest* internal_default_instance() { + return reinterpret_cast( + &_HeaderNumberRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(HeaderNumberRequest& a, HeaderNumberRequest& b) { + a.Swap(&b); + } + inline void Swap(HeaderNumberRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(HeaderNumberRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HeaderNumberRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const HeaderNumberRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const HeaderNumberRequest& from) { + HeaderNumberRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(HeaderNumberRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "remote.HeaderNumberRequest"; + } + protected: + explicit HeaderNumberRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHashFieldNumber = 1, + }; + // .types.H256 hash = 1; + bool has_hash() const; + private: + bool _internal_has_hash() const; + public: + void clear_hash(); + const ::types::H256& hash() const; + PROTOBUF_NODISCARD ::types::H256* release_hash(); + ::types::H256* mutable_hash(); + void set_allocated_hash(::types::H256* hash); + private: + const ::types::H256& _internal_hash() const; + ::types::H256* _internal_mutable_hash(); + public: + void unsafe_arena_set_allocated_hash( + ::types::H256* hash); + ::types::H256* unsafe_arena_release_hash(); + + // @@protoc_insertion_point(class_scope:remote.HeaderNumberRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::types::H256* hash_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_remote_2fethbackend_2eproto; +}; +// ------------------------------------------------------------------- + +class HeaderNumberReply final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:remote.HeaderNumberReply) */ { + public: + inline HeaderNumberReply() : HeaderNumberReply(nullptr) {} + ~HeaderNumberReply() override; + explicit PROTOBUF_CONSTEXPR HeaderNumberReply(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + HeaderNumberReply(const HeaderNumberReply& from); + HeaderNumberReply(HeaderNumberReply&& from) noexcept + : HeaderNumberReply() { + *this = ::std::move(from); + } + + inline HeaderNumberReply& operator=(const HeaderNumberReply& from) { + CopyFrom(from); + return *this; + } + inline HeaderNumberReply& operator=(HeaderNumberReply&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const HeaderNumberReply& default_instance() { + return *internal_default_instance(); + } + static inline const HeaderNumberReply* internal_default_instance() { + return reinterpret_cast( + &_HeaderNumberReply_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(HeaderNumberReply& a, HeaderNumberReply& b) { + a.Swap(&b); + } + inline void Swap(HeaderNumberReply* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(HeaderNumberReply* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HeaderNumberReply* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const HeaderNumberReply& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const HeaderNumberReply& from) { + HeaderNumberReply::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(HeaderNumberReply* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "remote.HeaderNumberReply"; + } + protected: + explicit HeaderNumberReply(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNumberFieldNumber = 1, + }; + // optional uint64 number = 1; + bool has_number() const; + private: + bool _internal_has_number() const; + public: + void clear_number(); + uint64_t number() const; + void set_number(uint64_t value); + private: + uint64_t _internal_number() const; + void _internal_set_number(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:remote.HeaderNumberReply) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint64_t number_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_remote_2fethbackend_2eproto; +}; +// ------------------------------------------------------------------- + class SubscribeRequest final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:remote.SubscribeRequest) */ { public: @@ -1587,7 +2218,7 @@ class SubscribeRequest final : &_SubscribeRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 10; + 14; friend void swap(SubscribeRequest& a, SubscribeRequest& b) { a.Swap(&b); @@ -1735,7 +2366,7 @@ class SubscribeReply final : &_SubscribeReply_default_instance_); } static constexpr int kIndexInFileMessages = - 11; + 15; friend void swap(SubscribeReply& a, SubscribeReply& b) { a.Swap(&b); @@ -1899,7 +2530,7 @@ class LogsFilterRequest final : &_LogsFilterRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 12; + 16; friend void swap(LogsFilterRequest& a, LogsFilterRequest& b) { a.Swap(&b); @@ -2098,7 +2729,7 @@ class SubscribeLogsReply final : &_SubscribeLogsReply_default_instance_); } static constexpr int kIndexInFileMessages = - 13; + 17; friend void swap(SubscribeLogsReply& a, SubscribeLogsReply& b) { a.Swap(&b); @@ -2375,7 +3006,7 @@ class BlockRequest final : &_BlockRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 14; + 18; friend void swap(BlockRequest& a, BlockRequest& b) { a.Swap(&b); @@ -2543,7 +3174,7 @@ class BlockReply final : &_BlockReply_default_instance_); } static constexpr int kIndexInFileMessages = - 15; + 19; friend void swap(BlockReply& a, BlockReply& b) { a.Swap(&b); @@ -2712,7 +3343,7 @@ class TxnLookupRequest final : &_TxnLookupRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 16; + 20; friend void swap(TxnLookupRequest& a, TxnLookupRequest& b) { a.Swap(&b); @@ -2869,7 +3500,7 @@ class TxnLookupReply final : &_TxnLookupReply_default_instance_); } static constexpr int kIndexInFileMessages = - 17; + 21; friend void swap(TxnLookupReply& a, TxnLookupReply& b) { a.Swap(&b); @@ -3017,7 +3648,7 @@ class NodesInfoRequest final : &_NodesInfoRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 18; + 22; friend void swap(NodesInfoRequest& a, NodesInfoRequest& b) { a.Swap(&b); @@ -3165,7 +3796,7 @@ class AddPeerRequest final : &_AddPeerRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 19; + 23; friend void swap(AddPeerRequest& a, AddPeerRequest& b) { a.Swap(&b); @@ -3318,7 +3949,7 @@ class NodesInfoReply final : &_NodesInfoReply_default_instance_); } static constexpr int kIndexInFileMessages = - 20; + 24; friend void swap(NodesInfoReply& a, NodesInfoReply& b) { a.Swap(&b); @@ -3475,7 +4106,7 @@ class PeersReply final : &_PeersReply_default_instance_); } static constexpr int kIndexInFileMessages = - 21; + 25; friend void swap(PeersReply& a, PeersReply& b) { a.Swap(&b); @@ -3632,7 +4263,7 @@ class AddPeerReply final : &_AddPeerReply_default_instance_); } static constexpr int kIndexInFileMessages = - 22; + 26; friend void swap(AddPeerReply& a, AddPeerReply& b) { a.Swap(&b); @@ -3780,7 +4411,7 @@ class PendingBlockReply final : &_PendingBlockReply_default_instance_); } static constexpr int kIndexInFileMessages = - 23; + 27; friend void swap(PendingBlockReply& a, PendingBlockReply& b) { a.Swap(&b); @@ -3933,7 +4564,7 @@ class EngineGetPayloadBodiesByHashV1Request final : &_EngineGetPayloadBodiesByHashV1Request_default_instance_); } static constexpr int kIndexInFileMessages = - 24; + 28; friend void swap(EngineGetPayloadBodiesByHashV1Request& a, EngineGetPayloadBodiesByHashV1Request& b) { a.Swap(&b); @@ -4090,7 +4721,7 @@ class EngineGetPayloadBodiesByRangeV1Request final : &_EngineGetPayloadBodiesByRangeV1Request_default_instance_); } static constexpr int kIndexInFileMessages = - 25; + 29; friend void swap(EngineGetPayloadBodiesByRangeV1Request& a, EngineGetPayloadBodiesByRangeV1Request& b) { a.Swap(&b); @@ -4249,7 +4880,7 @@ class BorEventRequest final : &_BorEventRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 26; + 30; friend void swap(BorEventRequest& a, BorEventRequest& b) { a.Swap(&b); @@ -4406,7 +5037,7 @@ class BorEventReply final : &_BorEventReply_default_instance_); } static constexpr int kIndexInFileMessages = - 27; + 31; friend void swap(BorEventReply& a, BorEventReply& b) { a.Swap(&b); @@ -4785,6 +5416,240 @@ inline void ClientVersionReply::set_allocated_node_name(std::string* node_name) // ------------------------------------------------------------------- +// CanonicalHashRequest + +// uint64 block_number = 1; +inline void CanonicalHashRequest::clear_block_number() { + _impl_.block_number_ = uint64_t{0u}; +} +inline uint64_t CanonicalHashRequest::_internal_block_number() const { + return _impl_.block_number_; +} +inline uint64_t CanonicalHashRequest::block_number() const { + // @@protoc_insertion_point(field_get:remote.CanonicalHashRequest.block_number) + return _internal_block_number(); +} +inline void CanonicalHashRequest::_internal_set_block_number(uint64_t value) { + + _impl_.block_number_ = value; +} +inline void CanonicalHashRequest::set_block_number(uint64_t value) { + _internal_set_block_number(value); + // @@protoc_insertion_point(field_set:remote.CanonicalHashRequest.block_number) +} + +// ------------------------------------------------------------------- + +// CanonicalHashReply + +// .types.H256 hash = 1; +inline bool CanonicalHashReply::_internal_has_hash() const { + return this != internal_default_instance() && _impl_.hash_ != nullptr; +} +inline bool CanonicalHashReply::has_hash() const { + return _internal_has_hash(); +} +inline const ::types::H256& CanonicalHashReply::_internal_hash() const { + const ::types::H256* p = _impl_.hash_; + return p != nullptr ? *p : reinterpret_cast( + ::types::_H256_default_instance_); +} +inline const ::types::H256& CanonicalHashReply::hash() const { + // @@protoc_insertion_point(field_get:remote.CanonicalHashReply.hash) + return _internal_hash(); +} +inline void CanonicalHashReply::unsafe_arena_set_allocated_hash( + ::types::H256* hash) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.hash_); + } + _impl_.hash_ = hash; + if (hash) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:remote.CanonicalHashReply.hash) +} +inline ::types::H256* CanonicalHashReply::release_hash() { + + ::types::H256* temp = _impl_.hash_; + _impl_.hash_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::types::H256* CanonicalHashReply::unsafe_arena_release_hash() { + // @@protoc_insertion_point(field_release:remote.CanonicalHashReply.hash) + + ::types::H256* temp = _impl_.hash_; + _impl_.hash_ = nullptr; + return temp; +} +inline ::types::H256* CanonicalHashReply::_internal_mutable_hash() { + + if (_impl_.hash_ == nullptr) { + auto* p = CreateMaybeMessage<::types::H256>(GetArenaForAllocation()); + _impl_.hash_ = p; + } + return _impl_.hash_; +} +inline ::types::H256* CanonicalHashReply::mutable_hash() { + ::types::H256* _msg = _internal_mutable_hash(); + // @@protoc_insertion_point(field_mutable:remote.CanonicalHashReply.hash) + return _msg; +} +inline void CanonicalHashReply::set_allocated_hash(::types::H256* hash) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.hash_); + } + if (hash) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(hash)); + if (message_arena != submessage_arena) { + hash = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, hash, submessage_arena); + } + + } else { + + } + _impl_.hash_ = hash; + // @@protoc_insertion_point(field_set_allocated:remote.CanonicalHashReply.hash) +} + +// ------------------------------------------------------------------- + +// HeaderNumberRequest + +// .types.H256 hash = 1; +inline bool HeaderNumberRequest::_internal_has_hash() const { + return this != internal_default_instance() && _impl_.hash_ != nullptr; +} +inline bool HeaderNumberRequest::has_hash() const { + return _internal_has_hash(); +} +inline const ::types::H256& HeaderNumberRequest::_internal_hash() const { + const ::types::H256* p = _impl_.hash_; + return p != nullptr ? *p : reinterpret_cast( + ::types::_H256_default_instance_); +} +inline const ::types::H256& HeaderNumberRequest::hash() const { + // @@protoc_insertion_point(field_get:remote.HeaderNumberRequest.hash) + return _internal_hash(); +} +inline void HeaderNumberRequest::unsafe_arena_set_allocated_hash( + ::types::H256* hash) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.hash_); + } + _impl_.hash_ = hash; + if (hash) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:remote.HeaderNumberRequest.hash) +} +inline ::types::H256* HeaderNumberRequest::release_hash() { + + ::types::H256* temp = _impl_.hash_; + _impl_.hash_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::types::H256* HeaderNumberRequest::unsafe_arena_release_hash() { + // @@protoc_insertion_point(field_release:remote.HeaderNumberRequest.hash) + + ::types::H256* temp = _impl_.hash_; + _impl_.hash_ = nullptr; + return temp; +} +inline ::types::H256* HeaderNumberRequest::_internal_mutable_hash() { + + if (_impl_.hash_ == nullptr) { + auto* p = CreateMaybeMessage<::types::H256>(GetArenaForAllocation()); + _impl_.hash_ = p; + } + return _impl_.hash_; +} +inline ::types::H256* HeaderNumberRequest::mutable_hash() { + ::types::H256* _msg = _internal_mutable_hash(); + // @@protoc_insertion_point(field_mutable:remote.HeaderNumberRequest.hash) + return _msg; +} +inline void HeaderNumberRequest::set_allocated_hash(::types::H256* hash) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.hash_); + } + if (hash) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(hash)); + if (message_arena != submessage_arena) { + hash = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, hash, submessage_arena); + } + + } else { + + } + _impl_.hash_ = hash; + // @@protoc_insertion_point(field_set_allocated:remote.HeaderNumberRequest.hash) +} + +// ------------------------------------------------------------------- + +// HeaderNumberReply + +// optional uint64 number = 1; +inline bool HeaderNumberReply::_internal_has_number() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool HeaderNumberReply::has_number() const { + return _internal_has_number(); +} +inline void HeaderNumberReply::clear_number() { + _impl_.number_ = uint64_t{0u}; + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline uint64_t HeaderNumberReply::_internal_number() const { + return _impl_.number_; +} +inline uint64_t HeaderNumberReply::number() const { + // @@protoc_insertion_point(field_get:remote.HeaderNumberReply.number) + return _internal_number(); +} +inline void HeaderNumberReply::_internal_set_number(uint64_t value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.number_ = value; +} +inline void HeaderNumberReply::set_number(uint64_t value) { + _internal_set_number(value); + // @@protoc_insertion_point(field_set:remote.HeaderNumberReply.number) +} + +// ------------------------------------------------------------------- + // SubscribeRequest // .remote.Event type = 1; @@ -6339,6 +7204,14 @@ BorEventReply::mutable_event_rlps() { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/silkworm/interfaces/3.21.12/remote/ethbackend_mock.grpc.pb.h b/silkworm/interfaces/3.21.12/remote/ethbackend_mock.grpc.pb.h index faac000fd4..27f2ca88ad 100644 --- a/silkworm/interfaces/3.21.12/remote/ethbackend_mock.grpc.pb.h +++ b/silkworm/interfaces/3.21.12/remote/ethbackend_mock.grpc.pb.h @@ -42,6 +42,12 @@ class MockETHBACKENDStub : public ETHBACKEND::StubInterface { MOCK_METHOD3(Block, ::grpc::Status(::grpc::ClientContext* context, const ::remote::BlockRequest& request, ::remote::BlockReply* response)); MOCK_METHOD3(AsyncBlockRaw, ::grpc::ClientAsyncResponseReaderInterface< ::remote::BlockReply>*(::grpc::ClientContext* context, const ::remote::BlockRequest& request, ::grpc::CompletionQueue* cq)); MOCK_METHOD3(PrepareAsyncBlockRaw, ::grpc::ClientAsyncResponseReaderInterface< ::remote::BlockReply>*(::grpc::ClientContext* context, const ::remote::BlockRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(CanonicalHash, ::grpc::Status(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::remote::CanonicalHashReply* response)); + MOCK_METHOD3(AsyncCanonicalHashRaw, ::grpc::ClientAsyncResponseReaderInterface< ::remote::CanonicalHashReply>*(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncCanonicalHashRaw, ::grpc::ClientAsyncResponseReaderInterface< ::remote::CanonicalHashReply>*(::grpc::ClientContext* context, const ::remote::CanonicalHashRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(HeaderNumber, ::grpc::Status(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::remote::HeaderNumberReply* response)); + MOCK_METHOD3(AsyncHeaderNumberRaw, ::grpc::ClientAsyncResponseReaderInterface< ::remote::HeaderNumberReply>*(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncHeaderNumberRaw, ::grpc::ClientAsyncResponseReaderInterface< ::remote::HeaderNumberReply>*(::grpc::ClientContext* context, const ::remote::HeaderNumberRequest& request, ::grpc::CompletionQueue* cq)); MOCK_METHOD3(TxnLookup, ::grpc::Status(::grpc::ClientContext* context, const ::remote::TxnLookupRequest& request, ::remote::TxnLookupReply* response)); MOCK_METHOD3(AsyncTxnLookupRaw, ::grpc::ClientAsyncResponseReaderInterface< ::remote::TxnLookupReply>*(::grpc::ClientContext* context, const ::remote::TxnLookupRequest& request, ::grpc::CompletionQueue* cq)); MOCK_METHOD3(PrepareAsyncTxnLookupRaw, ::grpc::ClientAsyncResponseReaderInterface< ::remote::TxnLookupReply>*(::grpc::ClientContext* context, const ::remote::TxnLookupRequest& request, ::grpc::CompletionQueue* cq)); diff --git a/silkworm/interfaces/3.21.12/remote/kv.pb.cc b/silkworm/interfaces/3.21.12/remote/kv.pb.cc index ac11e3d213..20cb2304cd 100644 --- a/silkworm/interfaces/3.21.12/remote/kv.pb.cc +++ b/silkworm/interfaces/3.21.12/remote/kv.pb.cc @@ -336,20 +336,20 @@ struct PairsDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PairsDefaultTypeInternal _Pairs_default_instance_; -PROTOBUF_CONSTEXPR ParisPagination::ParisPagination( +PROTOBUF_CONSTEXPR PairsPagination::PairsPagination( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.next_key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.limit_)*/int64_t{0} , /*decltype(_impl_._cached_size_)*/{}} {} -struct ParisPaginationDefaultTypeInternal { - PROTOBUF_CONSTEXPR ParisPaginationDefaultTypeInternal() +struct PairsPaginationDefaultTypeInternal { + PROTOBUF_CONSTEXPR PairsPaginationDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~ParisPaginationDefaultTypeInternal() {} + ~PairsPaginationDefaultTypeInternal() {} union { - ParisPagination _instance; + PairsPagination _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ParisPaginationDefaultTypeInternal _ParisPagination_default_instance_; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PairsPaginationDefaultTypeInternal _PairsPagination_default_instance_; PROTOBUF_CONSTEXPR IndexPagination::IndexPagination( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.next_time_stamp_)*/int64_t{0} @@ -572,13 +572,13 @@ const uint32_t TableStruct_remote_2fkv_2eproto::offsets[] PROTOBUF_SECTION_VARIA PROTOBUF_FIELD_OFFSET(::remote::Pairs, _impl_.values_), PROTOBUF_FIELD_OFFSET(::remote::Pairs, _impl_.next_page_token_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::remote::ParisPagination, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::remote::PairsPagination, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::remote::ParisPagination, _impl_.next_key_), - PROTOBUF_FIELD_OFFSET(::remote::ParisPagination, _impl_.limit_), + PROTOBUF_FIELD_OFFSET(::remote::PairsPagination, _impl_.next_key_), + PROTOBUF_FIELD_OFFSET(::remote::PairsPagination, _impl_.limit_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::remote::IndexPagination, _internal_metadata_), ~0u, // no _extensions_ @@ -608,7 +608,7 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 162, -1, -1, sizeof(::remote::HistoryRangeReq)}, { 176, -1, -1, sizeof(::remote::DomainRangeReq)}, { 192, -1, -1, sizeof(::remote::Pairs)}, - { 201, -1, -1, sizeof(::remote::ParisPagination)}, + { 201, -1, -1, sizeof(::remote::PairsPagination)}, { 209, -1, -1, sizeof(::remote::IndexPagination)}, }; @@ -632,7 +632,7 @@ static const ::_pb::Message* const file_default_instances[] = { &::remote::_HistoryRangeReq_default_instance_._instance, &::remote::_DomainRangeReq_default_instance_._instance, &::remote::_Pairs_default_instance_._instance, - &::remote::_ParisPagination_default_instance_._instance, + &::remote::_PairsPagination_default_instance_._instance, &::remote::_IndexPagination_default_instance_._instance, }; @@ -688,7 +688,7 @@ const char descriptor_table_protodef_remote_2fkv_2eproto[] PROTOBUF_SECTION_VARI "\024\n\014order_ascend\030\007 \001(\010\022\r\n\005limit\030\010 \001(\022\022\021\n\t" "page_size\030\t \001(\005\022\022\n\npage_token\030\n \001(\t\">\n\005P" "airs\022\014\n\004keys\030\001 \003(\014\022\016\n\006values\030\002 \003(\014\022\027\n\017ne" - "xt_page_token\030\003 \001(\t\"2\n\017ParisPagination\022\020" + "xt_page_token\030\003 \001(\t\"2\n\017PairsPagination\022\020" "\n\010next_key\030\001 \001(\014\022\r\n\005limit\030\002 \001(\022\"9\n\017Index" "Pagination\022\027\n\017next_time_stamp\030\001 \001(\022\022\r\n\005l" "imit\030\002 \001(\022*\373\001\n\002Op\022\t\n\005FIRST\020\000\022\r\n\tFIRST_DU" @@ -6707,19 +6707,19 @@ ::PROTOBUF_NAMESPACE_ID::Metadata Pairs::GetMetadata() const { // =================================================================== -class ParisPagination::_Internal { +class PairsPagination::_Internal { public: }; -ParisPagination::ParisPagination(::PROTOBUF_NAMESPACE_ID::Arena* arena, +PairsPagination::PairsPagination(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:remote.ParisPagination) + // @@protoc_insertion_point(arena_constructor:remote.PairsPagination) } -ParisPagination::ParisPagination(const ParisPagination& from) +PairsPagination::PairsPagination(const PairsPagination& from) : ::PROTOBUF_NAMESPACE_ID::Message() { - ParisPagination* const _this = this; (void)_this; + PairsPagination* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_.next_key_){} , decltype(_impl_.limit_){} @@ -6735,10 +6735,10 @@ ParisPagination::ParisPagination(const ParisPagination& from) _this->GetArenaForAllocation()); } _this->_impl_.limit_ = from._impl_.limit_; - // @@protoc_insertion_point(copy_constructor:remote.ParisPagination) + // @@protoc_insertion_point(copy_constructor:remote.PairsPagination) } -inline void ParisPagination::SharedCtor( +inline void PairsPagination::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; @@ -6753,8 +6753,8 @@ inline void ParisPagination::SharedCtor( #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } -ParisPagination::~ParisPagination() { - // @@protoc_insertion_point(destructor:remote.ParisPagination) +PairsPagination::~PairsPagination() { + // @@protoc_insertion_point(destructor:remote.PairsPagination) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; return; @@ -6762,17 +6762,17 @@ ParisPagination::~ParisPagination() { SharedDtor(); } -inline void ParisPagination::SharedDtor() { +inline void PairsPagination::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.next_key_.Destroy(); } -void ParisPagination::SetCachedSize(int size) const { +void PairsPagination::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void ParisPagination::Clear() { -// @@protoc_insertion_point(message_clear_start:remote.ParisPagination) +void PairsPagination::Clear() { +// @@protoc_insertion_point(message_clear_start:remote.PairsPagination) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -6782,7 +6782,7 @@ void ParisPagination::Clear() { _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* ParisPagination::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +const char* PairsPagination::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { uint32_t tag; @@ -6828,9 +6828,9 @@ const char* ParisPagination::_InternalParse(const char* ptr, ::_pbi::ParseContex #undef CHK_ } -uint8_t* ParisPagination::_InternalSerialize( +uint8_t* PairsPagination::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:remote.ParisPagination) + // @@protoc_insertion_point(serialize_to_array_start:remote.PairsPagination) uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -6850,12 +6850,12 @@ uint8_t* ParisPagination::_InternalSerialize( target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:remote.ParisPagination) + // @@protoc_insertion_point(serialize_to_array_end:remote.PairsPagination) return target; } -size_t ParisPagination::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:remote.ParisPagination) +size_t PairsPagination::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:remote.PairsPagination) size_t total_size = 0; uint32_t cached_has_bits = 0; @@ -6877,17 +6877,17 @@ size_t ParisPagination::ByteSizeLong() const { return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ParisPagination::_class_data_ = { +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PairsPagination::_class_data_ = { ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - ParisPagination::MergeImpl + PairsPagination::MergeImpl }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ParisPagination::GetClassData() const { return &_class_data_; } +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PairsPagination::GetClassData() const { return &_class_data_; } -void ParisPagination::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:remote.ParisPagination) +void PairsPagination::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:remote.PairsPagination) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -6901,18 +6901,18 @@ void ParisPagination::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } -void ParisPagination::CopyFrom(const ParisPagination& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:remote.ParisPagination) +void PairsPagination::CopyFrom(const PairsPagination& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:remote.PairsPagination) if (&from == this) return; Clear(); MergeFrom(from); } -bool ParisPagination::IsInitialized() const { +bool PairsPagination::IsInitialized() const { return true; } -void ParisPagination::InternalSwap(ParisPagination* other) { +void PairsPagination::InternalSwap(PairsPagination* other) { using std::swap; auto* lhs_arena = GetArenaForAllocation(); auto* rhs_arena = other->GetArenaForAllocation(); @@ -6924,7 +6924,7 @@ void ParisPagination::InternalSwap(ParisPagination* other) { swap(_impl_.limit_, other->_impl_.limit_); } -::PROTOBUF_NAMESPACE_ID::Metadata ParisPagination::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata PairsPagination::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_remote_2fkv_2eproto_getter, &descriptor_table_remote_2fkv_2eproto_once, file_level_metadata_remote_2fkv_2eproto[19]); @@ -7220,9 +7220,9 @@ template<> PROTOBUF_NOINLINE ::remote::Pairs* Arena::CreateMaybeMessage< ::remote::Pairs >(Arena* arena) { return Arena::CreateMessageInternal< ::remote::Pairs >(arena); } -template<> PROTOBUF_NOINLINE ::remote::ParisPagination* -Arena::CreateMaybeMessage< ::remote::ParisPagination >(Arena* arena) { - return Arena::CreateMessageInternal< ::remote::ParisPagination >(arena); +template<> PROTOBUF_NOINLINE ::remote::PairsPagination* +Arena::CreateMaybeMessage< ::remote::PairsPagination >(Arena* arena) { + return Arena::CreateMessageInternal< ::remote::PairsPagination >(arena); } template<> PROTOBUF_NOINLINE ::remote::IndexPagination* Arena::CreateMaybeMessage< ::remote::IndexPagination >(Arena* arena) { diff --git a/silkworm/interfaces/3.21.12/remote/kv.pb.h b/silkworm/interfaces/3.21.12/remote/kv.pb.h index 7da7baecd5..6fc6c110a1 100644 --- a/silkworm/interfaces/3.21.12/remote/kv.pb.h +++ b/silkworm/interfaces/3.21.12/remote/kv.pb.h @@ -88,9 +88,9 @@ extern PairDefaultTypeInternal _Pair_default_instance_; class Pairs; struct PairsDefaultTypeInternal; extern PairsDefaultTypeInternal _Pairs_default_instance_; -class ParisPagination; -struct ParisPaginationDefaultTypeInternal; -extern ParisPaginationDefaultTypeInternal _ParisPagination_default_instance_; +class PairsPagination; +struct PairsPaginationDefaultTypeInternal; +extern PairsPaginationDefaultTypeInternal _PairsPagination_default_instance_; class RangeReq; struct RangeReqDefaultTypeInternal; extern RangeReqDefaultTypeInternal _RangeReq_default_instance_; @@ -127,7 +127,7 @@ template<> ::remote::IndexRangeReply* Arena::CreateMaybeMessage<::remote::IndexR template<> ::remote::IndexRangeReq* Arena::CreateMaybeMessage<::remote::IndexRangeReq>(Arena*); template<> ::remote::Pair* Arena::CreateMaybeMessage<::remote::Pair>(Arena*); template<> ::remote::Pairs* Arena::CreateMaybeMessage<::remote::Pairs>(Arena*); -template<> ::remote::ParisPagination* Arena::CreateMaybeMessage<::remote::ParisPagination>(Arena*); +template<> ::remote::PairsPagination* Arena::CreateMaybeMessage<::remote::PairsPagination>(Arena*); template<> ::remote::RangeReq* Arena::CreateMaybeMessage<::remote::RangeReq>(Arena*); template<> ::remote::SnapshotsReply* Arena::CreateMaybeMessage<::remote::SnapshotsReply>(Arena*); template<> ::remote::SnapshotsRequest* Arena::CreateMaybeMessage<::remote::SnapshotsRequest>(Arena*); @@ -4068,24 +4068,24 @@ class Pairs final : }; // ------------------------------------------------------------------- -class ParisPagination final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:remote.ParisPagination) */ { +class PairsPagination final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:remote.PairsPagination) */ { public: - inline ParisPagination() : ParisPagination(nullptr) {} - ~ParisPagination() override; - explicit PROTOBUF_CONSTEXPR ParisPagination(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline PairsPagination() : PairsPagination(nullptr) {} + ~PairsPagination() override; + explicit PROTOBUF_CONSTEXPR PairsPagination(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - ParisPagination(const ParisPagination& from); - ParisPagination(ParisPagination&& from) noexcept - : ParisPagination() { + PairsPagination(const PairsPagination& from); + PairsPagination(PairsPagination&& from) noexcept + : PairsPagination() { *this = ::std::move(from); } - inline ParisPagination& operator=(const ParisPagination& from) { + inline PairsPagination& operator=(const PairsPagination& from) { CopyFrom(from); return *this; } - inline ParisPagination& operator=(ParisPagination&& from) noexcept { + inline PairsPagination& operator=(PairsPagination&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -4108,20 +4108,20 @@ class ParisPagination final : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const ParisPagination& default_instance() { + static const PairsPagination& default_instance() { return *internal_default_instance(); } - static inline const ParisPagination* internal_default_instance() { - return reinterpret_cast( - &_ParisPagination_default_instance_); + static inline const PairsPagination* internal_default_instance() { + return reinterpret_cast( + &_PairsPagination_default_instance_); } static constexpr int kIndexInFileMessages = 19; - friend void swap(ParisPagination& a, ParisPagination& b) { + friend void swap(PairsPagination& a, PairsPagination& b) { a.Swap(&b); } - inline void Swap(ParisPagination* other) { + inline void Swap(PairsPagination* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -4134,7 +4134,7 @@ class ParisPagination final : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ParisPagination* other) { + void UnsafeArenaSwap(PairsPagination* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -4142,14 +4142,14 @@ class ParisPagination final : // implements Message ---------------------------------------------- - ParisPagination* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + PairsPagination* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ParisPagination& from); + void CopyFrom(const PairsPagination& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const ParisPagination& from) { - ParisPagination::MergeImpl(*this, from); + void MergeFrom( const PairsPagination& from) { + PairsPagination::MergeImpl(*this, from); } private: static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); @@ -4167,15 +4167,15 @@ class ParisPagination final : void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(ParisPagination* other); + void InternalSwap(PairsPagination* other); private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "remote.ParisPagination"; + return "remote.PairsPagination"; } protected: - explicit ParisPagination(::PROTOBUF_NAMESPACE_ID::Arena* arena, + explicit PairsPagination(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); public: @@ -4215,7 +4215,7 @@ class ParisPagination final : void _internal_set_limit(int64_t value); public: - // @@protoc_insertion_point(class_scope:remote.ParisPagination) + // @@protoc_insertion_point(class_scope:remote.PairsPagination) private: class _Internal; @@ -7671,44 +7671,44 @@ inline void Pairs::set_allocated_next_page_token(std::string* next_page_token) { // ------------------------------------------------------------------- -// ParisPagination +// PairsPagination // bytes next_key = 1; -inline void ParisPagination::clear_next_key() { +inline void PairsPagination::clear_next_key() { _impl_.next_key_.ClearToEmpty(); } -inline const std::string& ParisPagination::next_key() const { - // @@protoc_insertion_point(field_get:remote.ParisPagination.next_key) +inline const std::string& PairsPagination::next_key() const { + // @@protoc_insertion_point(field_get:remote.PairsPagination.next_key) return _internal_next_key(); } template inline PROTOBUF_ALWAYS_INLINE -void ParisPagination::set_next_key(ArgT0&& arg0, ArgT... args) { +void PairsPagination::set_next_key(ArgT0&& arg0, ArgT... args) { _impl_.next_key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:remote.ParisPagination.next_key) + // @@protoc_insertion_point(field_set:remote.PairsPagination.next_key) } -inline std::string* ParisPagination::mutable_next_key() { +inline std::string* PairsPagination::mutable_next_key() { std::string* _s = _internal_mutable_next_key(); - // @@protoc_insertion_point(field_mutable:remote.ParisPagination.next_key) + // @@protoc_insertion_point(field_mutable:remote.PairsPagination.next_key) return _s; } -inline const std::string& ParisPagination::_internal_next_key() const { +inline const std::string& PairsPagination::_internal_next_key() const { return _impl_.next_key_.Get(); } -inline void ParisPagination::_internal_set_next_key(const std::string& value) { +inline void PairsPagination::_internal_set_next_key(const std::string& value) { _impl_.next_key_.Set(value, GetArenaForAllocation()); } -inline std::string* ParisPagination::_internal_mutable_next_key() { +inline std::string* PairsPagination::_internal_mutable_next_key() { return _impl_.next_key_.Mutable(GetArenaForAllocation()); } -inline std::string* ParisPagination::release_next_key() { - // @@protoc_insertion_point(field_release:remote.ParisPagination.next_key) +inline std::string* PairsPagination::release_next_key() { + // @@protoc_insertion_point(field_release:remote.PairsPagination.next_key) return _impl_.next_key_.Release(); } -inline void ParisPagination::set_allocated_next_key(std::string* next_key) { +inline void PairsPagination::set_allocated_next_key(std::string* next_key) { if (next_key != nullptr) { } else { @@ -7720,27 +7720,27 @@ inline void ParisPagination::set_allocated_next_key(std::string* next_key) { _impl_.next_key_.Set("", GetArenaForAllocation()); } #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:remote.ParisPagination.next_key) + // @@protoc_insertion_point(field_set_allocated:remote.PairsPagination.next_key) } // sint64 limit = 2; -inline void ParisPagination::clear_limit() { +inline void PairsPagination::clear_limit() { _impl_.limit_ = int64_t{0}; } -inline int64_t ParisPagination::_internal_limit() const { +inline int64_t PairsPagination::_internal_limit() const { return _impl_.limit_; } -inline int64_t ParisPagination::limit() const { - // @@protoc_insertion_point(field_get:remote.ParisPagination.limit) +inline int64_t PairsPagination::limit() const { + // @@protoc_insertion_point(field_get:remote.PairsPagination.limit) return _internal_limit(); } -inline void ParisPagination::_internal_set_limit(int64_t value) { +inline void PairsPagination::_internal_set_limit(int64_t value) { _impl_.limit_ = value; } -inline void ParisPagination::set_limit(int64_t value) { +inline void PairsPagination::set_limit(int64_t value) { _internal_set_limit(value); - // @@protoc_insertion_point(field_set:remote.ParisPagination.limit) + // @@protoc_insertion_point(field_set:remote.PairsPagination.limit) } // ------------------------------------------------------------------- diff --git a/silkworm/rpc/ethbackend/backend.hpp b/silkworm/rpc/ethbackend/backend.hpp index e54cd8f8dd..5faaff8d43 100644 --- a/silkworm/rpc/ethbackend/backend.hpp +++ b/silkworm/rpc/ethbackend/backend.hpp @@ -43,6 +43,8 @@ class BackEnd { virtual Task peers() = 0; virtual Task get_block(BlockNum block_number, const HashAsSpan& hash, bool read_senders, silkworm::Block& block) = 0; virtual Task get_block_number_from_txn_hash(const HashAsSpan& hash) = 0; + virtual Task get_block_number_from_hash(const HashAsSpan& hash) = 0; + virtual Task get_block_hash_from_block_number(uint64_t number) = 0; }; } // namespace silkworm::rpc::ethbackend diff --git a/silkworm/rpc/ethbackend/remote_backend.cpp b/silkworm/rpc/ethbackend/remote_backend.cpp index 9262c59c67..c5071fa0fa 100644 --- a/silkworm/rpc/ethbackend/remote_backend.cpp +++ b/silkworm/rpc/ethbackend/remote_backend.cpp @@ -178,6 +178,30 @@ Task RemoteBackEnd::get_block_number_from_txn_hash(const HashAsSpan& h co_return bn; } +Task RemoteBackEnd::get_block_number_from_hash(const HashAsSpan& hash) { + const auto start_time = clock_time::now(); + UnaryRpc<&::remote::ETHBACKEND::StubInterface::AsyncHeaderNumber> header_number_rpc{*stub_, grpc_context_}; + ::remote::HeaderNumberRequest request; + request.set_allocated_hash(H256_from_bytes(hash).release()); + const auto reply = co_await header_number_rpc.finish_on(executor_, request); + auto bn = reply.number(); + SILK_TRACE << "RemoteBackEnd::get_block_number_from_hash bn=" << bn << " t=" << clock_time::since(start_time); + co_return bn; +} + +Task RemoteBackEnd::get_block_hash_from_block_number(uint64_t number) { + const auto start_time = clock_time::now(); + UnaryRpc<&::remote::ETHBACKEND::StubInterface::AsyncCanonicalHash> canonical_hsh_rpc{*stub_, grpc_context_}; + ::remote::CanonicalHashRequest request; + request.set_block_number(number); + const auto reply = co_await canonical_hsh_rpc.finish_on(executor_, request); + evmc::bytes32 hash; + span_from_H256(reply.hash(), hash.bytes); + SILK_TRACE << "RemoteBackEnd::get_block_hash_from_block_number bn=" + << " t=" << clock_time::since(start_time); + co_return hash; +} + std::vector RemoteBackEnd::decode(const ::google::protobuf::RepeatedPtrField& grpc_txs) { // Convert encoded transactions from std::string to Bytes std::vector encoded_transactions; diff --git a/silkworm/rpc/ethbackend/remote_backend.hpp b/silkworm/rpc/ethbackend/remote_backend.hpp index 92b302a00e..cf4af29066 100644 --- a/silkworm/rpc/ethbackend/remote_backend.hpp +++ b/silkworm/rpc/ethbackend/remote_backend.hpp @@ -54,6 +54,8 @@ class RemoteBackEnd final : public BackEnd { Task peers() override; Task get_block(BlockNum block_number, const HashAsSpan& hash, bool read_senders, silkworm::Block& block) override; Task get_block_number_from_txn_hash(const HashAsSpan& hash) override; + Task get_block_number_from_hash(const HashAsSpan& hash) override; + Task get_block_hash_from_block_number(uint64_t number) override; private: static std::vector decode(const ::google::protobuf::RepeatedPtrField& grpc_txs); diff --git a/silkworm/rpc/ethbackend/remote_backend_test.cpp b/silkworm/rpc/ethbackend/remote_backend_test.cpp index 92dbd58ce0..3305ab9daf 100644 --- a/silkworm/rpc/ethbackend/remote_backend_test.cpp +++ b/silkworm/rpc/ethbackend/remote_backend_test.cpp @@ -171,18 +171,68 @@ TEST_CASE_METHOD(EthBackendTest, "BackEnd::get_block_number_from_txn_hash", "[si CHECK(bn == 5); } - SECTION("call net_peer_count and get zero count") { + SECTION("call get_block_number_from_txn_hash and get zero count") { EXPECT_CALL(reader, Finish).WillOnce(test::finish_ok(grpc_context_)); - const auto net_peer_count = run<ðbackend::RemoteBackEnd::get_block_number_from_txn_hash>(hash.bytes); - CHECK(net_peer_count == 0); + const auto bn = run<ðbackend::RemoteBackEnd::get_block_number_from_txn_hash>(hash.bytes); + CHECK(bn == 0); } - SECTION("call net_peer_count and get error") { + SECTION("call get_block_number_from_txn_hash and get error") { EXPECT_CALL(reader, Finish).WillOnce(test::finish_cancelled(grpc_context_)); CHECK_THROWS_AS((run<ðbackend::RemoteBackEnd::get_block_number_from_txn_hash>(hash.bytes)), boost::system::system_error); } } +TEST_CASE_METHOD(EthBackendTest, "BackEnd::get_block_number_from_hash", "[silkworm][rpc][ethbackend][backend]") { + test::StrictMockAsyncResponseReader<::remote::HeaderNumberReply> reader; + const Hash hash; + EXPECT_CALL(*stub_, AsyncHeaderNumberRaw).WillOnce(testing::Return(&reader)); + + SECTION("call get_block_number_from_hash and get number") { + ::remote::HeaderNumberReply response; + response.set_number(3); + EXPECT_CALL(reader, Finish).WillOnce(test::finish_with(grpc_context_, std::move(response))); + const auto bn = run<ðbackend::RemoteBackEnd::get_block_number_from_hash>(hash.bytes); + CHECK(bn == 3); + } + + SECTION("call get_block_number_from_hash and get zero count") { + EXPECT_CALL(reader, Finish).WillOnce(test::finish_ok(grpc_context_)); + const auto bn = run<ðbackend::RemoteBackEnd::get_block_number_from_hash>(hash.bytes); + CHECK(bn == 0); + } + + SECTION("call get_block_number_from_hash and get error") { + EXPECT_CALL(reader, Finish).WillOnce(test::finish_cancelled(grpc_context_)); + CHECK_THROWS_AS((run<ðbackend::RemoteBackEnd::get_block_number_from_hash>(hash.bytes)), boost::system::system_error); + } +} + +TEST_CASE_METHOD(EthBackendTest, "BackEnd::get_block_hash_from_block_number", "[silkworm][rpc][ethbackend][backend]") { + test::StrictMockAsyncResponseReader<::remote::CanonicalHashReply> reader; + const uint64_t bn{0}; + EXPECT_CALL(*stub_, AsyncCanonicalHashRaw).WillOnce(testing::Return(&reader)); + + SECTION("call get_block_number_from_hash and get number") { + ::remote::CanonicalHashReply response; + response.set_allocated_hash(make_h256(0x3b8fb240d288781d, 0x4aac94d3fd16809e, 0xe413bc99294a0857, 0x98a589dae51ddd4a)); + EXPECT_CALL(reader, Finish).WillOnce(test::finish_with(grpc_context_, std::move(response))); + const auto hash = run<ðbackend::RemoteBackEnd::get_block_hash_from_block_number>(bn); + CHECK(hash == 0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a_bytes32); + } + + SECTION("call get_block_number_from_hash and get zero count") { + EXPECT_CALL(reader, Finish).WillOnce(test::finish_ok(grpc_context_)); + const auto hash = run<ðbackend::RemoteBackEnd::get_block_hash_from_block_number>(bn); + CHECK(hash == 0x0000000000000000000000000000000000000000000000000000000000000000_bytes32); + } + + SECTION("call get_block_number_from_hash and get error") { + EXPECT_CALL(reader, Finish).WillOnce(test::finish_cancelled(grpc_context_)); + CHECK_THROWS_AS((run<ðbackend::RemoteBackEnd::get_block_hash_from_block_number>(bn)), boost::system::system_error); + } +} + TEST_CASE_METHOD(EthBackendTest, "BackEnd::net_peer_count", "[silkworm][rpc][ethbackend][backend]") { test::StrictMockAsyncResponseReader<::remote::NetPeerCountReply> reader; EXPECT_CALL(*stub_, AsyncNetPeerCountRaw).WillOnce(testing::Return(&reader)); diff --git a/silkworm/rpc/test_util/mock_back_end.hpp b/silkworm/rpc/test_util/mock_back_end.hpp index 48cbf93666..c2a1008d99 100644 --- a/silkworm/rpc/test_util/mock_back_end.hpp +++ b/silkworm/rpc/test_util/mock_back_end.hpp @@ -46,6 +46,8 @@ class BackEndMock : public ethbackend::BackEnd { // NOLINT MOCK_METHOD((Task), peers, ()); MOCK_METHOD((Task), get_block, (BlockNum block_number, const HashAsSpan& hash, bool, silkworm::Block&)); MOCK_METHOD((Task), get_block_number_from_txn_hash, (const HashAsSpan& hash)); + MOCK_METHOD((Task), get_block_number_from_hash, (const HashAsSpan& hash)); + MOCK_METHOD((Task), get_block_hash_from_block_number, (uint64_t number)); }; } // namespace silkworm::rpc::test diff --git a/third_party/clang-tidy/clang-tidy-diff.sh b/third_party/clang-tidy/clang-tidy-diff.sh index 433878a40c..5c15a739b7 100755 --- a/third_party/clang-tidy/clang-tidy-diff.sh +++ b/third_party/clang-tidy/clang-tidy-diff.sh @@ -38,7 +38,7 @@ fi args=( -clang-tidy-binary "$tidy" -p 1 - -exclude "(mock_block_exchange.hpp|mock_execution_client.hpp)" + -exclude "(mock_block_exchange.hpp|mock_execution_client.hpp|.pb.h|mock_back_end.hpp|remote_backend)" -j 6 -timeout 60 -config-file "$project_dir/.clang-tidy" diff --git a/third_party/erigon-interfaces b/third_party/erigon-interfaces index 0d10589c85..740306e3de 160000 --- a/third_party/erigon-interfaces +++ b/third_party/erigon-interfaces @@ -1 +1 @@ -Subproject commit 0d10589c853376fc093fafc4c45d4d2c48f8e9e4 +Subproject commit 740306e3debed05c0fe659613111500fc270dcaf