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

Refactor the crate to use stable futures #1328

Merged
merged 87 commits into from
Jan 6, 2020
Merged
Show file tree
Hide file tree
Changes from 77 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
170d2d2
Switch to stable futures (#1196)
tomaka Sep 16, 2019
c7148d5
Address some reviewing (#1246)
tomaka Sep 20, 2019
0bec84e
Remove some config on the TcpConfig (#1250)
tomaka Sep 24, 2019
67642eb
Update to futures-preview-0.3.0-alpha.18. (#1255)
twittner Sep 24, 2019
d7e9ba4
Make the TCP tests compile again (#1251)
tomaka Sep 26, 2019
7f58684
Upgrade libp2p-kad to stable futures (#1254)
tomaka Sep 26, 2019
73aa278
protocols/noise: Update to futures-preview (#1248)
mxinden Oct 3, 2019
6667fb8
Fix floodsub with new futures (#1249)
tomaka Oct 7, 2019
9921a33
Upgrade websocket transport to soketto 0.3.0. (#1266)
twittner Oct 8, 2019
abe2f2a
Merge master into stable-futures (#1271)
tomaka Oct 10, 2019
b1f3111
Switch MemoryTransport to Vec<u8> and fix tests (#1274)
tomaka Oct 21, 2019
0eeddac
Update the stable-futures branch to master (#1288)
tomaka Oct 28, 2019
8944899
*: Remove usage of custom buffer initialization usage (#1263)
mxinden Nov 1, 2019
5f17b11
protocols/noise: Adapt to breaking changes in noise 0.16 (#1292)
mxinden Nov 1, 2019
7eb4165
Use unsigned-varint and futures_codec from crates.io. (#1293)
twittner Nov 5, 2019
c1226b2
Cherry-pick commits from master to stable-futures (#1296)
tomaka Nov 6, 2019
cb74580
websocket: Replace `futures-rustls` with `async-tls`. (#1298)
twittner Nov 8, 2019
f85241d
Update core, tcp, secio and mplex to futures-0.3. (#1302)
twittner Nov 14, 2019
2015053
Update yamux to development version. (#1297)
twittner Nov 15, 2019
3e89c36
yamux: Use futures-0.3. (#1307)
twittner Nov 15, 2019
3dd07fc
Update libp2p-uds to futures 0.3 (#1308)
tomaka Nov 18, 2019
be73b90
protocols/plaintext: Move to stable futures and use unsigned varints …
mxinden Nov 19, 2019
02c5f34
Update more crates to futures-0.3 (#1312)
twittner Nov 19, 2019
a26620b
misc/mdns: Update to futures-preview (#1247)
mxinden Nov 20, 2019
8128891
Update mdns dependencies to use futures-0.3 (#1313)
twittner Nov 20, 2019
7cd44ae
Fix mplex tests (#1314)
tomaka Nov 21, 2019
1597b02
Use soketto's `reader-writer-split` branch. (#1311)
twittner Nov 22, 2019
df71d4a
Update root crate to use futures-0.3. (#1315)
twittner Nov 22, 2019
b764472
Fix examples and update core-derive. (#1317)
twittner Nov 25, 2019
e083e82
Fix tests of libp2p-ping (#1321)
tomaka Nov 25, 2019
e5b087d
Fix the WASM build with stable futures (#1322)
tomaka Nov 26, 2019
8be45f5
Fix the identify tests (#1324)
tomaka Nov 26, 2019
8d22e98
Add support for PINGs and PONGs to websockets. (#1319)
twittner Nov 26, 2019
26f58d2
protocols/kad: Fix tests + minor fix in mdns and noise (#1320)
mxinden Nov 28, 2019
98dac8d
Merge master into stable-futures (#1325)
tomaka Nov 28, 2019
aa4c289
Fix identify not compiling for wasm (#1326)
tomaka Nov 29, 2019
a6bef38
Merge remote-tracking branch 'upstream/master' into HEAD
tomaka Nov 29, 2019
fb997f2
Merge pull request #1327 from tomaka/merge-master-for-real
tomaka Nov 29, 2019
9cefb52
Update to current soketto `develop`. (#1332)
twittner Dec 6, 2019
173fc04
Fix tests.
twittner Dec 6, 2019
ea58aed
Merge pull request #1335 from twittner/tests
tomaka Dec 9, 2019
73e745e
Fix the regular tests for stable-futures
tomaka Dec 9, 2019
b6d5d97
Merge pull request #1336 from tomaka/fix-stable-fut-tests
tomaka Dec 9, 2019
481849e
secio: Back to 4-byte BE length prefix. (#1337)
twittner Dec 9, 2019
26ec67b
Make the kademlia test ignore failures
tomaka Dec 9, 2019
a5415f9
Merge pull request #1339 from tomaka/ignore-kad-fail
tomaka Dec 9, 2019
1e8a90c
Remove a write optimisation in Negotiated.
romanb Dec 9, 2019
7e91757
Merge pull request #1340 from romanb/stable-futures-multistream-simpl
tomaka Dec 10, 2019
ad42b00
Cleanups in libp2p-core in stable-futures branch
tomaka Dec 10, 2019
d738f41
More work
tomaka Dec 10, 2019
213c633
Pass &mut std::task::Context to poll
tomaka Dec 10, 2019
18bcba9
Err, fix wrong foo functions
tomaka Dec 10, 2019
3f1cbaa
Fix noise/io.rs not flushing the underlying stream
tomaka Dec 11, 2019
d003270
Update protocols/noise/src/io.rs
tomaka Dec 11, 2019
c0e78f2
Merge pull request #1343 from tomaka/derive-poll-context
tomaka Dec 11, 2019
168f5d8
Merge pull request #1347 from tomaka/fix-noise-io-flush
tomaka Dec 12, 2019
a720601
Merge pull request #1342 from tomaka/cleanup-stable
tomaka Dec 12, 2019
21f32da
Merge remote-tracking branch 'upstream/master' into HEAD
tomaka Dec 12, 2019
894c831
Bring back phantom types to yamux upgrade outputs.
twittner Dec 12, 2019
2322162
Merge pull request #1350 from twittner/phantom
tomaka Dec 12, 2019
34a3e5c
Merge pull request #1349 from tomaka/merge-master-again
tomaka Dec 12, 2019
f293594
Several changes.
twittner Dec 18, 2019
be8d811
Update `futures-timer` to version 2.
twittner Dec 18, 2019
9349d6c
Fix test.
twittner Dec 18, 2019
34a631d
Fix deflate test.
twittner Dec 19, 2019
589fdaf
Use published versions of soketto and yamux.
twittner Dec 20, 2019
2bc8d95
Update to bytes v0.5
twittner Dec 21, 2019
34b36b4
Cover more cases in simultaneous connect test.
twittner Dec 21, 2019
83e4c60
Update yamux dependency.
twittner Dec 30, 2019
72f1018
Update to unsigned-varint v0.3
twittner Jan 2, 2020
d870c73
Pin protobuf to version 2.8.1
twittner Jan 2, 2020
ff0d2d5
Merge pull request #1353 from twittner/fixes
tomaka Jan 2, 2020
23fc6ee
Address some review comments on #1328
tomaka Jan 2, 2020
d0944ed
Merge pull request #1366 from tomaka/review-stable-fut
tomaka Jan 2, 2020
17e90f0
Merge master in stable-futures
tomaka Jan 2, 2020
e29f36e
Merge pull request #1369 from tomaka/merge-master
tomaka Jan 3, 2020
90e0044
Apply suggestions from code review
tomaka Jan 3, 2020
74790cd
Apply suggestions from code review
mxinden Jan 6, 2020
e216571
Another small review fix
tomaka Jan 6, 2020
84ebd20
Merge pull request #1372 from tomaka/another-review-fix
tomaka Jan 6, 2020
65a7de4
Address review on stable-futures
tomaka Jan 6, 2020
be0f18d
Update core/src/nodes/tasks/manager.rs
tomaka Jan 6, 2020
1333d5b
Another review fix for stable-futures branch
tomaka Jan 6, 2020
5e0f219
Use a different fix
tomaka Jan 6, 2020
55d6925
Terminology
tomaka Jan 6, 2020
fd7c06e
Merge pull request #1375 from tomaka/another-review-fix2
tomaka Jan 6, 2020
ced66a3
Merge pull request #1373 from tomaka/loggin-stable-fut
tomaka Jan 6, 2020
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Next Version

- Use varints instead of fixed sized (4 byte) integers to delimit plaintext 2.0 messages to align implementation with the specification.

# Version 0.13.2 (2020-01-02)

- Fixed the `libp2p-noise` handshake not flushing the underlying stream before waiting for a response.
Expand Down
15 changes: 6 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ default = ["secp256k1", "libp2p-websocket"]
secp256k1 = ["libp2p-core/secp256k1", "libp2p-secio/secp256k1"]

[dependencies]
bytes = "0.4"
futures = "0.1"
bytes = "0.5"
futures = "0.3.1"
multiaddr = { package = "parity-multiaddr", version = "0.6.0", path = "misc/multiaddr" }
multihash = { package = "parity-multihash", version = "0.2.0", path = "misc/multihash" }
lazy_static = "1.2"
Expand All @@ -33,11 +33,8 @@ libp2p-uds = { version = "0.13.0", path = "transports/uds" }
libp2p-wasm-ext = { version = "0.6.0", path = "transports/wasm-ext" }
libp2p-yamux = { version = "0.13.0", path = "muxers/yamux" }
parking_lot = "0.9.0"
smallvec = "0.6"
tokio-codec = "0.1"
tokio-executor = "0.1"
tokio-io = "0.1"
wasm-timer = "0.1"
smallvec = "1.0"
wasm-timer = "0.2.4"

[target.'cfg(not(any(target_os = "emscripten", target_os = "unknown")))'.dependencies]
libp2p-deflate = { version = "0.5.0", path = "protocols/deflate" }
Expand All @@ -48,9 +45,8 @@ libp2p-tcp = { version = "0.13.0", path = "transports/tcp" }
libp2p-websocket = { version = "0.13.0", path = "transports/websocket", optional = true }

[dev-dependencies]
async-std = "1.0"
env_logger = "0.7.1"
tokio = "0.1"
tokio-stdin-stdout = "0.1"

[workspace]
members = [
Expand Down Expand Up @@ -78,3 +74,4 @@ members = [
"transports/websocket",
"transports/wasm-ext"
]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra newline at EOF

27 changes: 12 additions & 15 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,27 @@ categories = ["network-programming", "asynchronous"]
[dependencies]
asn1_der = "0.6.1"
bs58 = "0.3.0"
bytes = "0.4"
bytes = "0.5"
ed25519-dalek = "1.0.0-pre.3"
failure = "0.1"
fnv = "1.0"
futures = { version = "0.3.1", features = ["compat", "io-compat", "executor", "thread-pool"] }
futures-timer = "2"
lazy_static = "1.2"
libsecp256k1 = { version = "0.3.1", optional = true }
log = "0.4"
multiaddr = { package = "parity-multiaddr", version = "0.6.0", path = "../misc/multiaddr" }
multihash = { package = "parity-multihash", version = "0.2.0", path = "../misc/multihash" }
multistream-select = { version = "0.6.0", path = "../misc/multistream-select" }
futures = "0.1"
parking_lot = "0.9.0"
pin-project = "0.4.6"
protobuf = "=2.8.1" # note: see https://github.com/libp2p/rust-libp2p/issues/1363
quick-error = "1.2"
rand = "0.7"
rw-stream-sink = { version = "0.1.1", path = "../misc/rw-stream-sink" }
libsecp256k1 = { version = "0.3.1", optional = true }
sha2 = "0.8.0"
smallvec = "0.6"
tokio-executor = "0.1.4"
tokio-io = "0.1"
wasm-timer = "0.1"
unsigned-varint = "0.2"
smallvec = "1.0"
unsigned-varint = "0.3"
void = "1"
zeroize = "1"

Expand All @@ -42,16 +41,14 @@ ring = { version = "0.16.9", features = ["alloc", "std"], default-features = fal
untrusted = "0.7.0"

[dev-dependencies]
libp2p-swarm = { version = "0.3.0", path = "../swarm" }
libp2p-tcp = { version = "0.13.0", path = "../transports/tcp" }
assert_matches = "1.3"
async-std = "1.0"
libp2p-mplex = { version = "0.13.0", path = "../muxers/mplex" }
libp2p-secio = { version = "0.13.0", path = "../protocols/secio" }
rand = "0.7.2"
libp2p-swarm = { version = "0.3.0", path = "../swarm" }
libp2p-tcp = { version = "0.13.0", path = "../transports/tcp" }
quickcheck = "0.9.0"
tokio = "0.1"
wasm-timer = "0.1"
assert_matches = "1.3"
tokio-mock-task = "0.1"
wasm-timer = "0.2"

[features]
default = ["secp256k1"]
Expand Down