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

GossipSub v1.2: IDONTWANT control message and priority queue. #553

Merged
merged 31 commits into from
Aug 16, 2024

Commits on Aug 9, 2024

  1. Replace sending channel with the smart rpcQueue

    Since we want to implement a priority queue later, we need to replace
    the normal sending channels with the new smart structures first.
    ppopth committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    6877d7b View commit details
    Browse the repository at this point in the history
  2. Implement UrgentPush in the smart rpcQueue

    UrgentPush allows you to push an rpc packet to the front of the queue so
    that it will be popped out fast.
    ppopth committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    7ddc486 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dc45ebb View commit details
    Browse the repository at this point in the history
  4. Send IDONTWANT right before validation step

    Most importantly, this commit adds a new method called PreValidation to
    the interface PubSubRouter, which will be called right before validating
    the gossipsub message.
    
    In GossipSubRouter, PreValidation will send the IDONTWANT controll
    messages to all the mesh peers of the topics of the received messages.
    ppopth committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    f06b3b2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    22d9773 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    62daad4 View commit details
    Browse the repository at this point in the history
  7. Handle IDONTWANT control messages

    When receiving IDONTWANTs, the host should remember the message ids
    contained in IDONTWANTs using a hash map.
    
    When receiving messages with those ids, it shouldn't forward them to the
    peers who already sent the IDONTWANTs.
    
    When the maximum number of IDONTWANTs is reached for any particular
    peer, the host should ignore any excessive IDONTWANTs from that peer.
    ppopth committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    53b1393 View commit details
    Browse the repository at this point in the history
  8. Clear expired message IDs from the IDONTWANT cache

    If the messages IDs received from IDONTWANTs are older than 3
    heartbeats, they should be removed from the IDONTWANT cache.
    ppopth committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    4e930a7 View commit details
    Browse the repository at this point in the history
  9. Keep the hashes of IDONTWANT message ids instead

    Rather than keeping the raw message ids, keep their hashes instead to
    save memory and protect again memory DoS attacks.
    ppopth committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    1afead5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6fabcdd View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    4db112f View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2024

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

Commits on Aug 11, 2024

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

Commits on Aug 13, 2024

  1. Not use pointers in rpcQueue

    ppopth committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    55abc3b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d1aa4d9 View commit details
    Browse the repository at this point in the history
  3. Check ctx error in rpc sending worker

    Co-authored-by: Steven Allen <steven@stebalien.com>
    ppopth and Stebalien authored Aug 13, 2024
    Configuration menu
    Copy the full SHA
    1914320 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2024

  1. Configuration menu
    Copy the full SHA
    810f65f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c507ef View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    97fa9b0 View commit details
    Browse the repository at this point in the history
  4. Fix misc lint errors

    ppopth committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    3ae4239 View commit details
    Browse the repository at this point in the history
  5. fixup! Fix misc lint errors

    ppopth committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    8e49e05 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2024

  1. Revert "Increase GossipSubMaxIHaveMessages to 1000"

    This reverts commit 6fabcdd.
    ppopth committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    6de02f3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e5704b6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f4b05f4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e5c971c View commit details
    Browse the repository at this point in the history
  5. Skip FuzzAppendOrMergeRPC

    ppopth committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    f141e13 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2024

  1. Revert "Skip FuzzAppendOrMergeRPC"

    This reverts commit f141e13.
    ppopth committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    0d9f553 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    baba9e1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9bdeb9b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6491d8e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    79dcdc8 View commit details
    Browse the repository at this point in the history