• 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

11.9
/base_layer/core/src/base_node/comms_interface/comms_request.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::{Display, Error, Formatter},
25
    ops::RangeInclusive,
26
};
27

28
use serde::{Deserialize, Serialize};
29
use tari_common_types::types::{
30
    BlockHash,
31
    CompressedCommitment,
32
    CompressedPublicKey,
33
    FixedHash,
34
    HashOutput,
35
    PrivateKey,
36
    Signature,
37
};
38
use tari_utilities::hex::Hex;
39

40
use crate::{blocks::NewBlockTemplate, chain_storage::MmrTree, proof_of_work::PowAlgorithm};
41

42
/// A container for the parameters required for a FetchMmrState request.
43
#[derive(Debug, Serialize, Deserialize)]
×
44
pub struct MmrStateRequest {
45
    pub tree: MmrTree,
46
    pub index: u64,
47
    pub count: u64,
48
}
49

50
/// API Request enum
51
#[derive(Debug, Serialize, Deserialize)]
×
52
pub enum NodeCommsRequest {
53
    GetChainMetadata,
54
    GetTargetDifficultyNextBlock(PowAlgorithm),
55
    FetchHeaders(RangeInclusive<u64>),
56
    FetchHeadersByHashes(Vec<HashOutput>),
57
    FetchMatchingUtxos(Vec<HashOutput>),
58
    FetchMatchingBlocks {
59
        range: RangeInclusive<u64>,
60
        compact: bool,
61
    },
62
    FetchBlocksByKernelExcessSigs(Vec<Signature>),
63
    FetchBlocksByUtxos(Vec<CompressedCommitment>),
64
    GetHeaderByHash(HashOutput),
65
    GetBlockByHash(HashOutput),
66
    GetNewBlockTemplate(GetNewBlockTemplateRequest),
67
    GetNewBlock(NewBlockTemplate),
68
    GetBlockFromAllChains(HashOutput),
69
    FetchKernelByExcessSig(Signature),
70
    FetchMempoolTransactionsByExcessSigs {
71
        excess_sigs: Vec<PrivateKey>,
72
    },
73
    FetchValidatorNodesKeys {
74
        height: u64,
75
    },
76
    GetShardKey {
77
        height: u64,
78
        public_key: CompressedPublicKey,
79
    },
80
    FetchTemplateRegistrations {
81
        start_height: u64,
82
        end_height: u64,
83
    },
84
    FetchUnspentUtxosInBlock {
85
        block_hash: BlockHash,
86
    },
87
    FetchOutputByPayRef(FixedHash),
88
    CheckOutputSpentStatus(HashOutput),
89
}
90

91
#[derive(Debug, Serialize, Deserialize)]
×
92
pub struct GetNewBlockTemplateRequest {
93
    pub algo: PowAlgorithm,
94
    pub max_weight: u64,
95
}
96

97
impl Display for NodeCommsRequest {
98
    fn fmt(&self, f: &mut Formatter) -> Result<(), Error> {
8✔
99
        #[allow(clippy::enum_glob_use)]
100
        use NodeCommsRequest::*;
101
        match self {
8✔
102
            GetChainMetadata => write!(f, "GetChainMetadata"),
×
103
            GetTargetDifficultyNextBlock(algo) => write!(f, "GetTargetDifficultyNextBlock ({:?})", algo),
×
104
            FetchHeaders(range) => {
×
105
                write!(f, "FetchHeaders ({:?})", range)
×
106
            },
107
            FetchHeadersByHashes(v) => write!(f, "FetchHeadersByHashes (n={})", v.len()),
×
108
            FetchMatchingUtxos(v) => write!(f, "FetchMatchingUtxos (n={})", v.len()),
×
109
            FetchMatchingBlocks { range, compact } => {
×
110
                write!(f, "FetchMatchingBlocks ({:?}, {})", range, compact)
×
111
            },
112
            FetchBlocksByKernelExcessSigs(v) => write!(f, "FetchBlocksByKernelExcessSigs (n={})", v.len()),
×
113
            FetchBlocksByUtxos(v) => write!(f, "FetchBlocksByUtxos (n={})", v.len()),
×
114
            GetHeaderByHash(v) => write!(f, "GetHeaderByHash({})", v),
×
115
            GetBlockByHash(v) => write!(f, "GetBlockByHash({})", v),
×
116
            GetNewBlockTemplate(v) => write!(f, "GetNewBlockTemplate ({}) with weight {}", v.algo, v.max_weight),
×
117
            GetNewBlock(b) => write!(f, "GetNewBlock (Block Height={})", b.header.height),
×
118
            GetBlockFromAllChains(v) => write!(f, "GetBlockFromAllChains({})", v),
4✔
119
            FetchKernelByExcessSig(s) => write!(
×
120
                f,
×
121
                "FetchKernelByExcessSig (signature=({}, {}))",
×
122
                s.get_compressed_public_nonce().to_hex(),
×
123
                s.get_signature().to_hex()
×
124
            ),
×
125
            FetchMempoolTransactionsByExcessSigs { .. } => {
126
                write!(f, "FetchMempoolTransactionsByExcessSigs")
4✔
127
            },
128
            FetchValidatorNodesKeys { height } => {
×
129
                write!(f, "FetchValidatorNodesKeys ({})", height)
×
130
            },
131
            GetShardKey { height, public_key } => {
×
132
                write!(f, "GetShardKey height ({}), public key ({:?})", height, public_key)
×
133
            },
134
            FetchTemplateRegistrations {
135
                start_height: start,
×
136
                end_height: end,
×
137
            } => {
×
138
                write!(f, "FetchTemplateRegistrations ({}..={})", start, end)
×
139
            },
140
            FetchUnspentUtxosInBlock { block_hash } => {
×
141
                write!(f, "FetchUnspentUtxosInBlock ({})", block_hash)
×
142
            },
143
            FetchOutputByPayRef(payref) => {
×
144
                write!(f, "FetchOutputByPayRef ({})", payref.to_hex())
×
145
            },
146
            CheckOutputSpentStatus(output_hash) => {
×
147
                write!(f, "CheckOutputSpentStatus ({})", output_hash.to_hex())
×
148
            },
149
        }
150
    }
8✔
151
}
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