diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 807e6cf..08c419f 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -70,7 +70,7 @@ jobs: run: | mkdir build cd build - cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_BINARY=ON -DARCH_ID=${{ matrix.config.arch }} + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_BINARY=ON -DARCH_ID=${{ matrix.config.arch }} make -j$(nproc) p2pool - name: Run RandomX tests @@ -87,7 +87,7 @@ jobs: cd tests mkdir build cd build - cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON -DARCH_ID=${{ matrix.config.arch }} + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON -DARCH_ID=${{ matrix.config.arch }} make -j$(nproc) - name: Run tests @@ -220,7 +220,7 @@ jobs: run: | mkdir build cd build - cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON make -j$(nproc) p2pool - name: Run RandomX tests @@ -235,7 +235,7 @@ jobs: cd tests mkdir build cd build - cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DCMAKE_CXX_FLAGS='${{ matrix.config.flags }} -Wl,-s -Wl,--gc-sections' -DSTATIC_LIBS=ON make -j$(nproc) - name: Run tests diff --git a/CMakeLists.txt b/CMakeLists.txt index 501dde3..ee04baa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -385,7 +385,7 @@ add_definitions("-DRAPIDJSON_PARSE_DEFAULT_FLAGS=kParseTrailingCommasFlag") add_executable(${CMAKE_PROJECT_NAME} ${HEADERS} ${SOURCES}) if (STATIC_BINARY OR STATIC_LIBS) - if (NOT (DEV_WITH_TSAN OR DEV_WITH_MSAN OR DEV_WITH_UBSAN OR DEV_WITH_ASAN)) + if ((CMAKE_BUILD_TYPE STREQUAL "Release") AND (NOT (DEV_WITH_TSAN OR DEV_WITH_MSAN OR DEV_WITH_UBSAN OR DEV_WITH_ASAN))) if (WIN32) add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} "${CMAKE_PROJECT_NAME}.exe") else() diff --git a/external/src/Tari/proto/gRPC/base_node.grpc.pb.cc b/external/src/Tari/proto/gRPC/base_node.grpc.pb.cc index 56d73a8..3050111 100644 --- a/external/src/Tari/proto/gRPC/base_node.grpc.pb.cc +++ b/external/src/Tari/proto/gRPC/base_node.grpc.pb.cc @@ -59,6 +59,7 @@ static const char* BaseNode_method_names[] = { "/tari.rpc.BaseNode/GetShardKey", "/tari.rpc.BaseNode/GetTemplateRegistrations", "/tari.rpc.BaseNode/GetSideChainUtxos", + "/tari.rpc.BaseNode/GetNetworkState", }; std::unique_ptr< BaseNode::Stub> BaseNode::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { @@ -104,6 +105,7 @@ BaseNode::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, , rpcmethod_GetShardKey_(BaseNode_method_names[33], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_GetTemplateRegistrations_(BaseNode_method_names[34], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel) , rpcmethod_GetSideChainUtxos_(BaseNode_method_names[35], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel) + , rpcmethod_GetNetworkState_(BaseNode_method_names[36], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) {} ::grpc::ClientReader< ::tari::rpc::BlockHeaderResponse>* BaseNode::Stub::ListHeadersRaw(::grpc::ClientContext* context, const ::tari::rpc::ListHeadersRequest& request) { @@ -850,6 +852,29 @@ void BaseNode::Stub::async::GetSideChainUtxos(::grpc::ClientContext* context, co return ::grpc::internal::ClientAsyncReaderFactory< ::tari::rpc::GetSideChainUtxosResponse>::Create(channel_.get(), cq, rpcmethod_GetSideChainUtxos_, context, request, false, nullptr); } +::grpc::Status BaseNode::Stub::GetNetworkState(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest& request, ::tari::rpc::GetNetworkStateResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::tari::rpc::GetNetworkStateRequest, ::tari::rpc::GetNetworkStateResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetNetworkState_, context, request, response); +} + +void BaseNode::Stub::async::GetNetworkState(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest* request, ::tari::rpc::GetNetworkStateResponse* response, std::function<void(::grpc::Status)> f) { + ::grpc::internal::CallbackUnaryCall< ::tari::rpc::GetNetworkStateRequest, ::tari::rpc::GetNetworkStateResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetNetworkState_, context, request, response, std::move(f)); +} + +void BaseNode::Stub::async::GetNetworkState(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest* request, ::tari::rpc::GetNetworkStateResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetNetworkState_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::tari::rpc::GetNetworkStateResponse>* BaseNode::Stub::PrepareAsyncGetNetworkStateRaw(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::tari::rpc::GetNetworkStateResponse, ::tari::rpc::GetNetworkStateRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetNetworkState_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::tari::rpc::GetNetworkStateResponse>* BaseNode::Stub::AsyncGetNetworkStateRaw(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncGetNetworkStateRaw(context, request, cq); + result->StartCall(); + return result; +} + BaseNode::Service::Service() { AddMethod(new ::grpc::internal::RpcServiceMethod( BaseNode_method_names[0], @@ -1211,6 +1236,16 @@ BaseNode::Service::Service() { ::grpc::ServerWriter<::tari::rpc::GetSideChainUtxosResponse>* writer) { return service->GetSideChainUtxos(ctx, req, writer); }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + BaseNode_method_names[36], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< BaseNode::Service, ::tari::rpc::GetNetworkStateRequest, ::tari::rpc::GetNetworkStateResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](BaseNode::Service* service, + ::grpc::ServerContext* ctx, + const ::tari::rpc::GetNetworkStateRequest* req, + ::tari::rpc::GetNetworkStateResponse* resp) { + return service->GetNetworkState(ctx, req, resp); + }, this))); } BaseNode::Service::~Service() { @@ -1468,6 +1503,13 @@ BaseNode::Service::~Service() { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } +::grpc::Status BaseNode::Service::GetNetworkState(::grpc::ServerContext* context, const ::tari::rpc::GetNetworkStateRequest* request, ::tari::rpc::GetNetworkStateResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + } // namespace tari } // namespace rpc diff --git a/external/src/Tari/proto/gRPC/base_node.grpc.pb.h b/external/src/Tari/proto/gRPC/base_node.grpc.pb.h index 8fcf878..f73df6d 100644 --- a/external/src/Tari/proto/gRPC/base_node.grpc.pb.h +++ b/external/src/Tari/proto/gRPC/base_node.grpc.pb.h @@ -367,6 +367,13 @@ class BaseNode final { std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::tari::rpc::GetSideChainUtxosResponse>> PrepareAsyncGetSideChainUtxos(::grpc::ClientContext* context, const ::tari::rpc::GetSideChainUtxosRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::tari::rpc::GetSideChainUtxosResponse>>(PrepareAsyncGetSideChainUtxosRaw(context, request, cq)); } + virtual ::grpc::Status GetNetworkState(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest& request, ::tari::rpc::GetNetworkStateResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tari::rpc::GetNetworkStateResponse>> AsyncGetNetworkState(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tari::rpc::GetNetworkStateResponse>>(AsyncGetNetworkStateRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tari::rpc::GetNetworkStateResponse>> PrepareAsyncGetNetworkState(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tari::rpc::GetNetworkStateResponse>>(PrepareAsyncGetNetworkStateRaw(context, request, cq)); + } class async_interface { public: virtual ~async_interface() {} @@ -462,6 +469,8 @@ class BaseNode final { // Get templates virtual void GetTemplateRegistrations(::grpc::ClientContext* context, const ::tari::rpc::GetTemplateRegistrationsRequest* request, ::grpc::ClientReadReactor< ::tari::rpc::GetTemplateRegistrationResponse>* reactor) = 0; virtual void GetSideChainUtxos(::grpc::ClientContext* context, const ::tari::rpc::GetSideChainUtxosRequest* request, ::grpc::ClientReadReactor< ::tari::rpc::GetSideChainUtxosResponse>* reactor) = 0; + virtual void GetNetworkState(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest* request, ::tari::rpc::GetNetworkStateResponse* response, std::function<void(::grpc::Status)>) = 0; + virtual void GetNetworkState(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest* request, ::tari::rpc::GetNetworkStateResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; }; typedef class async_interface experimental_async_interface; virtual class async_interface* async() { return nullptr; } @@ -551,6 +560,8 @@ class BaseNode final { virtual ::grpc::ClientReaderInterface< ::tari::rpc::GetSideChainUtxosResponse>* GetSideChainUtxosRaw(::grpc::ClientContext* context, const ::tari::rpc::GetSideChainUtxosRequest& request) = 0; virtual ::grpc::ClientAsyncReaderInterface< ::tari::rpc::GetSideChainUtxosResponse>* AsyncGetSideChainUtxosRaw(::grpc::ClientContext* context, const ::tari::rpc::GetSideChainUtxosRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0; virtual ::grpc::ClientAsyncReaderInterface< ::tari::rpc::GetSideChainUtxosResponse>* PrepareAsyncGetSideChainUtxosRaw(::grpc::ClientContext* context, const ::tari::rpc::GetSideChainUtxosRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tari::rpc::GetNetworkStateResponse>* AsyncGetNetworkStateRaw(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tari::rpc::GetNetworkStateResponse>* PrepareAsyncGetNetworkStateRaw(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest& request, ::grpc::CompletionQueue* cq) = 0; }; class Stub final : public StubInterface { public: @@ -831,6 +842,13 @@ class BaseNode final { std::unique_ptr< ::grpc::ClientAsyncReader< ::tari::rpc::GetSideChainUtxosResponse>> PrepareAsyncGetSideChainUtxos(::grpc::ClientContext* context, const ::tari::rpc::GetSideChainUtxosRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncReader< ::tari::rpc::GetSideChainUtxosResponse>>(PrepareAsyncGetSideChainUtxosRaw(context, request, cq)); } + ::grpc::Status GetNetworkState(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest& request, ::tari::rpc::GetNetworkStateResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tari::rpc::GetNetworkStateResponse>> AsyncGetNetworkState(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tari::rpc::GetNetworkStateResponse>>(AsyncGetNetworkStateRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tari::rpc::GetNetworkStateResponse>> PrepareAsyncGetNetworkState(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tari::rpc::GetNetworkStateResponse>>(PrepareAsyncGetNetworkStateRaw(context, request, cq)); + } class async final : public StubInterface::async_interface { public: @@ -894,6 +912,8 @@ class BaseNode final { void GetShardKey(::grpc::ClientContext* context, const ::tari::rpc::GetShardKeyRequest* request, ::tari::rpc::GetShardKeyResponse* response, ::grpc::ClientUnaryReactor* reactor) override; void GetTemplateRegistrations(::grpc::ClientContext* context, const ::tari::rpc::GetTemplateRegistrationsRequest* request, ::grpc::ClientReadReactor< ::tari::rpc::GetTemplateRegistrationResponse>* reactor) override; void GetSideChainUtxos(::grpc::ClientContext* context, const ::tari::rpc::GetSideChainUtxosRequest* request, ::grpc::ClientReadReactor< ::tari::rpc::GetSideChainUtxosResponse>* reactor) override; + void GetNetworkState(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest* request, ::tari::rpc::GetNetworkStateResponse* response, std::function<void(::grpc::Status)>) override; + void GetNetworkState(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest* request, ::tari::rpc::GetNetworkStateResponse* response, ::grpc::ClientUnaryReactor* reactor) override; private: friend class Stub; explicit async(Stub* stub): stub_(stub) { } @@ -989,6 +1009,8 @@ class BaseNode final { ::grpc::ClientReader< ::tari::rpc::GetSideChainUtxosResponse>* GetSideChainUtxosRaw(::grpc::ClientContext* context, const ::tari::rpc::GetSideChainUtxosRequest& request) override; ::grpc::ClientAsyncReader< ::tari::rpc::GetSideChainUtxosResponse>* AsyncGetSideChainUtxosRaw(::grpc::ClientContext* context, const ::tari::rpc::GetSideChainUtxosRequest& request, ::grpc::CompletionQueue* cq, void* tag) override; ::grpc::ClientAsyncReader< ::tari::rpc::GetSideChainUtxosResponse>* PrepareAsyncGetSideChainUtxosRaw(::grpc::ClientContext* context, const ::tari::rpc::GetSideChainUtxosRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tari::rpc::GetNetworkStateResponse>* AsyncGetNetworkStateRaw(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tari::rpc::GetNetworkStateResponse>* PrepareAsyncGetNetworkStateRaw(::grpc::ClientContext* context, const ::tari::rpc::GetNetworkStateRequest& request, ::grpc::CompletionQueue* cq) override; const ::grpc::internal::RpcMethod rpcmethod_ListHeaders_; const ::grpc::internal::RpcMethod rpcmethod_GetHeaderByHash_; const ::grpc::internal::RpcMethod rpcmethod_GetBlocks_; @@ -1025,6 +1047,7 @@ class BaseNode final { const ::grpc::internal::RpcMethod rpcmethod_GetShardKey_; const ::grpc::internal::RpcMethod rpcmethod_GetTemplateRegistrations_; const ::grpc::internal::RpcMethod rpcmethod_GetSideChainUtxos_; + const ::grpc::internal::RpcMethod rpcmethod_GetNetworkState_; }; static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); @@ -1100,6 +1123,7 @@ class BaseNode final { // Get templates virtual ::grpc::Status GetTemplateRegistrations(::grpc::ServerContext* context, const ::tari::rpc::GetTemplateRegistrationsRequest* request, ::grpc::ServerWriter< ::tari::rpc::GetTemplateRegistrationResponse>* writer); virtual ::grpc::Status GetSideChainUtxos(::grpc::ServerContext* context, const ::tari::rpc::GetSideChainUtxosRequest* request, ::grpc::ServerWriter< ::tari::rpc::GetSideChainUtxosResponse>* writer); + virtual ::grpc::Status GetNetworkState(::grpc::ServerContext* context, const ::tari::rpc::GetNetworkStateRequest* request, ::tari::rpc::GetNetworkStateResponse* response); }; template <class BaseClass> class WithAsyncMethod_ListHeaders : public BaseClass { @@ -1821,7 +1845,27 @@ class BaseNode final { ::grpc::Service::RequestAsyncServerStreaming(35, context, request, writer, new_call_cq, notification_cq, tag); } }; - typedef WithAsyncMethod_ListHeaders<WithAsyncMethod_GetHeaderByHash<WithAsyncMethod_GetBlocks<WithAsyncMethod_GetBlockTiming<WithAsyncMethod_GetConstants<WithAsyncMethod_GetBlockSize<WithAsyncMethod_GetBlockFees<WithAsyncMethod_GetVersion<WithAsyncMethod_CheckForUpdates<WithAsyncMethod_GetTokensInCirculation<WithAsyncMethod_GetNetworkDifficulty<WithAsyncMethod_GetNewBlockTemplate<WithAsyncMethod_GetNewBlock<WithAsyncMethod_GetNewBlockWithCoinbases<WithAsyncMethod_GetNewBlockTemplateWithCoinbases<WithAsyncMethod_GetNewBlockBlob<WithAsyncMethod_SubmitBlock<WithAsyncMethod_SubmitBlockBlob<WithAsyncMethod_SubmitTransaction<WithAsyncMethod_GetSyncInfo<WithAsyncMethod_GetSyncProgress<WithAsyncMethod_GetTipInfo<WithAsyncMethod_SearchKernels<WithAsyncMethod_SearchUtxos<WithAsyncMethod_FetchMatchingUtxos<WithAsyncMethod_GetPeers<WithAsyncMethod_GetMempoolTransactions<WithAsyncMethod_TransactionState<WithAsyncMethod_Identify<WithAsyncMethod_GetNetworkStatus<WithAsyncMethod_ListConnectedPeers<WithAsyncMethod_GetMempoolStats<WithAsyncMethod_GetActiveValidatorNodes<WithAsyncMethod_GetShardKey<WithAsyncMethod_GetTemplateRegistrations<WithAsyncMethod_GetSideChainUtxos<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService; + template <class BaseClass> + class WithAsyncMethod_GetNetworkState : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_GetNetworkState() { + ::grpc::Service::MarkMethodAsync(36); + } + ~WithAsyncMethod_GetNetworkState() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetNetworkState(::grpc::ServerContext* /*context*/, const ::tari::rpc::GetNetworkStateRequest* /*request*/, ::tari::rpc::GetNetworkStateResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetNetworkState(::grpc::ServerContext* context, ::tari::rpc::GetNetworkStateRequest* request, ::grpc::ServerAsyncResponseWriter< ::tari::rpc::GetNetworkStateResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(36, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_ListHeaders<WithAsyncMethod_GetHeaderByHash<WithAsyncMethod_GetBlocks<WithAsyncMethod_GetBlockTiming<WithAsyncMethod_GetConstants<WithAsyncMethod_GetBlockSize<WithAsyncMethod_GetBlockFees<WithAsyncMethod_GetVersion<WithAsyncMethod_CheckForUpdates<WithAsyncMethod_GetTokensInCirculation<WithAsyncMethod_GetNetworkDifficulty<WithAsyncMethod_GetNewBlockTemplate<WithAsyncMethod_GetNewBlock<WithAsyncMethod_GetNewBlockWithCoinbases<WithAsyncMethod_GetNewBlockTemplateWithCoinbases<WithAsyncMethod_GetNewBlockBlob<WithAsyncMethod_SubmitBlock<WithAsyncMethod_SubmitBlockBlob<WithAsyncMethod_SubmitTransaction<WithAsyncMethod_GetSyncInfo<WithAsyncMethod_GetSyncProgress<WithAsyncMethod_GetTipInfo<WithAsyncMethod_SearchKernels<WithAsyncMethod_SearchUtxos<WithAsyncMethod_FetchMatchingUtxos<WithAsyncMethod_GetPeers<WithAsyncMethod_GetMempoolTransactions<WithAsyncMethod_TransactionState<WithAsyncMethod_Identify<WithAsyncMethod_GetNetworkStatus<WithAsyncMethod_ListConnectedPeers<WithAsyncMethod_GetMempoolStats<WithAsyncMethod_GetActiveValidatorNodes<WithAsyncMethod_GetShardKey<WithAsyncMethod_GetTemplateRegistrations<WithAsyncMethod_GetSideChainUtxos<WithAsyncMethod_GetNetworkState<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService; template <class BaseClass> class WithCallbackMethod_ListHeaders : public BaseClass { private: @@ -2734,7 +2778,34 @@ class BaseNode final { virtual ::grpc::ServerWriteReactor< ::tari::rpc::GetSideChainUtxosResponse>* GetSideChainUtxos( ::grpc::CallbackServerContext* /*context*/, const ::tari::rpc::GetSideChainUtxosRequest* /*request*/) { return nullptr; } }; - typedef WithCallbackMethod_ListHeaders<WithCallbackMethod_GetHeaderByHash<WithCallbackMethod_GetBlocks<WithCallbackMethod_GetBlockTiming<WithCallbackMethod_GetConstants<WithCallbackMethod_GetBlockSize<WithCallbackMethod_GetBlockFees<WithCallbackMethod_GetVersion<WithCallbackMethod_CheckForUpdates<WithCallbackMethod_GetTokensInCirculation<WithCallbackMethod_GetNetworkDifficulty<WithCallbackMethod_GetNewBlockTemplate<WithCallbackMethod_GetNewBlock<WithCallbackMethod_GetNewBlockWithCoinbases<WithCallbackMethod_GetNewBlockTemplateWithCoinbases<WithCallbackMethod_GetNewBlockBlob<WithCallbackMethod_SubmitBlock<WithCallbackMethod_SubmitBlockBlob<WithCallbackMethod_SubmitTransaction<WithCallbackMethod_GetSyncInfo<WithCallbackMethod_GetSyncProgress<WithCallbackMethod_GetTipInfo<WithCallbackMethod_SearchKernels<WithCallbackMethod_SearchUtxos<WithCallbackMethod_FetchMatchingUtxos<WithCallbackMethod_GetPeers<WithCallbackMethod_GetMempoolTransactions<WithCallbackMethod_TransactionState<WithCallbackMethod_Identify<WithCallbackMethod_GetNetworkStatus<WithCallbackMethod_ListConnectedPeers<WithCallbackMethod_GetMempoolStats<WithCallbackMethod_GetActiveValidatorNodes<WithCallbackMethod_GetShardKey<WithCallbackMethod_GetTemplateRegistrations<WithCallbackMethod_GetSideChainUtxos<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > CallbackService; + template <class BaseClass> + class WithCallbackMethod_GetNetworkState : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_GetNetworkState() { + ::grpc::Service::MarkMethodCallback(36, + new ::grpc::internal::CallbackUnaryHandler< ::tari::rpc::GetNetworkStateRequest, ::tari::rpc::GetNetworkStateResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::tari::rpc::GetNetworkStateRequest* request, ::tari::rpc::GetNetworkStateResponse* response) { return this->GetNetworkState(context, request, response); }));} + void SetMessageAllocatorFor_GetNetworkState( + ::grpc::MessageAllocator< ::tari::rpc::GetNetworkStateRequest, ::tari::rpc::GetNetworkStateResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(36); + static_cast<::grpc::internal::CallbackUnaryHandler< ::tari::rpc::GetNetworkStateRequest, ::tari::rpc::GetNetworkStateResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_GetNetworkState() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetNetworkState(::grpc::ServerContext* /*context*/, const ::tari::rpc::GetNetworkStateRequest* /*request*/, ::tari::rpc::GetNetworkStateResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetNetworkState( + ::grpc::CallbackServerContext* /*context*/, const ::tari::rpc::GetNetworkStateRequest* /*request*/, ::tari::rpc::GetNetworkStateResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_ListHeaders<WithCallbackMethod_GetHeaderByHash<WithCallbackMethod_GetBlocks<WithCallbackMethod_GetBlockTiming<WithCallbackMethod_GetConstants<WithCallbackMethod_GetBlockSize<WithCallbackMethod_GetBlockFees<WithCallbackMethod_GetVersion<WithCallbackMethod_CheckForUpdates<WithCallbackMethod_GetTokensInCirculation<WithCallbackMethod_GetNetworkDifficulty<WithCallbackMethod_GetNewBlockTemplate<WithCallbackMethod_GetNewBlock<WithCallbackMethod_GetNewBlockWithCoinbases<WithCallbackMethod_GetNewBlockTemplateWithCoinbases<WithCallbackMethod_GetNewBlockBlob<WithCallbackMethod_SubmitBlock<WithCallbackMethod_SubmitBlockBlob<WithCallbackMethod_SubmitTransaction<WithCallbackMethod_GetSyncInfo<WithCallbackMethod_GetSyncProgress<WithCallbackMethod_GetTipInfo<WithCallbackMethod_SearchKernels<WithCallbackMethod_SearchUtxos<WithCallbackMethod_FetchMatchingUtxos<WithCallbackMethod_GetPeers<WithCallbackMethod_GetMempoolTransactions<WithCallbackMethod_TransactionState<WithCallbackMethod_Identify<WithCallbackMethod_GetNetworkStatus<WithCallbackMethod_ListConnectedPeers<WithCallbackMethod_GetMempoolStats<WithCallbackMethod_GetActiveValidatorNodes<WithCallbackMethod_GetShardKey<WithCallbackMethod_GetTemplateRegistrations<WithCallbackMethod_GetSideChainUtxos<WithCallbackMethod_GetNetworkState<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > CallbackService; typedef CallbackService ExperimentalCallbackService; template <class BaseClass> class WithGenericMethod_ListHeaders : public BaseClass { @@ -3349,6 +3420,23 @@ class BaseNode final { } }; template <class BaseClass> + class WithGenericMethod_GetNetworkState : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_GetNetworkState() { + ::grpc::Service::MarkMethodGeneric(36); + } + ~WithGenericMethod_GetNetworkState() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetNetworkState(::grpc::ServerContext* /*context*/, const ::tari::rpc::GetNetworkStateRequest* /*request*/, ::tari::rpc::GetNetworkStateResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template <class BaseClass> class WithRawMethod_ListHeaders : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} @@ -4069,6 +4157,26 @@ class BaseNode final { } }; template <class BaseClass> + class WithRawMethod_GetNetworkState : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_GetNetworkState() { + ::grpc::Service::MarkMethodRaw(36); + } + ~WithRawMethod_GetNetworkState() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetNetworkState(::grpc::ServerContext* /*context*/, const ::tari::rpc::GetNetworkStateRequest* /*request*/, ::tari::rpc::GetNetworkStateResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetNetworkState(::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(36, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template <class BaseClass> class WithRawCallbackMethod_ListHeaders : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} @@ -4861,6 +4969,28 @@ class BaseNode final { ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) { return nullptr; } }; template <class BaseClass> + class WithRawCallbackMethod_GetNetworkState : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_GetNetworkState() { + ::grpc::Service::MarkMethodRawCallback(36, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->GetNetworkState(context, request, response); })); + } + ~WithRawCallbackMethod_GetNetworkState() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetNetworkState(::grpc::ServerContext* /*context*/, const ::tari::rpc::GetNetworkStateRequest* /*request*/, ::tari::rpc::GetNetworkStateResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetNetworkState( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template <class BaseClass> class WithStreamedUnaryMethod_GetHeaderByHash : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} @@ -5508,7 +5638,34 @@ class BaseNode final { // replace default version of method with streamed unary virtual ::grpc::Status StreamedGetShardKey(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tari::rpc::GetShardKeyRequest,::tari::rpc::GetShardKeyResponse>* server_unary_streamer) = 0; }; - typedef WithStreamedUnaryMethod_GetHeaderByHash<WithStreamedUnaryMethod_GetBlockTiming<WithStreamedUnaryMethod_GetConstants<WithStreamedUnaryMethod_GetBlockSize<WithStreamedUnaryMethod_GetBlockFees<WithStreamedUnaryMethod_GetVersion<WithStreamedUnaryMethod_CheckForUpdates<WithStreamedUnaryMethod_GetNewBlockTemplate<WithStreamedUnaryMethod_GetNewBlock<WithStreamedUnaryMethod_GetNewBlockWithCoinbases<WithStreamedUnaryMethod_GetNewBlockTemplateWithCoinbases<WithStreamedUnaryMethod_GetNewBlockBlob<WithStreamedUnaryMethod_SubmitBlock<WithStreamedUnaryMethod_SubmitBlockBlob<WithStreamedUnaryMethod_SubmitTransaction<WithStreamedUnaryMethod_GetSyncInfo<WithStreamedUnaryMethod_GetSyncProgress<WithStreamedUnaryMethod_GetTipInfo<WithStreamedUnaryMethod_TransactionState<WithStreamedUnaryMethod_Identify<WithStreamedUnaryMethod_GetNetworkStatus<WithStreamedUnaryMethod_ListConnectedPeers<WithStreamedUnaryMethod_GetMempoolStats<WithStreamedUnaryMethod_GetShardKey<Service > > > > > > > > > > > > > > > > > > > > > > > > StreamedUnaryService; + template <class BaseClass> + class WithStreamedUnaryMethod_GetNetworkState : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_GetNetworkState() { + ::grpc::Service::MarkMethodStreamed(36, + new ::grpc::internal::StreamedUnaryHandler< + ::tari::rpc::GetNetworkStateRequest, ::tari::rpc::GetNetworkStateResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::tari::rpc::GetNetworkStateRequest, ::tari::rpc::GetNetworkStateResponse>* streamer) { + return this->StreamedGetNetworkState(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_GetNetworkState() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status GetNetworkState(::grpc::ServerContext* /*context*/, const ::tari::rpc::GetNetworkStateRequest* /*request*/, ::tari::rpc::GetNetworkStateResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGetNetworkState(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tari::rpc::GetNetworkStateRequest,::tari::rpc::GetNetworkStateResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_GetHeaderByHash<WithStreamedUnaryMethod_GetBlockTiming<WithStreamedUnaryMethod_GetConstants<WithStreamedUnaryMethod_GetBlockSize<WithStreamedUnaryMethod_GetBlockFees<WithStreamedUnaryMethod_GetVersion<WithStreamedUnaryMethod_CheckForUpdates<WithStreamedUnaryMethod_GetNewBlockTemplate<WithStreamedUnaryMethod_GetNewBlock<WithStreamedUnaryMethod_GetNewBlockWithCoinbases<WithStreamedUnaryMethod_GetNewBlockTemplateWithCoinbases<WithStreamedUnaryMethod_GetNewBlockBlob<WithStreamedUnaryMethod_SubmitBlock<WithStreamedUnaryMethod_SubmitBlockBlob<WithStreamedUnaryMethod_SubmitTransaction<WithStreamedUnaryMethod_GetSyncInfo<WithStreamedUnaryMethod_GetSyncProgress<WithStreamedUnaryMethod_GetTipInfo<WithStreamedUnaryMethod_TransactionState<WithStreamedUnaryMethod_Identify<WithStreamedUnaryMethod_GetNetworkStatus<WithStreamedUnaryMethod_ListConnectedPeers<WithStreamedUnaryMethod_GetMempoolStats<WithStreamedUnaryMethod_GetShardKey<WithStreamedUnaryMethod_GetNetworkState<Service > > > > > > > > > > > > > > > > > > > > > > > > > StreamedUnaryService; template <class BaseClass> class WithSplitStreamingMethod_ListHeaders : public BaseClass { private: @@ -5834,7 +5991,7 @@ class BaseNode final { virtual ::grpc::Status StreamedGetSideChainUtxos(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::tari::rpc::GetSideChainUtxosRequest,::tari::rpc::GetSideChainUtxosResponse>* server_split_streamer) = 0; }; typedef WithSplitStreamingMethod_ListHeaders<WithSplitStreamingMethod_GetBlocks<WithSplitStreamingMethod_GetTokensInCirculation<WithSplitStreamingMethod_GetNetworkDifficulty<WithSplitStreamingMethod_SearchKernels<WithSplitStreamingMethod_SearchUtxos<WithSplitStreamingMethod_FetchMatchingUtxos<WithSplitStreamingMethod_GetPeers<WithSplitStreamingMethod_GetMempoolTransactions<WithSplitStreamingMethod_GetActiveValidatorNodes<WithSplitStreamingMethod_GetTemplateRegistrations<WithSplitStreamingMethod_GetSideChainUtxos<Service > > > > > > > > > > > > SplitStreamedService; - typedef WithSplitStreamingMethod_ListHeaders<WithStreamedUnaryMethod_GetHeaderByHash<WithSplitStreamingMethod_GetBlocks<WithStreamedUnaryMethod_GetBlockTiming<WithStreamedUnaryMethod_GetConstants<WithStreamedUnaryMethod_GetBlockSize<WithStreamedUnaryMethod_GetBlockFees<WithStreamedUnaryMethod_GetVersion<WithStreamedUnaryMethod_CheckForUpdates<WithSplitStreamingMethod_GetTokensInCirculation<WithSplitStreamingMethod_GetNetworkDifficulty<WithStreamedUnaryMethod_GetNewBlockTemplate<WithStreamedUnaryMethod_GetNewBlock<WithStreamedUnaryMethod_GetNewBlockWithCoinbases<WithStreamedUnaryMethod_GetNewBlockTemplateWithCoinbases<WithStreamedUnaryMethod_GetNewBlockBlob<WithStreamedUnaryMethod_SubmitBlock<WithStreamedUnaryMethod_SubmitBlockBlob<WithStreamedUnaryMethod_SubmitTransaction<WithStreamedUnaryMethod_GetSyncInfo<WithStreamedUnaryMethod_GetSyncProgress<WithStreamedUnaryMethod_GetTipInfo<WithSplitStreamingMethod_SearchKernels<WithSplitStreamingMethod_SearchUtxos<WithSplitStreamingMethod_FetchMatchingUtxos<WithSplitStreamingMethod_GetPeers<WithSplitStreamingMethod_GetMempoolTransactions<WithStreamedUnaryMethod_TransactionState<WithStreamedUnaryMethod_Identify<WithStreamedUnaryMethod_GetNetworkStatus<WithStreamedUnaryMethod_ListConnectedPeers<WithStreamedUnaryMethod_GetMempoolStats<WithSplitStreamingMethod_GetActiveValidatorNodes<WithStreamedUnaryMethod_GetShardKey<WithSplitStreamingMethod_GetTemplateRegistrations<WithSplitStreamingMethod_GetSideChainUtxos<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService; + typedef WithSplitStreamingMethod_ListHeaders<WithStreamedUnaryMethod_GetHeaderByHash<WithSplitStreamingMethod_GetBlocks<WithStreamedUnaryMethod_GetBlockTiming<WithStreamedUnaryMethod_GetConstants<WithStreamedUnaryMethod_GetBlockSize<WithStreamedUnaryMethod_GetBlockFees<WithStreamedUnaryMethod_GetVersion<WithStreamedUnaryMethod_CheckForUpdates<WithSplitStreamingMethod_GetTokensInCirculation<WithSplitStreamingMethod_GetNetworkDifficulty<WithStreamedUnaryMethod_GetNewBlockTemplate<WithStreamedUnaryMethod_GetNewBlock<WithStreamedUnaryMethod_GetNewBlockWithCoinbases<WithStreamedUnaryMethod_GetNewBlockTemplateWithCoinbases<WithStreamedUnaryMethod_GetNewBlockBlob<WithStreamedUnaryMethod_SubmitBlock<WithStreamedUnaryMethod_SubmitBlockBlob<WithStreamedUnaryMethod_SubmitTransaction<WithStreamedUnaryMethod_GetSyncInfo<WithStreamedUnaryMethod_GetSyncProgress<WithStreamedUnaryMethod_GetTipInfo<WithSplitStreamingMethod_SearchKernels<WithSplitStreamingMethod_SearchUtxos<WithSplitStreamingMethod_FetchMatchingUtxos<WithSplitStreamingMethod_GetPeers<WithSplitStreamingMethod_GetMempoolTransactions<WithStreamedUnaryMethod_TransactionState<WithStreamedUnaryMethod_Identify<WithStreamedUnaryMethod_GetNetworkStatus<WithStreamedUnaryMethod_ListConnectedPeers<WithStreamedUnaryMethod_GetMempoolStats<WithSplitStreamingMethod_GetActiveValidatorNodes<WithStreamedUnaryMethod_GetShardKey<WithSplitStreamingMethod_GetTemplateRegistrations<WithSplitStreamingMethod_GetSideChainUtxos<WithStreamedUnaryMethod_GetNetworkState<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService; }; } // namespace rpc diff --git a/external/src/Tari/proto/gRPC/base_node.pb.cc b/external/src/Tari/proto/gRPC/base_node.pb.cc index 2d0b87c..d88c51b 100644 --- a/external/src/Tari/proto/gRPC/base_node.pb.cc +++ b/external/src/Tari/proto/gRPC/base_node.pb.cc @@ -65,8 +65,12 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT inline constexpr SyncProgressResponse::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept - : tip_height_{::uint64_t{0u}}, + : short_desc_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + tip_height_{::uint64_t{0u}}, local_height_{::uint64_t{0u}}, + initial_connected_peers_{::uint64_t{0u}}, state_{static_cast< ::tari::rpc::SyncState >(0)}, _cached_size_{0} {} @@ -214,13 +218,15 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT inline constexpr NetworkDifficultyResponse::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept - : difficulty_{::uint64_t{0u}}, + : coinbase_extras_{}, + difficulty_{::uint64_t{0u}}, estimated_hash_rate_{::uint64_t{0u}}, height_{::uint64_t{0u}}, timestamp_{::uint64_t{0u}}, pow_algo_{::uint64_t{0u}}, sha3x_estimated_hash_rate_{::uint64_t{0u}}, randomx_estimated_hash_rate_{::uint64_t{0u}}, + num_coinbases_{::uint64_t{0u}}, _cached_size_{0} {} template <typename> @@ -247,6 +253,7 @@ inline constexpr MetaData::Impl_::Impl_( ::_pbi::ConstantInitialized()), best_block_height_{::uint64_t{0u}}, pruned_height_{::uint64_t{0u}}, + timestamp_{::uint64_t{0u}}, _cached_size_{0} {} template <typename> @@ -523,6 +530,18 @@ struct GetNewBlockBlobResultDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetNewBlockBlobResultDefaultTypeInternal _GetNewBlockBlobResult_default_instance_; template <typename> +PROTOBUF_CONSTEXPR GetNetworkStateRequest::GetNetworkStateRequest(::_pbi::ConstantInitialized) {} +struct GetNetworkStateRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetNetworkStateRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetNetworkStateRequestDefaultTypeInternal() {} + union { + GetNetworkStateRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetNetworkStateRequestDefaultTypeInternal _GetNetworkStateRequest_default_instance_; + template <typename> PROTOBUF_CONSTEXPR GetMempoolTransactionsRequest::GetMempoolTransactionsRequest(::_pbi::ConstantInitialized) {} struct GetMempoolTransactionsRequestDefaultTypeInternal { PROTOBUF_CONSTEXPR GetMempoolTransactionsRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -794,8 +813,9 @@ inline constexpr TipInfoResponse::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept : _cached_size_{0}, metadata_{nullptr}, + base_node_state_{static_cast< ::tari::rpc::BaseNodeState >(0)}, initial_sync_achieved_{false}, - base_node_state_{static_cast< ::tari::rpc::BaseNodeState >(0)} {} + failed_checkpoints_{false} {} template <typename> PROTOBUF_CONSTEXPR TipInfoResponse::TipInfoResponse(::_pbi::ConstantInitialized) @@ -893,6 +913,31 @@ struct GetNewBlockTemplateWithCoinbasesRequestDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetNewBlockTemplateWithCoinbasesRequestDefaultTypeInternal _GetNewBlockTemplateWithCoinbasesRequest_default_instance_; +inline constexpr GetNetworkStateResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + metadata_{nullptr}, + base_node_state_{static_cast< ::tari::rpc::BaseNodeState >(0)}, + initial_sync_achieved_{false}, + failed_checkpoints_{false}, + reward_{::uint64_t{0u}}, + sha3x_estimated_hash_rate_{::uint64_t{0u}}, + randomx_estimated_hash_rate_{::uint64_t{0u}} {} + +template <typename> +PROTOBUF_CONSTEXPR GetNetworkStateResponse::GetNetworkStateResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct GetNetworkStateResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetNetworkStateResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetNetworkStateResponseDefaultTypeInternal() {} + union { + GetNetworkStateResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetNetworkStateResponseDefaultTypeInternal _GetNetworkStateResponse_default_instance_; + inline constexpr BlockHeaderResponse::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept : _cached_size_{0}, @@ -1229,7 +1274,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBlocksResponseDefaultTypeInternal _GetBlocksResponse_default_instance_; } // namespace rpc } // namespace tari -static ::_pb::Metadata file_level_metadata_base_5fnode_2eproto[55]; +static ::_pb::Metadata file_level_metadata_base_5fnode_2eproto[57]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_base_5fnode_2eproto[6]; static constexpr const ::_pb::ServiceDescriptor** file_level_service_descriptors_base_5fnode_2eproto = nullptr; @@ -1361,9 +1406,11 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::tari::rpc::TipInfoResponse, _impl_.metadata_), PROTOBUF_FIELD_OFFSET(::tari::rpc::TipInfoResponse, _impl_.initial_sync_achieved_), PROTOBUF_FIELD_OFFSET(::tari::rpc::TipInfoResponse, _impl_.base_node_state_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::TipInfoResponse, _impl_.failed_checkpoints_), 0, ~0u, ~0u, + ~0u, PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockTemplateResponse, _impl_._has_bits_), PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockTemplateResponse, _internal_metadata_), ~0u, // no _extensions_ @@ -1444,6 +1491,8 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::tari::rpc::NetworkDifficultyResponse, _impl_.pow_algo_), PROTOBUF_FIELD_OFFSET(::tari::rpc::NetworkDifficultyResponse, _impl_.sha3x_estimated_hash_rate_), PROTOBUF_FIELD_OFFSET(::tari::rpc::NetworkDifficultyResponse, _impl_.randomx_estimated_hash_rate_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::NetworkDifficultyResponse, _impl_.num_coinbases_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::NetworkDifficultyResponse, _impl_.coinbase_extras_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::tari::rpc::ValueAtHeightResponse, _internal_metadata_), ~0u, // no _extensions_ @@ -1582,8 +1631,9 @@ const ::uint32_t ~0u, // no sizeof(Split) PROTOBUF_FIELD_OFFSET(::tari::rpc::MetaData, _impl_.best_block_height_), PROTOBUF_FIELD_OFFSET(::tari::rpc::MetaData, _impl_.best_block_hash_), - PROTOBUF_FIELD_OFFSET(::tari::rpc::MetaData, _impl_.pruned_height_), PROTOBUF_FIELD_OFFSET(::tari::rpc::MetaData, _impl_.accumulated_difficulty_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::MetaData, _impl_.pruned_height_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::MetaData, _impl_.timestamp_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::tari::rpc::SyncInfoResponse, _internal_metadata_), ~0u, // no _extensions_ @@ -1606,6 +1656,8 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::tari::rpc::SyncProgressResponse, _impl_.tip_height_), PROTOBUF_FIELD_OFFSET(::tari::rpc::SyncProgressResponse, _impl_.local_height_), PROTOBUF_FIELD_OFFSET(::tari::rpc::SyncProgressResponse, _impl_.state_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::SyncProgressResponse, _impl_.short_desc_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::SyncProgressResponse, _impl_.initial_connected_peers_), PROTOBUF_FIELD_OFFSET(::tari::rpc::GetNewBlockResult, _impl_._has_bits_), PROTOBUF_FIELD_OFFSET(::tari::rpc::GetNewBlockResult, _internal_metadata_), ~0u, // no _extensions_ @@ -1870,6 +1922,36 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::tari::rpc::GetSideChainUtxosResponse, _impl_.outputs_), 0, ~0u, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::tari::rpc::GetNetworkStateRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::tari::rpc::GetNetworkStateResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::GetNetworkStateResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::tari::rpc::GetNetworkStateResponse, _impl_.metadata_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::GetNetworkStateResponse, _impl_.initial_sync_achieved_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::GetNetworkStateResponse, _impl_.base_node_state_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::GetNetworkStateResponse, _impl_.failed_checkpoints_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::GetNetworkStateResponse, _impl_.reward_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::GetNetworkStateResponse, _impl_.sha3x_estimated_hash_rate_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::GetNetworkStateResponse, _impl_.randomx_estimated_hash_rate_), + 0, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, }; static const ::_pbi::MigrationSchema @@ -1882,53 +1964,55 @@ static const ::_pbi::MigrationSchema {73, 88, -1, sizeof(::tari::rpc::GetTokensResponse)}, {95, -1, -1, sizeof(::tari::rpc::SubmitBlockResponse)}, {104, -1, -1, sizeof(::tari::rpc::BlockBlobRequest)}, - {114, 125, -1, sizeof(::tari::rpc::TipInfoResponse)}, - {128, 139, -1, sizeof(::tari::rpc::NewBlockTemplateResponse)}, - {142, 152, -1, sizeof(::tari::rpc::NewBlockTemplateRequest)}, - {154, 165, -1, sizeof(::tari::rpc::GetNewBlockTemplateWithCoinbasesRequest)}, - {168, 178, -1, sizeof(::tari::rpc::GetNewBlockWithCoinbasesRequest)}, - {180, -1, -1, sizeof(::tari::rpc::NewBlockCoinbase)}, - {193, -1, -1, sizeof(::tari::rpc::NetworkDifficultyResponse)}, - {208, -1, -1, sizeof(::tari::rpc::ValueAtHeightResponse)}, - {218, -1, -1, sizeof(::tari::rpc::IntegerValue)}, - {227, -1, -1, sizeof(::tari::rpc::StringValue)}, - {236, -1, -1, sizeof(::tari::rpc::BlockGroupRequest)}, - {248, -1, -1, sizeof(::tari::rpc::BlockGroupResponse)}, - {258, -1, -1, sizeof(::tari::rpc::HeightRequest)}, - {269, -1, -1, sizeof(::tari::rpc::BlockTimingResponse)}, - {280, -1, -1, sizeof(::tari::rpc::GetHeaderByHashRequest)}, - {289, 302, -1, sizeof(::tari::rpc::BlockHeaderResponse)}, - {307, -1, -1, sizeof(::tari::rpc::ListHeadersRequest)}, - {318, -1, -1, sizeof(::tari::rpc::GetBlocksRequest)}, - {327, -1, -1, sizeof(::tari::rpc::GetBlocksResponse)}, - {336, -1, -1, sizeof(::tari::rpc::MetaData)}, - {348, -1, -1, sizeof(::tari::rpc::SyncInfoResponse)}, - {359, -1, -1, sizeof(::tari::rpc::SyncProgressResponse)}, - {370, 383, -1, sizeof(::tari::rpc::GetNewBlockResult)}, - {388, -1, -1, sizeof(::tari::rpc::GetNewBlockBlobResult)}, - {402, 414, -1, sizeof(::tari::rpc::MinerData)}, - {418, -1, -1, sizeof(::tari::rpc::SearchKernelsRequest)}, - {427, -1, -1, sizeof(::tari::rpc::SearchUtxosRequest)}, - {436, -1, -1, sizeof(::tari::rpc::FetchMatchingUtxosRequest)}, - {445, 454, -1, sizeof(::tari::rpc::FetchMatchingUtxosResponse)}, - {455, 464, -1, sizeof(::tari::rpc::GetPeersResponse)}, - {465, -1, -1, sizeof(::tari::rpc::GetPeersRequest)}, - {473, 482, -1, sizeof(::tari::rpc::SubmitTransactionRequest)}, - {483, -1, -1, sizeof(::tari::rpc::SubmitTransactionResponse)}, - {492, -1, -1, sizeof(::tari::rpc::GetMempoolTransactionsRequest)}, - {500, 509, -1, sizeof(::tari::rpc::GetMempoolTransactionsResponse)}, - {510, 519, -1, sizeof(::tari::rpc::TransactionStateRequest)}, - {520, -1, -1, sizeof(::tari::rpc::TransactionStateResponse)}, - {529, -1, -1, sizeof(::tari::rpc::MempoolStatsResponse)}, - {540, -1, -1, sizeof(::tari::rpc::GetActiveValidatorNodesRequest)}, - {549, -1, -1, sizeof(::tari::rpc::GetActiveValidatorNodesResponse)}, - {559, -1, -1, sizeof(::tari::rpc::GetShardKeyRequest)}, - {569, -1, -1, sizeof(::tari::rpc::GetShardKeyResponse)}, - {579, -1, -1, sizeof(::tari::rpc::GetTemplateRegistrationsRequest)}, - {589, 599, -1, sizeof(::tari::rpc::GetTemplateRegistrationResponse)}, - {601, -1, -1, sizeof(::tari::rpc::BlockInfo)}, - {612, -1, -1, sizeof(::tari::rpc::GetSideChainUtxosRequest)}, - {622, 632, -1, sizeof(::tari::rpc::GetSideChainUtxosResponse)}, + {114, 126, -1, sizeof(::tari::rpc::TipInfoResponse)}, + {130, 141, -1, sizeof(::tari::rpc::NewBlockTemplateResponse)}, + {144, 154, -1, sizeof(::tari::rpc::NewBlockTemplateRequest)}, + {156, 167, -1, sizeof(::tari::rpc::GetNewBlockTemplateWithCoinbasesRequest)}, + {170, 180, -1, sizeof(::tari::rpc::GetNewBlockWithCoinbasesRequest)}, + {182, -1, -1, sizeof(::tari::rpc::NewBlockCoinbase)}, + {195, -1, -1, sizeof(::tari::rpc::NetworkDifficultyResponse)}, + {212, -1, -1, sizeof(::tari::rpc::ValueAtHeightResponse)}, + {222, -1, -1, sizeof(::tari::rpc::IntegerValue)}, + {231, -1, -1, sizeof(::tari::rpc::StringValue)}, + {240, -1, -1, sizeof(::tari::rpc::BlockGroupRequest)}, + {252, -1, -1, sizeof(::tari::rpc::BlockGroupResponse)}, + {262, -1, -1, sizeof(::tari::rpc::HeightRequest)}, + {273, -1, -1, sizeof(::tari::rpc::BlockTimingResponse)}, + {284, -1, -1, sizeof(::tari::rpc::GetHeaderByHashRequest)}, + {293, 306, -1, sizeof(::tari::rpc::BlockHeaderResponse)}, + {311, -1, -1, sizeof(::tari::rpc::ListHeadersRequest)}, + {322, -1, -1, sizeof(::tari::rpc::GetBlocksRequest)}, + {331, -1, -1, sizeof(::tari::rpc::GetBlocksResponse)}, + {340, -1, -1, sizeof(::tari::rpc::MetaData)}, + {353, -1, -1, sizeof(::tari::rpc::SyncInfoResponse)}, + {364, -1, -1, sizeof(::tari::rpc::SyncProgressResponse)}, + {377, 390, -1, sizeof(::tari::rpc::GetNewBlockResult)}, + {395, -1, -1, sizeof(::tari::rpc::GetNewBlockBlobResult)}, + {409, 421, -1, sizeof(::tari::rpc::MinerData)}, + {425, -1, -1, sizeof(::tari::rpc::SearchKernelsRequest)}, + {434, -1, -1, sizeof(::tari::rpc::SearchUtxosRequest)}, + {443, -1, -1, sizeof(::tari::rpc::FetchMatchingUtxosRequest)}, + {452, 461, -1, sizeof(::tari::rpc::FetchMatchingUtxosResponse)}, + {462, 471, -1, sizeof(::tari::rpc::GetPeersResponse)}, + {472, -1, -1, sizeof(::tari::rpc::GetPeersRequest)}, + {480, 489, -1, sizeof(::tari::rpc::SubmitTransactionRequest)}, + {490, -1, -1, sizeof(::tari::rpc::SubmitTransactionResponse)}, + {499, -1, -1, sizeof(::tari::rpc::GetMempoolTransactionsRequest)}, + {507, 516, -1, sizeof(::tari::rpc::GetMempoolTransactionsResponse)}, + {517, 526, -1, sizeof(::tari::rpc::TransactionStateRequest)}, + {527, -1, -1, sizeof(::tari::rpc::TransactionStateResponse)}, + {536, -1, -1, sizeof(::tari::rpc::MempoolStatsResponse)}, + {547, -1, -1, sizeof(::tari::rpc::GetActiveValidatorNodesRequest)}, + {556, -1, -1, sizeof(::tari::rpc::GetActiveValidatorNodesResponse)}, + {566, -1, -1, sizeof(::tari::rpc::GetShardKeyRequest)}, + {576, -1, -1, sizeof(::tari::rpc::GetShardKeyResponse)}, + {586, -1, -1, sizeof(::tari::rpc::GetTemplateRegistrationsRequest)}, + {596, 606, -1, sizeof(::tari::rpc::GetTemplateRegistrationResponse)}, + {608, -1, -1, sizeof(::tari::rpc::BlockInfo)}, + {619, -1, -1, sizeof(::tari::rpc::GetSideChainUtxosRequest)}, + {629, 639, -1, sizeof(::tari::rpc::GetSideChainUtxosResponse)}, + {641, -1, -1, sizeof(::tari::rpc::GetNetworkStateRequest)}, + {649, 664, -1, sizeof(::tari::rpc::GetNetworkStateResponse)}, }; static const ::_pb::Message* const file_default_instances[] = { &::tari::rpc::_GetAssetMetadataRequest_default_instance_._instance, @@ -1986,6 +2070,8 @@ static const ::_pb::Message* const file_default_instances[] = { &::tari::rpc::_BlockInfo_default_instance_._instance, &::tari::rpc::_GetSideChainUtxosRequest_default_instance_._instance, &::tari::rpc::_GetSideChainUtxosResponse_default_instance_._instance, + &::tari::rpc::_GetNetworkStateRequest_default_instance_._instance, + &::tari::rpc::_GetNetworkStateResponse_default_instance_._instance, }; const char descriptor_table_protodef_base_5fnode_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( protodesc_cold) = { @@ -2014,193 +2100,206 @@ const char descriptor_table_protodef_base_5fnode_2eproto[] ABSL_ATTRIBUTE_SECTIO "res\022\016\n\006script\030\007 \001(\014\")\n\023SubmitBlockRespon" "se\022\022\n\nblock_hash\030\001 \001(\014\":\n\020BlockBlobReque" "st\022\023\n\013header_blob\030\001 \001(\014\022\021\n\tbody_blob\030\002 \001" - "(\014\"\210\001\n\017TipInfoResponse\022$\n\010metadata\030\001 \001(\013" + "(\014\"\244\001\n\017TipInfoResponse\022$\n\010metadata\030\001 \001(\013" "2\022.tari.rpc.MetaData\022\035\n\025initial_sync_ach" "ieved\030\002 \001(\010\0220\n\017base_node_state\030\003 \001(\0162\027.t" - "ari.rpc.BaseNodeState\"\232\001\n\030NewBlockTempla" - "teResponse\0226\n\022new_block_template\030\001 \001(\0132\032" - ".tari.rpc.NewBlockTemplate\022\035\n\025initial_sy" - "nc_achieved\030\003 \001(\010\022\'\n\nminer_data\030\004 \001(\0132\023." - "tari.rpc.MinerData\"N\n\027NewBlockTemplateRe" - "quest\022\037\n\004algo\030\001 \001(\0132\021.tari.rpc.PowAlgo\022\022" - "\n\nmax_weight\030\002 \001(\004\"\215\001\n\'GetNewBlockTempla" - "teWithCoinbasesRequest\022\037\n\004algo\030\001 \001(\0132\021.t" - "ari.rpc.PowAlgo\022\022\n\nmax_weight\030\002 \001(\004\022-\n\tc" - "oinbases\030\003 \003(\0132\032.tari.rpc.NewBlockCoinba" - "se\"\202\001\n\037GetNewBlockWithCoinbasesRequest\0220" - "\n\014new_template\030\001 \001(\0132\032.tari.rpc.NewBlock" - "Template\022-\n\tcoinbases\030\002 \003(\0132\032.tari.rpc.N" - "ewBlockCoinbase\"\201\001\n\020NewBlockCoinbase\022\017\n\007" - "address\030\001 \001(\t\022\r\n\005value\030\002 \001(\004\022\027\n\017stealth_" - "payment\030\003 \001(\010\022\034\n\024revealed_value_proof\030\004 " - "\001(\010\022\026\n\016coinbase_extra\030\005 \001(\014\"\311\001\n\031NetworkD" - "ifficultyResponse\022\022\n\ndifficulty\030\001 \001(\004\022\033\n" - "\023estimated_hash_rate\030\002 \001(\004\022\016\n\006height\030\003 \001" - "(\004\022\021\n\ttimestamp\030\004 \001(\004\022\020\n\010pow_algo\030\005 \001(\004\022" - "!\n\031sha3x_estimated_hash_rate\030\006 \001(\004\022#\n\033ra" - "ndomx_estimated_hash_rate\030\007 \001(\004\"6\n\025Value" - "AtHeightResponse\022\r\n\005value\030\001 \001(\004\022\016\n\006heigh" - "t\030\002 \001(\004\"\035\n\014IntegerValue\022\r\n\005value\030\001 \001(\004\"\034" - "\n\013StringValue\022\r\n\005value\030\001 \001(\t\"v\n\021BlockGro" - "upRequest\022\020\n\010from_tip\030\001 \001(\004\022\024\n\014start_hei" - "ght\030\002 \001(\004\022\022\n\nend_height\030\003 \001(\004\022%\n\tcalc_ty" - "pe\030\004 \001(\0162\022.tari.rpc.CalcType\"J\n\022BlockGro" - "upResponse\022\r\n\005value\030\001 \003(\001\022%\n\tcalc_type\030\002" - " \001(\0162\022.tari.rpc.CalcType\"K\n\rHeightReques" - "t\022\020\n\010from_tip\030\001 \001(\004\022\024\n\014start_height\030\002 \001(" - "\004\022\022\n\nend_height\030\003 \001(\004\"<\n\023BlockTimingResp" - "onse\022\013\n\003max\030\001 \001(\004\022\013\n\003min\030\002 \001(\004\022\013\n\003avg\030\003 " - "\001(\001\"&\n\026GetHeaderByHashRequest\022\014\n\004hash\030\001 " - "\001(\014\"\221\001\n\023BlockHeaderResponse\022%\n\006header\030\001 " - "\001(\0132\025.tari.rpc.BlockHeader\022\025\n\rconfirmati" - "ons\030\002 \001(\004\022\016\n\006reward\030\003 \001(\004\022\022\n\ndifficulty\030" - "\004 \001(\004\022\030\n\020num_transactions\030\005 \001(\r\"b\n\022ListH" - "eadersRequest\022\023\n\013from_height\030\001 \001(\004\022\023\n\013nu" - "m_headers\030\002 \001(\004\022\"\n\007sorting\030\003 \001(\0162\021.tari." - "rpc.Sorting\"#\n\020GetBlocksRequest\022\017\n\007heigh" - "ts\030\001 \003(\004\">\n\021GetBlocksResponse\022)\n\006blocks\030" - "\001 \003(\0132\031.tari.rpc.HistoricalBlock\"u\n\010Meta" - "Data\022\031\n\021best_block_height\030\001 \001(\004\022\027\n\017best_" - "block_hash\030\002 \001(\014\022\025\n\rpruned_height\030\006 \001(\004\022" - "\036\n\026accumulated_difficulty\030\005 \001(\014\"R\n\020SyncI" - "nfoResponse\022\022\n\ntip_height\030\001 \001(\004\022\024\n\014local" - "_height\030\002 \001(\004\022\024\n\014peer_node_id\030\003 \003(\014\"d\n\024S" - "yncProgressResponse\022\022\n\ntip_height\030\001 \001(\004\022" - "\024\n\014local_height\030\002 \001(\004\022\"\n\005state\030\003 \001(\0162\023.t" - "ari.rpc.SyncState\"\243\001\n\021GetNewBlockResult\022" - "\022\n\nblock_hash\030\001 \001(\014\022\036\n\005block\030\002 \001(\0132\017.tar" - "i.rpc.Block\022\031\n\021merge_mining_hash\030\003 \001(\014\022\026" - "\n\016tari_unique_id\030\004 \001(\014\022\'\n\nminer_data\030\005 \001" - "(\0132\023.tari.rpc.MinerData\"\223\001\n\025GetNewBlockB" - "lobResult\022\022\n\nblock_hash\030\001 \001(\014\022\016\n\006header\030" - "\002 \001(\014\022\022\n\nblock_body\030\003 \001(\014\022\031\n\021merge_minin" - "g_hash\030\004 \001(\014\022\017\n\007utxo_mr\030\005 \001(\014\022\026\n\016tari_un" - "ique_id\030\006 \001(\014\"k\n\tMinerData\022\037\n\004algo\030\001 \001(\013" - "2\021.tari.rpc.PowAlgo\022\031\n\021target_difficulty" - "\030\002 \001(\004\022\016\n\006reward\030\003 \001(\004\022\022\n\ntotal_fees\030\005 \001" - "(\004\"\?\n\024SearchKernelsRequest\022\'\n\nsignatures" - "\030\001 \003(\0132\023.tari.rpc.Signature\")\n\022SearchUtx" - "osRequest\022\023\n\013commitments\030\001 \003(\014\"+\n\031FetchM" - "atchingUtxosRequest\022\016\n\006hashes\030\001 \003(\014\"I\n\032F" - "etchMatchingUtxosResponse\022+\n\006output\030\001 \001(" - "\0132\033.tari.rpc.TransactionOutput\"0\n\020GetPee" - "rsResponse\022\034\n\004peer\030\001 \001(\0132\016.tari.rpc.Peer" - "\"\021\n\017GetPeersRequest\"F\n\030SubmitTransaction" - "Request\022*\n\013transaction\030\001 \001(\0132\025.tari.rpc." - "Transaction\"N\n\031SubmitTransactionResponse" - "\0221\n\006result\030\001 \001(\0162!.tari.rpc.SubmitTransa" - "ctionResult\"\037\n\035GetMempoolTransactionsReq" - "uest\"L\n\036GetMempoolTransactionsResponse\022*" - "\n\013transaction\030\001 \001(\0132\025.tari.rpc.Transacti" - "on\"B\n\027TransactionStateRequest\022\'\n\nexcess_" - "sig\030\001 \001(\0132\023.tari.rpc.Signature\"I\n\030Transa" - "ctionStateResponse\022-\n\006result\030\001 \001(\0162\035.tar" - "i.rpc.TransactionLocation\"^\n\024MempoolStat" - "sResponse\022\027\n\017unconfirmed_txs\030\002 \001(\004\022\021\n\tre" - "org_txs\030\003 \001(\004\022\032\n\022unconfirmed_weight\030\004 \001(" - "\004\"0\n\036GetActiveValidatorNodesRequest\022\016\n\006h" - "eight\030\001 \001(\004\"H\n\037GetActiveValidatorNodesRe" - "sponse\022\021\n\tshard_key\030\001 \001(\014\022\022\n\npublic_key\030" - "\002 \001(\014\"8\n\022GetShardKeyRequest\022\016\n\006height\030\001 " - "\001(\004\022\022\n\npublic_key\030\002 \001(\014\"7\n\023GetShardKeyRe" - "sponse\022\021\n\tshard_key\030\001 \001(\014\022\r\n\005found\030\002 \001(\010" - "\"D\n\037GetTemplateRegistrationsRequest\022\022\n\ns" - "tart_hash\030\001 \001(\014\022\r\n\005count\030\002 \001(\004\"j\n\037GetTem" - "plateRegistrationResponse\022\021\n\tutxo_hash\030\001" - " \001(\014\0224\n\014registration\030\002 \001(\0132\036.tari.rpc.Te" - "mplateRegistration\"B\n\tBlockInfo\022\016\n\006heigh" - "t\030\001 \001(\004\022\014\n\004hash\030\002 \001(\014\022\027\n\017next_block_hash" - "\030\003 \001(\014\"=\n\030GetSideChainUtxosRequest\022\022\n\nst" - "art_hash\030\001 \001(\014\022\r\n\005count\030\002 \001(\004\"r\n\031GetSide" - "ChainUtxosResponse\022\'\n\nblock_info\030\001 \001(\0132\023" - ".tari.rpc.BlockInfo\022,\n\007outputs\030\002 \003(\0132\033.t" - "ari.rpc.TransactionOutput*\200\001\n\rBaseNodeSt" - "ate\022\014\n\010START_UP\020\000\022\017\n\013HEADER_SYNC\020\001\022\020\n\014HO" - "RIZON_SYNC\020\002\022\016\n\nCONNECTING\020\003\022\016\n\nBLOCK_SY" - "NC\020\004\022\r\n\tLISTENING\020\005\022\017\n\013SYNC_FAILED\020\006*<\n\010" - "CalcType\022\010\n\004MEAN\020\000\022\n\n\006MEDIAN\020\001\022\014\n\010QUANTI" - "LE\020\002\022\014\n\010QUARTILE\020\003*,\n\007Sorting\022\020\n\014SORTING" - "_DESC\020\000\022\017\n\013SORTING_ASC\020\001*b\n\tSyncState\022\013\n" - "\007STARTUP\020\000\022\023\n\017HEADER_STARTING\020\001\022\n\n\006HEADE" - "R\020\002\022\022\n\016BLOCK_STARTING\020\003\022\t\n\005BLOCK\020\004\022\010\n\004DO" - "NE\020\005*t\n\027SubmitTransactionResult\022\010\n\004NONE\020" - "\000\022\014\n\010ACCEPTED\020\001\022 \n\034NOT_PROCESSABLE_AT_TH" - "IS_TIME\020\002\022\021\n\rALREADY_MINED\020\003\022\014\n\010REJECTED" - "\020\004*J\n\023TransactionLocation\022\013\n\007UNKNOWN\020\000\022\013" - "\n\007MEMPOOL\020\001\022\t\n\005MINED\020\002\022\016\n\nNOT_STORED\020\0032\327" - "\026\n\010BaseNode\022L\n\013ListHeaders\022\034.tari.rpc.Li" - "stHeadersRequest\032\035.tari.rpc.BlockHeaderR" - "esponse0\001\022R\n\017GetHeaderByHash\022 .tari.rpc." - "GetHeaderByHashRequest\032\035.tari.rpc.BlockH" - "eaderResponse\022D\n\tGetBlocks\022\032.tari.rpc.Ge" - "tBlocksRequest\032\031.tari.rpc.HistoricalBloc" - "k0\001\022H\n\016GetBlockTiming\022\027.tari.rpc.HeightR" - "equest\032\035.tari.rpc.BlockTimingResponse\022C\n" - "\014GetConstants\022\025.tari.rpc.BlockHeight\032\034.t" - "ari.rpc.ConsensusConstants\022I\n\014GetBlockSi" - "ze\022\033.tari.rpc.BlockGroupRequest\032\034.tari.r" - "pc.BlockGroupResponse\022I\n\014GetBlockFees\022\033." - "tari.rpc.BlockGroupRequest\032\034.tari.rpc.Bl" - "ockGroupResponse\0224\n\nGetVersion\022\017.tari.rp" - "c.Empty\032\025.tari.rpc.StringValue\022<\n\017CheckF" - "orUpdates\022\017.tari.rpc.Empty\032\030.tari.rpc.So" - "ftwareUpdate\022W\n\026GetTokensInCirculation\022\032" - ".tari.rpc.GetBlocksRequest\032\037.tari.rpc.Va" - "lueAtHeightResponse0\001\022V\n\024GetNetworkDiffi" - "culty\022\027.tari.rpc.HeightRequest\032#.tari.rp" - "c.NetworkDifficultyResponse0\001\022\\\n\023GetNewB" - "lockTemplate\022!.tari.rpc.NewBlockTemplate" - "Request\032\".tari.rpc.NewBlockTemplateRespo" - "nse\022F\n\013GetNewBlock\022\032.tari.rpc.NewBlockTe" - "mplate\032\033.tari.rpc.GetNewBlockResult\022b\n\030G" - "etNewBlockWithCoinbases\022).tari.rpc.GetNe" - "wBlockWithCoinbasesRequest\032\033.tari.rpc.Ge" - "tNewBlockResult\022r\n GetNewBlockTemplateWi" - "thCoinbases\0221.tari.rpc.GetNewBlockTempla" - "teWithCoinbasesRequest\032\033.tari.rpc.GetNew" - "BlockResult\022N\n\017GetNewBlockBlob\022\032.tari.rp" - "c.NewBlockTemplate\032\037.tari.rpc.GetNewBloc" - "kBlobResult\022=\n\013SubmitBlock\022\017.tari.rpc.Bl" - "ock\032\035.tari.rpc.SubmitBlockResponse\022L\n\017Su" - "bmitBlockBlob\022\032.tari.rpc.BlockBlobReques" - "t\032\035.tari.rpc.SubmitBlockResponse\022\\\n\021Subm" - "itTransaction\022\".tari.rpc.SubmitTransacti" - "onRequest\032#.tari.rpc.SubmitTransactionRe" - "sponse\022:\n\013GetSyncInfo\022\017.tari.rpc.Empty\032\032" - ".tari.rpc.SyncInfoResponse\022B\n\017GetSyncPro" - "gress\022\017.tari.rpc.Empty\032\036.tari.rpc.SyncPr" - "ogressResponse\0228\n\nGetTipInfo\022\017.tari.rpc." - "Empty\032\031.tari.rpc.TipInfoResponse\022L\n\rSear" - "chKernels\022\036.tari.rpc.SearchKernelsReques" - "t\032\031.tari.rpc.HistoricalBlock0\001\022H\n\013Search" - "Utxos\022\034.tari.rpc.SearchUtxosRequest\032\031.ta" - "ri.rpc.HistoricalBlock0\001\022a\n\022FetchMatchin" - "gUtxos\022#.tari.rpc.FetchMatchingUtxosRequ" - "est\032$.tari.rpc.FetchMatchingUtxosRespons" - "e0\001\022C\n\010GetPeers\022\031.tari.rpc.GetPeersReque" - "st\032\032.tari.rpc.GetPeersResponse0\001\022m\n\026GetM" - "empoolTransactions\022\'.tari.rpc.GetMempool" - "TransactionsRequest\032(.tari.rpc.GetMempoo" - "lTransactionsResponse0\001\022Y\n\020TransactionSt" - "ate\022!.tari.rpc.TransactionStateRequest\032\"" - ".tari.rpc.TransactionStateResponse\0223\n\010Id" - "entify\022\017.tari.rpc.Empty\032\026.tari.rpc.NodeI" - "dentity\022D\n\020GetNetworkStatus\022\017.tari.rpc.E" - "mpty\032\037.tari.rpc.NetworkStatusResponse\022K\n" - "\022ListConnectedPeers\022\017.tari.rpc.Empty\032$.t" - "ari.rpc.ListConnectedPeersResponse\022B\n\017Ge" - "tMempoolStats\022\017.tari.rpc.Empty\032\036.tari.rp" - "c.MempoolStatsResponse\022p\n\027GetActiveValid" - "atorNodes\022(.tari.rpc.GetActiveValidatorN" - "odesRequest\032).tari.rpc.GetActiveValidato" - "rNodesResponse0\001\022J\n\013GetShardKey\022\034.tari.r" - "pc.GetShardKeyRequest\032\035.tari.rpc.GetShar" - "dKeyResponse\022r\n\030GetTemplateRegistrations" - "\022).tari.rpc.GetTemplateRegistrationsRequ" - "est\032).tari.rpc.GetTemplateRegistrationRe" - "sponse0\001\022^\n\021GetSideChainUtxos\022\".tari.rpc" - ".GetSideChainUtxosRequest\032#.tari.rpc.Get" - "SideChainUtxosResponse0\001b\006proto3" + "ari.rpc.BaseNodeState\022\032\n\022failed_checkpoi" + "nts\030\004 \001(\010\"\232\001\n\030NewBlockTemplateResponse\0226" + "\n\022new_block_template\030\001 \001(\0132\032.tari.rpc.Ne" + "wBlockTemplate\022\035\n\025initial_sync_achieved\030" + "\003 \001(\010\022\'\n\nminer_data\030\004 \001(\0132\023.tari.rpc.Min" + "erData\"N\n\027NewBlockTemplateRequest\022\037\n\004alg" + "o\030\001 \001(\0132\021.tari.rpc.PowAlgo\022\022\n\nmax_weight" + "\030\002 \001(\004\"\215\001\n\'GetNewBlockTemplateWithCoinba" + "sesRequest\022\037\n\004algo\030\001 \001(\0132\021.tari.rpc.PowA" + "lgo\022\022\n\nmax_weight\030\002 \001(\004\022-\n\tcoinbases\030\003 \003" + "(\0132\032.tari.rpc.NewBlockCoinbase\"\202\001\n\037GetNe" + "wBlockWithCoinbasesRequest\0220\n\014new_templa" + "te\030\001 \001(\0132\032.tari.rpc.NewBlockTemplate\022-\n\t" + "coinbases\030\002 \003(\0132\032.tari.rpc.NewBlockCoinb" + "ase\"\201\001\n\020NewBlockCoinbase\022\017\n\007address\030\001 \001(" + "\t\022\r\n\005value\030\002 \001(\004\022\027\n\017stealth_payment\030\003 \001(" + "\010\022\034\n\024revealed_value_proof\030\004 \001(\010\022\026\n\016coinb" + "ase_extra\030\005 \001(\014\"\371\001\n\031NetworkDifficultyRes" + "ponse\022\022\n\ndifficulty\030\001 \001(\004\022\033\n\023estimated_h" + "ash_rate\030\002 \001(\004\022\016\n\006height\030\003 \001(\004\022\021\n\ttimest" + "amp\030\004 \001(\004\022\020\n\010pow_algo\030\005 \001(\004\022!\n\031sha3x_est" + "imated_hash_rate\030\006 \001(\004\022#\n\033randomx_estima" + "ted_hash_rate\030\007 \001(\004\022\025\n\rnum_coinbases\030\010 \001" + "(\004\022\027\n\017coinbase_extras\030\t \003(\014\"6\n\025ValueAtHe" + "ightResponse\022\r\n\005value\030\001 \001(\004\022\016\n\006height\030\002 " + "\001(\004\"\035\n\014IntegerValue\022\r\n\005value\030\001 \001(\004\"\034\n\013St" + "ringValue\022\r\n\005value\030\001 \001(\t\"v\n\021BlockGroupRe" + "quest\022\020\n\010from_tip\030\001 \001(\004\022\024\n\014start_height\030" + "\002 \001(\004\022\022\n\nend_height\030\003 \001(\004\022%\n\tcalc_type\030\004" + " \001(\0162\022.tari.rpc.CalcType\"J\n\022BlockGroupRe" + "sponse\022\r\n\005value\030\001 \003(\001\022%\n\tcalc_type\030\002 \001(\016" + "2\022.tari.rpc.CalcType\"K\n\rHeightRequest\022\020\n" + "\010from_tip\030\001 \001(\004\022\024\n\014start_height\030\002 \001(\004\022\022\n" + "\nend_height\030\003 \001(\004\"<\n\023BlockTimingResponse" + "\022\013\n\003max\030\001 \001(\004\022\013\n\003min\030\002 \001(\004\022\013\n\003avg\030\003 \001(\001\"" + "&\n\026GetHeaderByHashRequest\022\014\n\004hash\030\001 \001(\014\"" + "\221\001\n\023BlockHeaderResponse\022%\n\006header\030\001 \001(\0132" + "\025.tari.rpc.BlockHeader\022\025\n\rconfirmations\030" + "\002 \001(\004\022\016\n\006reward\030\003 \001(\004\022\022\n\ndifficulty\030\004 \001(" + "\004\022\030\n\020num_transactions\030\005 \001(\r\"b\n\022ListHeade" + "rsRequest\022\023\n\013from_height\030\001 \001(\004\022\023\n\013num_he" + "aders\030\002 \001(\004\022\"\n\007sorting\030\003 \001(\0162\021.tari.rpc." + "Sorting\"#\n\020GetBlocksRequest\022\017\n\007heights\030\001" + " \003(\004\">\n\021GetBlocksResponse\022)\n\006blocks\030\001 \003(" + "\0132\031.tari.rpc.HistoricalBlock\"\210\001\n\010MetaDat" + "a\022\031\n\021best_block_height\030\001 \001(\004\022\027\n\017best_blo" + "ck_hash\030\002 \001(\014\022\036\n\026accumulated_difficulty\030" + "\005 \001(\014\022\025\n\rpruned_height\030\006 \001(\004\022\021\n\ttimestam" + "p\030\007 \001(\004\"R\n\020SyncInfoResponse\022\022\n\ntip_heigh" + "t\030\001 \001(\004\022\024\n\014local_height\030\002 \001(\004\022\024\n\014peer_no" + "de_id\030\003 \003(\014\"\231\001\n\024SyncProgressResponse\022\022\n\n" + "tip_height\030\001 \001(\004\022\024\n\014local_height\030\002 \001(\004\022\"" + "\n\005state\030\003 \001(\0162\023.tari.rpc.SyncState\022\022\n\nsh" + "ort_desc\030\004 \001(\t\022\037\n\027initial_connected_peer" + "s\030\005 \001(\004\"\243\001\n\021GetNewBlockResult\022\022\n\nblock_h" + "ash\030\001 \001(\014\022\036\n\005block\030\002 \001(\0132\017.tari.rpc.Bloc" + "k\022\031\n\021merge_mining_hash\030\003 \001(\014\022\026\n\016tari_uni" + "que_id\030\004 \001(\014\022\'\n\nminer_data\030\005 \001(\0132\023.tari." + "rpc.MinerData\"\223\001\n\025GetNewBlockBlobResult\022" + "\022\n\nblock_hash\030\001 \001(\014\022\016\n\006header\030\002 \001(\014\022\022\n\nb" + "lock_body\030\003 \001(\014\022\031\n\021merge_mining_hash\030\004 \001" + "(\014\022\017\n\007utxo_mr\030\005 \001(\014\022\026\n\016tari_unique_id\030\006 " + "\001(\014\"k\n\tMinerData\022\037\n\004algo\030\001 \001(\0132\021.tari.rp" + "c.PowAlgo\022\031\n\021target_difficulty\030\002 \001(\004\022\016\n\006" + "reward\030\003 \001(\004\022\022\n\ntotal_fees\030\005 \001(\004\"\?\n\024Sear" + "chKernelsRequest\022\'\n\nsignatures\030\001 \003(\0132\023.t" + "ari.rpc.Signature\")\n\022SearchUtxosRequest\022" + "\023\n\013commitments\030\001 \003(\014\"+\n\031FetchMatchingUtx" + "osRequest\022\016\n\006hashes\030\001 \003(\014\"I\n\032FetchMatchi" + "ngUtxosResponse\022+\n\006output\030\001 \001(\0132\033.tari.r" + "pc.TransactionOutput\"0\n\020GetPeersResponse" + "\022\034\n\004peer\030\001 \001(\0132\016.tari.rpc.Peer\"\021\n\017GetPee" + "rsRequest\"F\n\030SubmitTransactionRequest\022*\n" + "\013transaction\030\001 \001(\0132\025.tari.rpc.Transactio" + "n\"N\n\031SubmitTransactionResponse\0221\n\006result" + "\030\001 \001(\0162!.tari.rpc.SubmitTransactionResul" + "t\"\037\n\035GetMempoolTransactionsRequest\"L\n\036Ge" + "tMempoolTransactionsResponse\022*\n\013transact" + "ion\030\001 \001(\0132\025.tari.rpc.Transaction\"B\n\027Tran" + "sactionStateRequest\022\'\n\nexcess_sig\030\001 \001(\0132" + "\023.tari.rpc.Signature\"I\n\030TransactionState" + "Response\022-\n\006result\030\001 \001(\0162\035.tari.rpc.Tran" + "sactionLocation\"^\n\024MempoolStatsResponse\022" + "\027\n\017unconfirmed_txs\030\002 \001(\004\022\021\n\treorg_txs\030\003 " + "\001(\004\022\032\n\022unconfirmed_weight\030\004 \001(\004\"0\n\036GetAc" + "tiveValidatorNodesRequest\022\016\n\006height\030\001 \001(" + "\004\"H\n\037GetActiveValidatorNodesResponse\022\021\n\t" + "shard_key\030\001 \001(\014\022\022\n\npublic_key\030\002 \001(\014\"8\n\022G" + "etShardKeyRequest\022\016\n\006height\030\001 \001(\004\022\022\n\npub" + "lic_key\030\002 \001(\014\"7\n\023GetShardKeyResponse\022\021\n\t" + "shard_key\030\001 \001(\014\022\r\n\005found\030\002 \001(\010\"D\n\037GetTem" + "plateRegistrationsRequest\022\022\n\nstart_hash\030" + "\001 \001(\014\022\r\n\005count\030\002 \001(\004\"j\n\037GetTemplateRegis" + "trationResponse\022\021\n\tutxo_hash\030\001 \001(\014\0224\n\014re" + "gistration\030\002 \001(\0132\036.tari.rpc.TemplateRegi" + "stration\"B\n\tBlockInfo\022\016\n\006height\030\001 \001(\004\022\014\n" + "\004hash\030\002 \001(\014\022\027\n\017next_block_hash\030\003 \001(\014\"=\n\030" + "GetSideChainUtxosRequest\022\022\n\nstart_hash\030\001" + " \001(\014\022\r\n\005count\030\002 \001(\004\"r\n\031GetSideChainUtxos" + "Response\022\'\n\nblock_info\030\001 \001(\0132\023.tari.rpc." + "BlockInfo\022,\n\007outputs\030\002 \003(\0132\033.tari.rpc.Tr" + "ansactionOutput\"\030\n\026GetNetworkStateReques" + "t\"\204\002\n\027GetNetworkStateResponse\022$\n\010metadat" + "a\030\001 \001(\0132\022.tari.rpc.MetaData\022\035\n\025initial_s" + "ync_achieved\030\002 \001(\010\0220\n\017base_node_state\030\003 " + "\001(\0162\027.tari.rpc.BaseNodeState\022\032\n\022failed_c" + "heckpoints\030\004 \001(\010\022\016\n\006reward\030\005 \001(\004\022!\n\031sha3" + "x_estimated_hash_rate\030\006 \001(\004\022#\n\033randomx_e" + "stimated_hash_rate\030\007 \001(\004*\200\001\n\rBaseNodeSta" + "te\022\014\n\010START_UP\020\000\022\017\n\013HEADER_SYNC\020\001\022\020\n\014HOR" + "IZON_SYNC\020\002\022\016\n\nCONNECTING\020\003\022\016\n\nBLOCK_SYN" + "C\020\004\022\r\n\tLISTENING\020\005\022\017\n\013SYNC_FAILED\020\006*<\n\010C" + "alcType\022\010\n\004MEAN\020\000\022\n\n\006MEDIAN\020\001\022\014\n\010QUANTIL" + "E\020\002\022\014\n\010QUARTILE\020\003*,\n\007Sorting\022\020\n\014SORTING_" + "DESC\020\000\022\017\n\013SORTING_ASC\020\001*b\n\tSyncState\022\013\n\007" + "STARTUP\020\000\022\023\n\017HEADER_STARTING\020\001\022\n\n\006HEADER" + "\020\002\022\022\n\016BLOCK_STARTING\020\003\022\t\n\005BLOCK\020\004\022\010\n\004DON" + "E\020\005*t\n\027SubmitTransactionResult\022\010\n\004NONE\020\000" + "\022\014\n\010ACCEPTED\020\001\022 \n\034NOT_PROCESSABLE_AT_THI" + "S_TIME\020\002\022\021\n\rALREADY_MINED\020\003\022\014\n\010REJECTED\020" + "\004*J\n\023TransactionLocation\022\013\n\007UNKNOWN\020\000\022\013\n" + "\007MEMPOOL\020\001\022\t\n\005MINED\020\002\022\016\n\nNOT_STORED\020\0032\257\027" + "\n\010BaseNode\022L\n\013ListHeaders\022\034.tari.rpc.Lis" + "tHeadersRequest\032\035.tari.rpc.BlockHeaderRe" + "sponse0\001\022R\n\017GetHeaderByHash\022 .tari.rpc.G" + "etHeaderByHashRequest\032\035.tari.rpc.BlockHe" + "aderResponse\022D\n\tGetBlocks\022\032.tari.rpc.Get" + "BlocksRequest\032\031.tari.rpc.HistoricalBlock" + "0\001\022H\n\016GetBlockTiming\022\027.tari.rpc.HeightRe" + "quest\032\035.tari.rpc.BlockTimingResponse\022C\n\014" + "GetConstants\022\025.tari.rpc.BlockHeight\032\034.ta" + "ri.rpc.ConsensusConstants\022I\n\014GetBlockSiz" + "e\022\033.tari.rpc.BlockGroupRequest\032\034.tari.rp" + "c.BlockGroupResponse\022I\n\014GetBlockFees\022\033.t" + "ari.rpc.BlockGroupRequest\032\034.tari.rpc.Blo" + "ckGroupResponse\0224\n\nGetVersion\022\017.tari.rpc" + ".Empty\032\025.tari.rpc.StringValue\022<\n\017CheckFo" + "rUpdates\022\017.tari.rpc.Empty\032\030.tari.rpc.Sof" + "twareUpdate\022W\n\026GetTokensInCirculation\022\032." + "tari.rpc.GetBlocksRequest\032\037.tari.rpc.Val" + "ueAtHeightResponse0\001\022V\n\024GetNetworkDiffic" + "ulty\022\027.tari.rpc.HeightRequest\032#.tari.rpc" + ".NetworkDifficultyResponse0\001\022\\\n\023GetNewBl" + "ockTemplate\022!.tari.rpc.NewBlockTemplateR" + "equest\032\".tari.rpc.NewBlockTemplateRespon" + "se\022F\n\013GetNewBlock\022\032.tari.rpc.NewBlockTem" + "plate\032\033.tari.rpc.GetNewBlockResult\022b\n\030Ge" + "tNewBlockWithCoinbases\022).tari.rpc.GetNew" + "BlockWithCoinbasesRequest\032\033.tari.rpc.Get" + "NewBlockResult\022r\n GetNewBlockTemplateWit" + "hCoinbases\0221.tari.rpc.GetNewBlockTemplat" + "eWithCoinbasesRequest\032\033.tari.rpc.GetNewB" + "lockResult\022N\n\017GetNewBlockBlob\022\032.tari.rpc" + ".NewBlockTemplate\032\037.tari.rpc.GetNewBlock" + "BlobResult\022=\n\013SubmitBlock\022\017.tari.rpc.Blo" + "ck\032\035.tari.rpc.SubmitBlockResponse\022L\n\017Sub" + "mitBlockBlob\022\032.tari.rpc.BlockBlobRequest" + "\032\035.tari.rpc.SubmitBlockResponse\022\\\n\021Submi" + "tTransaction\022\".tari.rpc.SubmitTransactio" + "nRequest\032#.tari.rpc.SubmitTransactionRes" + "ponse\022:\n\013GetSyncInfo\022\017.tari.rpc.Empty\032\032." + "tari.rpc.SyncInfoResponse\022B\n\017GetSyncProg" + "ress\022\017.tari.rpc.Empty\032\036.tari.rpc.SyncPro" + "gressResponse\0228\n\nGetTipInfo\022\017.tari.rpc.E" + "mpty\032\031.tari.rpc.TipInfoResponse\022L\n\rSearc" + "hKernels\022\036.tari.rpc.SearchKernelsRequest" + "\032\031.tari.rpc.HistoricalBlock0\001\022H\n\013SearchU" + "txos\022\034.tari.rpc.SearchUtxosRequest\032\031.tar" + "i.rpc.HistoricalBlock0\001\022a\n\022FetchMatching" + "Utxos\022#.tari.rpc.FetchMatchingUtxosReque" + "st\032$.tari.rpc.FetchMatchingUtxosResponse" + "0\001\022C\n\010GetPeers\022\031.tari.rpc.GetPeersReques" + "t\032\032.tari.rpc.GetPeersResponse0\001\022m\n\026GetMe" + "mpoolTransactions\022\'.tari.rpc.GetMempoolT" + "ransactionsRequest\032(.tari.rpc.GetMempool" + "TransactionsResponse0\001\022Y\n\020TransactionSta" + "te\022!.tari.rpc.TransactionStateRequest\032\"." + "tari.rpc.TransactionStateResponse\0223\n\010Ide" + "ntify\022\017.tari.rpc.Empty\032\026.tari.rpc.NodeId" + "entity\022D\n\020GetNetworkStatus\022\017.tari.rpc.Em" + "pty\032\037.tari.rpc.NetworkStatusResponse\022K\n\022" + "ListConnectedPeers\022\017.tari.rpc.Empty\032$.ta" + "ri.rpc.ListConnectedPeersResponse\022B\n\017Get" + "MempoolStats\022\017.tari.rpc.Empty\032\036.tari.rpc" + ".MempoolStatsResponse\022p\n\027GetActiveValida" + "torNodes\022(.tari.rpc.GetActiveValidatorNo" + "desRequest\032).tari.rpc.GetActiveValidator" + "NodesResponse0\001\022J\n\013GetShardKey\022\034.tari.rp" + "c.GetShardKeyRequest\032\035.tari.rpc.GetShard" + "KeyResponse\022r\n\030GetTemplateRegistrations\022" + ").tari.rpc.GetTemplateRegistrationsReque" + "st\032).tari.rpc.GetTemplateRegistrationRes" + "ponse0\001\022^\n\021GetSideChainUtxos\022\".tari.rpc." + "GetSideChainUtxosRequest\032#.tari.rpc.GetS" + "ideChainUtxosResponse0\001\022V\n\017GetNetworkSta" + "te\022 .tari.rpc.GetNetworkStateRequest\032!.t" + "ari.rpc.GetNetworkStateResponseb\006proto3" }; static const ::_pbi::DescriptorTable* const descriptor_table_base_5fnode_2eproto_deps[5] = { @@ -2214,13 +2313,13 @@ static ::absl::once_flag descriptor_table_base_5fnode_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_base_5fnode_2eproto = { false, false, - 8472, + 8999, descriptor_table_protodef_base_5fnode_2eproto, "base_node.proto", &descriptor_table_base_5fnode_2eproto_once, descriptor_table_base_5fnode_2eproto_deps, 5, - 55, + 57, schemas, file_default_instances, TableStruct_base_5fnode_2eproto::offsets, @@ -4530,12 +4629,12 @@ TipInfoResponse::TipInfoResponse( arena, *from._impl_.metadata_) : nullptr; ::memcpy(reinterpret_cast<char *>(&_impl_) + - offsetof(Impl_, initial_sync_achieved_), + offsetof(Impl_, base_node_state_), reinterpret_cast<const char *>(&from._impl_) + - offsetof(Impl_, initial_sync_achieved_), - offsetof(Impl_, base_node_state_) - - offsetof(Impl_, initial_sync_achieved_) + - sizeof(Impl_::base_node_state_)); + offsetof(Impl_, base_node_state_), + offsetof(Impl_, failed_checkpoints_) - + offsetof(Impl_, base_node_state_) + + sizeof(Impl_::failed_checkpoints_)); // @@protoc_insertion_point(copy_constructor:tari.rpc.TipInfoResponse) } @@ -4549,9 +4648,9 @@ inline void TipInfoResponse::SharedCtor(::_pb::Arena* arena) { ::memset(reinterpret_cast<char *>(&_impl_) + offsetof(Impl_, metadata_), 0, - offsetof(Impl_, base_node_state_) - + offsetof(Impl_, failed_checkpoints_) - offsetof(Impl_, metadata_) + - sizeof(Impl_::base_node_state_)); + sizeof(Impl_::failed_checkpoints_)); } TipInfoResponse::~TipInfoResponse() { // @@protoc_insertion_point(destructor:tari.rpc.TipInfoResponse) @@ -4590,9 +4689,9 @@ PROTOBUF_NOINLINE void TipInfoResponse::Clear() { ABSL_DCHECK(_impl_.metadata_ != nullptr); _impl_.metadata_->Clear(); } - ::memset(&_impl_.initial_sync_achieved_, 0, static_cast<::size_t>( - reinterpret_cast<char*>(&_impl_.base_node_state_) - - reinterpret_cast<char*>(&_impl_.initial_sync_achieved_)) + sizeof(_impl_.base_node_state_)); + ::memset(&_impl_.base_node_state_, 0, static_cast<::size_t>( + reinterpret_cast<char*>(&_impl_.failed_checkpoints_) - + reinterpret_cast<char*>(&_impl_.base_node_state_)) + sizeof(_impl_.failed_checkpoints_)); _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } @@ -4605,15 +4704,15 @@ const char* TipInfoResponse::_InternalParse( PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<2, 3, 1, 0, 2> TipInfoResponse::_table_ = { +const ::_pbi::TcParseTable<2, 4, 1, 0, 2> TipInfoResponse::_table_ = { { PROTOBUF_FIELD_OFFSET(TipInfoResponse, _impl_._has_bits_), 0, // no _extensions_ - 3, 24, // max_field_number, fast_idx_mask + 4, 24, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294967288, // skipmap + 4294967280, // skipmap offsetof(decltype(_table_), field_entries), - 3, // num_field_entries + 4, // num_field_entries 1, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_TipInfoResponse_default_instance_._instance, @@ -4622,7 +4721,9 @@ const ::_pbi::TcParseTable<2, 3, 1, 0, 2> TipInfoResponse::_table_ = { ::_pbi::TcParser::GetTable<::tari::rpc::TipInfoResponse>(), // to_prefetch #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ - {::_pbi::TcParser::MiniParse, {}}, + // bool failed_checkpoints = 4; + {::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(TipInfoResponse, _impl_.failed_checkpoints_), 63>(), + {32, 63, 0, PROTOBUF_FIELD_OFFSET(TipInfoResponse, _impl_.failed_checkpoints_)}}, // .tari.rpc.MetaData metadata = 1; {::_pbi::TcParser::FastMtS1, {10, 0, 0, PROTOBUF_FIELD_OFFSET(TipInfoResponse, _impl_.metadata_)}}, @@ -4644,6 +4745,9 @@ const ::_pbi::TcParseTable<2, 3, 1, 0, 2> TipInfoResponse::_table_ = { // .tari.rpc.BaseNodeState base_node_state = 3; {PROTOBUF_FIELD_OFFSET(TipInfoResponse, _impl_.base_node_state_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + // bool failed_checkpoints = 4; + {PROTOBUF_FIELD_OFFSET(TipInfoResponse, _impl_.failed_checkpoints_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, }}, {{ {::_pbi::TcParser::GetTable<::tari::rpc::MetaData>()}, }}, {{ @@ -4678,6 +4782,13 @@ const ::_pbi::TcParseTable<2, 3, 1, 0, 2> TipInfoResponse::_table_ = { 3, this->_internal_base_node_state(), target); } + // bool failed_checkpoints = 4; + if (this->_internal_failed_checkpoints() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 4, this->_internal_failed_checkpoints(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -4702,15 +4813,20 @@ const ::_pbi::TcParseTable<2, 3, 1, 0, 2> TipInfoResponse::_table_ = { 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.metadata_); } + // .tari.rpc.BaseNodeState base_node_state = 3; + if (this->_internal_base_node_state() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_base_node_state()); + } + // bool initial_sync_achieved = 2; if (this->_internal_initial_sync_achieved() != 0) { total_size += 2; } - // .tari.rpc.BaseNodeState base_node_state = 3; - if (this->_internal_base_node_state() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_base_node_state()); + // bool failed_checkpoints = 4; + if (this->_internal_failed_checkpoints() != 0) { + total_size += 2; } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); @@ -4736,11 +4852,14 @@ void TipInfoResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, const : _this->_impl_.metadata_->MergeFrom(*from._impl_.metadata_); } } + if (from._internal_base_node_state() != 0) { + _this->_impl_.base_node_state_ = from._impl_.base_node_state_; + } if (from._internal_initial_sync_achieved() != 0) { _this->_impl_.initial_sync_achieved_ = from._impl_.initial_sync_achieved_; } - if (from._internal_base_node_state() != 0) { - _this->_impl_.base_node_state_ = from._impl_.base_node_state_; + if (from._internal_failed_checkpoints() != 0) { + _this->_impl_.failed_checkpoints_ = from._impl_.failed_checkpoints_; } _this->_impl_._has_bits_[0] |= cached_has_bits; _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); @@ -4762,8 +4881,8 @@ void TipInfoResponse::InternalSwap(TipInfoResponse* PROTOBUF_RESTRICT other) { _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(TipInfoResponse, _impl_.base_node_state_) - + sizeof(TipInfoResponse::_impl_.base_node_state_) + PROTOBUF_FIELD_OFFSET(TipInfoResponse, _impl_.failed_checkpoints_) + + sizeof(TipInfoResponse::_impl_.failed_checkpoints_) - PROTOBUF_FIELD_OFFSET(TipInfoResponse, _impl_.metadata_)>( reinterpret_cast<char*>(&_impl_.metadata_), reinterpret_cast<char*>(&other->_impl_.metadata_)); @@ -6176,24 +6295,45 @@ NetworkDifficultyResponse::NetworkDifficultyResponse(::google::protobuf::Arena* SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:tari.rpc.NetworkDifficultyResponse) } +inline PROTOBUF_NDEBUG_INLINE NetworkDifficultyResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : coinbase_extras_{visibility, arena, from.coinbase_extras_}, + _cached_size_{0} {} + NetworkDifficultyResponse::NetworkDifficultyResponse( - ::google::protobuf::Arena* arena, const NetworkDifficultyResponse& from) - : NetworkDifficultyResponse(arena) { - MergeFrom(from); + ::google::protobuf::Arena* arena, + const NetworkDifficultyResponse& from) + : ::google::protobuf::Message(arena) { + NetworkDifficultyResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::memcpy(reinterpret_cast<char *>(&_impl_) + + offsetof(Impl_, difficulty_), + reinterpret_cast<const char *>(&from._impl_) + + offsetof(Impl_, difficulty_), + offsetof(Impl_, num_coinbases_) - + offsetof(Impl_, difficulty_) + + sizeof(Impl_::num_coinbases_)); + + // @@protoc_insertion_point(copy_constructor:tari.rpc.NetworkDifficultyResponse) } inline PROTOBUF_NDEBUG_INLINE NetworkDifficultyResponse::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena) - : _cached_size_{0} {} + : coinbase_extras_{visibility, arena}, + _cached_size_{0} {} inline void NetworkDifficultyResponse::SharedCtor(::_pb::Arena* arena) { new (&_impl_) Impl_(internal_visibility(), arena); ::memset(reinterpret_cast<char *>(&_impl_) + offsetof(Impl_, difficulty_), 0, - offsetof(Impl_, randomx_estimated_hash_rate_) - + offsetof(Impl_, num_coinbases_) - offsetof(Impl_, difficulty_) + - sizeof(Impl_::randomx_estimated_hash_rate_)); + sizeof(Impl_::num_coinbases_)); } NetworkDifficultyResponse::~NetworkDifficultyResponse() { // @@protoc_insertion_point(destructor:tari.rpc.NetworkDifficultyResponse) @@ -6226,9 +6366,10 @@ PROTOBUF_NOINLINE void NetworkDifficultyResponse::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + _impl_.coinbase_extras_.Clear(); ::memset(&_impl_.difficulty_, 0, static_cast<::size_t>( - reinterpret_cast<char*>(&_impl_.randomx_estimated_hash_rate_) - - reinterpret_cast<char*>(&_impl_.difficulty_)) + sizeof(_impl_.randomx_estimated_hash_rate_)); + reinterpret_cast<char*>(&_impl_.num_coinbases_) - + reinterpret_cast<char*>(&_impl_.difficulty_)) + sizeof(_impl_.num_coinbases_)); _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } @@ -6240,15 +6381,15 @@ const char* NetworkDifficultyResponse::_InternalParse( PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<3, 7, 0, 0, 2> NetworkDifficultyResponse::_table_ = { +const ::_pbi::TcParseTable<4, 9, 0, 0, 2> NetworkDifficultyResponse::_table_ = { { 0, // no _has_bits_ 0, // no _extensions_ - 7, 56, // max_field_number, fast_idx_mask + 9, 120, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294967168, // skipmap + 4294966784, // skipmap offsetof(decltype(_table_), field_entries), - 7, // num_field_entries + 9, // num_field_entries 0, // num_aux_entries offsetof(decltype(_table_), field_names), // no aux_entries &_NetworkDifficultyResponse_default_instance_._instance, @@ -6279,6 +6420,18 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> NetworkDifficultyResponse::_table_ = { // uint64 randomx_estimated_hash_rate = 7; {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(NetworkDifficultyResponse, _impl_.randomx_estimated_hash_rate_), 63>(), {56, 63, 0, PROTOBUF_FIELD_OFFSET(NetworkDifficultyResponse, _impl_.randomx_estimated_hash_rate_)}}, + // uint64 num_coinbases = 8; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(NetworkDifficultyResponse, _impl_.num_coinbases_), 63>(), + {64, 63, 0, PROTOBUF_FIELD_OFFSET(NetworkDifficultyResponse, _impl_.num_coinbases_)}}, + // repeated bytes coinbase_extras = 9; + {::_pbi::TcParser::FastBR1, + {74, 63, 0, PROTOBUF_FIELD_OFFSET(NetworkDifficultyResponse, _impl_.coinbase_extras_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, }}, {{ 65535, 65535 }}, {{ @@ -6303,6 +6456,12 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> NetworkDifficultyResponse::_table_ = { // uint64 randomx_estimated_hash_rate = 7; {PROTOBUF_FIELD_OFFSET(NetworkDifficultyResponse, _impl_.randomx_estimated_hash_rate_), 0, 0, (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // uint64 num_coinbases = 8; + {PROTOBUF_FIELD_OFFSET(NetworkDifficultyResponse, _impl_.num_coinbases_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // repeated bytes coinbase_extras = 9; + {PROTOBUF_FIELD_OFFSET(NetworkDifficultyResponse, _impl_.coinbase_extras_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)}, }}, // no aux_entries {{ @@ -6365,6 +6524,19 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> NetworkDifficultyResponse::_table_ = { 7, this->_internal_randomx_estimated_hash_rate(), target); } + // uint64 num_coinbases = 8; + if (this->_internal_num_coinbases() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 8, this->_internal_num_coinbases(), target); + } + + // repeated bytes coinbase_extras = 9; + for (int i = 0, n = this->_internal_coinbase_extras_size(); i < n; ++i) { + const auto& s = this->_internal_coinbase_extras().Get(i); + target = stream->WriteBytes(9, s, target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -6382,6 +6554,12 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> NetworkDifficultyResponse::_table_ = { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + // repeated bytes coinbase_extras = 9; + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_coinbase_extras().size()); + for (int i = 0, n = _internal_coinbase_extras().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( + _internal_coinbase_extras().Get(i)); + } // uint64 difficulty = 1; if (this->_internal_difficulty() != 0) { total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( @@ -6424,6 +6602,12 @@ const ::_pbi::TcParseTable<3, 7, 0, 0, 2> NetworkDifficultyResponse::_table_ = { this->_internal_randomx_estimated_hash_rate()); } + // uint64 num_coinbases = 8; + if (this->_internal_num_coinbases() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_num_coinbases()); + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -6436,6 +6620,7 @@ void NetworkDifficultyResponse::MergeImpl(::google::protobuf::MessageLite& to_ms ::uint32_t cached_has_bits = 0; (void) cached_has_bits; + _this->_internal_mutable_coinbase_extras()->MergeFrom(from._internal_coinbase_extras()); if (from._internal_difficulty() != 0) { _this->_impl_.difficulty_ = from._impl_.difficulty_; } @@ -6457,6 +6642,9 @@ void NetworkDifficultyResponse::MergeImpl(::google::protobuf::MessageLite& to_ms if (from._internal_randomx_estimated_hash_rate() != 0) { _this->_impl_.randomx_estimated_hash_rate_ = from._impl_.randomx_estimated_hash_rate_; } + if (from._internal_num_coinbases() != 0) { + _this->_impl_.num_coinbases_ = from._impl_.num_coinbases_; + } _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } @@ -6474,9 +6662,10 @@ PROTOBUF_NOINLINE bool NetworkDifficultyResponse::IsInitialized() const { void NetworkDifficultyResponse::InternalSwap(NetworkDifficultyResponse* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.coinbase_extras_.InternalSwap(&other->_impl_.coinbase_extras_); ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(NetworkDifficultyResponse, _impl_.randomx_estimated_hash_rate_) - + sizeof(NetworkDifficultyResponse::_impl_.randomx_estimated_hash_rate_) + PROTOBUF_FIELD_OFFSET(NetworkDifficultyResponse, _impl_.num_coinbases_) + + sizeof(NetworkDifficultyResponse::_impl_.num_coinbases_) - PROTOBUF_FIELD_OFFSET(NetworkDifficultyResponse, _impl_.difficulty_)>( reinterpret_cast<char*>(&_impl_.difficulty_), reinterpret_cast<char*>(&other->_impl_.difficulty_)); @@ -9209,9 +9398,9 @@ MetaData::MetaData( offsetof(Impl_, best_block_height_), reinterpret_cast<const char *>(&from._impl_) + offsetof(Impl_, best_block_height_), - offsetof(Impl_, pruned_height_) - + offsetof(Impl_, timestamp_) - offsetof(Impl_, best_block_height_) + - sizeof(Impl_::pruned_height_)); + sizeof(Impl_::timestamp_)); // @@protoc_insertion_point(copy_constructor:tari.rpc.MetaData) } @@ -9227,9 +9416,9 @@ inline void MetaData::SharedCtor(::_pb::Arena* arena) { ::memset(reinterpret_cast<char *>(&_impl_) + offsetof(Impl_, best_block_height_), 0, - offsetof(Impl_, pruned_height_) - + offsetof(Impl_, timestamp_) - offsetof(Impl_, best_block_height_) + - sizeof(Impl_::pruned_height_)); + sizeof(Impl_::timestamp_)); } MetaData::~MetaData() { // @@protoc_insertion_point(destructor:tari.rpc.MetaData) @@ -9267,8 +9456,8 @@ PROTOBUF_NOINLINE void MetaData::Clear() { _impl_.best_block_hash_.ClearToEmpty(); _impl_.accumulated_difficulty_.ClearToEmpty(); ::memset(&_impl_.best_block_height_, 0, static_cast<::size_t>( - reinterpret_cast<char*>(&_impl_.pruned_height_) - - reinterpret_cast<char*>(&_impl_.best_block_height_)) + sizeof(_impl_.pruned_height_)); + reinterpret_cast<char*>(&_impl_.timestamp_) - + reinterpret_cast<char*>(&_impl_.best_block_height_)) + sizeof(_impl_.timestamp_)); _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } @@ -9280,15 +9469,15 @@ const char* MetaData::_InternalParse( PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<3, 4, 0, 0, 2> MetaData::_table_ = { +const ::_pbi::TcParseTable<3, 5, 0, 0, 2> MetaData::_table_ = { { 0, // no _has_bits_ 0, // no _extensions_ - 6, 56, // max_field_number, fast_idx_mask + 7, 56, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294967244, // skipmap + 4294967180, // skipmap offsetof(decltype(_table_), field_entries), - 4, // num_field_entries + 5, // num_field_entries 0, // num_aux_entries offsetof(decltype(_table_), field_names), // no aux_entries &_MetaData_default_instance_._instance, @@ -9312,7 +9501,9 @@ const ::_pbi::TcParseTable<3, 4, 0, 0, 2> MetaData::_table_ = { // uint64 pruned_height = 6; {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(MetaData, _impl_.pruned_height_), 63>(), {48, 63, 0, PROTOBUF_FIELD_OFFSET(MetaData, _impl_.pruned_height_)}}, - {::_pbi::TcParser::MiniParse, {}}, + // uint64 timestamp = 7; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(MetaData, _impl_.timestamp_), 63>(), + {56, 63, 0, PROTOBUF_FIELD_OFFSET(MetaData, _impl_.timestamp_)}}, }}, {{ 65535, 65535 }}, {{ @@ -9328,6 +9519,9 @@ const ::_pbi::TcParseTable<3, 4, 0, 0, 2> MetaData::_table_ = { // uint64 pruned_height = 6; {PROTOBUF_FIELD_OFFSET(MetaData, _impl_.pruned_height_), 0, 0, (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // uint64 timestamp = 7; + {PROTOBUF_FIELD_OFFSET(MetaData, _impl_.timestamp_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, }}, // no aux_entries {{ @@ -9367,6 +9561,13 @@ const ::_pbi::TcParseTable<3, 4, 0, 0, 2> MetaData::_table_ = { 6, this->_internal_pruned_height(), target); } + // uint64 timestamp = 7; + if (this->_internal_timestamp() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 7, this->_internal_timestamp(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -9408,6 +9609,12 @@ const ::_pbi::TcParseTable<3, 4, 0, 0, 2> MetaData::_table_ = { this->_internal_pruned_height()); } + // uint64 timestamp = 7; + if (this->_internal_timestamp() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_timestamp()); + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -9432,6 +9639,9 @@ void MetaData::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google if (from._internal_pruned_height() != 0) { _this->_impl_.pruned_height_ = from._impl_.pruned_height_; } + if (from._internal_timestamp() != 0) { + _this->_impl_.timestamp_ = from._impl_.timestamp_; + } _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } @@ -9454,8 +9664,8 @@ void MetaData::InternalSwap(MetaData* PROTOBUF_RESTRICT other) { ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.best_block_hash_, &other->_impl_.best_block_hash_, arena); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.accumulated_difficulty_, &other->_impl_.accumulated_difficulty_, arena); ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(MetaData, _impl_.pruned_height_) - + sizeof(MetaData::_impl_.pruned_height_) + PROTOBUF_FIELD_OFFSET(MetaData, _impl_.timestamp_) + + sizeof(MetaData::_impl_.timestamp_) - PROTOBUF_FIELD_OFFSET(MetaData, _impl_.best_block_height_)>( reinterpret_cast<char*>(&_impl_.best_block_height_), reinterpret_cast<char*>(&other->_impl_.best_block_height_)); @@ -9731,15 +9941,36 @@ SyncProgressResponse::SyncProgressResponse(::google::protobuf::Arena* arena) SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:tari.rpc.SyncProgressResponse) } +inline PROTOBUF_NDEBUG_INLINE SyncProgressResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : short_desc_(arena, from.short_desc_), + _cached_size_{0} {} + SyncProgressResponse::SyncProgressResponse( - ::google::protobuf::Arena* arena, const SyncProgressResponse& from) - : SyncProgressResponse(arena) { - MergeFrom(from); + ::google::protobuf::Arena* arena, + const SyncProgressResponse& from) + : ::google::protobuf::Message(arena) { + SyncProgressResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::memcpy(reinterpret_cast<char *>(&_impl_) + + offsetof(Impl_, tip_height_), + reinterpret_cast<const char *>(&from._impl_) + + offsetof(Impl_, tip_height_), + offsetof(Impl_, state_) - + offsetof(Impl_, tip_height_) + + sizeof(Impl_::state_)); + + // @@protoc_insertion_point(copy_constructor:tari.rpc.SyncProgressResponse) } inline PROTOBUF_NDEBUG_INLINE SyncProgressResponse::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena) - : _cached_size_{0} {} + : short_desc_(arena), + _cached_size_{0} {} inline void SyncProgressResponse::SharedCtor(::_pb::Arena* arena) { new (&_impl_) Impl_(internal_visibility(), arena); @@ -9757,6 +9988,7 @@ SyncProgressResponse::~SyncProgressResponse() { } inline void SyncProgressResponse::SharedDtor() { ABSL_DCHECK(GetArena() == nullptr); + _impl_.short_desc_.Destroy(); _impl_.~Impl_(); } @@ -9781,6 +10013,7 @@ PROTOBUF_NOINLINE void SyncProgressResponse::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + _impl_.short_desc_.ClearToEmpty(); ::memset(&_impl_.tip_height_, 0, static_cast<::size_t>( reinterpret_cast<char*>(&_impl_.state_) - reinterpret_cast<char*>(&_impl_.tip_height_)) + sizeof(_impl_.state_)); @@ -9795,15 +10028,15 @@ const char* SyncProgressResponse::_InternalParse( PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<2, 3, 0, 0, 2> SyncProgressResponse::_table_ = { +const ::_pbi::TcParseTable<3, 5, 0, 48, 2> SyncProgressResponse::_table_ = { { 0, // no _has_bits_ 0, // no _extensions_ - 3, 24, // max_field_number, fast_idx_mask + 5, 56, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294967288, // skipmap + 4294967264, // skipmap offsetof(decltype(_table_), field_entries), - 3, // num_field_entries + 5, // num_field_entries 0, // num_aux_entries offsetof(decltype(_table_), field_names), // no aux_entries &_SyncProgressResponse_default_instance_._instance, @@ -9822,6 +10055,14 @@ const ::_pbi::TcParseTable<2, 3, 0, 0, 2> SyncProgressResponse::_table_ = { // .tari.rpc.SyncState state = 3; {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SyncProgressResponse, _impl_.state_), 63>(), {24, 63, 0, PROTOBUF_FIELD_OFFSET(SyncProgressResponse, _impl_.state_)}}, + // string short_desc = 4; + {::_pbi::TcParser::FastUS1, + {34, 63, 0, PROTOBUF_FIELD_OFFSET(SyncProgressResponse, _impl_.short_desc_)}}, + // uint64 initial_connected_peers = 5; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(SyncProgressResponse, _impl_.initial_connected_peers_), 63>(), + {40, 63, 0, PROTOBUF_FIELD_OFFSET(SyncProgressResponse, _impl_.initial_connected_peers_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, }}, {{ 65535, 65535 }}, {{ @@ -9834,9 +10075,18 @@ const ::_pbi::TcParseTable<2, 3, 0, 0, 2> SyncProgressResponse::_table_ = { // .tari.rpc.SyncState state = 3; {PROTOBUF_FIELD_OFFSET(SyncProgressResponse, _impl_.state_), 0, 0, (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + // string short_desc = 4; + {PROTOBUF_FIELD_OFFSET(SyncProgressResponse, _impl_.short_desc_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // uint64 initial_connected_peers = 5; + {PROTOBUF_FIELD_OFFSET(SyncProgressResponse, _impl_.initial_connected_peers_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, }}, // no aux_entries {{ + "\35\0\0\0\12\0\0\0" + "tari.rpc.SyncProgressResponse" + "short_desc" }}, }; @@ -9868,6 +10118,21 @@ const ::_pbi::TcParseTable<2, 3, 0, 0, 2> SyncProgressResponse::_table_ = { 3, this->_internal_state(), target); } + // string short_desc = 4; + if (!this->_internal_short_desc().empty()) { + const std::string& _s = this->_internal_short_desc(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tari.rpc.SyncProgressResponse.short_desc"); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + + // uint64 initial_connected_peers = 5; + if (this->_internal_initial_connected_peers() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 5, this->_internal_initial_connected_peers(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -9885,6 +10150,12 @@ const ::_pbi::TcParseTable<2, 3, 0, 0, 2> SyncProgressResponse::_table_ = { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + // string short_desc = 4; + if (!this->_internal_short_desc().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_short_desc()); + } + // uint64 tip_height = 1; if (this->_internal_tip_height() != 0) { total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( @@ -9897,6 +10168,12 @@ const ::_pbi::TcParseTable<2, 3, 0, 0, 2> SyncProgressResponse::_table_ = { this->_internal_local_height()); } + // uint64 initial_connected_peers = 5; + if (this->_internal_initial_connected_peers() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_initial_connected_peers()); + } + // .tari.rpc.SyncState state = 3; if (this->_internal_state() != 0) { total_size += 1 + @@ -9915,12 +10192,18 @@ void SyncProgressResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, co ::uint32_t cached_has_bits = 0; (void) cached_has_bits; + if (!from._internal_short_desc().empty()) { + _this->_internal_set_short_desc(from._internal_short_desc()); + } if (from._internal_tip_height() != 0) { _this->_impl_.tip_height_ = from._impl_.tip_height_; } if (from._internal_local_height() != 0) { _this->_impl_.local_height_ = from._impl_.local_height_; } + if (from._internal_initial_connected_peers() != 0) { + _this->_impl_.initial_connected_peers_ = from._impl_.initial_connected_peers_; + } if (from._internal_state() != 0) { _this->_impl_.state_ = from._impl_.state_; } @@ -9940,7 +10223,10 @@ PROTOBUF_NOINLINE bool SyncProgressResponse::IsInitialized() const { void SyncProgressResponse::InternalSwap(SyncProgressResponse* PROTOBUF_RESTRICT other) { using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.short_desc_, &other->_impl_.short_desc_, arena); ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(SyncProgressResponse, _impl_.state_) + sizeof(SyncProgressResponse::_impl_.state_) @@ -15269,6 +15555,406 @@ void GetSideChainUtxosResponse::InternalSwap(GetSideChainUtxosResponse* PROTOBUF &descriptor_table_base_5fnode_2eproto_once, file_level_metadata_base_5fnode_2eproto[54]); } +// =================================================================== + +class GetNetworkStateRequest::_Internal { + public: +}; + +GetNetworkStateRequest::GetNetworkStateRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::internal::ZeroFieldsBase(arena) { + // @@protoc_insertion_point(arena_constructor:tari.rpc.GetNetworkStateRequest) +} +GetNetworkStateRequest::GetNetworkStateRequest( + ::google::protobuf::Arena* arena, + const GetNetworkStateRequest& from) + : ::google::protobuf::internal::ZeroFieldsBase(arena) { + GetNetworkStateRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + + // @@protoc_insertion_point(copy_constructor:tari.rpc.GetNetworkStateRequest) +} + + + + + + + + + +::google::protobuf::Metadata GetNetworkStateRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors(&descriptor_table_base_5fnode_2eproto_getter, + &descriptor_table_base_5fnode_2eproto_once, + file_level_metadata_base_5fnode_2eproto[55]); +} +// =================================================================== + +class GetNetworkStateResponse::_Internal { + public: + using HasBits = decltype(std::declval<GetNetworkStateResponse>()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_._has_bits_); +}; + +GetNetworkStateResponse::GetNetworkStateResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:tari.rpc.GetNetworkStateResponse) +} +inline PROTOBUF_NDEBUG_INLINE GetNetworkStateResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +GetNetworkStateResponse::GetNetworkStateResponse( + ::google::protobuf::Arena* arena, + const GetNetworkStateResponse& from) + : ::google::protobuf::Message(arena) { + GetNetworkStateResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.metadata_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::tari::rpc::MetaData>( + arena, *from._impl_.metadata_) + : nullptr; + ::memcpy(reinterpret_cast<char *>(&_impl_) + + offsetof(Impl_, base_node_state_), + reinterpret_cast<const char *>(&from._impl_) + + offsetof(Impl_, base_node_state_), + offsetof(Impl_, randomx_estimated_hash_rate_) - + offsetof(Impl_, base_node_state_) + + sizeof(Impl_::randomx_estimated_hash_rate_)); + + // @@protoc_insertion_point(copy_constructor:tari.rpc.GetNetworkStateResponse) +} +inline PROTOBUF_NDEBUG_INLINE GetNetworkStateResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void GetNetworkStateResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast<char *>(&_impl_) + + offsetof(Impl_, metadata_), + 0, + offsetof(Impl_, randomx_estimated_hash_rate_) - + offsetof(Impl_, metadata_) + + sizeof(Impl_::randomx_estimated_hash_rate_)); +} +GetNetworkStateResponse::~GetNetworkStateResponse() { + // @@protoc_insertion_point(destructor:tari.rpc.GetNetworkStateResponse) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void GetNetworkStateResponse::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.metadata_; + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +GetNetworkStateResponse::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + nullptr, // OnDemandRegisterArenaDtor + PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_._cached_size_), + false, + }, + &GetNetworkStateResponse::MergeImpl, + &GetNetworkStateResponse::kDescriptorMethods, + }; + return &_data_; +} +PROTOBUF_NOINLINE void GetNetworkStateResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:tari.rpc.GetNetworkStateResponse) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.metadata_ != nullptr); + _impl_.metadata_->Clear(); + } + ::memset(&_impl_.base_node_state_, 0, static_cast<::size_t>( + reinterpret_cast<char*>(&_impl_.randomx_estimated_hash_rate_) - + reinterpret_cast<char*>(&_impl_.base_node_state_)) + sizeof(_impl_.randomx_estimated_hash_rate_)); + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* GetNetworkStateResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 7, 1, 0, 2> GetNetworkStateResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_._has_bits_), + 0, // no _extensions_ + 7, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967168, // skipmap + offsetof(decltype(_table_), field_entries), + 7, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_GetNetworkStateResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::tari::rpc::GetNetworkStateResponse>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .tari.rpc.MetaData metadata = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.metadata_)}}, + // bool initial_sync_achieved = 2; + {::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(GetNetworkStateResponse, _impl_.initial_sync_achieved_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.initial_sync_achieved_)}}, + // .tari.rpc.BaseNodeState base_node_state = 3; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(GetNetworkStateResponse, _impl_.base_node_state_), 63>(), + {24, 63, 0, PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.base_node_state_)}}, + // bool failed_checkpoints = 4; + {::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(GetNetworkStateResponse, _impl_.failed_checkpoints_), 63>(), + {32, 63, 0, PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.failed_checkpoints_)}}, + // uint64 reward = 5; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(GetNetworkStateResponse, _impl_.reward_), 63>(), + {40, 63, 0, PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.reward_)}}, + // uint64 sha3x_estimated_hash_rate = 6; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(GetNetworkStateResponse, _impl_.sha3x_estimated_hash_rate_), 63>(), + {48, 63, 0, PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.sha3x_estimated_hash_rate_)}}, + // uint64 randomx_estimated_hash_rate = 7; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(GetNetworkStateResponse, _impl_.randomx_estimated_hash_rate_), 63>(), + {56, 63, 0, PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.randomx_estimated_hash_rate_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .tari.rpc.MetaData metadata = 1; + {PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.metadata_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bool initial_sync_achieved = 2; + {PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.initial_sync_achieved_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + // .tari.rpc.BaseNodeState base_node_state = 3; + {PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.base_node_state_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + // bool failed_checkpoints = 4; + {PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.failed_checkpoints_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + // uint64 reward = 5; + {PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.reward_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // uint64 sha3x_estimated_hash_rate = 6; + {PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.sha3x_estimated_hash_rate_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // uint64 randomx_estimated_hash_rate = 7; + {PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.randomx_estimated_hash_rate_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + }}, {{ + {::_pbi::TcParser::GetTable<::tari::rpc::MetaData>()}, + }}, {{ + }}, +}; + +::uint8_t* GetNetworkStateResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tari.rpc.GetNetworkStateResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // .tari.rpc.MetaData metadata = 1; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *_impl_.metadata_, _impl_.metadata_->GetCachedSize(), target, stream); + } + + // bool initial_sync_achieved = 2; + if (this->_internal_initial_sync_achieved() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 2, this->_internal_initial_sync_achieved(), target); + } + + // .tari.rpc.BaseNodeState base_node_state = 3; + if (this->_internal_base_node_state() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 3, this->_internal_base_node_state(), target); + } + + // bool failed_checkpoints = 4; + if (this->_internal_failed_checkpoints() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 4, this->_internal_failed_checkpoints(), target); + } + + // uint64 reward = 5; + if (this->_internal_reward() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 5, this->_internal_reward(), target); + } + + // uint64 sha3x_estimated_hash_rate = 6; + if (this->_internal_sha3x_estimated_hash_rate() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 6, this->_internal_sha3x_estimated_hash_rate(), target); + } + + // uint64 randomx_estimated_hash_rate = 7; + if (this->_internal_randomx_estimated_hash_rate() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 7, this->_internal_randomx_estimated_hash_rate(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tari.rpc.GetNetworkStateResponse) + return target; +} + +::size_t GetNetworkStateResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tari.rpc.GetNetworkStateResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .tari.rpc.MetaData metadata = 1; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.metadata_); + } + + // .tari.rpc.BaseNodeState base_node_state = 3; + if (this->_internal_base_node_state() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_base_node_state()); + } + + // bool initial_sync_achieved = 2; + if (this->_internal_initial_sync_achieved() != 0) { + total_size += 2; + } + + // bool failed_checkpoints = 4; + if (this->_internal_failed_checkpoints() != 0) { + total_size += 2; + } + + // uint64 reward = 5; + if (this->_internal_reward() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_reward()); + } + + // uint64 sha3x_estimated_hash_rate = 6; + if (this->_internal_sha3x_estimated_hash_rate() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_sha3x_estimated_hash_rate()); + } + + // uint64 randomx_estimated_hash_rate = 7; + if (this->_internal_randomx_estimated_hash_rate() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_randomx_estimated_hash_rate()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void GetNetworkStateResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast<GetNetworkStateResponse*>(&to_msg); + auto& from = static_cast<const GetNetworkStateResponse&>(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.GetNetworkStateResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(from._impl_.metadata_ != nullptr); + if (_this->_impl_.metadata_ == nullptr) { + _this->_impl_.metadata_ = + ::google::protobuf::Message::CopyConstruct<::tari::rpc::MetaData>(arena, *from._impl_.metadata_); + } else { + _this->_impl_.metadata_->MergeFrom(*from._impl_.metadata_); + } + } + if (from._internal_base_node_state() != 0) { + _this->_impl_.base_node_state_ = from._impl_.base_node_state_; + } + if (from._internal_initial_sync_achieved() != 0) { + _this->_impl_.initial_sync_achieved_ = from._impl_.initial_sync_achieved_; + } + if (from._internal_failed_checkpoints() != 0) { + _this->_impl_.failed_checkpoints_ = from._impl_.failed_checkpoints_; + } + if (from._internal_reward() != 0) { + _this->_impl_.reward_ = from._impl_.reward_; + } + if (from._internal_sha3x_estimated_hash_rate() != 0) { + _this->_impl_.sha3x_estimated_hash_rate_ = from._impl_.sha3x_estimated_hash_rate_; + } + if (from._internal_randomx_estimated_hash_rate() != 0) { + _this->_impl_.randomx_estimated_hash_rate_ = from._impl_.randomx_estimated_hash_rate_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void GetNetworkStateResponse::CopyFrom(const GetNetworkStateResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.GetNetworkStateResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool GetNetworkStateResponse::IsInitialized() const { + return true; +} + +void GetNetworkStateResponse::InternalSwap(GetNetworkStateResponse* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.randomx_estimated_hash_rate_) + + sizeof(GetNetworkStateResponse::_impl_.randomx_estimated_hash_rate_) + - PROTOBUF_FIELD_OFFSET(GetNetworkStateResponse, _impl_.metadata_)>( + reinterpret_cast<char*>(&_impl_.metadata_), + reinterpret_cast<char*>(&other->_impl_.metadata_)); +} + +::google::protobuf::Metadata GetNetworkStateResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors(&descriptor_table_base_5fnode_2eproto_getter, + &descriptor_table_base_5fnode_2eproto_once, + file_level_metadata_base_5fnode_2eproto[56]); +} // @@protoc_insertion_point(namespace_scope) } // namespace rpc } // namespace tari diff --git a/external/src/Tari/proto/gRPC/base_node.pb.h b/external/src/Tari/proto/gRPC/base_node.pb.h index c23d0f4..924101f 100644 --- a/external/src/Tari/proto/gRPC/base_node.pb.h +++ b/external/src/Tari/proto/gRPC/base_node.pb.h @@ -109,6 +109,12 @@ extern GetMempoolTransactionsRequestDefaultTypeInternal _GetMempoolTransactionsR class GetMempoolTransactionsResponse; struct GetMempoolTransactionsResponseDefaultTypeInternal; extern GetMempoolTransactionsResponseDefaultTypeInternal _GetMempoolTransactionsResponse_default_instance_; +class GetNetworkStateRequest; +struct GetNetworkStateRequestDefaultTypeInternal; +extern GetNetworkStateRequestDefaultTypeInternal _GetNetworkStateRequest_default_instance_; +class GetNetworkStateResponse; +struct GetNetworkStateResponseDefaultTypeInternal; +extern GetNetworkStateResponseDefaultTypeInternal _GetNetworkStateResponse_default_instance_; class GetNewBlockBlobResult; struct GetNewBlockBlobResultDefaultTypeInternal; extern GetNewBlockBlobResultDefaultTypeInternal _GetNewBlockBlobResult_default_instance_; @@ -923,10 +929,28 @@ class SyncProgressResponse final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { + kShortDescFieldNumber = 4, kTipHeightFieldNumber = 1, kLocalHeightFieldNumber = 2, + kInitialConnectedPeersFieldNumber = 5, kStateFieldNumber = 3, }; + // string short_desc = 4; + void clear_short_desc() ; + const std::string& short_desc() const; + template <typename Arg_ = const std::string&, typename... Args_> + void set_short_desc(Arg_&& arg, Args_... args); + std::string* mutable_short_desc(); + PROTOBUF_NODISCARD std::string* release_short_desc(); + void set_allocated_short_desc(std::string* value); + + private: + const std::string& _internal_short_desc() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_short_desc( + const std::string& value); + std::string* _internal_mutable_short_desc(); + + public: // uint64 tip_height = 1; void clear_tip_height() ; ::uint64_t tip_height() const; @@ -946,6 +970,16 @@ class SyncProgressResponse final : public ::google::protobuf::Message ::uint64_t _internal_local_height() const; void _internal_set_local_height(::uint64_t value); + public: + // uint64 initial_connected_peers = 5; + void clear_initial_connected_peers() ; + ::uint64_t initial_connected_peers() const; + void set_initial_connected_peers(::uint64_t value); + + private: + ::uint64_t _internal_initial_connected_peers() const; + void _internal_set_initial_connected_peers(::uint64_t value); + public: // .tari.rpc.SyncState state = 3; void clear_state() ; @@ -962,8 +996,8 @@ class SyncProgressResponse final : public ::google::protobuf::Message class _Internal; friend class ::google::protobuf::internal::TcParser; static const ::google::protobuf::internal::TcParseTable< - 2, 3, 0, - 0, 2> + 3, 5, 0, + 48, 2> _table_; friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; @@ -978,8 +1012,10 @@ class SyncProgressResponse final : public ::google::protobuf::Message ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::ArenaStringPtr short_desc_; ::uint64_t tip_height_; ::uint64_t local_height_; + ::uint64_t initial_connected_peers_; int state_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER @@ -2248,6 +2284,7 @@ class NetworkDifficultyResponse final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { + kCoinbaseExtrasFieldNumber = 9, kDifficultyFieldNumber = 1, kEstimatedHashRateFieldNumber = 2, kHeightFieldNumber = 3, @@ -2255,7 +2292,36 @@ class NetworkDifficultyResponse final : public ::google::protobuf::Message kPowAlgoFieldNumber = 5, kSha3XEstimatedHashRateFieldNumber = 6, kRandomxEstimatedHashRateFieldNumber = 7, + kNumCoinbasesFieldNumber = 8, }; + // repeated bytes coinbase_extras = 9; + int coinbase_extras_size() const; + private: + int _internal_coinbase_extras_size() const; + + public: + void clear_coinbase_extras() ; + const std::string& coinbase_extras(int index) const; + std::string* mutable_coinbase_extras(int index); + void set_coinbase_extras(int index, const std::string& value); + void set_coinbase_extras(int index, std::string&& value); + void set_coinbase_extras(int index, const char* value); + void set_coinbase_extras(int index, const void* value, std::size_t size); + void set_coinbase_extras(int index, absl::string_view value); + std::string* add_coinbase_extras(); + void add_coinbase_extras(const std::string& value); + void add_coinbase_extras(std::string&& value); + void add_coinbase_extras(const char* value); + void add_coinbase_extras(const void* value, std::size_t size); + void add_coinbase_extras(absl::string_view value); + const ::google::protobuf::RepeatedPtrField<std::string>& coinbase_extras() const; + ::google::protobuf::RepeatedPtrField<std::string>* mutable_coinbase_extras(); + + private: + const ::google::protobuf::RepeatedPtrField<std::string>& _internal_coinbase_extras() const; + ::google::protobuf::RepeatedPtrField<std::string>* _internal_mutable_coinbase_extras(); + + public: // uint64 difficulty = 1; void clear_difficulty() ; ::uint64_t difficulty() const; @@ -2325,13 +2391,23 @@ class NetworkDifficultyResponse final : public ::google::protobuf::Message ::uint64_t _internal_randomx_estimated_hash_rate() const; void _internal_set_randomx_estimated_hash_rate(::uint64_t value); + public: + // uint64 num_coinbases = 8; + void clear_num_coinbases() ; + ::uint64_t num_coinbases() const; + void set_num_coinbases(::uint64_t value); + + private: + ::uint64_t _internal_num_coinbases() const; + void _internal_set_num_coinbases(::uint64_t value); + public: // @@protoc_insertion_point(class_scope:tari.rpc.NetworkDifficultyResponse) private: class _Internal; friend class ::google::protobuf::internal::TcParser; static const ::google::protobuf::internal::TcParseTable< - 3, 7, 0, + 4, 9, 0, 0, 2> _table_; friend class ::google::protobuf::MessageLite; @@ -2347,6 +2423,7 @@ class NetworkDifficultyResponse final : public ::google::protobuf::Message ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::RepeatedPtrField<std::string> coinbase_extras_; ::uint64_t difficulty_; ::uint64_t estimated_hash_rate_; ::uint64_t height_; @@ -2354,6 +2431,7 @@ class NetworkDifficultyResponse final : public ::google::protobuf::Message ::uint64_t pow_algo_; ::uint64_t sha3x_estimated_hash_rate_; ::uint64_t randomx_estimated_hash_rate_; + ::uint64_t num_coinbases_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER }; @@ -2491,6 +2569,7 @@ class MetaData final : public ::google::protobuf::Message kAccumulatedDifficultyFieldNumber = 5, kBestBlockHeightFieldNumber = 1, kPrunedHeightFieldNumber = 6, + kTimestampFieldNumber = 7, }; // bytes best_block_hash = 2; void clear_best_block_hash() ; @@ -2543,13 +2622,23 @@ class MetaData final : public ::google::protobuf::Message ::uint64_t _internal_pruned_height() const; void _internal_set_pruned_height(::uint64_t value); + public: + // uint64 timestamp = 7; + void clear_timestamp() ; + ::uint64_t timestamp() const; + void set_timestamp(::uint64_t value); + + private: + ::uint64_t _internal_timestamp() const; + void _internal_set_timestamp(::uint64_t value); + public: // @@protoc_insertion_point(class_scope:tari.rpc.MetaData) private: class _Internal; friend class ::google::protobuf::internal::TcParser; static const ::google::protobuf::internal::TcParseTable< - 3, 4, 0, + 3, 5, 0, 0, 2> _table_; friend class ::google::protobuf::MessageLite; @@ -2569,6 +2658,7 @@ class MetaData final : public ::google::protobuf::Message ::google::protobuf::internal::ArenaStringPtr accumulated_difficulty_; ::uint64_t best_block_height_; ::uint64_t pruned_height_; + ::uint64_t timestamp_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER }; @@ -4830,6 +4920,134 @@ class GetNewBlockBlobResult final : public ::google::protobuf::Message }; // ------------------------------------------------------------------- +class GetNetworkStateRequest final : public ::google::protobuf::internal::ZeroFieldsBase +/* @@protoc_insertion_point(class_definition:tari.rpc.GetNetworkStateRequest) */ { + public: + inline GetNetworkStateRequest() : GetNetworkStateRequest(nullptr) {} + template <typename = void> + explicit PROTOBUF_CONSTEXPR GetNetworkStateRequest( + ::google::protobuf::internal::ConstantInitialized); + + inline GetNetworkStateRequest(const GetNetworkStateRequest& from) : GetNetworkStateRequest(nullptr, from) {} + inline GetNetworkStateRequest(GetNetworkStateRequest&& from) noexcept + : GetNetworkStateRequest(nullptr, std::move(from)) {} + inline GetNetworkStateRequest& operator=(const GetNetworkStateRequest& from) { + CopyFrom(from); + return *this; + } + inline GetNetworkStateRequest& operator=(GetNetworkStateRequest&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetNetworkStateRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GetNetworkStateRequest* internal_default_instance() { + return reinterpret_cast<const GetNetworkStateRequest*>( + &_GetNetworkStateRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 55; + friend void swap(GetNetworkStateRequest& a, GetNetworkStateRequest& b) { a.Swap(&b); } + inline void Swap(GetNetworkStateRequest* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetNetworkStateRequest* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetNetworkStateRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct<GetNetworkStateRequest>(arena); + } + using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const GetNetworkStateRequest& from) { + ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const GetNetworkStateRequest& from) { + ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + + public: + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "tari.rpc.GetNetworkStateRequest"; } + + protected: + explicit GetNetworkStateRequest(::google::protobuf::Arena* arena); + GetNetworkStateRequest(::google::protobuf::Arena* arena, const GetNetworkStateRequest& from); + GetNetworkStateRequest(::google::protobuf::Arena* arena, GetNetworkStateRequest&& from) noexcept + : GetNetworkStateRequest(arena) { + *this = ::std::move(from); + } + + public: + ::google::protobuf::Metadata GetMetadata() const final; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + // @@protoc_insertion_point(class_scope:tari.rpc.GetNetworkStateRequest) + private: + class _Internal; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template <typename T> + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + PROTOBUF_TSAN_DECLARE_MEMBER + }; + friend struct ::TableStruct_base_5fnode_2eproto; +}; +// ------------------------------------------------------------------- + class GetMempoolTransactionsRequest final : public ::google::protobuf::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:tari.rpc.GetMempoolTransactionsRequest) */ { public: @@ -7297,8 +7515,9 @@ class TipInfoResponse final : public ::google::protobuf::Message // accessors ------------------------------------------------------- enum : int { kMetadataFieldNumber = 1, - kInitialSyncAchievedFieldNumber = 2, kBaseNodeStateFieldNumber = 3, + kInitialSyncAchievedFieldNumber = 2, + kFailedCheckpointsFieldNumber = 4, }; // .tari.rpc.MetaData metadata = 1; bool has_metadata() const; @@ -7314,16 +7533,6 @@ class TipInfoResponse final : public ::google::protobuf::Message const ::tari::rpc::MetaData& _internal_metadata() const; ::tari::rpc::MetaData* _internal_mutable_metadata(); - public: - // bool initial_sync_achieved = 2; - void clear_initial_sync_achieved() ; - bool initial_sync_achieved() const; - void set_initial_sync_achieved(bool value); - - private: - bool _internal_initial_sync_achieved() const; - void _internal_set_initial_sync_achieved(bool value); - public: // .tari.rpc.BaseNodeState base_node_state = 3; void clear_base_node_state() ; @@ -7334,13 +7543,33 @@ class TipInfoResponse final : public ::google::protobuf::Message ::tari::rpc::BaseNodeState _internal_base_node_state() const; void _internal_set_base_node_state(::tari::rpc::BaseNodeState value); + public: + // bool initial_sync_achieved = 2; + void clear_initial_sync_achieved() ; + bool initial_sync_achieved() const; + void set_initial_sync_achieved(bool value); + + private: + bool _internal_initial_sync_achieved() const; + void _internal_set_initial_sync_achieved(bool value); + + public: + // bool failed_checkpoints = 4; + void clear_failed_checkpoints() ; + bool failed_checkpoints() const; + void set_failed_checkpoints(bool value); + + private: + bool _internal_failed_checkpoints() const; + void _internal_set_failed_checkpoints(bool value); + public: // @@protoc_insertion_point(class_scope:tari.rpc.TipInfoResponse) private: class _Internal; friend class ::google::protobuf::internal::TcParser; static const ::google::protobuf::internal::TcParseTable< - 2, 3, 1, + 2, 4, 1, 0, 2> _table_; friend class ::google::protobuf::MessageLite; @@ -7359,8 +7588,9 @@ class TipInfoResponse final : public ::google::protobuf::Message ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::tari::rpc::MetaData* metadata_; - bool initial_sync_achieved_; int base_node_state_; + bool initial_sync_achieved_; + bool failed_checkpoints_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; @@ -8140,6 +8370,251 @@ class GetNewBlockTemplateWithCoinbasesRequest final : public ::google::protobuf: }; // ------------------------------------------------------------------- +class GetNetworkStateResponse final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:tari.rpc.GetNetworkStateResponse) */ { + public: + inline GetNetworkStateResponse() : GetNetworkStateResponse(nullptr) {} + ~GetNetworkStateResponse() override; + template <typename = void> + explicit PROTOBUF_CONSTEXPR GetNetworkStateResponse( + ::google::protobuf::internal::ConstantInitialized); + + inline GetNetworkStateResponse(const GetNetworkStateResponse& from) : GetNetworkStateResponse(nullptr, from) {} + inline GetNetworkStateResponse(GetNetworkStateResponse&& from) noexcept + : GetNetworkStateResponse(nullptr, std::move(from)) {} + inline GetNetworkStateResponse& operator=(const GetNetworkStateResponse& from) { + CopyFrom(from); + return *this; + } + inline GetNetworkStateResponse& operator=(GetNetworkStateResponse&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetNetworkStateResponse& default_instance() { + return *internal_default_instance(); + } + static inline const GetNetworkStateResponse* internal_default_instance() { + return reinterpret_cast<const GetNetworkStateResponse*>( + &_GetNetworkStateResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = 56; + friend void swap(GetNetworkStateResponse& a, GetNetworkStateResponse& b) { a.Swap(&b); } + inline void Swap(GetNetworkStateResponse* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetNetworkStateResponse* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetNetworkStateResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct<GetNetworkStateResponse>(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const GetNetworkStateResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const GetNetworkStateResponse& from) { GetNetworkStateResponse::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(GetNetworkStateResponse* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "tari.rpc.GetNetworkStateResponse"; } + + protected: + explicit GetNetworkStateResponse(::google::protobuf::Arena* arena); + GetNetworkStateResponse(::google::protobuf::Arena* arena, const GetNetworkStateResponse& from); + GetNetworkStateResponse(::google::protobuf::Arena* arena, GetNetworkStateResponse&& from) noexcept + : GetNetworkStateResponse(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; + + public: + ::google::protobuf::Metadata GetMetadata() const final; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kMetadataFieldNumber = 1, + kBaseNodeStateFieldNumber = 3, + kInitialSyncAchievedFieldNumber = 2, + kFailedCheckpointsFieldNumber = 4, + kRewardFieldNumber = 5, + kSha3XEstimatedHashRateFieldNumber = 6, + kRandomxEstimatedHashRateFieldNumber = 7, + }; + // .tari.rpc.MetaData metadata = 1; + bool has_metadata() const; + void clear_metadata() ; + const ::tari::rpc::MetaData& metadata() const; + PROTOBUF_NODISCARD ::tari::rpc::MetaData* release_metadata(); + ::tari::rpc::MetaData* mutable_metadata(); + void set_allocated_metadata(::tari::rpc::MetaData* value); + void unsafe_arena_set_allocated_metadata(::tari::rpc::MetaData* value); + ::tari::rpc::MetaData* unsafe_arena_release_metadata(); + + private: + const ::tari::rpc::MetaData& _internal_metadata() const; + ::tari::rpc::MetaData* _internal_mutable_metadata(); + + public: + // .tari.rpc.BaseNodeState base_node_state = 3; + void clear_base_node_state() ; + ::tari::rpc::BaseNodeState base_node_state() const; + void set_base_node_state(::tari::rpc::BaseNodeState value); + + private: + ::tari::rpc::BaseNodeState _internal_base_node_state() const; + void _internal_set_base_node_state(::tari::rpc::BaseNodeState value); + + public: + // bool initial_sync_achieved = 2; + void clear_initial_sync_achieved() ; + bool initial_sync_achieved() const; + void set_initial_sync_achieved(bool value); + + private: + bool _internal_initial_sync_achieved() const; + void _internal_set_initial_sync_achieved(bool value); + + public: + // bool failed_checkpoints = 4; + void clear_failed_checkpoints() ; + bool failed_checkpoints() const; + void set_failed_checkpoints(bool value); + + private: + bool _internal_failed_checkpoints() const; + void _internal_set_failed_checkpoints(bool value); + + public: + // uint64 reward = 5; + void clear_reward() ; + ::uint64_t reward() const; + void set_reward(::uint64_t value); + + private: + ::uint64_t _internal_reward() const; + void _internal_set_reward(::uint64_t value); + + public: + // uint64 sha3x_estimated_hash_rate = 6; + void clear_sha3x_estimated_hash_rate() ; + ::uint64_t sha3x_estimated_hash_rate() const; + void set_sha3x_estimated_hash_rate(::uint64_t value); + + private: + ::uint64_t _internal_sha3x_estimated_hash_rate() const; + void _internal_set_sha3x_estimated_hash_rate(::uint64_t value); + + public: + // uint64 randomx_estimated_hash_rate = 7; + void clear_randomx_estimated_hash_rate() ; + ::uint64_t randomx_estimated_hash_rate() const; + void set_randomx_estimated_hash_rate(::uint64_t value); + + private: + ::uint64_t _internal_randomx_estimated_hash_rate() const; + void _internal_set_randomx_estimated_hash_rate(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:tari.rpc.GetNetworkStateResponse) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 7, 1, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template <typename T> + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::tari::rpc::MetaData* metadata_; + int base_node_state_; + bool initial_sync_achieved_; + bool failed_checkpoints_; + ::uint64_t reward_; + ::uint64_t sha3x_estimated_hash_rate_; + ::uint64_t randomx_estimated_hash_rate_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_base_5fnode_2eproto; +}; +// ------------------------------------------------------------------- + class BlockHeaderResponse final : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tari.rpc.BlockHeaderResponse) */ { public: @@ -12745,6 +13220,28 @@ inline void TipInfoResponse::_internal_set_base_node_state(::tari::rpc::BaseNode _impl_.base_node_state_ = value; } +// bool failed_checkpoints = 4; +inline void TipInfoResponse::clear_failed_checkpoints() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.failed_checkpoints_ = false; +} +inline bool TipInfoResponse::failed_checkpoints() const { + // @@protoc_insertion_point(field_get:tari.rpc.TipInfoResponse.failed_checkpoints) + return _internal_failed_checkpoints(); +} +inline void TipInfoResponse::set_failed_checkpoints(bool value) { + _internal_set_failed_checkpoints(value); + // @@protoc_insertion_point(field_set:tari.rpc.TipInfoResponse.failed_checkpoints) +} +inline bool TipInfoResponse::_internal_failed_checkpoints() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.failed_checkpoints_; +} +inline void TipInfoResponse::_internal_set_failed_checkpoints(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.failed_checkpoints_ = value; +} + // ------------------------------------------------------------------- // NewBlockTemplateResponse @@ -13713,6 +14210,130 @@ inline void NetworkDifficultyResponse::_internal_set_randomx_estimated_hash_rate _impl_.randomx_estimated_hash_rate_ = value; } +// uint64 num_coinbases = 8; +inline void NetworkDifficultyResponse::clear_num_coinbases() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.num_coinbases_ = ::uint64_t{0u}; +} +inline ::uint64_t NetworkDifficultyResponse::num_coinbases() const { + // @@protoc_insertion_point(field_get:tari.rpc.NetworkDifficultyResponse.num_coinbases) + return _internal_num_coinbases(); +} +inline void NetworkDifficultyResponse::set_num_coinbases(::uint64_t value) { + _internal_set_num_coinbases(value); + // @@protoc_insertion_point(field_set:tari.rpc.NetworkDifficultyResponse.num_coinbases) +} +inline ::uint64_t NetworkDifficultyResponse::_internal_num_coinbases() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.num_coinbases_; +} +inline void NetworkDifficultyResponse::_internal_set_num_coinbases(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.num_coinbases_ = value; +} + +// repeated bytes coinbase_extras = 9; +inline int NetworkDifficultyResponse::_internal_coinbase_extras_size() const { + return _internal_coinbase_extras().size(); +} +inline int NetworkDifficultyResponse::coinbase_extras_size() const { + return _internal_coinbase_extras_size(); +} +inline void NetworkDifficultyResponse::clear_coinbase_extras() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.coinbase_extras_.Clear(); +} +inline std::string* NetworkDifficultyResponse::add_coinbase_extras() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + std::string* _s = _internal_mutable_coinbase_extras()->Add(); + // @@protoc_insertion_point(field_add_mutable:tari.rpc.NetworkDifficultyResponse.coinbase_extras) + return _s; +} +inline const std::string& NetworkDifficultyResponse::coinbase_extras(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:tari.rpc.NetworkDifficultyResponse.coinbase_extras) + return _internal_coinbase_extras().Get(index); +} +inline std::string* NetworkDifficultyResponse::mutable_coinbase_extras(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:tari.rpc.NetworkDifficultyResponse.coinbase_extras) + return _internal_mutable_coinbase_extras()->Mutable(index); +} +inline void NetworkDifficultyResponse::set_coinbase_extras(int index, const std::string& value) { + _internal_mutable_coinbase_extras()->Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tari.rpc.NetworkDifficultyResponse.coinbase_extras) +} +inline void NetworkDifficultyResponse::set_coinbase_extras(int index, std::string&& value) { + _internal_mutable_coinbase_extras()->Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tari.rpc.NetworkDifficultyResponse.coinbase_extras) +} +inline void NetworkDifficultyResponse::set_coinbase_extras(int index, const char* value) { + ABSL_DCHECK(value != nullptr); + _internal_mutable_coinbase_extras()->Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tari.rpc.NetworkDifficultyResponse.coinbase_extras) +} +inline void NetworkDifficultyResponse::set_coinbase_extras(int index, const void* value, + std::size_t size) { + _internal_mutable_coinbase_extras()->Mutable(index)->assign( + reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_set_pointer:tari.rpc.NetworkDifficultyResponse.coinbase_extras) +} +inline void NetworkDifficultyResponse::set_coinbase_extras(int index, absl::string_view value) { + _internal_mutable_coinbase_extras()->Mutable(index)->assign( + value.data(), value.size()); + // @@protoc_insertion_point(field_set_string_piece:tari.rpc.NetworkDifficultyResponse.coinbase_extras) +} +inline void NetworkDifficultyResponse::add_coinbase_extras(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_coinbase_extras()->Add()->assign(value); + // @@protoc_insertion_point(field_add:tari.rpc.NetworkDifficultyResponse.coinbase_extras) +} +inline void NetworkDifficultyResponse::add_coinbase_extras(std::string&& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_coinbase_extras()->Add(std::move(value)); + // @@protoc_insertion_point(field_add:tari.rpc.NetworkDifficultyResponse.coinbase_extras) +} +inline void NetworkDifficultyResponse::add_coinbase_extras(const char* value) { + ABSL_DCHECK(value != nullptr); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_coinbase_extras()->Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tari.rpc.NetworkDifficultyResponse.coinbase_extras) +} +inline void NetworkDifficultyResponse::add_coinbase_extras(const void* value, std::size_t size) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_coinbase_extras()->Add()->assign( + reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_add_pointer:tari.rpc.NetworkDifficultyResponse.coinbase_extras) +} +inline void NetworkDifficultyResponse::add_coinbase_extras(absl::string_view value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_coinbase_extras()->Add()->assign(value.data(), + value.size()); + // @@protoc_insertion_point(field_add_string_piece:tari.rpc.NetworkDifficultyResponse.coinbase_extras) +} +inline const ::google::protobuf::RepeatedPtrField<std::string>& +NetworkDifficultyResponse::coinbase_extras() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:tari.rpc.NetworkDifficultyResponse.coinbase_extras) + return _internal_coinbase_extras(); +} +inline ::google::protobuf::RepeatedPtrField<std::string>* +NetworkDifficultyResponse::mutable_coinbase_extras() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:tari.rpc.NetworkDifficultyResponse.coinbase_extras) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_coinbase_extras(); +} +inline const ::google::protobuf::RepeatedPtrField<std::string>& +NetworkDifficultyResponse::_internal_coinbase_extras() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.coinbase_extras_; +} +inline ::google::protobuf::RepeatedPtrField<std::string>* +NetworkDifficultyResponse::_internal_mutable_coinbase_extras() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.coinbase_extras_; +} + // ------------------------------------------------------------------- // ValueAtHeightResponse @@ -14625,28 +15246,6 @@ inline void MetaData::set_allocated_best_block_hash(std::string* value) { // @@protoc_insertion_point(field_set_allocated:tari.rpc.MetaData.best_block_hash) } -// uint64 pruned_height = 6; -inline void MetaData::clear_pruned_height() { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_.pruned_height_ = ::uint64_t{0u}; -} -inline ::uint64_t MetaData::pruned_height() const { - // @@protoc_insertion_point(field_get:tari.rpc.MetaData.pruned_height) - return _internal_pruned_height(); -} -inline void MetaData::set_pruned_height(::uint64_t value) { - _internal_set_pruned_height(value); - // @@protoc_insertion_point(field_set:tari.rpc.MetaData.pruned_height) -} -inline ::uint64_t MetaData::_internal_pruned_height() const { - PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.pruned_height_; -} -inline void MetaData::_internal_set_pruned_height(::uint64_t value) { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_.pruned_height_ = value; -} - // bytes accumulated_difficulty = 5; inline void MetaData::clear_accumulated_difficulty() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); @@ -14697,6 +15296,50 @@ inline void MetaData::set_allocated_accumulated_difficulty(std::string* value) { // @@protoc_insertion_point(field_set_allocated:tari.rpc.MetaData.accumulated_difficulty) } +// uint64 pruned_height = 6; +inline void MetaData::clear_pruned_height() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.pruned_height_ = ::uint64_t{0u}; +} +inline ::uint64_t MetaData::pruned_height() const { + // @@protoc_insertion_point(field_get:tari.rpc.MetaData.pruned_height) + return _internal_pruned_height(); +} +inline void MetaData::set_pruned_height(::uint64_t value) { + _internal_set_pruned_height(value); + // @@protoc_insertion_point(field_set:tari.rpc.MetaData.pruned_height) +} +inline ::uint64_t MetaData::_internal_pruned_height() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.pruned_height_; +} +inline void MetaData::_internal_set_pruned_height(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.pruned_height_ = value; +} + +// uint64 timestamp = 7; +inline void MetaData::clear_timestamp() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.timestamp_ = ::uint64_t{0u}; +} +inline ::uint64_t MetaData::timestamp() const { + // @@protoc_insertion_point(field_get:tari.rpc.MetaData.timestamp) + return _internal_timestamp(); +} +inline void MetaData::set_timestamp(::uint64_t value) { + _internal_set_timestamp(value); + // @@protoc_insertion_point(field_set:tari.rpc.MetaData.timestamp) +} +inline ::uint64_t MetaData::_internal_timestamp() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.timestamp_; +} +inline void MetaData::_internal_set_timestamp(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.timestamp_ = value; +} + // ------------------------------------------------------------------- // SyncInfoResponse @@ -14917,6 +15560,78 @@ inline void SyncProgressResponse::_internal_set_state(::tari::rpc::SyncState val _impl_.state_ = value; } +// string short_desc = 4; +inline void SyncProgressResponse::clear_short_desc() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.short_desc_.ClearToEmpty(); +} +inline const std::string& SyncProgressResponse::short_desc() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:tari.rpc.SyncProgressResponse.short_desc) + return _internal_short_desc(); +} +template <typename Arg_, typename... Args_> +inline PROTOBUF_ALWAYS_INLINE void SyncProgressResponse::set_short_desc(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.short_desc_.Set(static_cast<Arg_&&>(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:tari.rpc.SyncProgressResponse.short_desc) +} +inline std::string* SyncProgressResponse::mutable_short_desc() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_short_desc(); + // @@protoc_insertion_point(field_mutable:tari.rpc.SyncProgressResponse.short_desc) + return _s; +} +inline const std::string& SyncProgressResponse::_internal_short_desc() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.short_desc_.Get(); +} +inline void SyncProgressResponse::_internal_set_short_desc(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.short_desc_.Set(value, GetArena()); +} +inline std::string* SyncProgressResponse::_internal_mutable_short_desc() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _impl_.short_desc_.Mutable( GetArena()); +} +inline std::string* SyncProgressResponse::release_short_desc() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:tari.rpc.SyncProgressResponse.short_desc) + return _impl_.short_desc_.Release(); +} +inline void SyncProgressResponse::set_allocated_short_desc(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.short_desc_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.short_desc_.IsDefault()) { + _impl_.short_desc_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tari.rpc.SyncProgressResponse.short_desc) +} + +// uint64 initial_connected_peers = 5; +inline void SyncProgressResponse::clear_initial_connected_peers() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.initial_connected_peers_ = ::uint64_t{0u}; +} +inline ::uint64_t SyncProgressResponse::initial_connected_peers() const { + // @@protoc_insertion_point(field_get:tari.rpc.SyncProgressResponse.initial_connected_peers) + return _internal_initial_connected_peers(); +} +inline void SyncProgressResponse::set_initial_connected_peers(::uint64_t value) { + _internal_set_initial_connected_peers(value); + // @@protoc_insertion_point(field_set:tari.rpc.SyncProgressResponse.initial_connected_peers) +} +inline ::uint64_t SyncProgressResponse::_internal_initial_connected_peers() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.initial_connected_peers_; +} +inline void SyncProgressResponse::_internal_set_initial_connected_peers(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.initial_connected_peers_ = value; +} + // ------------------------------------------------------------------- // GetNewBlockResult @@ -17439,6 +18154,242 @@ GetSideChainUtxosResponse::_internal_mutable_outputs() { return &_impl_.outputs_; } +// ------------------------------------------------------------------- + +// GetNetworkStateRequest + +// ------------------------------------------------------------------- + +// GetNetworkStateResponse + +// .tari.rpc.MetaData metadata = 1; +inline bool GetNetworkStateResponse::has_metadata() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.metadata_ != nullptr); + return value; +} +inline void GetNetworkStateResponse::clear_metadata() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.metadata_ != nullptr) _impl_.metadata_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::tari::rpc::MetaData& GetNetworkStateResponse::_internal_metadata() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + const ::tari::rpc::MetaData* p = _impl_.metadata_; + return p != nullptr ? *p : reinterpret_cast<const ::tari::rpc::MetaData&>(::tari::rpc::_MetaData_default_instance_); +} +inline const ::tari::rpc::MetaData& GetNetworkStateResponse::metadata() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:tari.rpc.GetNetworkStateResponse.metadata) + return _internal_metadata(); +} +inline void GetNetworkStateResponse::unsafe_arena_set_allocated_metadata(::tari::rpc::MetaData* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.metadata_); + } + _impl_.metadata_ = reinterpret_cast<::tari::rpc::MetaData*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tari.rpc.GetNetworkStateResponse.metadata) +} +inline ::tari::rpc::MetaData* GetNetworkStateResponse::release_metadata() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::tari::rpc::MetaData* released = _impl_.metadata_; + _impl_.metadata_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return released; +} +inline ::tari::rpc::MetaData* GetNetworkStateResponse::unsafe_arena_release_metadata() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:tari.rpc.GetNetworkStateResponse.metadata) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::tari::rpc::MetaData* temp = _impl_.metadata_; + _impl_.metadata_ = nullptr; + return temp; +} +inline ::tari::rpc::MetaData* GetNetworkStateResponse::_internal_mutable_metadata() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.metadata_ == nullptr) { + auto* p = ::google::protobuf::Message::DefaultConstruct<::tari::rpc::MetaData>(GetArena()); + _impl_.metadata_ = reinterpret_cast<::tari::rpc::MetaData*>(p); + } + return _impl_.metadata_; +} +inline ::tari::rpc::MetaData* GetNetworkStateResponse::mutable_metadata() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000001u; + ::tari::rpc::MetaData* _msg = _internal_mutable_metadata(); + // @@protoc_insertion_point(field_mutable:tari.rpc.GetNetworkStateResponse.metadata) + return _msg; +} +inline void GetNetworkStateResponse::set_allocated_metadata(::tari::rpc::MetaData* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (message_arena == nullptr) { + delete (_impl_.metadata_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.metadata_ = reinterpret_cast<::tari::rpc::MetaData*>(value); + // @@protoc_insertion_point(field_set_allocated:tari.rpc.GetNetworkStateResponse.metadata) +} + +// bool initial_sync_achieved = 2; +inline void GetNetworkStateResponse::clear_initial_sync_achieved() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.initial_sync_achieved_ = false; +} +inline bool GetNetworkStateResponse::initial_sync_achieved() const { + // @@protoc_insertion_point(field_get:tari.rpc.GetNetworkStateResponse.initial_sync_achieved) + return _internal_initial_sync_achieved(); +} +inline void GetNetworkStateResponse::set_initial_sync_achieved(bool value) { + _internal_set_initial_sync_achieved(value); + // @@protoc_insertion_point(field_set:tari.rpc.GetNetworkStateResponse.initial_sync_achieved) +} +inline bool GetNetworkStateResponse::_internal_initial_sync_achieved() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.initial_sync_achieved_; +} +inline void GetNetworkStateResponse::_internal_set_initial_sync_achieved(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.initial_sync_achieved_ = value; +} + +// .tari.rpc.BaseNodeState base_node_state = 3; +inline void GetNetworkStateResponse::clear_base_node_state() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.base_node_state_ = 0; +} +inline ::tari::rpc::BaseNodeState GetNetworkStateResponse::base_node_state() const { + // @@protoc_insertion_point(field_get:tari.rpc.GetNetworkStateResponse.base_node_state) + return _internal_base_node_state(); +} +inline void GetNetworkStateResponse::set_base_node_state(::tari::rpc::BaseNodeState value) { + _internal_set_base_node_state(value); + // @@protoc_insertion_point(field_set:tari.rpc.GetNetworkStateResponse.base_node_state) +} +inline ::tari::rpc::BaseNodeState GetNetworkStateResponse::_internal_base_node_state() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return static_cast<::tari::rpc::BaseNodeState>(_impl_.base_node_state_); +} +inline void GetNetworkStateResponse::_internal_set_base_node_state(::tari::rpc::BaseNodeState value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.base_node_state_ = value; +} + +// bool failed_checkpoints = 4; +inline void GetNetworkStateResponse::clear_failed_checkpoints() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.failed_checkpoints_ = false; +} +inline bool GetNetworkStateResponse::failed_checkpoints() const { + // @@protoc_insertion_point(field_get:tari.rpc.GetNetworkStateResponse.failed_checkpoints) + return _internal_failed_checkpoints(); +} +inline void GetNetworkStateResponse::set_failed_checkpoints(bool value) { + _internal_set_failed_checkpoints(value); + // @@protoc_insertion_point(field_set:tari.rpc.GetNetworkStateResponse.failed_checkpoints) +} +inline bool GetNetworkStateResponse::_internal_failed_checkpoints() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.failed_checkpoints_; +} +inline void GetNetworkStateResponse::_internal_set_failed_checkpoints(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.failed_checkpoints_ = value; +} + +// uint64 reward = 5; +inline void GetNetworkStateResponse::clear_reward() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.reward_ = ::uint64_t{0u}; +} +inline ::uint64_t GetNetworkStateResponse::reward() const { + // @@protoc_insertion_point(field_get:tari.rpc.GetNetworkStateResponse.reward) + return _internal_reward(); +} +inline void GetNetworkStateResponse::set_reward(::uint64_t value) { + _internal_set_reward(value); + // @@protoc_insertion_point(field_set:tari.rpc.GetNetworkStateResponse.reward) +} +inline ::uint64_t GetNetworkStateResponse::_internal_reward() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.reward_; +} +inline void GetNetworkStateResponse::_internal_set_reward(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.reward_ = value; +} + +// uint64 sha3x_estimated_hash_rate = 6; +inline void GetNetworkStateResponse::clear_sha3x_estimated_hash_rate() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.sha3x_estimated_hash_rate_ = ::uint64_t{0u}; +} +inline ::uint64_t GetNetworkStateResponse::sha3x_estimated_hash_rate() const { + // @@protoc_insertion_point(field_get:tari.rpc.GetNetworkStateResponse.sha3x_estimated_hash_rate) + return _internal_sha3x_estimated_hash_rate(); +} +inline void GetNetworkStateResponse::set_sha3x_estimated_hash_rate(::uint64_t value) { + _internal_set_sha3x_estimated_hash_rate(value); + // @@protoc_insertion_point(field_set:tari.rpc.GetNetworkStateResponse.sha3x_estimated_hash_rate) +} +inline ::uint64_t GetNetworkStateResponse::_internal_sha3x_estimated_hash_rate() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.sha3x_estimated_hash_rate_; +} +inline void GetNetworkStateResponse::_internal_set_sha3x_estimated_hash_rate(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.sha3x_estimated_hash_rate_ = value; +} + +// uint64 randomx_estimated_hash_rate = 7; +inline void GetNetworkStateResponse::clear_randomx_estimated_hash_rate() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.randomx_estimated_hash_rate_ = ::uint64_t{0u}; +} +inline ::uint64_t GetNetworkStateResponse::randomx_estimated_hash_rate() const { + // @@protoc_insertion_point(field_get:tari.rpc.GetNetworkStateResponse.randomx_estimated_hash_rate) + return _internal_randomx_estimated_hash_rate(); +} +inline void GetNetworkStateResponse::set_randomx_estimated_hash_rate(::uint64_t value) { + _internal_set_randomx_estimated_hash_rate(value); + // @@protoc_insertion_point(field_set:tari.rpc.GetNetworkStateResponse.randomx_estimated_hash_rate) +} +inline ::uint64_t GetNetworkStateResponse::_internal_randomx_estimated_hash_rate() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.randomx_estimated_hash_rate_; +} +inline void GetNetworkStateResponse::_internal_set_randomx_estimated_hash_rate(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.randomx_estimated_hash_rate_ = value; +} + #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ diff --git a/external/src/Tari/proto/gRPC/base_node.proto b/external/src/Tari/proto/gRPC/base_node.proto index 84b7f07..a0b21d8 100644 --- a/external/src/Tari/proto/gRPC/base_node.proto +++ b/external/src/Tari/proto/gRPC/base_node.proto @@ -99,6 +99,7 @@ service BaseNode { // Get templates rpc GetTemplateRegistrations(GetTemplateRegistrationsRequest) returns (stream GetTemplateRegistrationResponse); rpc GetSideChainUtxos(GetSideChainUtxosRequest) returns (stream GetSideChainUtxosResponse); + rpc GetNetworkState(GetNetworkStateRequest) returns (GetNetworkStateResponse); } message GetAssetMetadataRequest { @@ -160,6 +161,7 @@ message TipInfoResponse { MetaData metadata = 1; bool initial_sync_achieved = 2; BaseNodeState base_node_state = 3; + bool failed_checkpoints = 4; } enum BaseNodeState{ @@ -217,6 +219,8 @@ message NetworkDifficultyResponse { uint64 pow_algo = 5; uint64 sha3x_estimated_hash_rate = 6; uint64 randomx_estimated_hash_rate = 7; + uint64 num_coinbases = 8; + repeated bytes coinbase_extras = 9; } // A generic single value response for a specific height @@ -339,10 +343,11 @@ message MetaData { uint64 best_block_height = 1; // The block hash of the current tip of the longest valid chain, or `None` for an empty chain bytes best_block_hash = 2; - // This is the min height this node can provide complete blocks for. A 0 here means this node is archival and can provide complete blocks for every height. - uint64 pruned_height = 6; // The current geometric mean of the pow of the chain tip, or `None` if there is no chain bytes accumulated_difficulty = 5; + // This is the min height this node can provide complete blocks for. A 0 here means this node is archival and can provide complete blocks for every height. + uint64 pruned_height = 6; + uint64 timestamp = 7; } message SyncInfoResponse { @@ -355,6 +360,8 @@ message SyncProgressResponse { uint64 tip_height = 1; uint64 local_height = 2; SyncState state = 3; + string short_desc = 4; + uint64 initial_connected_peers = 5; } enum SyncState { @@ -515,3 +522,23 @@ message GetSideChainUtxosResponse { repeated TransactionOutput outputs = 2; } +message GetNetworkStateRequest { +} + +message GetNetworkStateResponse { + // metadata + MetaData metadata = 1; + // has the base node synced + bool initial_sync_achieved = 2; + //current state of the base node + BaseNodeState base_node_state = 3; + // do we have failed checkpoints + bool failed_checkpoints = 4; + // The block reward of the next tip + uint64 reward = 5; + // estimate sha3x hash rate + uint64 sha3x_estimated_hash_rate = 6; + // estimate randomx hash rate + uint64 randomx_estimated_hash_rate = 7; +} + diff --git a/external/src/Tari/proto/gRPC/block.pb.cc b/external/src/Tari/proto/gRPC/block.pb.cc index d623926..ffa5381 100644 --- a/external/src/Tari/proto/gRPC/block.pb.cc +++ b/external/src/Tari/proto/gRPC/block.pb.cc @@ -107,6 +107,9 @@ inline constexpr BlockHeader::Impl_::Impl_( output_mr_( &::google::protobuf::internal::fixed_address_empty_string, ::_pbi::ConstantInitialized()), + block_output_mr_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), kernel_mr_( &::google::protobuf::internal::fixed_address_empty_string, ::_pbi::ConstantInitialized()), @@ -149,7 +152,8 @@ inline constexpr NewBlockTemplate::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept : _cached_size_{0}, header_{nullptr}, - body_{nullptr} {} + body_{nullptr}, + is_mempool_in_sync_{false} {} template <typename> PROTOBUF_CONSTEXPR NewBlockTemplate::NewBlockTemplate(::_pbi::ConstantInitialized) @@ -227,6 +231,7 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.prev_hash_), PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.timestamp_), PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.output_mr_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.block_output_mr_), PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.kernel_mr_), PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.input_mr_), PROTOBUF_FIELD_OFFSET(::tari::rpc::BlockHeader, _impl_.total_kernel_offset_), @@ -247,6 +252,7 @@ const ::uint32_t ~0u, ~0u, ~0u, + ~0u, 0, ~0u, ~0u, @@ -326,19 +332,21 @@ const ::uint32_t ~0u, // no sizeof(Split) PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockTemplate, _impl_.header_), PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockTemplate, _impl_.body_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::NewBlockTemplate, _impl_.is_mempool_in_sync_), 0, 1, + ~0u, }; static const ::_pbi::MigrationSchema schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - {0, 24, -1, sizeof(::tari::rpc::BlockHeader)}, - {40, -1, -1, sizeof(::tari::rpc::ProofOfWork)}, - {50, -1, -1, sizeof(::tari::rpc::PowAlgo)}, - {59, 69, -1, sizeof(::tari::rpc::Block)}, - {71, 81, -1, sizeof(::tari::rpc::HistoricalBlock)}, - {83, 97, -1, sizeof(::tari::rpc::NewBlockHeaderTemplate)}, - {103, 113, -1, sizeof(::tari::rpc::NewBlockTemplate)}, + {0, 25, -1, sizeof(::tari::rpc::BlockHeader)}, + {42, -1, -1, sizeof(::tari::rpc::ProofOfWork)}, + {52, -1, -1, sizeof(::tari::rpc::PowAlgo)}, + {61, 71, -1, sizeof(::tari::rpc::Block)}, + {73, 83, -1, sizeof(::tari::rpc::HistoricalBlock)}, + {85, 99, -1, sizeof(::tari::rpc::NewBlockHeaderTemplate)}, + {105, 116, -1, sizeof(::tari::rpc::NewBlockTemplate)}, }; static const ::_pb::Message* const file_default_instances[] = { &::tari::rpc::_BlockHeader_default_instance_._instance, @@ -352,31 +360,33 @@ static const ::_pb::Message* const file_default_instances[] = { const char descriptor_table_protodef_block_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( protodesc_cold) = { "\n\013block.proto\022\010tari.rpc\032\021transaction.pro" - "to\"\361\002\n\013BlockHeader\022\014\n\004hash\030\001 \001(\014\022\017\n\007vers" + "to\"\212\003\n\013BlockHeader\022\014\n\004hash\030\001 \001(\014\022\017\n\007vers" "ion\030\002 \001(\r\022\016\n\006height\030\003 \001(\004\022\021\n\tprev_hash\030\004" " \001(\014\022\021\n\ttimestamp\030\005 \001(\004\022\021\n\toutput_mr\030\006 \001" - "(\014\022\021\n\tkernel_mr\030\010 \001(\014\022\020\n\010input_mr\030\t \001(\014\022" - "\033\n\023total_kernel_offset\030\n \001(\014\022\r\n\005nonce\030\013 " - "\001(\004\022\"\n\003pow\030\014 \001(\0132\025.tari.rpc.ProofOfWork\022" - "\027\n\017kernel_mmr_size\030\r \001(\004\022\027\n\017output_mmr_s" - "ize\030\016 \001(\004\022\033\n\023total_script_offset\030\017 \001(\014\022\031" - "\n\021validator_node_mr\030\020 \001(\014\022\033\n\023validator_n" - "ode_size\030\021 \001(\004\"1\n\013ProofOfWork\022\020\n\010pow_alg" - "o\030\001 \001(\004\022\020\n\010pow_data\030\004 \001(\014\"o\n\007PowAlgo\022,\n\010" - "pow_algo\030\001 \001(\0162\032.tari.rpc.PowAlgo.PowAlg" - "os\"6\n\010PowAlgos\022\025\n\021POW_ALGOS_RANDOMX\020\000\022\023\n" - "\017POW_ALGOS_SHA3X\020\001\"U\n\005Block\022%\n\006header\030\001 " - "\001(\0132\025.tari.rpc.BlockHeader\022%\n\004body\030\002 \001(\013" - "2\027.tari.rpc.AggregateBody\"H\n\017HistoricalB" - "lock\022\025\n\rconfirmations\030\001 \001(\004\022\036\n\005block\030\002 \001" - "(\0132\017.tari.rpc.Block\"\252\001\n\026NewBlockHeaderTe" - "mplate\022\017\n\007version\030\001 \001(\r\022\016\n\006height\030\002 \001(\004\022" - "\021\n\tprev_hash\030\003 \001(\014\022\033\n\023total_kernel_offse" - "t\030\004 \001(\014\022\"\n\003pow\030\005 \001(\0132\025.tari.rpc.ProofOfW" - "ork\022\033\n\023total_script_offset\030\007 \001(\014\"k\n\020NewB" - "lockTemplate\0220\n\006header\030\001 \001(\0132 .tari.rpc." - "NewBlockHeaderTemplate\022%\n\004body\030\002 \001(\0132\027.t" - "ari.rpc.AggregateBodyb\006proto3" + "(\014\022\027\n\017block_output_mr\030\007 \001(\014\022\021\n\tkernel_mr" + "\030\010 \001(\014\022\020\n\010input_mr\030\t \001(\014\022\033\n\023total_kernel" + "_offset\030\n \001(\014\022\r\n\005nonce\030\013 \001(\004\022\"\n\003pow\030\014 \001(" + "\0132\025.tari.rpc.ProofOfWork\022\027\n\017kernel_mmr_s" + "ize\030\r \001(\004\022\027\n\017output_mmr_size\030\016 \001(\004\022\033\n\023to" + "tal_script_offset\030\017 \001(\014\022\031\n\021validator_nod" + "e_mr\030\020 \001(\014\022\033\n\023validator_node_size\030\021 \001(\004\"" + "1\n\013ProofOfWork\022\020\n\010pow_algo\030\001 \001(\004\022\020\n\010pow_" + "data\030\004 \001(\014\"o\n\007PowAlgo\022,\n\010pow_algo\030\001 \001(\0162" + "\032.tari.rpc.PowAlgo.PowAlgos\"6\n\010PowAlgos\022" + "\025\n\021POW_ALGOS_RANDOMX\020\000\022\023\n\017POW_ALGOS_SHA3" + "X\020\001\"U\n\005Block\022%\n\006header\030\001 \001(\0132\025.tari.rpc." + "BlockHeader\022%\n\004body\030\002 \001(\0132\027.tari.rpc.Agg" + "regateBody\"H\n\017HistoricalBlock\022\025\n\rconfirm" + "ations\030\001 \001(\004\022\036\n\005block\030\002 \001(\0132\017.tari.rpc.B" + "lock\"\252\001\n\026NewBlockHeaderTemplate\022\017\n\007versi" + "on\030\001 \001(\r\022\016\n\006height\030\002 \001(\004\022\021\n\tprev_hash\030\003 " + "\001(\014\022\033\n\023total_kernel_offset\030\004 \001(\014\022\"\n\003pow\030" + "\005 \001(\0132\025.tari.rpc.ProofOfWork\022\033\n\023total_sc" + "ript_offset\030\007 \001(\014\"\207\001\n\020NewBlockTemplate\0220" + "\n\006header\030\001 \001(\0132 .tari.rpc.NewBlockHeader" + "Template\022%\n\004body\030\002 \001(\0132\027.tari.rpc.Aggreg" + "ateBody\022\032\n\022is_mempool_in_sync\030\003 \001(\010b\006pro" + "to3" }; static const ::_pbi::DescriptorTable* const descriptor_table_block_2eproto_deps[1] = { @@ -386,7 +396,7 @@ static ::absl::once_flag descriptor_table_block_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_block_2eproto = { false, false, - 1029, + 1083, descriptor_table_protodef_block_2eproto, "block.proto", &descriptor_table_block_2eproto_once, @@ -459,6 +469,7 @@ inline PROTOBUF_NDEBUG_INLINE BlockHeader::Impl_::Impl_( hash_(arena, from.hash_), prev_hash_(arena, from.prev_hash_), output_mr_(arena, from.output_mr_), + block_output_mr_(arena, from.block_output_mr_), kernel_mr_(arena, from.kernel_mr_), input_mr_(arena, from.input_mr_), total_kernel_offset_(arena, from.total_kernel_offset_), @@ -495,6 +506,7 @@ inline PROTOBUF_NDEBUG_INLINE BlockHeader::Impl_::Impl_( hash_(arena), prev_hash_(arena), output_mr_(arena), + block_output_mr_(arena), kernel_mr_(arena), input_mr_(arena), total_kernel_offset_(arena), @@ -520,6 +532,7 @@ inline void BlockHeader::SharedDtor() { _impl_.hash_.Destroy(); _impl_.prev_hash_.Destroy(); _impl_.output_mr_.Destroy(); + _impl_.block_output_mr_.Destroy(); _impl_.kernel_mr_.Destroy(); _impl_.input_mr_.Destroy(); _impl_.total_kernel_offset_.Destroy(); @@ -553,6 +566,7 @@ PROTOBUF_NOINLINE void BlockHeader::Clear() { _impl_.hash_.ClearToEmpty(); _impl_.prev_hash_.ClearToEmpty(); _impl_.output_mr_.ClearToEmpty(); + _impl_.block_output_mr_.ClearToEmpty(); _impl_.kernel_mr_.ClearToEmpty(); _impl_.input_mr_.ClearToEmpty(); _impl_.total_kernel_offset_.ClearToEmpty(); @@ -578,15 +592,15 @@ const char* BlockHeader::_InternalParse( PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<5, 16, 1, 0, 2> BlockHeader::_table_ = { +const ::_pbi::TcParseTable<5, 17, 1, 0, 2> BlockHeader::_table_ = { { PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_._has_bits_), 0, // no _extensions_ 17, 248, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294836288, // skipmap + 4294836224, // skipmap offsetof(decltype(_table_), field_entries), - 16, // num_field_entries + 17, // num_field_entries 1, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_BlockHeader_default_instance_._instance, @@ -614,7 +628,9 @@ const ::_pbi::TcParseTable<5, 16, 1, 0, 2> BlockHeader::_table_ = { // bytes output_mr = 6; {::_pbi::TcParser::FastBS1, {50, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.output_mr_)}}, - {::_pbi::TcParser::MiniParse, {}}, + // bytes block_output_mr = 7; + {::_pbi::TcParser::FastBS1, + {58, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.block_output_mr_)}}, // bytes kernel_mr = 8; {::_pbi::TcParser::FastBS1, {66, 63, 0, PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.kernel_mr_)}}, @@ -680,6 +696,9 @@ const ::_pbi::TcParseTable<5, 16, 1, 0, 2> BlockHeader::_table_ = { // bytes output_mr = 6; {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.output_mr_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // bytes block_output_mr = 7; + {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.block_output_mr_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, // bytes kernel_mr = 8; {PROTOBUF_FIELD_OFFSET(BlockHeader, _impl_.kernel_mr_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, @@ -762,6 +781,12 @@ const ::_pbi::TcParseTable<5, 16, 1, 0, 2> BlockHeader::_table_ = { target = stream->WriteBytesMaybeAliased(6, _s, target); } + // bytes block_output_mr = 7; + if (!this->_internal_block_output_mr().empty()) { + const std::string& _s = this->_internal_block_output_mr(); + target = stream->WriteBytesMaybeAliased(7, _s, target); + } + // bytes kernel_mr = 8; if (!this->_internal_kernel_mr().empty()) { const std::string& _s = this->_internal_kernel_mr(); @@ -862,6 +887,12 @@ const ::_pbi::TcParseTable<5, 16, 1, 0, 2> BlockHeader::_table_ = { this->_internal_output_mr()); } + // bytes block_output_mr = 7; + if (!this->_internal_block_output_mr().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_block_output_mr()); + } + // bytes kernel_mr = 8; if (!this->_internal_kernel_mr().empty()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( @@ -963,6 +994,9 @@ void BlockHeader::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::goo if (!from._internal_output_mr().empty()) { _this->_internal_set_output_mr(from._internal_output_mr()); } + if (!from._internal_block_output_mr().empty()) { + _this->_internal_set_block_output_mr(from._internal_block_output_mr()); + } if (!from._internal_kernel_mr().empty()) { _this->_internal_set_kernel_mr(from._internal_kernel_mr()); } @@ -1033,6 +1067,7 @@ void BlockHeader::InternalSwap(BlockHeader* PROTOBUF_RESTRICT other) { ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.hash_, &other->_impl_.hash_, arena); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.prev_hash_, &other->_impl_.prev_hash_, arena); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.output_mr_, &other->_impl_.output_mr_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.block_output_mr_, &other->_impl_.block_output_mr_, arena); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.kernel_mr_, &other->_impl_.kernel_mr_, arena); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.input_mr_, &other->_impl_.input_mr_, arena); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.total_kernel_offset_, &other->_impl_.total_kernel_offset_, arena); @@ -2366,6 +2401,7 @@ NewBlockTemplate::NewBlockTemplate( _impl_.body_ = (cached_has_bits & 0x00000002u) ? ::google::protobuf::Message::CopyConstruct<::tari::rpc::AggregateBody>( arena, *from._impl_.body_) : nullptr; + _impl_.is_mempool_in_sync_ = from._impl_.is_mempool_in_sync_; // @@protoc_insertion_point(copy_constructor:tari.rpc.NewBlockTemplate) } @@ -2379,9 +2415,9 @@ inline void NewBlockTemplate::SharedCtor(::_pb::Arena* arena) { ::memset(reinterpret_cast<char *>(&_impl_) + offsetof(Impl_, header_), 0, - offsetof(Impl_, body_) - + offsetof(Impl_, is_mempool_in_sync_) - offsetof(Impl_, header_) + - sizeof(Impl_::body_)); + sizeof(Impl_::is_mempool_in_sync_)); } NewBlockTemplate::~NewBlockTemplate() { // @@protoc_insertion_point(destructor:tari.rpc.NewBlockTemplate) @@ -2427,6 +2463,7 @@ PROTOBUF_NOINLINE void NewBlockTemplate::Clear() { _impl_.body_->Clear(); } } + _impl_.is_mempool_in_sync_ = false; _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } @@ -2439,15 +2476,15 @@ const char* NewBlockTemplate::_InternalParse( PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 2, 0, 2> NewBlockTemplate::_table_ = { +const ::_pbi::TcParseTable<2, 3, 2, 0, 2> NewBlockTemplate::_table_ = { { PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_._has_bits_), 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask + 3, 24, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap + 4294967288, // skipmap offsetof(decltype(_table_), field_entries), - 2, // num_field_entries + 3, // num_field_entries 2, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_NewBlockTemplate_default_instance_._instance, @@ -2456,12 +2493,16 @@ const ::_pbi::TcParseTable<1, 2, 2, 0, 2> NewBlockTemplate::_table_ = { ::_pbi::TcParser::GetTable<::tari::rpc::NewBlockTemplate>(), // to_prefetch #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ - // .tari.rpc.AggregateBody body = 2; - {::_pbi::TcParser::FastMtS1, - {18, 1, 1, PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.body_)}}, + {::_pbi::TcParser::MiniParse, {}}, // .tari.rpc.NewBlockHeaderTemplate header = 1; {::_pbi::TcParser::FastMtS1, {10, 0, 0, PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.header_)}}, + // .tari.rpc.AggregateBody body = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 1, PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.body_)}}, + // bool is_mempool_in_sync = 3; + {::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(NewBlockTemplate, _impl_.is_mempool_in_sync_), 63>(), + {24, 63, 0, PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.is_mempool_in_sync_)}}, }}, {{ 65535, 65535 }}, {{ @@ -2471,6 +2512,9 @@ const ::_pbi::TcParseTable<1, 2, 2, 0, 2> NewBlockTemplate::_table_ = { // .tari.rpc.AggregateBody body = 2; {PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.body_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bool is_mempool_in_sync = 3; + {PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.is_mempool_in_sync_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, }}, {{ {::_pbi::TcParser::GetTable<::tari::rpc::NewBlockHeaderTemplate>()}, {::_pbi::TcParser::GetTable<::tari::rpc::AggregateBody>()}, @@ -2498,6 +2542,13 @@ const ::_pbi::TcParseTable<1, 2, 2, 0, 2> NewBlockTemplate::_table_ = { 2, *_impl_.body_, _impl_.body_->GetCachedSize(), target, stream); } + // bool is_mempool_in_sync = 3; + if (this->_internal_is_mempool_in_sync() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 3, this->_internal_is_mempool_in_sync(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -2530,6 +2581,11 @@ const ::_pbi::TcParseTable<1, 2, 2, 0, 2> NewBlockTemplate::_table_ = { } } + // bool is_mempool_in_sync = 3; + if (this->_internal_is_mempool_in_sync() != 0) { + total_size += 2; + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -2564,6 +2620,9 @@ void NewBlockTemplate::MergeImpl(::google::protobuf::MessageLite& to_msg, const } } } + if (from._internal_is_mempool_in_sync() != 0) { + _this->_impl_.is_mempool_in_sync_ = from._impl_.is_mempool_in_sync_; + } _this->_impl_._has_bits_[0] |= cached_has_bits; _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } @@ -2584,8 +2643,8 @@ void NewBlockTemplate::InternalSwap(NewBlockTemplate* PROTOBUF_RESTRICT other) { _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.body_) - + sizeof(NewBlockTemplate::_impl_.body_) + PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.is_mempool_in_sync_) + + sizeof(NewBlockTemplate::_impl_.is_mempool_in_sync_) - PROTOBUF_FIELD_OFFSET(NewBlockTemplate, _impl_.header_)>( reinterpret_cast<char*>(&_impl_.header_), reinterpret_cast<char*>(&other->_impl_.header_)); diff --git a/external/src/Tari/proto/gRPC/block.pb.h b/external/src/Tari/proto/gRPC/block.pb.h index eb542e4..4fba76b 100644 --- a/external/src/Tari/proto/gRPC/block.pb.h +++ b/external/src/Tari/proto/gRPC/block.pb.h @@ -872,6 +872,7 @@ class BlockHeader final : public ::google::protobuf::Message kHashFieldNumber = 1, kPrevHashFieldNumber = 4, kOutputMrFieldNumber = 6, + kBlockOutputMrFieldNumber = 7, kKernelMrFieldNumber = 8, kInputMrFieldNumber = 9, kTotalKernelOffsetFieldNumber = 10, @@ -933,6 +934,22 @@ class BlockHeader final : public ::google::protobuf::Message const std::string& value); std::string* _internal_mutable_output_mr(); + public: + // bytes block_output_mr = 7; + void clear_block_output_mr() ; + const std::string& block_output_mr() const; + template <typename Arg_ = const std::string&, typename... Args_> + void set_block_output_mr(Arg_&& arg, Args_... args); + std::string* mutable_block_output_mr(); + PROTOBUF_NODISCARD std::string* release_block_output_mr(); + void set_allocated_block_output_mr(std::string* value); + + private: + const std::string& _internal_block_output_mr() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_block_output_mr( + const std::string& value); + std::string* _internal_mutable_block_output_mr(); + public: // bytes kernel_mr = 8; void clear_kernel_mr() ; @@ -1104,7 +1121,7 @@ class BlockHeader final : public ::google::protobuf::Message class _Internal; friend class ::google::protobuf::internal::TcParser; static const ::google::protobuf::internal::TcParseTable< - 5, 16, 1, + 5, 17, 1, 0, 2> _table_; friend class ::google::protobuf::MessageLite; @@ -1125,6 +1142,7 @@ class BlockHeader final : public ::google::protobuf::Message ::google::protobuf::internal::ArenaStringPtr hash_; ::google::protobuf::internal::ArenaStringPtr prev_hash_; ::google::protobuf::internal::ArenaStringPtr output_mr_; + ::google::protobuf::internal::ArenaStringPtr block_output_mr_; ::google::protobuf::internal::ArenaStringPtr kernel_mr_; ::google::protobuf::internal::ArenaStringPtr input_mr_; ::google::protobuf::internal::ArenaStringPtr total_kernel_offset_; @@ -1272,6 +1290,7 @@ class NewBlockTemplate final : public ::google::protobuf::Message enum : int { kHeaderFieldNumber = 1, kBodyFieldNumber = 2, + kIsMempoolInSyncFieldNumber = 3, }; // .tari.rpc.NewBlockHeaderTemplate header = 1; bool has_header() const; @@ -1302,13 +1321,23 @@ class NewBlockTemplate final : public ::google::protobuf::Message const ::tari::rpc::AggregateBody& _internal_body() const; ::tari::rpc::AggregateBody* _internal_mutable_body(); + public: + // bool is_mempool_in_sync = 3; + void clear_is_mempool_in_sync() ; + bool is_mempool_in_sync() const; + void set_is_mempool_in_sync(bool value); + + private: + bool _internal_is_mempool_in_sync() const; + void _internal_set_is_mempool_in_sync(bool value); + public: // @@protoc_insertion_point(class_scope:tari.rpc.NewBlockTemplate) private: class _Internal; friend class ::google::protobuf::internal::TcParser; static const ::google::protobuf::internal::TcParseTable< - 1, 2, 2, + 2, 3, 2, 0, 2> _table_; friend class ::google::protobuf::MessageLite; @@ -1328,6 +1357,7 @@ class NewBlockTemplate final : public ::google::protobuf::Message mutable ::google::protobuf::internal::CachedSize _cached_size_; ::tari::rpc::NewBlockHeaderTemplate* header_; ::tari::rpc::AggregateBody* body_; + bool is_mempool_in_sync_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; @@ -1941,6 +1971,56 @@ inline void BlockHeader::set_allocated_output_mr(std::string* value) { // @@protoc_insertion_point(field_set_allocated:tari.rpc.BlockHeader.output_mr) } +// bytes block_output_mr = 7; +inline void BlockHeader::clear_block_output_mr() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.block_output_mr_.ClearToEmpty(); +} +inline const std::string& BlockHeader::block_output_mr() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:tari.rpc.BlockHeader.block_output_mr) + return _internal_block_output_mr(); +} +template <typename Arg_, typename... Args_> +inline PROTOBUF_ALWAYS_INLINE void BlockHeader::set_block_output_mr(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.block_output_mr_.SetBytes(static_cast<Arg_&&>(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:tari.rpc.BlockHeader.block_output_mr) +} +inline std::string* BlockHeader::mutable_block_output_mr() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_block_output_mr(); + // @@protoc_insertion_point(field_mutable:tari.rpc.BlockHeader.block_output_mr) + return _s; +} +inline const std::string& BlockHeader::_internal_block_output_mr() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.block_output_mr_.Get(); +} +inline void BlockHeader::_internal_set_block_output_mr(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.block_output_mr_.Set(value, GetArena()); +} +inline std::string* BlockHeader::_internal_mutable_block_output_mr() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _impl_.block_output_mr_.Mutable( GetArena()); +} +inline std::string* BlockHeader::release_block_output_mr() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:tari.rpc.BlockHeader.block_output_mr) + return _impl_.block_output_mr_.Release(); +} +inline void BlockHeader::set_allocated_block_output_mr(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.block_output_mr_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.block_output_mr_.IsDefault()) { + _impl_.block_output_mr_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tari.rpc.BlockHeader.block_output_mr) +} + // bytes kernel_mr = 8; inline void BlockHeader::clear_kernel_mr() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); @@ -3275,6 +3355,28 @@ inline void NewBlockTemplate::set_allocated_body(::tari::rpc::AggregateBody* val // @@protoc_insertion_point(field_set_allocated:tari.rpc.NewBlockTemplate.body) } +// bool is_mempool_in_sync = 3; +inline void NewBlockTemplate::clear_is_mempool_in_sync() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.is_mempool_in_sync_ = false; +} +inline bool NewBlockTemplate::is_mempool_in_sync() const { + // @@protoc_insertion_point(field_get:tari.rpc.NewBlockTemplate.is_mempool_in_sync) + return _internal_is_mempool_in_sync(); +} +inline void NewBlockTemplate::set_is_mempool_in_sync(bool value) { + _internal_set_is_mempool_in_sync(value); + // @@protoc_insertion_point(field_set:tari.rpc.NewBlockTemplate.is_mempool_in_sync) +} +inline bool NewBlockTemplate::_internal_is_mempool_in_sync() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.is_mempool_in_sync_; +} +inline void NewBlockTemplate::_internal_set_is_mempool_in_sync(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.is_mempool_in_sync_ = value; +} + #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ diff --git a/external/src/Tari/proto/gRPC/block.proto b/external/src/Tari/proto/gRPC/block.proto index f5ed70c..e5968c0 100644 --- a/external/src/Tari/proto/gRPC/block.proto +++ b/external/src/Tari/proto/gRPC/block.proto @@ -38,9 +38,10 @@ message BlockHeader { bytes prev_hash = 4; // Timestamp at which the block was built. uint64 timestamp = 5; - // This is the UTXO merkle root of the outputs - // This is calculated as Hash (txo MMR root || roaring bitmap hash of UTXO indices) + // This is the UTXO merkle root of the outputs in the blockchain bytes output_mr = 6; + // This is the merkle root of all outputs in this block + bytes block_output_mr = 7; // This is the MMR root of the kernels bytes kernel_mr = 8; // This is the Merkle root of the inputs in this block @@ -133,5 +134,8 @@ message NewBlockTemplate { // This flag indicates if the inputs, outputs and kernels have been sorted internally, that is, the sort() method // has been called. This may be false even if all components are sorted. AggregateBody body = 2; + // Sometimes the mempool has not synced to the latest tip, this flag indicates if the mempool is out of sync. + // In most cases the next call to get_new_block_template will return a block with the mempool in sync. + bool is_mempool_in_sync = 3; } diff --git a/external/src/Tari/proto/gRPC/transaction.pb.cc b/external/src/Tari/proto/gRPC/transaction.pb.cc index 0c47e42..d6a1938 100644 --- a/external/src/Tari/proto/gRPC/transaction.pb.cc +++ b/external/src/Tari/proto/gRPC/transaction.pb.cc @@ -108,6 +108,7 @@ inline constexpr UnblindedOutput::Impl_::Impl_( ::_pbi::ConstantInitialized()), features_{nullptr}, metadata_signature_{nullptr}, + range_proof_{nullptr}, value_{::uint64_t{0u}}, script_lock_height_{::uint64_t{0u}}, minimum_value_promise_{::uint64_t{0u}} {} @@ -427,6 +428,7 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::tari::rpc::UnblindedOutput, _impl_.covenant_), PROTOBUF_FIELD_OFFSET(::tari::rpc::UnblindedOutput, _impl_.encrypted_data_), PROTOBUF_FIELD_OFFSET(::tari::rpc::UnblindedOutput, _impl_.minimum_value_promise_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::UnblindedOutput, _impl_.range_proof_), ~0u, ~0u, 0, @@ -439,6 +441,7 @@ const ::uint32_t ~0u, ~0u, ~0u, + 2, }; static const ::_pbi::MigrationSchema @@ -449,7 +452,7 @@ static const ::_pbi::MigrationSchema {90, 104, -1, sizeof(::tari::rpc::OutputFeatures)}, {110, -1, -1, sizeof(::tari::rpc::AggregateBody)}, {121, 132, -1, sizeof(::tari::rpc::Transaction)}, - {135, 155, -1, sizeof(::tari::rpc::UnblindedOutput)}, + {135, 156, -1, sizeof(::tari::rpc::UnblindedOutput)}, }; static const ::_pb::Message* const file_default_instances[] = { &::tari::rpc::_TransactionKernel_default_instance_._instance, @@ -498,7 +501,7 @@ const char descriptor_table_protodef_transaction_2eproto[] ABSL_ATTRIBUTE_SECTIO "tari.rpc.TransactionKernel\"[\n\013Transactio" "n\022\016\n\006offset\030\001 \001(\014\022%\n\004body\030\002 \001(\0132\027.tari.r" "pc.AggregateBody\022\025\n\rscript_offset\030\003 \001(\014\"" - "\343\002\n\017UnblindedOutput\022\r\n\005value\030\001 \001(\004\022\024\n\014sp" + "\216\003\n\017UnblindedOutput\022\r\n\005value\030\001 \001(\004\022\024\n\014sp" "ending_key\030\002 \001(\014\022*\n\010features\030\003 \001(\0132\030.tar" "i.rpc.OutputFeatures\022\016\n\006script\030\004 \001(\014\022\022\n\n" "input_data\030\005 \001(\014\022\032\n\022script_private_key\030\007" @@ -506,8 +509,9 @@ const char descriptor_table_protodef_transaction_2eproto[] ABSL_ATTRIBUTE_SECTIO "\n\022metadata_signature\030\t \001(\0132\034.tari.rpc.Co" "mAndPubSignature\022\032\n\022script_lock_height\030\n" " \001(\004\022\020\n\010covenant\030\013 \001(\014\022\026\n\016encrypted_data" - "\030\014 \001(\014\022\035\n\025minimum_value_promise\030\r \001(\004b\006p" - "roto3" + "\030\014 \001(\014\022\035\n\025minimum_value_promise\030\r \001(\004\022)\n" + "\013range_proof\030\016 \001(\0132\024.tari.rpc.RangeProof" + "b\006proto3" }; static const ::_pbi::DescriptorTable* const descriptor_table_transaction_2eproto_deps[2] = { @@ -518,7 +522,7 @@ static ::absl::once_flag descriptor_table_transaction_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_transaction_2eproto = { false, false, - 1805, + 1848, descriptor_table_protodef_transaction_2eproto, "transaction.proto", &descriptor_table_transaction_2eproto_once, @@ -2988,6 +2992,11 @@ void UnblindedOutput::clear_metadata_signature() { if (_impl_.metadata_signature_ != nullptr) _impl_.metadata_signature_->Clear(); _impl_._has_bits_[0] &= ~0x00000002u; } +void UnblindedOutput::clear_range_proof() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.range_proof_ != nullptr) _impl_.range_proof_->Clear(); + _impl_._has_bits_[0] &= ~0x00000004u; +} UnblindedOutput::UnblindedOutput(::google::protobuf::Arena* arena) : ::google::protobuf::Message(arena) { SharedCtor(arena); @@ -3022,6 +3031,9 @@ UnblindedOutput::UnblindedOutput( _impl_.metadata_signature_ = (cached_has_bits & 0x00000002u) ? ::google::protobuf::Message::CopyConstruct<::tari::rpc::ComAndPubSignature>( arena, *from._impl_.metadata_signature_) : nullptr; + _impl_.range_proof_ = (cached_has_bits & 0x00000004u) ? ::google::protobuf::Message::CopyConstruct<::tari::rpc::RangeProof>( + arena, *from._impl_.range_proof_) + : nullptr; ::memcpy(reinterpret_cast<char *>(&_impl_) + offsetof(Impl_, value_), reinterpret_cast<const char *>(&from._impl_) + @@ -3069,6 +3081,7 @@ inline void UnblindedOutput::SharedDtor() { _impl_.encrypted_data_.Destroy(); delete _impl_.features_; delete _impl_.metadata_signature_; + delete _impl_.range_proof_; _impl_.~Impl_(); } @@ -3101,7 +3114,7 @@ PROTOBUF_NOINLINE void UnblindedOutput::Clear() { _impl_.covenant_.ClearToEmpty(); _impl_.encrypted_data_.ClearToEmpty(); cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000007u) { if (cached_has_bits & 0x00000001u) { ABSL_DCHECK(_impl_.features_ != nullptr); _impl_.features_->Clear(); @@ -3110,6 +3123,10 @@ PROTOBUF_NOINLINE void UnblindedOutput::Clear() { ABSL_DCHECK(_impl_.metadata_signature_ != nullptr); _impl_.metadata_signature_->Clear(); } + if (cached_has_bits & 0x00000004u) { + ABSL_DCHECK(_impl_.range_proof_ != nullptr); + _impl_.range_proof_->Clear(); + } } ::memset(&_impl_.value_, 0, static_cast<::size_t>( reinterpret_cast<char*>(&_impl_.minimum_value_promise_) - @@ -3126,16 +3143,16 @@ const char* UnblindedOutput::_InternalParse( PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<4, 12, 2, 0, 2> UnblindedOutput::_table_ = { +const ::_pbi::TcParseTable<4, 13, 3, 0, 2> UnblindedOutput::_table_ = { { PROTOBUF_FIELD_OFFSET(UnblindedOutput, _impl_._has_bits_), 0, // no _extensions_ - 13, 120, // max_field_number, fast_idx_mask + 14, 120, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294959136, // skipmap + 4294950944, // skipmap offsetof(decltype(_table_), field_entries), - 12, // num_field_entries - 2, // num_aux_entries + 13, // num_field_entries + 3, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_UnblindedOutput_default_instance_._instance, ::_pbi::TcParser::GenericFallback, // fallback @@ -3181,7 +3198,9 @@ const ::_pbi::TcParseTable<4, 12, 2, 0, 2> UnblindedOutput::_table_ = { // uint64 minimum_value_promise = 13; {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(UnblindedOutput, _impl_.minimum_value_promise_), 63>(), {104, 63, 0, PROTOBUF_FIELD_OFFSET(UnblindedOutput, _impl_.minimum_value_promise_)}}, - {::_pbi::TcParser::MiniParse, {}}, + // .tari.rpc.RangeProof range_proof = 14; + {::_pbi::TcParser::FastMtS1, + {114, 2, 2, PROTOBUF_FIELD_OFFSET(UnblindedOutput, _impl_.range_proof_)}}, {::_pbi::TcParser::MiniParse, {}}, }}, {{ 65535, 65535 @@ -3222,9 +3241,13 @@ const ::_pbi::TcParseTable<4, 12, 2, 0, 2> UnblindedOutput::_table_ = { // uint64 minimum_value_promise = 13; {PROTOBUF_FIELD_OFFSET(UnblindedOutput, _impl_.minimum_value_promise_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // .tari.rpc.RangeProof range_proof = 14; + {PROTOBUF_FIELD_OFFSET(UnblindedOutput, _impl_.range_proof_), _Internal::kHasBitsOffset + 2, 2, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, }}, {{ {::_pbi::TcParser::GetTable<::tari::rpc::OutputFeatures>()}, {::_pbi::TcParser::GetTable<::tari::rpc::ComAndPubSignature>()}, + {::_pbi::TcParser::GetTable<::tari::rpc::RangeProof>()}, }}, {{ }}, }; @@ -3312,6 +3335,12 @@ const ::_pbi::TcParseTable<4, 12, 2, 0, 2> UnblindedOutput::_table_ = { 13, this->_internal_minimum_value_promise(), target); } + // .tari.rpc.RangeProof range_proof = 14; + if (cached_has_bits & 0x00000004u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 14, *_impl_.range_proof_, _impl_.range_proof_->GetCachedSize(), target, stream); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -3372,7 +3401,7 @@ const ::_pbi::TcParseTable<4, 12, 2, 0, 2> UnblindedOutput::_table_ = { } cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000007u) { // .tari.rpc.OutputFeatures features = 3; if (cached_has_bits & 0x00000001u) { total_size += @@ -3385,6 +3414,12 @@ const ::_pbi::TcParseTable<4, 12, 2, 0, 2> UnblindedOutput::_table_ = { 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.metadata_signature_); } + // .tari.rpc.RangeProof range_proof = 14; + if (cached_has_bits & 0x00000004u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.range_proof_); + } + } // uint64 value = 1; if (this->_internal_value() != 0) { @@ -3439,7 +3474,7 @@ void UnblindedOutput::MergeImpl(::google::protobuf::MessageLite& to_msg, const : _this->_internal_set_encrypted_data(from._internal_encrypted_data()); } cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000007u) { if (cached_has_bits & 0x00000001u) { ABSL_DCHECK(from._impl_.features_ != nullptr); if (_this->_impl_.features_ == nullptr) { @@ -3458,6 +3493,15 @@ void UnblindedOutput::MergeImpl(::google::protobuf::MessageLite& to_msg, const : _this->_impl_.metadata_signature_->MergeFrom(*from._impl_.metadata_signature_); } } + if (cached_has_bits & 0x00000004u) { + ABSL_DCHECK(from._impl_.range_proof_ != nullptr); + if (_this->_impl_.range_proof_ == nullptr) { + _this->_impl_.range_proof_ = + ::google::protobuf::Message::CopyConstruct<::tari::rpc::RangeProof>(arena, *from._impl_.range_proof_); + } else { + _this->_impl_.range_proof_->MergeFrom(*from._impl_.range_proof_); + } + } } if (from._internal_value() != 0) { _this->_impl_.value_ = from._impl_.value_; diff --git a/external/src/Tari/proto/gRPC/transaction.pb.h b/external/src/Tari/proto/gRPC/transaction.pb.h index 20ac1f4..f4a61c3 100644 --- a/external/src/Tari/proto/gRPC/transaction.pb.h +++ b/external/src/Tari/proto/gRPC/transaction.pb.h @@ -737,6 +737,7 @@ class UnblindedOutput final : public ::google::protobuf::Message kEncryptedDataFieldNumber = 12, kFeaturesFieldNumber = 3, kMetadataSignatureFieldNumber = 9, + kRangeProofFieldNumber = 14, kValueFieldNumber = 1, kScriptLockHeightFieldNumber = 10, kMinimumValuePromiseFieldNumber = 13, @@ -882,6 +883,21 @@ class UnblindedOutput final : public ::google::protobuf::Message const ::tari::rpc::ComAndPubSignature& _internal_metadata_signature() const; ::tari::rpc::ComAndPubSignature* _internal_mutable_metadata_signature(); + public: + // .tari.rpc.RangeProof range_proof = 14; + bool has_range_proof() const; + void clear_range_proof() ; + const ::tari::rpc::RangeProof& range_proof() const; + PROTOBUF_NODISCARD ::tari::rpc::RangeProof* release_range_proof(); + ::tari::rpc::RangeProof* mutable_range_proof(); + void set_allocated_range_proof(::tari::rpc::RangeProof* value); + void unsafe_arena_set_allocated_range_proof(::tari::rpc::RangeProof* value); + ::tari::rpc::RangeProof* unsafe_arena_release_range_proof(); + + private: + const ::tari::rpc::RangeProof& _internal_range_proof() const; + ::tari::rpc::RangeProof* _internal_mutable_range_proof(); + public: // uint64 value = 1; void clear_value() ; @@ -918,7 +934,7 @@ class UnblindedOutput final : public ::google::protobuf::Message class _Internal; friend class ::google::protobuf::internal::TcParser; static const ::google::protobuf::internal::TcParseTable< - 4, 12, 2, + 4, 13, 3, 0, 2> _table_; friend class ::google::protobuf::MessageLite; @@ -945,6 +961,7 @@ class UnblindedOutput final : public ::google::protobuf::Message ::google::protobuf::internal::ArenaStringPtr encrypted_data_; ::tari::rpc::OutputFeatures* features_; ::tari::rpc::ComAndPubSignature* metadata_signature_; + ::tari::rpc::RangeProof* range_proof_; ::uint64_t value_; ::uint64_t script_lock_height_; ::uint64_t minimum_value_promise_; @@ -5045,6 +5062,97 @@ inline void UnblindedOutput::_internal_set_minimum_value_promise(::uint64_t valu _impl_.minimum_value_promise_ = value; } +// .tari.rpc.RangeProof range_proof = 14; +inline bool UnblindedOutput::has_range_proof() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || _impl_.range_proof_ != nullptr); + return value; +} +inline const ::tari::rpc::RangeProof& UnblindedOutput::_internal_range_proof() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + const ::tari::rpc::RangeProof* p = _impl_.range_proof_; + return p != nullptr ? *p : reinterpret_cast<const ::tari::rpc::RangeProof&>(::tari::rpc::_RangeProof_default_instance_); +} +inline const ::tari::rpc::RangeProof& UnblindedOutput::range_proof() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:tari.rpc.UnblindedOutput.range_proof) + return _internal_range_proof(); +} +inline void UnblindedOutput::unsafe_arena_set_allocated_range_proof(::tari::rpc::RangeProof* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.range_proof_); + } + _impl_.range_proof_ = reinterpret_cast<::tari::rpc::RangeProof*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tari.rpc.UnblindedOutput.range_proof) +} +inline ::tari::rpc::RangeProof* UnblindedOutput::release_range_proof() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000004u; + ::tari::rpc::RangeProof* released = _impl_.range_proof_; + _impl_.range_proof_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return released; +} +inline ::tari::rpc::RangeProof* UnblindedOutput::unsafe_arena_release_range_proof() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:tari.rpc.UnblindedOutput.range_proof) + + _impl_._has_bits_[0] &= ~0x00000004u; + ::tari::rpc::RangeProof* temp = _impl_.range_proof_; + _impl_.range_proof_ = nullptr; + return temp; +} +inline ::tari::rpc::RangeProof* UnblindedOutput::_internal_mutable_range_proof() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.range_proof_ == nullptr) { + auto* p = ::google::protobuf::Message::DefaultConstruct<::tari::rpc::RangeProof>(GetArena()); + _impl_.range_proof_ = reinterpret_cast<::tari::rpc::RangeProof*>(p); + } + return _impl_.range_proof_; +} +inline ::tari::rpc::RangeProof* UnblindedOutput::mutable_range_proof() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000004u; + ::tari::rpc::RangeProof* _msg = _internal_mutable_range_proof(); + // @@protoc_insertion_point(field_mutable:tari.rpc.UnblindedOutput.range_proof) + return _msg; +} +inline void UnblindedOutput::set_allocated_range_proof(::tari::rpc::RangeProof* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.range_proof_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + + _impl_.range_proof_ = reinterpret_cast<::tari::rpc::RangeProof*>(value); + // @@protoc_insertion_point(field_set_allocated:tari.rpc.UnblindedOutput.range_proof) +} + #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ diff --git a/external/src/Tari/proto/gRPC/transaction.proto b/external/src/Tari/proto/gRPC/transaction.proto index 8133e70..efef3ee 100644 --- a/external/src/Tari/proto/gRPC/transaction.proto +++ b/external/src/Tari/proto/gRPC/transaction.proto @@ -178,5 +178,7 @@ message UnblindedOutput { bytes encrypted_data = 12; // The minimum value of the commitment that is proven by the range proof (in MicroMinotari) uint64 minimum_value_promise = 13; + // The range proof + RangeProof range_proof = 14; } diff --git a/external/src/Tari/proto/gRPC/types.pb.cc b/external/src/Tari/proto/gRPC/types.pb.cc index 5f2784d..09e84f1 100644 --- a/external/src/Tari/proto/gRPC/types.pb.cc +++ b/external/src/Tari/proto/gRPC/types.pb.cc @@ -302,7 +302,7 @@ inline constexpr ConsensusConstants::Impl_::Impl_( block_weight_inputs_{::uint64_t{0u}}, block_weight_outputs_{::uint64_t{0u}}, block_weight_kernels_{::uint64_t{0u}}, - faucet_value_{::uint64_t{0u}}, + pre_mine_value_{::uint64_t{0u}}, max_script_byte_size_{::uint64_t{0u}}, validator_node_validity_period_{::uint64_t{0u}}, effective_from_height_{::uint64_t{0u}}, @@ -313,6 +313,7 @@ inline constexpr ConsensusConstants::Impl_::Impl_( validator_node_registration_shuffle_interval_epoch_{::uint64_t{0u}}, inflation_bips_{::uint64_t{0u}}, tail_epoch_length_{::uint64_t{0u}}, + max_block_coinbase_count_{::uint64_t{0u}}, blockchain_version_{0u} {} template <typename> @@ -486,7 +487,7 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::tari::rpc::ConsensusConstants, _impl_.block_weight_inputs_), PROTOBUF_FIELD_OFFSET(::tari::rpc::ConsensusConstants, _impl_.block_weight_outputs_), PROTOBUF_FIELD_OFFSET(::tari::rpc::ConsensusConstants, _impl_.block_weight_kernels_), - PROTOBUF_FIELD_OFFSET(::tari::rpc::ConsensusConstants, _impl_.faucet_value_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::ConsensusConstants, _impl_.pre_mine_value_), PROTOBUF_FIELD_OFFSET(::tari::rpc::ConsensusConstants, _impl_.max_script_byte_size_), PROTOBUF_FIELD_OFFSET(::tari::rpc::ConsensusConstants, _impl_.validator_node_validity_period_), PROTOBUF_FIELD_OFFSET(::tari::rpc::ConsensusConstants, _impl_.effective_from_height_), @@ -505,6 +506,7 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::tari::rpc::ConsensusConstants, _impl_.permitted_range_proof_types_), PROTOBUF_FIELD_OFFSET(::tari::rpc::ConsensusConstants, _impl_.inflation_bips_), PROTOBUF_FIELD_OFFSET(::tari::rpc::ConsensusConstants, _impl_.tail_epoch_length_), + PROTOBUF_FIELD_OFFSET(::tari::rpc::ConsensusConstants, _impl_.max_block_coinbase_count_), ~0u, ~0u, ~0u, @@ -538,6 +540,7 @@ const ::uint32_t ~0u, ~0u, ~0u, + ~0u, }; static const ::_pbi::MigrationSchema @@ -554,7 +557,7 @@ static const ::_pbi::MigrationSchema {96, -1, -1, sizeof(::tari::rpc::PermittedRangeProofs)}, {106, -1, -1, sizeof(::tari::rpc::RangeProof)}, {115, 125, -1, sizeof(::tari::rpc::ConsensusConstants_ProofOfWorkEntry_DoNotUse)}, - {127, 168, -1, sizeof(::tari::rpc::ConsensusConstants)}, + {127, 169, -1, sizeof(::tari::rpc::ConsensusConstants)}, }; static const ::_pb::Message* const file_default_instances[] = { &::tari::rpc::_Range_default_instance_._instance, @@ -593,7 +596,7 @@ const char descriptor_table_protodef_types_2eproto[] ABSL_ATTRIBUTE_SECTION_VARI "output_type\030\001 \001(\0162\024.tari.rpc.OutputType\022" "3\n\021range_proof_types\030\002 \003(\0162\030.tari.rpc.Ra" "ngeProofType\"!\n\nRangeProof\022\023\n\013proof_byte" - "s\030\001 \001(\014\"\327\n\n\022ConsensusConstants\022\035\n\025coinba" + "s\030\001 \001(\014\"\373\n\n\022ConsensusConstants\022\035\n\025coinba" "se_min_maturity\030\001 \001(\004\022\032\n\022blockchain_vers" "ion\030\002 \001(\r\022\031\n\021future_time_limit\030\003 \001(\004\022\037\n\027" "difficulty_block_window\030\005 \001(\004\022$\n\034max_blo" @@ -604,41 +607,41 @@ const char descriptor_table_protodef_types_2eproto[] ABSL_ATTRIBUTE_SECTION_VARI "\022 \n\030min_sha3x_pow_difficulty\030\r \001(\004\022\033\n\023bl" "ock_weight_inputs\030\016 \001(\004\022\034\n\024block_weight_" "outputs\030\017 \001(\004\022\034\n\024block_weight_kernels\030\020 " - "\001(\004\022\024\n\014faucet_value\030\021 \001(\004\022\034\n\024max_script_" - "byte_size\030\022 \001(\004\022&\n\036validator_node_validi" - "ty_period\030\023 \001(\004\022\035\n\025effective_from_height" - "\030\024 \001(\004\0227\n\036valid_blockchain_version_range" - "\030\025 \001(\0132\017.tari.rpc.Range\022\037\n\027max_randomx_s" - "eed_height\030\026 \001(\004\022D\n\rproof_of_work\030\027 \003(\0132" - "-.tari.rpc.ConsensusConstants.ProofOfWor" - "kEntry\0222\n\022transaction_weight\030\030 \001(\0132\026.tar" - "i.rpc.WeightParams\022,\n\023input_version_rang" - "e\030\032 \001(\0132\017.tari.rpc.Range\0226\n\024output_versi" - "on_range\030\033 \001(\0132\030.tari.rpc.OutputsVersion" - "\022-\n\024kernel_version_range\030\034 \001(\0132\017.tari.rp" - "c.Range\0224\n\026permitted_output_types\030\035 \003(\0162" - "\024.tari.rpc.OutputType\022\024\n\014epoch_length\030\036 " - "\001(\004\0226\n.validator_node_registration_min_d" - "eposit_amount\030\037 \001(\004\0223\n+validator_node_re" - "gistration_min_lock_height\030 \001(\004\022:\n2vali" - "dator_node_registration_shuffle_interval" - "_epoch\030! \001(\004\022C\n\033permitted_range_proof_ty" - "pes\030\" \003(\0132\036.tari.rpc.PermittedRangeProof" - "s\022\026\n\016inflation_bips\030# \001(\004\022\031\n\021tail_epoch_" - "length\030$ \001(\004\032S\n\020ProofOfWorkEntry\022\013\n\003key\030" - "\001 \001(\r\022.\n\005value\030\002 \001(\0132\037.tari.rpc.PowAlgor" - "ithmConstants:\0028\001*s\n\nOutputType\022\014\n\010STAND" - "ARD\020\000\022\014\n\010COINBASE\020\001\022\010\n\004BURN\020\002\022\037\n\033VALIDAT" - "OR_NODE_REGISTRATION\020\003\022\036\n\032CODE_TEMPLATE_" - "REGISTRATION\020\004*:\n\016RangeProofType\022\024\n\020BULL" - "ETPROOF_PLUS\020\000\022\022\n\016REVEALED_VALUE\020\001b\006prot" - "o3" + "\001(\004\022\026\n\016pre_mine_value\030\021 \001(\004\022\034\n\024max_scrip" + "t_byte_size\030\022 \001(\004\022&\n\036validator_node_vali" + "dity_period\030\023 \001(\004\022\035\n\025effective_from_heig" + "ht\030\024 \001(\004\0227\n\036valid_blockchain_version_ran" + "ge\030\025 \001(\0132\017.tari.rpc.Range\022\037\n\027max_randomx" + "_seed_height\030\026 \001(\004\022D\n\rproof_of_work\030\027 \003(" + "\0132-.tari.rpc.ConsensusConstants.ProofOfW" + "orkEntry\0222\n\022transaction_weight\030\030 \001(\0132\026.t" + "ari.rpc.WeightParams\022,\n\023input_version_ra" + "nge\030\032 \001(\0132\017.tari.rpc.Range\0226\n\024output_ver" + "sion_range\030\033 \001(\0132\030.tari.rpc.OutputsVersi" + "on\022-\n\024kernel_version_range\030\034 \001(\0132\017.tari." + "rpc.Range\0224\n\026permitted_output_types\030\035 \003(" + "\0162\024.tari.rpc.OutputType\022\024\n\014epoch_length\030" + "\036 \001(\004\0226\n.validator_node_registration_min" + "_deposit_amount\030\037 \001(\004\0223\n+validator_node_" + "registration_min_lock_height\030 \001(\004\022:\n2va" + "lidator_node_registration_shuffle_interv" + "al_epoch\030! \001(\004\022C\n\033permitted_range_proof_" + "types\030\" \003(\0132\036.tari.rpc.PermittedRangePro" + "ofs\022\026\n\016inflation_bips\030# \001(\004\022\031\n\021tail_epoc" + "h_length\030$ \001(\004\022 \n\030max_block_coinbase_cou" + "nt\030% \001(\004\032S\n\020ProofOfWorkEntry\022\013\n\003key\030\001 \001(" + "\r\022.\n\005value\030\002 \001(\0132\037.tari.rpc.PowAlgorithm" + "Constants:\0028\001*s\n\nOutputType\022\014\n\010STANDARD\020" + "\000\022\014\n\010COINBASE\020\001\022\010\n\004BURN\020\002\022\037\n\033VALIDATOR_N" + "ODE_REGISTRATION\020\003\022\036\n\032CODE_TEMPLATE_REGI" + "STRATION\020\004*:\n\016RangeProofType\022\024\n\020BULLETPR" + "OOF_PLUS\020\000\022\022\n\016REVEALED_VALUE\020\001b\006proto3" }; static ::absl::once_flag descriptor_table_types_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_types_2eproto = { false, false, - 2362, + 2398, descriptor_table_protodef_types_2eproto, "types.proto", &descriptor_table_types_2eproto_once, @@ -3217,15 +3220,15 @@ const char* ConsensusConstants::_InternalParse( PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<5, 33, 8, 0, 7> ConsensusConstants::_table_ = { +const ::_pbi::TcParseTable<5, 34, 8, 0, 7> ConsensusConstants::_table_ = { { PROTOBUF_FIELD_OFFSET(ConsensusConstants, _impl_._has_bits_), 0, // no _extensions_ - 36, 248, // max_field_number, fast_idx_mask + 37, 248, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), 16777256, // skipmap offsetof(decltype(_table_), field_entries), - 33, // num_field_entries + 34, // num_field_entries 8, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_ConsensusConstants_default_instance_._instance, @@ -3279,9 +3282,9 @@ const ::_pbi::TcParseTable<5, 33, 8, 0, 7> ConsensusConstants::_table_ = { // uint64 block_weight_kernels = 16; {::_pbi::TcParser::FastV64S2, {384, 63, 0, PROTOBUF_FIELD_OFFSET(ConsensusConstants, _impl_.block_weight_kernels_)}}, - // uint64 faucet_value = 17; + // uint64 pre_mine_value = 17; {::_pbi::TcParser::FastV64S2, - {392, 63, 0, PROTOBUF_FIELD_OFFSET(ConsensusConstants, _impl_.faucet_value_)}}, + {392, 63, 0, PROTOBUF_FIELD_OFFSET(ConsensusConstants, _impl_.pre_mine_value_)}}, // uint64 max_script_byte_size = 18; {::_pbi::TcParser::FastV64S2, {400, 63, 0, PROTOBUF_FIELD_OFFSET(ConsensusConstants, _impl_.max_script_byte_size_)}}, @@ -3322,7 +3325,7 @@ const ::_pbi::TcParseTable<5, 33, 8, 0, 7> ConsensusConstants::_table_ = { {504, 63, 0, PROTOBUF_FIELD_OFFSET(ConsensusConstants, _impl_.validator_node_registration_min_deposit_amount_)}}, }}, {{ 33, 0, 1, - 65520, 29, + 65504, 29, 65535, 65535 }}, {{ // uint64 coinbase_min_maturity = 1; @@ -3367,8 +3370,8 @@ const ::_pbi::TcParseTable<5, 33, 8, 0, 7> ConsensusConstants::_table_ = { // uint64 block_weight_kernels = 16; {PROTOBUF_FIELD_OFFSET(ConsensusConstants, _impl_.block_weight_kernels_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, - // uint64 faucet_value = 17; - {PROTOBUF_FIELD_OFFSET(ConsensusConstants, _impl_.faucet_value_), -1, 0, + // uint64 pre_mine_value = 17; + {PROTOBUF_FIELD_OFFSET(ConsensusConstants, _impl_.pre_mine_value_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, // uint64 max_script_byte_size = 18; {PROTOBUF_FIELD_OFFSET(ConsensusConstants, _impl_.max_script_byte_size_), -1, 0, @@ -3424,6 +3427,9 @@ const ::_pbi::TcParseTable<5, 33, 8, 0, 7> ConsensusConstants::_table_ = { // uint64 tail_epoch_length = 36; {PROTOBUF_FIELD_OFFSET(ConsensusConstants, _impl_.tail_epoch_length_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // uint64 max_block_coinbase_count = 37; + {PROTOBUF_FIELD_OFFSET(ConsensusConstants, _impl_.max_block_coinbase_count_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, }}, {{ {::_pbi::TcParser::GetTable<::tari::rpc::Range>()}, {::_pbi::TcParser::GetMapAuxInfo< @@ -3547,11 +3553,11 @@ const ::_pbi::TcParseTable<5, 33, 8, 0, 7> ConsensusConstants::_table_ = { 16, this->_internal_block_weight_kernels(), target); } - // uint64 faucet_value = 17; - if (this->_internal_faucet_value() != 0) { + // uint64 pre_mine_value = 17; + if (this->_internal_pre_mine_value() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray( - 17, this->_internal_faucet_value(), target); + 17, this->_internal_pre_mine_value(), target); } // uint64 max_script_byte_size = 18; @@ -3696,6 +3702,13 @@ const ::_pbi::TcParseTable<5, 33, 8, 0, 7> ConsensusConstants::_table_ = { 36, this->_internal_tail_epoch_length(), target); } + // uint64 max_block_coinbase_count = 37; + if (this->_internal_max_block_coinbase_count() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 37, this->_internal_max_block_coinbase_count(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -3860,10 +3873,10 @@ const ::_pbi::TcParseTable<5, 33, 8, 0, 7> ConsensusConstants::_table_ = { this->_internal_block_weight_kernels()); } - // uint64 faucet_value = 17; - if (this->_internal_faucet_value() != 0) { + // uint64 pre_mine_value = 17; + if (this->_internal_pre_mine_value() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt64Size( - this->_internal_faucet_value()); + this->_internal_pre_mine_value()); } // uint64 max_script_byte_size = 18; @@ -3926,6 +3939,12 @@ const ::_pbi::TcParseTable<5, 33, 8, 0, 7> ConsensusConstants::_table_ = { this->_internal_tail_epoch_length()); } + // uint64 max_block_coinbase_count = 37; + if (this->_internal_max_block_coinbase_count() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::UInt64Size( + this->_internal_max_block_coinbase_count()); + } + // uint32 blockchain_version = 2; if (this->_internal_blockchain_version() != 0) { total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( @@ -4034,8 +4053,8 @@ void ConsensusConstants::MergeImpl(::google::protobuf::MessageLite& to_msg, cons if (from._internal_block_weight_kernels() != 0) { _this->_impl_.block_weight_kernels_ = from._impl_.block_weight_kernels_; } - if (from._internal_faucet_value() != 0) { - _this->_impl_.faucet_value_ = from._impl_.faucet_value_; + if (from._internal_pre_mine_value() != 0) { + _this->_impl_.pre_mine_value_ = from._impl_.pre_mine_value_; } if (from._internal_max_script_byte_size() != 0) { _this->_impl_.max_script_byte_size_ = from._impl_.max_script_byte_size_; @@ -4067,6 +4086,9 @@ void ConsensusConstants::MergeImpl(::google::protobuf::MessageLite& to_msg, cons if (from._internal_tail_epoch_length() != 0) { _this->_impl_.tail_epoch_length_ = from._impl_.tail_epoch_length_; } + if (from._internal_max_block_coinbase_count() != 0) { + _this->_impl_.max_block_coinbase_count_ = from._impl_.max_block_coinbase_count_; + } if (from._internal_blockchain_version() != 0) { _this->_impl_.blockchain_version_ = from._impl_.blockchain_version_; } diff --git a/external/src/Tari/proto/gRPC/types.pb.h b/external/src/Tari/proto/gRPC/types.pb.h index dddc367..393a62d 100644 --- a/external/src/Tari/proto/gRPC/types.pb.h +++ b/external/src/Tari/proto/gRPC/types.pb.h @@ -2416,7 +2416,7 @@ class ConsensusConstants final : public ::google::protobuf::Message kBlockWeightInputsFieldNumber = 14, kBlockWeightOutputsFieldNumber = 15, kBlockWeightKernelsFieldNumber = 16, - kFaucetValueFieldNumber = 17, + kPreMineValueFieldNumber = 17, kMaxScriptByteSizeFieldNumber = 18, kValidatorNodeValidityPeriodFieldNumber = 19, kEffectiveFromHeightFieldNumber = 20, @@ -2427,6 +2427,7 @@ class ConsensusConstants final : public ::google::protobuf::Message kValidatorNodeRegistrationShuffleIntervalEpochFieldNumber = 33, kInflationBipsFieldNumber = 35, kTailEpochLengthFieldNumber = 36, + kMaxBlockCoinbaseCountFieldNumber = 37, kBlockchainVersionFieldNumber = 2, }; // repeated uint64 emission_decay = 11; @@ -2693,14 +2694,14 @@ class ConsensusConstants final : public ::google::protobuf::Message void _internal_set_block_weight_kernels(::uint64_t value); public: - // uint64 faucet_value = 17; - void clear_faucet_value() ; - ::uint64_t faucet_value() const; - void set_faucet_value(::uint64_t value); + // uint64 pre_mine_value = 17; + void clear_pre_mine_value() ; + ::uint64_t pre_mine_value() const; + void set_pre_mine_value(::uint64_t value); private: - ::uint64_t _internal_faucet_value() const; - void _internal_set_faucet_value(::uint64_t value); + ::uint64_t _internal_pre_mine_value() const; + void _internal_set_pre_mine_value(::uint64_t value); public: // uint64 max_script_byte_size = 18; @@ -2802,6 +2803,16 @@ class ConsensusConstants final : public ::google::protobuf::Message ::uint64_t _internal_tail_epoch_length() const; void _internal_set_tail_epoch_length(::uint64_t value); + public: + // uint64 max_block_coinbase_count = 37; + void clear_max_block_coinbase_count() ; + ::uint64_t max_block_coinbase_count() const; + void set_max_block_coinbase_count(::uint64_t value); + + private: + ::uint64_t _internal_max_block_coinbase_count() const; + void _internal_set_max_block_coinbase_count(::uint64_t value); + public: // uint32 blockchain_version = 2; void clear_blockchain_version() ; @@ -2818,7 +2829,7 @@ class ConsensusConstants final : public ::google::protobuf::Message class _Internal; friend class ::google::protobuf::internal::TcParser; static const ::google::protobuf::internal::TcParseTable< - 5, 33, 8, + 5, 34, 8, 0, 7> _table_; friend class ::google::protobuf::MessageLite; @@ -2862,7 +2873,7 @@ class ConsensusConstants final : public ::google::protobuf::Message ::uint64_t block_weight_inputs_; ::uint64_t block_weight_outputs_; ::uint64_t block_weight_kernels_; - ::uint64_t faucet_value_; + ::uint64_t pre_mine_value_; ::uint64_t max_script_byte_size_; ::uint64_t validator_node_validity_period_; ::uint64_t effective_from_height_; @@ -2873,6 +2884,7 @@ class ConsensusConstants final : public ::google::protobuf::Message ::uint64_t validator_node_registration_shuffle_interval_epoch_; ::uint64_t inflation_bips_; ::uint64_t tail_epoch_length_; + ::uint64_t max_block_coinbase_count_; ::uint32_t blockchain_version_; PROTOBUF_TSAN_DECLARE_MEMBER }; @@ -4302,26 +4314,26 @@ inline void ConsensusConstants::_internal_set_block_weight_kernels(::uint64_t va _impl_.block_weight_kernels_ = value; } -// uint64 faucet_value = 17; -inline void ConsensusConstants::clear_faucet_value() { +// uint64 pre_mine_value = 17; +inline void ConsensusConstants::clear_pre_mine_value() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_.faucet_value_ = ::uint64_t{0u}; + _impl_.pre_mine_value_ = ::uint64_t{0u}; } -inline ::uint64_t ConsensusConstants::faucet_value() const { - // @@protoc_insertion_point(field_get:tari.rpc.ConsensusConstants.faucet_value) - return _internal_faucet_value(); +inline ::uint64_t ConsensusConstants::pre_mine_value() const { + // @@protoc_insertion_point(field_get:tari.rpc.ConsensusConstants.pre_mine_value) + return _internal_pre_mine_value(); } -inline void ConsensusConstants::set_faucet_value(::uint64_t value) { - _internal_set_faucet_value(value); - // @@protoc_insertion_point(field_set:tari.rpc.ConsensusConstants.faucet_value) +inline void ConsensusConstants::set_pre_mine_value(::uint64_t value) { + _internal_set_pre_mine_value(value); + // @@protoc_insertion_point(field_set:tari.rpc.ConsensusConstants.pre_mine_value) } -inline ::uint64_t ConsensusConstants::_internal_faucet_value() const { +inline ::uint64_t ConsensusConstants::_internal_pre_mine_value() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.faucet_value_; + return _impl_.pre_mine_value_; } -inline void ConsensusConstants::_internal_set_faucet_value(::uint64_t value) { +inline void ConsensusConstants::_internal_set_pre_mine_value(::uint64_t value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_.faucet_value_ = value; + _impl_.pre_mine_value_ = value; } // uint64 max_script_byte_size = 18; @@ -5146,6 +5158,28 @@ inline void ConsensusConstants::_internal_set_tail_epoch_length(::uint64_t value _impl_.tail_epoch_length_ = value; } +// uint64 max_block_coinbase_count = 37; +inline void ConsensusConstants::clear_max_block_coinbase_count() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.max_block_coinbase_count_ = ::uint64_t{0u}; +} +inline ::uint64_t ConsensusConstants::max_block_coinbase_count() const { + // @@protoc_insertion_point(field_get:tari.rpc.ConsensusConstants.max_block_coinbase_count) + return _internal_max_block_coinbase_count(); +} +inline void ConsensusConstants::set_max_block_coinbase_count(::uint64_t value) { + _internal_set_max_block_coinbase_count(value); + // @@protoc_insertion_point(field_set:tari.rpc.ConsensusConstants.max_block_coinbase_count) +} +inline ::uint64_t ConsensusConstants::_internal_max_block_coinbase_count() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.max_block_coinbase_count_; +} +inline void ConsensusConstants::_internal_set_max_block_coinbase_count(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.max_block_coinbase_count_ = value; +} + #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ diff --git a/external/src/Tari/proto/gRPC/types.proto b/external/src/Tari/proto/gRPC/types.proto index c652dbd..d25b5ad 100644 --- a/external/src/Tari/proto/gRPC/types.proto +++ b/external/src/Tari/proto/gRPC/types.proto @@ -124,7 +124,7 @@ message ConsensusConstants { uint64 block_weight_inputs = 14; uint64 block_weight_outputs = 15; uint64 block_weight_kernels = 16; - uint64 faucet_value = 17; + uint64 pre_mine_value = 17; uint64 max_script_byte_size = 18; uint64 validator_node_validity_period = 19; uint64 effective_from_height = 20; @@ -143,4 +143,5 @@ message ConsensusConstants { repeated PermittedRangeProofs permitted_range_proof_types = 34; uint64 inflation_bips = 35; uint64 tail_epoch_length = 36; + uint64 max_block_coinbase_count = 37; } diff --git a/src/pool_block.h b/src/pool_block.h index 53ace67..0338c6e 100644 --- a/src/pool_block.h +++ b/src/pool_block.h @@ -20,6 +20,8 @@ #include "uv_util.h" #include "wallet.h" +#include <map> + #if defined(_DEBUG) || defined(DEV_DEBUG) #define POOL_BLOCK_DEBUG 1 #else @@ -143,7 +145,7 @@ struct PoolBlock // Merge mining extra data // Format: vector of (chain ID, chain data) pairs // Chain data format is arbitrary and depends on the merge mined chain's requirements - std::vector<std::pair<hash, std::vector<uint8_t>>> m_mergeMiningExtra; + std::map<hash, std::vector<uint8_t>> m_mergeMiningExtra; // Arbitrary extra data uint32_t m_sidechainExtraBuf[4]; diff --git a/src/pool_block_parser.inl b/src/pool_block_parser.inl index 35476e1..68ed649 100644 --- a/src/pool_block_parser.inl +++ b/src/pool_block_parser.inl @@ -370,14 +370,15 @@ int PoolBlock::deserialize(const uint8_t* data, size_t size, const SideChain& si if (mm_extra_data_count > MERGE_MINING_MAX_CHAINS) return __LINE__; if (static_cast<uint64_t>(data_end - data) < mm_extra_data_count * (HASH_SIZE + 1)) return __LINE__; - m_mergeMiningExtra.reserve(mm_extra_data_count); - + hash prev_chain_id; + for (uint64_t i = 0; i < mm_extra_data_count; ++i) { hash chain_id; READ_BUF(chain_id.h, HASH_SIZE); // IDs must be ordered to avoid duplicates - if (i && !(m_mergeMiningExtra[i - 1].first < chain_id)) return __LINE__; + if (i && !(prev_chain_id < chain_id)) return __LINE__; + prev_chain_id = chain_id; uint64_t n; READ_VARINT(n); @@ -390,7 +391,7 @@ int PoolBlock::deserialize(const uint8_t* data, size_t size, const SideChain& si READ_BUF(t.data(), n); - m_mergeMiningExtra.emplace_back(chain_id, std::move(t)); + m_mergeMiningExtra.emplace(chain_id, std::move(t)); } }