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

tari-project / tari / 40691582512
79%

Build:
DEFAULT BRANCH: development
Ran 28 Oct 2026 02:38PM UTC
Jobs 1
Files 799
Run time 1min
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

28 Oct 2026 12:53PM UTC coverage: 77.114% (+0.5%) from 76.663%
40691582512

push

github

web-flow
fix(miner): handle stratum responses without a method field (#8192)

Stratum mode in `minotari_miner` has been broken since v5.0.0. #7411
changed the request/response check in the stratum client to
`v.get("method").expect(..)`. JSON-RPC responses (the login reply,
submit replies, keepalive replies) have no `method` field, so the first
response from any pool panicked the `client_controller` thread. Its join
handle was discarded, so the miner kept running on a stale job until the
next keepalive failed about 30 s later and the process exited with a
misleading `SendError`.

This PR fixes the panic and hardens the stratum client against malformed
or hostile pool input.

## Fix
- Requests and responses are classified the way they were before #7411:
`method == "job"` is a request, everything else is a response. No panic
path is left.
- The client thread is supervised. `run_miner` races `mc.run()` against
a oneshot that the client thread fires from `catch_unwind`. If the
client thread stops, the miner exits at once with `Stratum client
controller stopped unexpectedly: <reason>`. There is no blocking join,
so a panic elsewhere can't hang the runtime on shutdown.
- The mining loop awaits on every pass, including after a share submit,
so the supervisor is always polled.

## Hardening of pool input handling
- **Line reader:** a persistent buffer survives `WouldBlock`, so split
messages are no longer dropped. The newline scan is incremental, lines
are capped at 128 KiB (enough for the base64 of a max-size header), and
an over-long line triggers a reconnect.
- **Parsing:** each line is parsed into a `Value` once. Responses are
deserialised by reference with no per-type clones. Jobs with a target of
0 are rejected, oversized blobs are rejected before they're queued, and
the pool-supplied worker id is capped at 256 bytes.
- **Channels:** both channels between the client thread and the mining
controller are now bounded at 16.
- Jobs use a blocking send, which gives ba... (continued)

138434 of 179518 relevant lines covered (77.11%)

337046.07 hits per line

Coverage Regressions

Lines Coverage ∆ File
693
58.44
1.7% base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
66
89.45
1.46% base_layer/core/src/chain_storage/lmdb_db/validator_node_store.rs
66
84.06
-3.81% base_layer/core/src/validation/aggregate_body/aggregate_body_chain_validator.rs
56
72.32
-0.06% base_layer/core/src/validation/helpers.rs
55
90.47
0.37% base_layer/core/src/mempool/mempool_storage.rs
50
77.33
2.03% base_layer/core/src/test_helpers/blockchain.rs
25
89.18
1.65% base_layer/transaction_components/src/validation/aggregate_body/aggregate_body_internal_validator.rs
17
86.98
-0.2% base_layer/core/src/chain_storage/lmdb_db/cursors.rs
17
75.68
-15.32% base_layer/transaction_components/src/transaction_components/side_chain/validator_node_registration.rs
14
55.26
0.0% base_layer/core/src/validation/error.rs
9
97.0
-0.54% base_layer/transaction_components/src/consensus/consensus_constants.rs
8
79.86
-5.76% base_layer/transaction_components/src/transaction_components/output_features.rs
7
77.95
0.83% comms/core/src/connectivity/manager.rs
6
68.47
-5.41% base_layer/transaction_components/src/transaction_components/side_chain/sidechain_feature.rs
5
87.03
-0.54% base_layer/core/src/base_node/service/service.rs
5
73.08
0.0% base_layer/wallet/src/output_manager_service/storage/sqlite_db/mod.rs
5
77.43
-0.06% base_layer/wallet/src/transaction_service/storage/sqlite_db.rs
5
93.65
0.2% comms/dht/src/outbound/broadcast.rs
4
0.0
-13.33% base_layer/core/src/base_node/comms_interface/comms_response.rs
3
37.5
-12.5% base_layer/common_types/src/epoch.rs
3
90.0
17.27% base_layer/core/src/chain_storage/active_validator_node.rs
3
0.0
0.0% base_layer/transaction_components/src/validation/error.rs
3
67.49
-1.48% comms/core/src/connectivity/requester.rs
3
90.41
-4.11% comms/core/src/pipeline/inbound.rs
3
98.36
-0.19% infrastructure/tari_script/src/script.rs
2
66.87
8.08% base_layer/core/src/chain_storage/blockchain_database.rs
2
95.67
-0.43% base_layer/core/src/proof_of_work/randomx_factory.rs
2
84.68
-0.29% comms/core/src/protocol/rpc/client/mod.rs
1
94.35
0.85% base_layer/core/src/mempool/service/inbound_handlers.rs
1
75.72
-0.22% base_layer/core/src/mempool/sync_protocol/mod.rs
1
97.73
0.46% base_layer/core/src/mempool/unconfirmed_pool/unconfirmed_pool.rs
1
99.93
0.02% base_layer/core/src/validation/block_body/test.rs
1
83.89
0.09% base_layer/wallet/src/storage/sqlite_db/wallet.rs
1
88.85
-0.17% comms/core/src/connection_manager/dialer.rs
1
87.65
0.0% comms/core/src/protocol/messaging/inbound.rs
1
36.36
-9.09% comms/dht/src/outbound/error.rs
1
33.96
-1.89% comms/dht/src/outbound/message.rs
Jobs
ID Job ID Ran Files Coverage
1 40691582512.1 28 Oct 2026 02:38PM UTC 799
77.11
GitHub Action Run
Source Files on build 40691582512
  • Tree
  • List 799
  • Changed 54
  • Source Changed 14
  • Coverage Changed 54
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40691582512
  • 37a7c1c8 on github
  • Prev Build on development (#40514277563)
  • Next Build on development (#40754488439)
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