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

tari-project / tari / 18908555886

29 Oct 2025 12:54PM UTC coverage: 59.571% (+0.004%) from 59.567%
18908555886

push

github

web-flow
chore(deps): bump actions/upload-artifact from 4 to 5 (#7555)

Bumps
[actions/upload-artifact](https://github.com/actions/upload-artifact)
from 4 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<h2>What's Changed</h2>
<p><strong>BREAKING CHANGE:</strong> this update supports Node
<code>v24.x</code>. This is not a breaking change per-se but we're
treating it as such.</p>
<ul>
<li>Update README.md by <a
href="https://github.com/GhadimiR"><code>@​GhadimiR</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/681">actions/upload-artifact#681</a></li>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/712">actions/upload-artifact#712</a></li>
<li>Readme: spell out the first use of GHES by <a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a> in
<a
href="https://redirect.github.com/actions/upload-artifact/pull/727">actions/upload-artifact#727</a></li>
<li>Update GHES guidance to include reference to Node 20 version by <a
href="https://github.com/patrikpolyak"><code>@​patrikpolyak</code></a>
in <a
href="https://redirect.github.com/actions/upload-artifact/pull/725">actions/upload-artifact#725</a></li>
<li>Bump <code>@actions/artifact</code> to <code>v4.0.0</code></li>
<li>Prepare <code>v5.0.0</code> by <a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a> in
<a
href="https://redirect.github.com/actions/upload-artifact/pull/734">actions/upload-artifact#734</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/GhadimiR"><code>@​GhadimiR</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/681">actions/upload-artifact#681</a></li>
<li><a href="https://github.c... (continued)

67662 of 113582 relevant lines covered (59.57%)

304376.63 hits per line

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

0.0
/base_layer/core/src/base_node/sync/config.rs
1
//  Copyright 2020, 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::time::Duration;
24

25
use serde::{Deserialize, Serialize};
26
use tari_common::configuration::serializers;
27
use tari_comms::peer_manager::NodeId;
28
#[derive(Debug, Clone, Serialize, Deserialize)]
29
#[serde(deny_unknown_fields)]
30
pub struct BlockchainSyncConfig {
31
    /// The initial max sync latency. If a peer fails to stream a header/block within this deadline another sync peer
32
    /// will be selected. If there are no further peers the sync will be restarted with an increased by
33
    /// `max_latency_increase`.
34
    #[serde(with = "serializers::seconds")]
35
    pub initial_max_sync_latency: Duration,
36
    /// If all sync peers exceed latency, increase allowed latency by this value
37
    #[serde(with = "serializers::seconds")]
38
    pub max_latency_increase: Duration,
39
    /// Longer ban period for potentially malicious infractions (protocol violations etc.)
40
    #[serde(with = "serializers::seconds")]
41
    pub ban_period: Duration,
42
    /// Short ban period for infractions that are likely not malicious (slow to respond, spotty connections etc)
43
    #[serde(with = "serializers::seconds")]
44
    pub short_ban_period: Duration,
45
    /// An allowlist of sync peers from which to sync. No other peers will be selected for sync. If empty, sync peers
46
    /// are chosen based on their advertised chain metadata.
47
    pub forced_sync_peers: Vec<NodeId>,
48
    /// An allowed list of nodes which should always be connected to
49
    pub monitored_peers: Vec<NodeId>,
50
    /// Number of threads to use for validation
51
    pub validation_concurrency: usize,
52
    /// The RPC deadline to set on sync clients. If this deadline is reached, a new sync peer will be selected for
53
    /// sync.
54
    #[serde(with = "serializers::seconds")]
55
    pub rpc_deadline: Duration,
56
    /// The number of initial rounds of seed peer based bootstrapping.
57
    #[serde(default = "default_num_initial_sync_rounds_seed_bootstrap")]
58
    pub num_initial_sync_rounds_seed_bootstrap: usize,
59
    /// The maximum reorg depth allowed during header synchronization.
60
    #[serde(default = "max_reorg_depth_allowed")]
61
    pub max_reorg_depth_allowed: usize,
62
}
63

64
fn default_num_initial_sync_rounds_seed_bootstrap() -> usize {
×
65
    // This should ideally match or be related to DhtConfig.network_discovery.max_seed_peer_sync_count
66
    // For now, a sensible default. This will be overridden by DhtEvent if DhtNetworkDiscoveryRoundInfo provides
67
    // total_rounds.
68
    5
×
69
}
×
70

71
fn max_reorg_depth_allowed() -> usize {
×
72
    10000
×
73
}
×
74

75
impl Default for BlockchainSyncConfig {
76
    fn default() -> Self {
×
77
        Self {
×
78
            initial_max_sync_latency: Duration::from_secs(240), // Syncing many full blocks over tor require this
×
79
            max_latency_increase: Duration::from_secs(10),      // Syncing many full blocks over tor require this
×
80
            ban_period: Duration::from_secs(60 * 60 * 2),       // 2 hours
×
81
            short_ban_period: Duration::from_secs(240),         // 4 mins
×
82
            forced_sync_peers: Default::default(),
×
83
            monitored_peers: Default::default(),
×
84
            validation_concurrency: 6,
×
85
            rpc_deadline: Duration::from_secs(240), // Syncing many full blocks over tor require this
×
86
            num_initial_sync_rounds_seed_bootstrap: default_num_initial_sync_rounds_seed_bootstrap(),
×
87
            max_reorg_depth_allowed: max_reorg_depth_allowed(),
×
88
        }
×
89
    }
×
90
}
91

92
impl BlockchainSyncConfig {
93
    // Add an accessor if one doesn't exist for the new field
94
    pub fn num_initial_sync_rounds_seed_bootstrap(&self) -> usize {
×
95
        self.num_initial_sync_rounds_seed_bootstrap
×
96
    }
×
97
}
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