Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

possible message loss in devp2p implementation #4107

Closed
paulperegud opened this issue Jan 10, 2017 · 1 comment
Closed

possible message loss in devp2p implementation #4107

paulperegud opened this issue Jan 10, 2017 · 1 comment
Assignees
Labels
F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust.

Comments

@paulperegud
Copy link
Contributor

paulperegud commented Jan 10, 2017

(I've just started to learn Rust, so please be gentle)

Commit that contains the implementation of subprotocol and a test program:
paulperegud@6107e98
Branch: https://github.com/paulperegud/parity/tree/buggy-pinger
Code is based on tag v1.4.8

Full instruction on how to run: https://github.com/paulperegud/parity/blob/buggy-pinger/util/network/PINGER

This is a program that implements devp2p subprotocol with rudimentary functionality. On established connection both endpoints send 100 messages with packet_id=1 to each other. When message with packet_id<6 is received, counter corresponding to this packet_id is increased and message with packet_id increased by one is sent back. If all messages are delivered (and pinger is written correctly) counters for all packet_id's in range 1..6 should be set to 100. Total of 1200 messages are being exchanged.

Other notes:

  1. Please note that in every 1..N chain of messages only last message, numbered N is sometimes lost.
  2. If sleeps are inserted and amount messages per second is small, no messages are being lost.
  3. This code has been tested on Linux and OSX. Problem manifests only on Linux.

EDIT: fixed link and typoes

@arkpar arkpar self-assigned this Jan 10, 2017
@rphmeier rphmeier added F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust. labels Jan 10, 2017
@arkpar
Copy link
Collaborator

arkpar commented Jan 10, 2017

Thanks for a detailed report. I've reproduced the issue and can confirm that this has been fixed by #4102

@arkpar arkpar closed this as completed Jan 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

No branches or pull requests

3 participants