-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add gossipable trait + relevant logic #45
Draft
Sanghren
wants to merge
59
commits into
ava-labs:main
Choose a base branch
from
Sanghren:add_gossipable
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
5cbdd66
feat: add gossipable trait
a0e662a
feat: add gossip
aa7f63c
feat: add channel to gossiper
ed23c1e
feat: add gossipable trait
0c35d21
feat: add gossip
86580a6
feat: add channel to gossiper
bb397b9
Merge remote-tracking branch 'origin/add_gossipable' into add_gossipable
10657e0
feat: add bloom
baf2923
feat: add test for bloom
1fea689
feat: add test for bloom
9f1ab3b
Merge branch 'ava-labs:main' into add_gossipable
Sanghren f5a464b
Merge branch 'ava-labs:main' into add_gossipable
Sanghren 7ba33ea
feat: add proto
cc7edeb
feat: add proto generated file
231d93b
feat: some cleanup
c1b42c2
feat: some cleanup
1f57923
feat: add Namespace to Config
db4cf30
feat: add test
e52b0a1
feat: add test
94085a6
Merge branch 'ava-labs:main' into add_gossipable
Sanghren 3c3e138
feat: remove warning debug print
c63269c
feat: add handler.rs
476016a
feat: cargo.toml dep
139dacb
feat: cargo.toml dep
b9fc9ec
feat: lint
a606351
feat: finish handler accept_request
573db11
feat: unused app-request param
f1b752a
feat: put tests under mod test
bbf1488
feat: clean up
5654fb1
feat: pass reference to bloom.has
20db932
feat: clean up
27df668
feat: address comments
0c446e9
feat: address comments
9e67429
feat: address comments
61c8256
feat: address comments
3a7a5cd
feat: address comments
8cc6084
feat: use associated type instead of phantomdata
b676024
feat: address warnings
acb1de0
Merge branch 'ava-labs:main' into add_gossipable
Sanghren 3bec776
feat: implement an example that run gossip logic
e046013
feat: implement an example that run gossip logic
13205e7
feat: make things work - wip
7b1e8eb
Merge branch 'ava-labs:main' into add_gossipable
Sanghren f56ab25
feat: wip
884f1fd
feat: wip
c5446e6
feat: wip
e4b3400
feat: wip
fb0359e
feat: wip
ccce15b
feat: wip
774ca6e
feat: wip
ec6767a
feat: wip
7db76bc
feat: clean
36c40dd
feat: clean
f6e8baf
feat: clean
672c728
feat: clean
b89abd9
feat: remove arc for callback
3faedf9
feat: format
ff65229
feat: format
65e8a14
feat: format
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,25 +12,44 @@ readme = "README.md" | |
|
||
[dependencies] | ||
avalanche-types = { path = "../../crates/avalanche-types", features = ["message"] } | ||
async-trait = { version = "0.1.73", features = [] } | ||
byteorder = "1.4.3" | ||
cert-manager = "0.0.10" # https://github.com/gyuho/cert-manager | ||
log = "0.4.20" | ||
rustls = { version = "0.21.5", features = ["logging", "dangerous_configuration"]} # https://github.com/rustls/rustls/tags | ||
rustls = { version = "0.21.5", features = ["logging", "dangerous_configuration"] } # https://github.com/rustls/rustls/tags | ||
rcgen = "0.10.0" | ||
hyper-rustls = "0.24.1" | ||
rustls-native-certs = "0.6.3" | ||
hyper = { version = "0.14.27", features = ["full"], optional = true } | ||
tokio-rustls = { version = "0.24.1", optional = true } | ||
tokio = { version = "1.32.0", features = ["sync", "time"] } | ||
prost = "0.12.0" | ||
prost-types = "0.12.0" | ||
prost-build = "0.12.0" | ||
bincode = "1.3.3" | ||
serde = { version = "1.0.188", features = ["derive"] } | ||
|
||
# for feature "pem" | ||
pem = { version = "3.0.0", optional = true } # https://github.com/jcreekmore/pem-rs | ||
pem = { version = "3.0.0", optional = true } # https://github.com/jcreekmore/pem-rs | ||
rand = "0.8.5" | ||
serde_json = "1.0.105" | ||
|
||
|
||
[dev-dependencies] | ||
env_logger = "0.10.0" | ||
mockall = "0.11.4" | ||
proptest = "1.2.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
random-manager = "0.0.5" | ||
tokio = { version = "1.32.0", features = ["full"] } | ||
testing_logger = "0.1.1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔, not sure we need this as it looks like it's unmaintained. I guess I'll see where it's used. |
||
tokio = { version = "1.32.0", features = ["sync", "time", "rt-multi-thread"] } | ||
tracing = "0.1.37" | ||
tracing-subscriber = "0.3.17" | ||
|
||
[build-dependencies] | ||
# ref. https://github.com/hyperium/tonic/tags | ||
# ref. https://github.com/hyperium/tonic/tree/master/tonic-build | ||
tonic-build = "0.9.2" | ||
|
||
[features] | ||
default = ["rustls", "pem_encoding"] | ||
rustls = ["hyper", "tokio-rustls"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/// ref. <https://github.com/hyperium/tonic/tree/master/tonic-build> | ||
fn main() { | ||
tonic_build::configure() | ||
.out_dir("./src/p2p") | ||
.build_server(true) | ||
.build_client(true) | ||
.compile(&["./src/p2p/gossip/sdk.proto"], &["./src/p2p/gossip/"]) | ||
.unwrap(); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔, usually libraries re-export
async-trait
such that the trait definition remains consistent with the trait implementation.I know I'll get my answer below, but are we defining traits with the macro or as we implementing traits with the macro? Or both?