Skip to content

fix(consensus): record commit-sync fetch faults on the serving peer - #12664

Open
VorobyevIlya wants to merge 11 commits into
developfrom
consensus/fix/commit-sync-fetch-fault-attribution
Open

fix(consensus): record commit-sync fetch faults on the serving peer#12664
VorobyevIlya wants to merge 11 commits into
developfrom
consensus/fix/commit-sync-fetch-fault-attribution

Conversation

@VorobyevIlya

@VorobyevIlya VorobyevIlya commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Description of change

The fast and regular commit syncers dropped peer-attributable fetch faults that the transaction-sync path already records, so honest validators could end up with different per-peer misbehavior counts depending on which path served the data.

  • Malformed or unrequested transaction entries and payloads failing verification against their refs are now charged to the serving peer as unprovable faults on both commit-sync paths, matching the transaction-sync path.
  • Fetched headers are now verified against the requested set instead of by position: an unrequested, duplicate, or malformed header is charged to the serving peer, as is a response with more entries than requested (new TooManyFetchedHeadersReturned, rejected before parsing).
  • Incomplete responses stay untracked (FetchedTransactionsMismatch, NotEnoughHeadersFetched, renamed from UnexpectedNumberOfHeadersFetched): the server may lack the data or clip the request to its own local limits, and the client keeps partial data on mid-stream errors, so an honest response can arrive incomplete. Truncation only drops whole entries, which is why faults inside a delivered entry remain attributable.

Links to any relevant issues

fixes #12362

How the change has been tested

  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

@iota-ci iota-ci added consensus Issues related to the Core Consensus team core-protocol labels Aug 13, 2026
@VorobyevIlya
VorobyevIlya force-pushed the consensus/fix/commit-sync-fetch-fault-attribution branch from 15fff5c to f446c12 Compare August 14, 2026 16:11
@VorobyevIlya
VorobyevIlya marked this pull request as ready for review August 14, 2026 23:17
@VorobyevIlya
VorobyevIlya requested a review from a team as a code owner August 14, 2026 23:17
@VorobyevIlya VorobyevIlya self-assigned this Aug 14, 2026
@VorobyevIlya
VorobyevIlya force-pushed the consensus/fix/commit-sync-fetch-fault-attribution branch from f446c12 to 65fb4da Compare August 19, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consensus Issues related to the Core Consensus team core-protocol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(starfish-core): align UnexpectedTransactionForCommit misbehavior attribution across fetch paths

2 participants