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

tari-project / tari / 15582316596

11 Jun 2025 10:21AM UTC coverage: 72.172% (-0.1%) from 72.299%
15582316596

push

github

web-flow
chore: new release v4.4.0-pre.0 (#7202)

Description
---
new release for esmeralda

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

## Summary by CodeRabbit

- **Documentation**
- Updated README and changelogs to reflect new recommended and released
versions for all networks, highlighting new features and bug fixes in
version 4.4.0.
- **Chores**
- Bumped version numbers across multiple packages and configuration
files from 4.3.1-pre.0 to 4.4.0-pre.0.

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

81639 of 113117 relevant lines covered (72.17%)

241334.47 hits per line

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

0.0
/base_layer/core/src/base_node/comms_interface/comms_response.rs
1
// Copyright 2019. The Tari Project
2
//
3
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
4
// following conditions are met:
5
//
6
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
7
// disclaimer.
8
//
9
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
10
// following disclaimer in the documentation and/or other materials provided with the distribution.
11
//
12
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
13
// products derived from this software without specific prior written permission.
14
//
15
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
16
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
20
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
21
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22

23
use std::{
24
    fmt::{self, Display, Formatter},
25
    sync::Arc,
26
};
27

28
use tari_common_types::{
29
    chain_metadata::ChainMetadata,
30
    types::{CompressedPublicKey, HashOutput, PrivateKey},
31
};
32

33
use crate::{
34
    blocks::{Block, ChainHeader, HistoricalBlock, NewBlockTemplate},
35
    chain_storage::{InputMinedInfo, OutputMinedInfo, TemplateRegistrationEntry},
36
    proof_of_work::Difficulty,
37
    transactions::transaction_components::{Transaction, TransactionKernel, TransactionOutput},
38
};
39

40
/// API Response enum
41
#[allow(clippy::large_enum_variant)]
42
#[derive(Debug, Clone)]
43
pub enum NodeCommsResponse {
44
    ChainMetadata(ChainMetadata),
45
    TransactionKernels(Vec<TransactionKernel>),
46
    BlockHeaders(Vec<ChainHeader>),
47
    BlockHeader(Option<ChainHeader>),
48
    Block(Box<Option<Block>>),
49
    TransactionOutputs(Vec<TransactionOutput>),
50
    HistoricalBlocks(Vec<HistoricalBlock>),
51
    HistoricalBlock(Box<Option<HistoricalBlock>>),
52
    NewBlockTemplate(NewBlockTemplate),
53
    NewBlock {
54
        success: bool,
55
        error: Option<String>,
56
        block: Option<Block>,
57
    },
58
    TargetDifficulty(Difficulty),
59
    MmrNodes(Vec<HashOutput>, Vec<u8>),
60
    FetchMempoolTransactionsByExcessSigsResponse(FetchMempoolTransactionsResponse),
61
    FetchValidatorNodesKeysResponse(Vec<(CompressedPublicKey, [u8; 32])>),
62
    GetShardKeyResponse(Option<[u8; 32]>),
63
    FetchTemplateRegistrationsResponse(Vec<TemplateRegistrationEntry>),
64
    OutputMinedInfo(Option<OutputMinedInfo>),
65
    InputMinedInfo(Option<InputMinedInfo>),
66
}
67

68
impl Display for NodeCommsResponse {
69
    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
×
70
        #[allow(clippy::enum_glob_use)]
71
        use NodeCommsResponse::*;
72
        match self {
×
73
            ChainMetadata(_) => write!(f, "ChainMetadata"),
×
74
            TransactionKernels(_) => write!(f, "TransactionKernel"),
×
75
            BlockHeaders(_) => write!(f, "BlockHeaders"),
×
76
            BlockHeader(_) => write!(f, "BlockHeader"),
×
77
            Block(_) => write!(f, "Block"),
×
78
            HistoricalBlock(_) => write!(f, "HistoricalBlock"),
×
79
            TransactionOutputs(_) => write!(f, "TransactionOutputs"),
×
80
            HistoricalBlocks(_) => write!(f, "HistoricalBlocks"),
×
81
            NewBlockTemplate(_) => write!(f, "NewBlockTemplate"),
×
82
            NewBlock {
83
                success,
×
84
                error,
×
85
                block: _,
×
86
            } => write!(
×
87
                f,
×
88
                "NewBlock({},{},...)",
×
89
                success,
×
90
                error.as_ref().unwrap_or(&"Unspecified".to_string())
×
91
            ),
×
92
            TargetDifficulty(_) => write!(f, "TargetDifficulty"),
×
93
            MmrNodes(_, _) => write!(f, "MmrNodes"),
×
94
            FetchMempoolTransactionsByExcessSigsResponse(resp) => write!(
×
95
                f,
×
96
                "FetchMempoolTransactionsByExcessSigsResponse({} transaction(s), {} not found)",
×
97
                resp.transactions.len(),
×
98
                resp.not_found.len()
×
99
            ),
×
100
            FetchValidatorNodesKeysResponse(_) => write!(f, "FetchValidatorNodesKeysResponse"),
×
101
            GetShardKeyResponse(_) => write!(f, "GetShardKeyResponse"),
×
102
            FetchTemplateRegistrationsResponse(_) => write!(f, "FetchTemplateRegistrationsResponse"),
×
103
            OutputMinedInfo(_) => write!(f, "OutputMinedInfo"),
×
104
            InputMinedInfo(_) => write!(f, "InputMinedInfo"),
×
105
        }
106
    }
×
107
}
108

109
/// Container struct for mempool transaction responses
110
#[derive(Debug, Clone)]
111
pub struct FetchMempoolTransactionsResponse {
112
    pub transactions: Vec<Arc<Transaction>>,
113
    pub not_found: Vec<PrivateKey>,
114
}
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