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

tari-project / tari / 17152995555

22 Aug 2025 10:35AM UTC coverage: 59.322% (+3.4%) from 55.905%
17152995555

push

github

web-flow
feat!: update c29 fork block (#7434)

Description
---

Updated the c29 fork block to be at height `95180` and approximately
`target_time = Tue, 16 Aug 2025 10:00:00 +0000`. This has been
calculated as follows:

- Get block timings from the base node for the last 10,000 blocks.

```
11:24 v5.0.0-pre.4 mainnet State: Listening Tip: 77442 (Fri, 22 Aug 2025 09:22:28 +0000) ...
>>
>> block-timing 10000
Timing for blocks #77442 - #67443
Max block time: 1443
Min block time: 1
Avg block time: 121.8988898889889
>>
>>
>> watch status
11:24 v5.0.0-pre.4 mainnet State: Listening Tip: 77442 (Fri, 22 Aug 2025 09:22:28 +0000) ...
```

Our start time is the time published by the base node:
- `start_time = Fri, 22 Aug 2025 09:22:28 +0000`

Our start block is the block published by the base node:
- `start_block = 77442`

Approximate time difference in seconds: `target_time - start_time =
2162147 seconds`. Using average block time, we get `77442 + 2162147 /
121.899 = 95179.2` then rounded up to `95180`.

Motivation and Context
---
The fork block height was wrong.

How Has This Been Tested?
---
See the calculation above.

What process can a PR reviewer use to test or verify this change?
---
Code review and review the calculation in the PR description.

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
BREAKING CHANGE: Consensus constant change to
`con_5.effective_from_height = 95_180;`.


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

* **Chores**
* Postponed the mainnet V2 network upgrade to block height 95... (continued)

1 of 1 new or added line in 1 file covered. (100.0%)

5077 existing lines in 113 files now uncovered.

70233 of 118392 relevant lines covered (59.32%)

538661.6 hits per line

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

0.0
/base_layer/core/src/base_node/service/error.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 tari_comms_dht::outbound::DhtOutboundError;
24
use tari_transaction_components::{BanPeriod, BanReason};
25
use thiserror::Error;
26

27
use crate::base_node::{comms_interface::CommsInterfaceError, service::initializer::ExtractBlockError};
28
#[derive(Debug, Error)]
29
pub enum BaseNodeServiceError {
30
    #[error("Comms interface error: `{0}`")]
31
    CommsInterfaceError(#[from] CommsInterfaceError),
32
    #[error("DHT outbound error: `{0}`")]
33
    DhtOutboundError(#[from] DhtOutboundError),
34
    #[error("Invalid request error: `{0}`")]
35
    InvalidRequest(String),
36
    #[error("Invalid response error: `{0}`")]
37
    InvalidResponse(String),
38
    #[error("Invalid block error: `{0}`")]
39
    InvalidBlockMessage(#[from] ExtractBlockError),
40
}
41

42
impl BaseNodeServiceError {
UNCOV
43
    pub fn get_ban_reason(&self) -> Option<BanReason> {
×
UNCOV
44
        match self {
×
UNCOV
45
            BaseNodeServiceError::CommsInterfaceError(e) => e.get_ban_reason(),
×
46
            BaseNodeServiceError::DhtOutboundError(_) => None,
×
47
            err @ BaseNodeServiceError::InvalidRequest(_) |
×
48
            err @ BaseNodeServiceError::InvalidResponse(_) |
×
49
            err @ BaseNodeServiceError::InvalidBlockMessage(_) => Some(BanReason {
×
50
                reason: err.to_string(),
×
51
                ban_duration: BanPeriod::Long,
×
52
            }),
×
53
        }
54
    }
×
55
}
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