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

tari-project / tari / 19257987480

11 Nov 2025 07:12AM UTC coverage: 50.496% (-1.1%) from 51.608%
19257987480

push

github

web-flow
fix(sidechain)!: adds shard group accumulated data to checkpoint (#7577)

Description
---
fix(sidechain)!: adds shard group accumulated data to checkpoint

Motivation and Context
---
This PR adds accumulated data typ to the sidechain header used for epoch
checkpoints.

Related https://github.com/tari-project/tari-ootle/pull/1639

How Has This Been Tested?
---
Updated fixtures for tests

What process can a PR reviewer use to test or verify this change?
---

<!-- 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
---

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

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->

BREAKING CHANGE: Previous commit proofs (epoch checkpoints, etc.) are
not compatible. These are not enabled on mainnet.


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

## Summary by CodeRabbit

## Release Notes

* **New Features**
* Added accumulated exhaust burn tracking to sidechain block headers,
enabling storage and retrieval of total exhaust burn metrics within
block validation data.

* **Chores**
* Updated protocol definitions and conversion logic to support the new
accumulated data structure.
* Refreshed test fixtures and block header schemas to accommodate
expanded metadata requirements.

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

1 of 20 new or added lines in 2 files covered. (5.0%)

1479 existing lines in 36 files now uncovered.

57906 of 114674 relevant lines covered (50.5%)

8050.74 hits per line

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

0.0
/base_layer/core/src/base_node/proto/rpc.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::convert::{TryFrom, TryInto};
24

25
use tari_node_components::blocks::Block;
26
use tari_transaction_components::rpc::models::FeePerGramStat;
27
use tari_utilities::ByteArray;
28

29
use crate::proto::base_node as proto;
30

31
impl TryFrom<Block> for proto::BlockBodyResponse {
32
    type Error = String;
33

UNCOV
34
    fn try_from(block: Block) -> Result<Self, Self::Error> {
×
35
        Ok(Self {
UNCOV
36
            hash: block.hash().to_vec(),
×
UNCOV
37
            body: Some(block.body.try_into()?),
×
38
        })
UNCOV
39
    }
×
40
}
41

42
impl From<Vec<FeePerGramStat>> for proto::GetMempoolFeePerGramStatsResponse {
43
    fn from(stats: Vec<FeePerGramStat>) -> Self {
×
44
        Self {
×
45
            stats: stats.into_iter().map(Into::into).collect(),
×
46
        }
×
47
    }
×
48
}
49

50
impl From<FeePerGramStat> for proto::MempoolFeePerGramStat {
51
    fn from(stat: FeePerGramStat) -> Self {
×
52
        Self {
×
53
            order: stat.order,
×
54
            min_fee_per_gram: stat.min_fee_per_gram.as_u64(),
×
55
            avg_fee_per_gram: stat.avg_fee_per_gram.as_u64(),
×
56
            max_fee_per_gram: stat.max_fee_per_gram.as_u64(),
×
57
        }
×
58
    }
×
59
}
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