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

tari-project / tari / 33493219414
77%

Build:
DEFAULT BRANCH: development
Ran 01 Sep 2026 10:37AM UTC
Jobs 1
Files 709
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Sep 2026 09:37AM UTC coverage: 64.052% (+0.3%) from 63.739%
33493219414

push

github

web-flow
feat(sidechain)!: add a protocol version to the sidechain block header (#7983)

## Description

Adds a `protocol_version: u32` field to `SidechainBlockHeader` and makes
`calculate_hash` select its hash preimage schema from that field.

## Motivation and Context

The Ootle sidechain resolves its protocol version from a per-network
activation schedule (epoch → version). That table lives on the
sidechain, so today a block gives an L1 verifier no way to tell which
schema it was hashed under — the verifier has to already know the
schedule, and a node running a stale schedule silently hashes a
post-fork block under the superseded schema and diverges instead of
stopping.

Making the header self-describing moves that decision into the block
itself. `tari_sidechain` can hash any block it is handed with no
knowledge of the activation schedule at all, which keeps this crate free
of a table it would otherwise have to track across every sidechain fork.

The window matters: once validator registration is decentralised, the
header format is L1 consensus and changing it costs an L1 coordination
round. The Ootle side is already taking a protocol bump, so this is the
cheap moment to add it.

### Hashing

- Version 0 keeps the existing `BlockHeaderHashFieldsV1` preimage, which
carries no version. Every block ID committed so far stays reproducible —
the existing fixtures are unmodified by this PR and still validate.
- From version 1 the preimage is the new `BlockHeaderHashFieldsV2`,
which commits to `protocol_version` itself. Committing the version
explicitly (rather than relying on the variant discriminant) is what
keeps it non-malleable when a fork bumps the version without changing
the header shape — two such versions would otherwise share a preimage
and a block ID.

`BlockHeaderHashFields` variant indices are consensus-bound and
append-only.

### Compatibility

Version 0 is what a header decodes to when the field is absent, so no
reset is needed to adopt this:

- **s... (continued)

28 of 30 new or added lines in 2 files covered. (93.33%)

329 existing lines in 13 files now uncovered.

79343 of 123873 relevant lines covered (64.05%)

216087.18 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
12.08
-0.06% base_layer/core/src/proto/sidechain_feature.rs

Coverage Regressions

Lines Coverage ∆ File
286
35.68
32.16% applications/minotari_peer_sync/src/main.rs
11
75.03
0.54% base_layer/core/src/base_node/sync/horizon_state_sync/synchronizer.rs
6
92.18
-1.27% comms/dht/src/outbound/broadcast.rs
5
19.44
-13.89% base_layer/core/src/base_node/sync/horizon_state_sync/error.rs
5
54.97
1.36% base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
4
82.14
-0.79% comms/core/src/noise/socket.rs
3
89.5
0.46% base_layer/transaction_components/src/validation/helpers.rs
2
87.53
-0.46% base_layer/p2p/src/services/liveness/service.rs
2
81.8
-0.4% comms/core/src/connection_manager/dialer.rs
2
76.56
-3.13% comms/core/src/pipeline/outbound.rs
1
93.81
-0.19% base_layer/core/src/proof_of_work/monero_rx/merkle_tree.rs
1
99.52
0.48% base_layer/core/src/validation/block_body/test.rs
1
64.6
1.55% comms/dht/src/connectivity/mod.rs
Jobs
ID Job ID Ran Files Coverage
1 33493219414.1 01 Sep 2026 10:37AM UTC 709
64.05
GitHub Action Run
Source Files on build 33493219414
  • Tree
  • List 709
  • Changed 36
  • Source Changed 3
  • Coverage Changed 36
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33493219414
  • db5ef659 on github
  • Prev Build on development (#33423629872)
  • Next Build on development (#33502866981)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc