Detect and handle malice: InvalidResponse

Description

handle_response is called with events such that the latest event doesn’t have Cause::Request (which means that the author didn’t follow the request/response protocol)

The response may not be timely (right after the request) :

A response could be responding to no request:

In that case, handle_response should return Error<InvalidResponse>

Note that the impl and testing tasks need to cover two aspects:

  • Ensure handle_response() fails if the message is not in response to an unanswered request we already sent.

  • Detect and handle cases where any other peer's response doesn't meet these requirements.

Environment

None

Assignee

Unassigned

Reporter

Qi Ma

Start date

2018/08/10

End date

2018/08/10

Task progress

None

Baseline start date

None

Baseline end date

None

Components

Priority

Minor
Configure