Skip to content

feat(client): log the provider that served each completed range - #2650

Merged
yigitdot merged 4 commits into
mainfrom
fix/2332-log-serving-provider
Oct 27, 2026
Merged

yigitdot merged 4 commits into
mainfrom
fix/2332-log-serving-provider

Conversation

@yigitdot

@yigitdot yigitdot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

The client logs lane faults with their provider but never who delivered the bytes: after a few NotFound refusals, no line says which node served the blob (#2332's Whisper pull shows four discovered nodes, three refusals, and no attribution). Adds an INFO line in run_worker's completion arm with provider, hash, offset, len and landed bytes, matching the fault lines' field names so completions join to faults and steals without offset arithmetic. A pick that verified no byte logs nothing.

len ends at the unit's verified prefix (UnitProgress::frontier), not at stop_at: a steal that finds the victim already past its split keeps the victim's end where the victim reached while stop_at stays at the split, so the frontier is the victim's real end in every steal branch, and it also bounds a retired lane that stops between gaps.

The existing debug line "a lane stopped its stream at a steal split" now fires only for a real steal stop: the verified prefix must stop short of the range's end (a declined steal lets the victim reach it), and the lane must not be retired (a key swap lowers the lane's own end with no steal). It logs both split and reached.

The line names the provider by its on-chain address only: StreamCandidate carries no node ID, and the fault lines use the same address.

Test: a_slow_victim_is_stolen_from_once (a fast and a slow ScriptedSource, one steal) now also captures the log and asserts the fast source logs two completions, the slow victim one, and the logged extents tile the blob — which fails if the victim logs its untrimmed pick. The existing CapturedLog writer moved to module level so both log tests share it.

The per-file "served by" breakdown on the CLI completion line stays open as a follow-up.

Closes #2332

🤖 Generated with Claude Code

run_worker's completion arm now logs, at info, the provider, hash,
offset, len and landed bytes of each range that landed bytes. len is
the completed extent: up to a peer's steal split when one trimmed the
range. Field names match the fault lines so completions join to faults
and steals without offset arithmetic.

Closes #2332

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 21:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-code-quality

github-code-quality Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: Rust, Solidity

Rust / code-coverage/cargo-llvm-cov

main fd32581 fix/2332-log-serving... 845838e +/-
77% 77% 0%

Solidity / code-coverage/forge

main fd32581 fix/2332-log-serving... 845838e +/-
92% 92% 0%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 27, 2026 22:36 UTC

…efix

A steal that finds the victim past its split keeps the victim's end where
the victim reached, but stop_at stays at the split, so len read from it
under-reported the victim's extent and left those bytes unattributed. len
now comes from the unit's verified frontier, which also bounds a retired
lane that stops between gaps.

The log assertions move into a_slow_victim_is_stolen_from_once, which ran
the same fetch, and parse the event's fields after its message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

yigitdot and others added 2 commits October 28, 2026 01:23
A declined steal leaves stop_at at the split while the victim reaches its
end, so the debug line claimed a stop that did not happen. It now also
needs the verified prefix short of the end, and logs both split and
reached.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A key swap lowers the lane's own end with no steal, so the debug line
said "steal split" for a stop no peer made. The arm reads retired once
and reuses it for the clear.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@yigitdot
yigitdot merged commit c564e2a into main Oct 27, 2026
37 checks passed
@yigitdot
yigitdot deleted the fix/2332-log-serving-provider branch October 27, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(client): log the provider that served each completed range

3 participants