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] - Connection keep alive bug-fix #2043

Merged
merged 25 commits into from
May 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
beaddf7
Keep connection alive after substream establishment
AgeManning Apr 12, 2021
5c58e9b
Update keep-alive based on mesh
AgeManning Apr 29, 2021
3bca719
Corrections
AgeManning May 3, 2021
42c1357
Revert changes to behaviour.rs
AgeManning May 3, 2021
22001c9
Update protocols/gossipsub/src/behaviour.rs
AgeManning May 4, 2021
10f3798
Update protocols/gossipsub/src/behaviour.rs
AgeManning May 4, 2021
de32534
build(deps): bump styfle/cancel-workflow-action from 0.8.0 to 0.9.0 (…
dependabot[bot] Apr 12, 2021
f40b348
protocols: Derive debug for MemoryStoreConfig and IdentifyConfig (#2029)
dvc94ch Apr 12, 2021
30a440a
*: Drop generic wasm32-unknown-unknown support (#2038)
mxinden Apr 12, 2021
82fbdc9
Update yamux requirement from 0.8.0 to 0.9.0 (#1960)
dependabot[bot] Apr 12, 2021
dba9c49
Derive debug for RelayConfig. (#2048)
dvc94ch Apr 12, 2021
fd43a05
build(deps): bump actions/cache from v2.1.4 to v2.1.5 (#2050)
dependabot[bot] Apr 13, 2021
379557e
*: Prepare v0.37.0 release (#2049)
mxinden Apr 13, 2021
53372fe
*: Prepare libp2p-swarm-derive v0.23.0 and libp2p v0.37.1
mxinden Apr 13, 2021
25c872f
protocols/mdns: Fix timely discovery after listening on new address (…
dvc94ch Apr 21, 2021
37e93ad
core/src/identity: Fix build with secp256k1 disabled (#2057)
vorot93 Apr 26, 2021
b0d171d
protocols/gossipsub: Remove `regex-filter` feature flag (#2056)
tzemanovic Apr 27, 2021
30a0b00
transport/wasm-ext: Support dialing `Multiaddr` with `/p2p` protocol …
appaquet Apr 27, 2021
6a1ac98
Apply suggestions
AgeManning May 4, 2021
727eb64
Merge latest master
AgeManning May 4, 2021
862113d
Further reviewer comments
AgeManning May 5, 2021
dacd62f
Avoid panic, conditional mapping check
AgeManning May 6, 2021
c4be35d
Bump gossipsub version add changelog
AgeManning May 6, 2021
3393f72
Merge latest master
AgeManning May 6, 2021
8605b67
Merge latest master
AgeManning May 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ futures = "0.3.1"
lazy_static = "1.2"
libp2p-core = { version = "0.28.3", path = "core", default-features = false }
libp2p-floodsub = { version = "0.29.0", path = "protocols/floodsub", optional = true }
libp2p-gossipsub = { version = "0.30.1", path = "./protocols/gossipsub", optional = true }
libp2p-gossipsub = { version = "0.31.0", path = "./protocols/gossipsub", optional = true }
libp2p-identify = { version = "0.29.0", path = "protocols/identify", optional = true }
libp2p-kad = { version = "0.30.0", path = "protocols/kad", optional = true }
libp2p-mplex = { version = "0.28.0", path = "muxers/mplex", optional = true }
Expand Down
8 changes: 6 additions & 2 deletions examples/gossipsub-chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ async fn main() -> Result<(), Box<dyn Error>> {
};

// Listen on all interfaces and whatever port the OS assigns
swarm.listen_on("/ip4/0.0.0.0/tcp/0".parse().unwrap()).unwrap();
swarm
.listen_on("/ip4/0.0.0.0/tcp/0".parse().unwrap())
.unwrap();

// Reach out to another node if specified
if let Some(to_dial) = std::env::args().nth(1) {
Expand All @@ -138,7 +140,9 @@ async fn main() -> Result<(), Box<dyn Error>> {
task::block_on(future::poll_fn(move |cx: &mut Context<'_>| {
loop {
if let Err(e) = match stdin.try_poll_next_unpin(cx)? {
Poll::Ready(Some(line)) => swarm.behaviour_mut().publish(topic.clone(), line.as_bytes()),
Poll::Ready(Some(line)) => swarm
.behaviour_mut()
.publish(topic.clone(), line.as_bytes()),
Poll::Ready(None) => panic!("Stdin closed"),
Poll::Pending => break,
} {
Expand Down
7 changes: 7 additions & 0 deletions protocols/gossipsub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 0.31.0 [unreleased]

- Keep connections to peers in a mesh alive. Allow closing idle connections to peers not in a mesh
[PR-2043].

[PR-2043]: https://github.com/libp2p/rust-libp2p/pull/2043https://github.com/libp2p/rust-libp2p/pull/2043

# 0.30.1 [2021-04-27]

- Remove `regex-filter` feature flag thus always enabling `regex::RegexSubscriptionFilter` [PR
Expand Down
2 changes: 1 addition & 1 deletion protocols/gossipsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "libp2p-gossipsub"
edition = "2018"
description = "Gossipsub protocol for libp2p"
version = "0.30.1"
version = "0.31.0"
authors = ["Age Manning <Age@AgeManning.com>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand Down