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

tari-project / tari / 36580513241
72%

Build:
DEFAULT BRANCH: development
Ran 29 Sep 2026 02:55PM UTC
Jobs 1
Files 792
Run time 3min
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

29 Sep 2026 02:09PM UTC coverage: 64.886% (+1.0%) from 63.849%
36580513241

push

github

web-flow
fix(jellyfish): harden deserialization and remove reachable panics (#8059)

Description
---
Hardens `tari_jellyfish` against malformed input and removes panics
reachable from stored or deserialized data:

- Bound `SparseMerkleProofExt` siblings to `MAX_PROOF_SIBLINGS` (256)
during borsh and serde decode, so oversized proofs are rejected before
allocation rather than in `verify`
- Validate deserialized invariants: `Nibble < 16`, `NibblePath`
length/trailing nibble consistency, `InternalNode` leaf count matches
children and no `Null` children
- Return errors instead of panicking in `get_range_proof` (missing key),
`get_hash` (hash cache miss), `gen_node_in_proof` (inconsistent storage)
and `batch_insert_at` (`Null` below root)
- Fix inverted bounds check in `NibblePath::get_bit` (`bits()` always
yielded nothing)

Motivation and Context
---
`SparseMerkleProofExt` is borsh-decoded from untrusted gRPC/block data
in the sidechain eviction proof path. Tree nodes deserialized from
storage (or synced from peers downstream) could trigger panics, which
are process-wide with `overflow-checks = true` in release.

How Has This Been Tested?
---
New unit tests for bounded proof decoding (borsh + serde, including a
`u32::MAX` declared length), nibble/nibble path/internal node
validation, and `NibblePath::bits`. Existing `tari_jellyfish` and
`tari_sidechain` tests pass.

What process can a PR reviewer use to test or verify this change?
---
`cargo test -p tari_jellyfish -p tari_sidechain`

Breaking Changes
---

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

No wire or hash format changes. Previously-accepted corrupt node data or
proofs with >256 siblings now fail to deserialize. `get_range_proof`
returns `Err(IndexNotFound)` instead of panicking for a missing key.


<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=71286575"><picture><so... (continued)

211 of 214 new or added lines in 2 files covered. (98.6%)

584 existing lines in 28 files now uncovered.

94617 of 145820 relevant lines covered (64.89%)

400226.74 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
80.25
5.3% infrastructure/jellyfish/src/tree.rs
1
70.19
13.96% infrastructure/jellyfish/src/types.rs

Coverage Regressions

Lines Coverage ∆ File
190
1.68
1.68% base_layer/wallet/src/transaction_service/handle.rs
72
84.93
0.0% base_layer/common_types/src/tari_address/mod.rs
34
84.16
-4.73% infrastructure/max_size/src/string.rs
33
85.98
19.52% infrastructure/max_size/src/vec.rs
31
97.09
0.47% infrastructure/tari_script/src/script.rs
29
91.38
2.73% infrastructure/tari_script/src/stack.rs
28
88.4
0.29% base_layer/core/src/blocks/genesis_block.rs
25
47.02
0.0% base_layer/transaction_components/src/transaction_components/output_features.rs
19
56.22
4.33% base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
19
88.42
4.66% infrastructure/max_size/src/bytes.rs
18
97.09
0.0% base_layer/core/src/proof_of_work/monero_rx/pow_data.rs
15
89.58
0.0% base_layer/transaction_components/src/transaction_components/covenants/arguments.rs
11
95.53
-1.82% base_layer/core/src/validation/header/header_full_validator.rs
10
95.82
4.06% base_layer/transaction_components/src/transaction_components/encrypted_data.rs
9
72.39
0.59% comms/core/src/connectivity/manager.rs
6
65.12
10.46% base_layer/core/src/chain_storage/blockchain_database.rs
6
96.95
2.84% base_layer/transaction_components/src/transaction_components/covenants/covenant.rs
5
81.98
-4.5% base_layer/transaction_components/src/transaction_components/covenants/token.rs
5
0.0
0.0% base_layer/transaction_components/src/transaction_components/side_chain/template_registration.rs
4
98.38
0.01% base_layer/common_types/src/tari_address/dual_address.rs
4
87.04
-0.4% base_layer/core/src/proof_of_work/cuckaroo_pow.rs
3
91.32
-1.37% base_layer/transaction_components/src/validation/helpers.rs
2
88.86
0.0% base_layer/core/src/validation/block_body/test.rs
2
69.57
0.16% comms/dht/src/connectivity/mod.rs
1
46.97
3.03% base_layer/core/src/chain_storage/block_add_result.rs
1
89.82
-0.18% base_layer/p2p/src/services/liveness/service.rs
1
82.14
-0.2% comms/core/src/noise/socket.rs
1
80.25
5.3% infrastructure/jellyfish/src/tree.rs
Jobs
ID Job ID Ran Files Coverage
1 36580513241.1 29 Sep 2026 02:55PM UTC 792
64.89
GitHub Action Run
Source Files on build 36580513241
  • Tree
  • List 792
  • Changed 53
  • Source Changed 23
  • Coverage Changed 51
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36580513241
  • 83586fd8 on github
  • Prev Build on development (#36560855364)
  • Next Build on development (#36590992162)
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