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

feat: iroh-gossip #1149

Merged
merged 71 commits into from
Aug 4, 2023
Merged

feat: iroh-gossip #1149

merged 71 commits into from
Aug 4, 2023

Commits on Aug 4, 2023

  1. feat: iroh-gossip initial commit

    This commit imports iroh-gossip into the repo. See n0-computer/iroh-sync#1 for the prehistory.
    
    * From that original PR comes my IO-less implementation of the gossip protocol
      (Plumtree broadcast trees and HyParView cluster membership). The
      implementations are quite strict according to the papers
      [1](https://asc.di.fct.unl.pt/~jleitao/pdf/dsn07-leitao.pdf) and
      [2](https://asc.di.fct.unl.pt/~jleitao/pdf/srds07-leitao.pdf). If you
      find any deviations that are not documented, please report, this is
      likely a bug.
    * The combined protocol for Plumtree and Hyparview is additionally namespaced
      with a 32-byte topic ID to allow multiple broadcast trees (one per
      topic) to coexist. This means: Each topic is a seperate broadcast tree
      with seperate swarm membership and active connections (connections to
      the same peers are still shared on the network layer)
    
    This IO-less protocol implementation is in the `proto` module.
    
    This PR *also* adds my work from the past week: A `net` module that provides networking
    for the IO-less protocol impl, through the `MagicEndpoint` from iroh-net, with a (I think) quite straightforward actor implementation.
    
    The `net` module has a smoke test, and the PR also includes a `chat` example that adds signed messages on the trustless base layer.
    
    What this mostly needs is, I think, more testing and validation of the
    protocol implementation. For this to be practical, I think we should
    formulate some base usecase scenarios.
    
    The `proto` module has a very simple simulator and some tests that can
    take environment variables to increase the cluster size. They passed
    with 10.000 nodes. They also report some stats. The numbers look OK-ish,
    but I'd love to compare them properly with either other implementations
    or estimations from the original paper or other resoures. However, those
    are hard to find.
    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    5ca2fa2 View commit details
    Browse the repository at this point in the history
  2. fix(gossip): make util pub

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    523b14e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9e28f42 View commit details
    Browse the repository at this point in the history
  4. chore: make clippy happy

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    a1a2d93 View commit details
    Browse the repository at this point in the history
  5. feat: transmit opaque PeerData on join, forward and neighbor

    ... and wire it up in net module to transmit your endpoint addresses
    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    209a008 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9433104 View commit details
    Browse the repository at this point in the history
  7. chore: clippy

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    d6c6181 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c24d1f5 View commit details
    Browse the repository at this point in the history
  9. fix: changes after rebase

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    7d0581a View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    60a88b3 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    88378b4 View commit details
    Browse the repository at this point in the history
  12. change: do not error on connect without addrs

    Before MagicEndpoint::connect would error if called without addrs or
    derp_region. This commit changes this by only warning and not bailing.
    This allows to connect to peers by peer id only if addresses or a derp_region
    were provided previously.
    
    The downside is that we lose a valuable error case. A more proper fix
    will need to move the check if a peer is dialable into the actor.
    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    4880e06 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    40473a8 View commit details
    Browse the repository at this point in the history
  14. chore: clippy

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    37f9f28 View commit details
    Browse the repository at this point in the history
  15. docs: document public items in iroh-gossip

    also renames mod.rs files to modname.rs
    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    bce578b View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    616055f View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    9aee1c5 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    82b8625 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    c7dd843 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    1ba34b4 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    f8d2f5b View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    9d4ff8c View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    7d81bee View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    a7133fa View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    ee68979 View commit details
    Browse the repository at this point in the history
  26. docs: more links

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    65b866e View commit details
    Browse the repository at this point in the history
  27. fix: changes after rebase

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    ad7bd55 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    c89472e View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    98e5d6a View commit details
    Browse the repository at this point in the history
  30. chore: clippy

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    84dfab3 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    36f599a View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    7927e65 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    7e3acfd View commit details
    Browse the repository at this point in the history
  34. docs for le people and le me

    divagant-martian authored and Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    e469b9e View commit details
    Browse the repository at this point in the history
  35. fmt

    divagant-martian authored and Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    72e0a28 View commit details
    Browse the repository at this point in the history
  36. docs: plumtree

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    6f08f5d View commit details
    Browse the repository at this point in the history
  37. docs: hyparview

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    efdfc13 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    3a5addf View commit details
    Browse the repository at this point in the history
  39. chore: cleanup

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    dbeb3fb View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    38cb7ee View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    c7f4327 View commit details
    Browse the repository at this point in the history
  42. fix: postcard is required

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    2418a57 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    0a5ffe5 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    e02123f View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    d561e6b View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    71280fa View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    5ad5924 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    1548381 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    c78a027 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    373a953 View commit details
    Browse the repository at this point in the history
  51. docs: typos

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    680ed0a View commit details
    Browse the repository at this point in the history
  52. docs: fix

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    270efd5 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    e5373b4 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    06a6e30 View commit details
    Browse the repository at this point in the history
  55. docx: fix

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    55ed2fd View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    f19872c View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    a045ca9 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    7ea6ba4 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    4735019 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    00ea3b9 View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    819bf54 View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    aaa419b View commit details
    Browse the repository at this point in the history
  63. chore: clippy & fmt

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    315e3c9 View commit details
    Browse the repository at this point in the history
  64. fix: renames in doc comments

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    4e0f768 View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    ff1c300 View commit details
    Browse the repository at this point in the history
  66. chore: fmt

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    d45210d View commit details
    Browse the repository at this point in the history
  67. chore: remove unneeded line

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    f85b079 View commit details
    Browse the repository at this point in the history
  68. Configuration menu
    Copy the full SHA
    8aead0e View commit details
    Browse the repository at this point in the history
  69. Configuration menu
    Copy the full SHA
    1b28a94 View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    3145b6a View commit details
    Browse the repository at this point in the history
  71. chore: remove debug leftovers

    Frando committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    19eef0f View commit details
    Browse the repository at this point in the history