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

tari-project / tari / 36550566220
71%

Build:
DEFAULT BRANCH: development
Ran 29 Sep 2026 10:38AM UTC
Jobs 1
Files 791
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

29 Sep 2026 09:38AM UTC coverage: 63.875% (-0.1%) from 64.016%
36550566220

push

github

web-flow
refactor(ledger): shared wire-format codec for every APDU layout (#8056)

Description
---
Makes `minotari_ledger_wallet_common` the single definition of every
Ledger APDU wire layout: commands, replies, and the `GetScriptOffset`
chunk assembly. The host encoders (`comms/src/accessor_methods.rs`) and
the device decoders (`wallet/src/handlers/*.rs`) both call it.

This is a pure refactor of the wire format. **Every byte on the wire is
unchanged**, and every device check fires in the same order with the
same status word. The one intentional behaviour change is the security
fix described below.

- **Codec:** `common/src/codec/`.
- Decoding is zero-copy: `&'a [u8; N]` fields borrowed from the APDU
buffer, with no indexing that can panic.
- Encoding writes into an `impl Writer` sink. A host-only `to_vec()`
sits behind a new `alloc` feature, which the device doesn't enable.
- Boundary types are raw bytes, `u64` and `u8` only, with no
`tari_crypto` dependency. The codec frames the data; it does not
validate it. Canonical-bytes checks stay at each edge.
- **Shared constants:** `CLA` and `RESPONSE_VERSION` are each one
constant in `common::codec`. This replaces `WALLET_CLA`/`CLA` and
`EXPECTED_RESPONSE_VERSION`/`RESPONSE_VERSION`.
- **Raw escape hatch:** `build_command` and `build_chunk_command` move
to `comms::raw`, documented as being for payloads the typed encoders
refuse to construct. They are not sealed, because the ledger demo and
the Speculos scenarios use them to send deliberately malformed chunk
sequences.
- **Registry test:** an exhaustive `match` over `Instruction`. Adding a
variant without an encoder fails to compile.
- **Cleanups:** `Bip32Path` (dead code) is deleted. `u64_to_string`
moves into `common`, with no panic path and edge tests.

The commits follow the planned landing order and are meant to be
reviewed one at a time. The golden vectors pass unchanged at every
commit.
1. `test(ledger): golden encode vectors for every instruction`. This
add... (continued)

1189 of 1199 new or added lines in 12 files covered. (99.17%)

985 existing lines in 26 files now uncovered.

92595 of 144962 relevant lines covered (63.88%)

771625.64 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
70.95
48.41% applications/minotari_ledger_wallet/comms/src/accessor_methods.rs
3
97.81
applications/minotari_ledger_wallet/common/src/codec/metadata.rs
1
99.37
applications/minotari_ledger_wallet/common/src/codec/mod.rs

Coverage Regressions

Lines Coverage ∆ File
413
52.66
-7.64% base_layer/core/src/chain_storage/blockchain_database.rs
266
33.85
-45.7% base_layer/core/src/base_node/rpc/query_service.rs
100
54.19
-1.18% base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
67
85.93
-10.24% base_layer/core/src/base_node/sync/header_sync/validator.rs
39
71.12
-4.17% base_layer/core/src/base_node/sync/horizon_state_sync/synchronizer.rs
22
74.39
-1.82% base_layer/core/src/test_helpers/blockchain.rs
18
19.7
-27.27% base_layer/core/src/chain_storage/block_add_result.rs
7
75.73
-6.8% base_layer/core/src/blocks/accumulated_data.rs
6
81.82
-9.09% base_layer/common_types/src/types/fixed_hash.rs
5
62.39
-1.42% base_layer/core/src/chain_storage/db_transaction.rs
4
80.86
-0.64% base_layer/core/src/chain_storage/lmdb_db/lmdb.rs
4
88.64
-4.55% base_layer/core/src/test_helpers/block_spec.rs
4
76.14
-4.55% base_layer/core/src/validation/block_body/block_body_full_validator.rs
4
87.2
-0.73% comms/core/src/connection_manager/peer_connection.rs
4
68.94
-0.62% comms/dht/src/connectivity/mod.rs
3
98.43
-1.18% base_layer/core/src/consensus/base_node_consensus_manager.rs
3
22.64
-5.66% base_layer/core/src/validation/error.rs
3
61.45
-3.61% base_layer/core/src/validation/mocks.rs
3
67.44
-6.98% base_layer/node_components/src/blocks/historical_block.rs
3
67.57
-8.11% comms/core/src/peer_manager/error.rs
2
73.07
1.1% comms/core/src/connectivity/manager.rs
1
69.81
-0.24% base_layer/core/src/mempool/sync_protocol/mod.rs
1
62.25
1.23% base_layer/core/src/validation/helpers.rs
1
89.82
-0.18% base_layer/p2p/src/services/liveness/service.rs
1
78.72
-0.13% base_layer/wallet/src/storage/sqlite_db/wallet.rs
1
91.45
-0.29% comms/core/src/multiplexing/yamux.rs
Jobs
ID Job ID Ran Files Coverage
1 36550566220.1 29 Sep 2026 10:38AM UTC 791
63.88
GitHub Action Run
Source Files on build 36550566220
  • Tree
  • List 791
  • Changed 42
  • Source Changed 5
  • Coverage Changed 42
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36550566220
  • 09c501da on github
  • Prev Build on development (#36461308808)
  • Next Build on development (#36560855364)
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