avalanche-rs icon indicating copy to clipboard operation
avalanche-rs copied to clipboard

Add gossipable trait + relevant logic

Open Sanghren opened this issue 1 year ago • 7 comments

Summary

This pull request is an initial attempt to address the issue: https://github.com/ava-labs/avalanche-rs/issues/29

Changes

Added traits for Gossipable and Set. Implemented logic for Gossiper and Handler (first dab at it). Build rust source from the sdk.proto Dummy Client implementation (real implementation out of scope of this PR, imho) Basic Handler implemenation.

ToDos

[ ] More tests [ ] Logic review (feel like i can improve stuff)

Questions

  1. Test File Structure: Currently, I've included tests within the same file as the logic they're intended to test. Is it better to separate them into their own files?
  2. Dependency Choices: I opted for using the probabilistic-collections crate for its BloomFilter implementation. Is there a preferred alternative that I should consider?
  3. File Placement: I'm uncertain where to place the sdk.proto file and its corresponding Rust-generated file. Could you please provide guidance on this?

Would love to have feedback on this. First dive into avalanche-rs so am not really familiar with it.

Sanghren avatar Sep 14 '23 07:09 Sanghren