• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tari-project / tari / 18097567115

29 Sep 2025 12:50PM UTC coverage: 58.554% (-2.3%) from 60.88%
18097567115

push

github

web-flow
chore(ci): switch rust toolchain to stable (#7524)

Description
switch rust toolchain to stable

Motivation and Context
use stable rust toolchain


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Standardized Rust toolchain on stable across CI workflows for more
predictable builds.
* Streamlined setup by removing unnecessary components and aligning
toolchain configuration with environment variables.
  * Enabled an environment flag to improve rustup behavior during CI.
* Improved coverage workflow consistency with dynamic toolchain
selection.

* **Tests**
* Removed nightly-only requirements, simplifying test commands and
improving compatibility.
* Expanded CI triggers to include ci-* branches for better pre-merge
validation.
* Maintained existing job logic while improving reliability and
maintainability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

66336 of 113291 relevant lines covered (58.55%)

551641.45 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/base_layer/core/src/base_node/rpc/mod.rs
1
// Copyright 2025 The Tari Project
2
// SPDX-License-Identifier: BSD-3-Clause
3

4
mod service;
5

6
pub mod sync_utxos_by_block_task;
7

8
pub use service::BaseNodeWalletRpcService;
9

10
pub mod query_service;
11

12
use std::{error::Error, fmt::Debug};
13

14
use tari_comms::{
15
    protocol::rpc::{Request, Response, RpcStatus, Streaming},
16
    types::CompressedSignature,
17
};
18
use tari_comms_rpc_macros::tari_rpc;
19
use tari_transaction_components::rpc::{models, models::GenerateKernelMerkleProofResponse};
20
use url::Url;
21

22
use crate::{
23
    base_node::StateMachineHandle,
24
    chain_storage::{async_db::AsyncBlockchainDb, BlockchainBackend},
25
    mempool::service::MempoolHandle,
26
    proto::{
27
        self,
28
        base_node::{
29
            FetchMatchingUtxos,
30
            FetchUtxosResponse,
31
            GetMempoolFeePerGramStatsRequest,
32
            GetMempoolFeePerGramStatsResponse,
33
            GetWalletQueryHttpServiceAddressResponse,
34
            QueryDeletedRequest,
35
            QueryDeletedResponse,
36
            Signatures,
37
            SyncUtxosByBlockRequest,
38
            SyncUtxosByBlockResponse,
39
            TipInfoResponse,
40
            TxQueryBatchResponses,
41
            TxQueryResponse,
42
            TxSubmissionResponse,
43
            UtxoQueryRequest,
44
            UtxoQueryResponses,
45
        },
46
        types::{Signature, Transaction},
47
    },
48
};
49

50
/// Trait that a base node wallet query service must implement.
51
/// Please note that this service is to fetch data, so read-only queries.
52
#[async_trait::async_trait]
53
pub trait BaseNodeWalletQueryService: Send + Sync + 'static {
54
    type Error: Error + 'static;
55

56
    async fn get_tip_info(&self) -> Result<models::TipInfoResponse, Self::Error>;
57

58
    async fn get_header_by_height(&self, height: u64) -> Result<models::BlockHeader, Self::Error>;
59

60
    async fn get_height_at_time(&self, epoch_time: u64) -> Result<u64, Self::Error>;
61

62
    async fn get_utxos_mined_info(
63
        &self,
64
        request: models::GetUtxosMinedInfoRequest,
65
    ) -> Result<models::GetUtxosMinedInfoResponse, Self::Error>;
66

67
    async fn get_utxos_by_block(
68
        &self,
69
        request: models::GetUtxosByBlockRequest,
70
    ) -> Result<models::GetUtxosByBlockResponse, Self::Error>;
71

72
    async fn transaction_query(&self, signature: models::Signature) -> Result<models::TxQueryResponse, Self::Error>;
73

74
    async fn sync_utxos_by_block(
75
        &self,
76
        request: models::SyncUtxosByBlockRequest,
77
    ) -> Result<models::SyncUtxosByBlockResponse, Self::Error>;
78

79
    async fn get_utxos_deleted_info(
80
        &self,
81
        request: models::GetUtxosDeletedInfoRequest,
82
    ) -> Result<models::GetUtxosDeletedInfoResponse, Self::Error>;
83

84
    async fn generate_kernel_merkle_proof(
85
        &self,
86
        excess_sig: CompressedSignature,
87
    ) -> Result<GenerateKernelMerkleProofResponse, Self::Error>;
88
}
89

90
#[tari_rpc(protocol_name = b"t/bnwallet/1", server_struct = BaseNodeWalletRpcServer, client_struct = BaseNodeWalletRpcClient)]
×
91
pub trait BaseNodeWalletService: Send + Sync + 'static {
92
    #[rpc(method = 1)]
93
    async fn submit_transaction(
94
        &self,
95
        request: Request<Transaction>,
96
    ) -> Result<Response<TxSubmissionResponse>, RpcStatus>;
97

98
    #[rpc(method = 2)]
99
    async fn transaction_query(&self, request: Request<Signature>) -> Result<Response<TxQueryResponse>, RpcStatus>;
100

101
    #[rpc(method = 3)]
102
    async fn transaction_batch_query(
103
        &self,
104
        request: Request<Signatures>,
105
    ) -> Result<Response<TxQueryBatchResponses>, RpcStatus>;
106

107
    #[rpc(method = 4)]
108
    async fn fetch_matching_utxos(
109
        &self,
110
        request: Request<FetchMatchingUtxos>,
111
    ) -> Result<Response<FetchUtxosResponse>, RpcStatus>;
112

113
    #[rpc(method = 5)]
114
    async fn get_tip_info(&self, request: Request<()>) -> Result<Response<TipInfoResponse>, RpcStatus>;
115

116
    #[rpc(method = 6)]
117
    async fn get_header(&self, request: Request<u64>) -> Result<Response<proto::core::BlockHeader>, RpcStatus>;
118

119
    #[rpc(method = 7)]
120
    async fn utxo_query(&self, request: Request<UtxoQueryRequest>) -> Result<Response<UtxoQueryResponses>, RpcStatus>;
121

122
    #[rpc(method = 8)]
123
    async fn query_deleted(
124
        &self,
125
        request: Request<QueryDeletedRequest>,
126
    ) -> Result<Response<QueryDeletedResponse>, RpcStatus>;
127

128
    #[rpc(method = 9)]
129
    async fn get_header_by_height(
130
        &self,
131
        request: Request<u64>,
132
    ) -> Result<Response<proto::core::BlockHeader>, RpcStatus>;
133

134
    #[rpc(method = 10)]
135
    async fn get_height_at_time(&self, request: Request<u64>) -> Result<Response<u64>, RpcStatus>;
136

137
    #[rpc(method = 11)]
138
    async fn sync_utxos_by_block(
139
        &self,
140
        request: Request<SyncUtxosByBlockRequest>,
141
    ) -> Result<Streaming<SyncUtxosByBlockResponse>, RpcStatus>;
142

143
    #[rpc(method = 12)]
144
    async fn get_mempool_fee_per_gram_stats(
145
        &self,
146
        request: Request<GetMempoolFeePerGramStatsRequest>,
147
    ) -> Result<Response<GetMempoolFeePerGramStatsResponse>, RpcStatus>;
148

149
    #[rpc(method = 13)]
150
    async fn get_wallet_query_http_service_address(
151
        &self,
152
        request: Request<()>,
153
    ) -> Result<Response<GetWalletQueryHttpServiceAddressResponse>, RpcStatus>;
154
}
155

156
pub fn create_base_node_wallet_rpc_service<B: BlockchainBackend + 'static>(
×
157
    db: AsyncBlockchainDb<B>,
×
158
    mempool: MempoolHandle,
×
159
    state_machine: StateMachineHandle,
×
160
    wallet_query_service_address: Option<Url>,
×
161
) -> BaseNodeWalletRpcServer<BaseNodeWalletRpcService<B>> {
×
162
    BaseNodeWalletRpcServer::new(BaseNodeWalletRpcService::new(
×
163
        db,
×
164
        mempool,
×
165
        state_machine,
×
166
        wallet_query_service_address,
×
167
    ))
168
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc