Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p2p/discover, p2p/enode: rework endpoint proof handling, packet logging #18963

Merged
merged 6 commits into from
Jan 29, 2019

Commits on Jan 25, 2019

  1. Configuration menu
    Copy the full SHA
    3ec7922 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2019

  1. p2p/discover, p2p/enode: rework endpoint proof handling, packet logging

    This change resolves multiple issues around handling of endpoint proofs.
    The proof is now done separately for each IP and completing the proof
    requires a matching ping hash.
    
    Also remove waitping because it's equivalent to sleep. waitping was
    slightly more efficient, but that may cause issues with findnode if
    packets are reordered and the remote end sees findnode before pong.
    
    Logging of received packets was hitherto done after handling the packet,
    which meant that sent replies were logged before the packet that
    generated them. This change splits up packet handling into 'preverify'
    and 'handle'. The error from 'preverify' is logged, but 'handle' happens
    after the message is logged. This fixes the order. Packet logs now
    contain the node ID.
    fjl committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    e4aabbb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4bd7767 View commit details
    Browse the repository at this point in the history
  3. p2p/discover: fix tests

    fjl committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    d8fe86c View commit details
    Browse the repository at this point in the history
  4. p2p/discover: really fix tests

    fjl committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    28466e4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    63d7b76 View commit details
    Browse the repository at this point in the history