20 Commits

Author SHA1 Message Date
Pierre Krieger
84487cf904
Publish 0.14.0-alpha.1 (#1376)
* Publish 0.14.0-alpha.1

* multiaddr -> 0.7.0
2020-01-07 15:30:39 +01:00
Toralf Wittner
72f1018acd Update to unsigned-varint v0.3 2020-01-02 10:45:43 +01:00
Toralf Wittner
2bc8d9590d Update to bytes v0.5
Except for `multiaddr` which encapsulates its use of bytes v0.4 now.
2019-12-21 15:42:24 +01:00
Pierre Krieger
98dac8d509
Merge master into stable-futures (#1325)
* Update parking_lot to v0.9 (#1300)

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Publish 0.13.1 (#1304)

* Publish 0.13.1

* Update CHANGELOG.md

Co-Authored-By: Toralf Wittner <tw@dtex.org>

* Update some deps of core-derive (#1299)

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
2019-11-28 18:03:59 +01:00
Pierre Krieger
c1226b203a
Cherry-pick commits from master to stable-futures (#1296)
* Implement Debug for (ed25519|secp256k1)::(Keypair|SecretKey) (#1285)

* Fix possible arithmetic overflow in libp2p-kad. (#1291)

When the number of active queries exceeds the (internal)
JOBS_MAX_QUERIES limit, which is only supposed to bound
the number of concurrent queries relating to background
jobs, an arithmetic overflow occurs. This is fixed by
using saturating subtraction.

* protocols/plaintext: Add example on how to upgrade with PlainTextConfig1 (#1286)

* [mdns] - Support for long mDNS names (Bug #1232) (#1287)

* Dead code -- commenting out with a note referencing future implementation

* Adding "std" feature so that cargo can build in other directories (notably `misc/mdns`, so that I could run these tests)

* Permitting `PeerID` to be built from an `Identity` multihash

* The length limit for DNS labels is 63 characters, as per RFC1035

* Allocates the vector with capacity for the service name plus additional QNAME encoding bytes

* Added support for encoding/decoding peer IDs with an encoded length greater than 63 characters

* Removing "std" from ring features

Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>

* Retaining MAX_INLINE_KEY_LENGTH with comment about future usage

* `segment_peer_id` consumes `peer_id` ... plus an early return for IDs that don't need to be segmented

* Fixing logic

* Bump most dependencies (#1268)

* Bump most dependencies

This actually builds 😊.

* Bump all dependencies

Includes the excellent work of @rschulman in #1265.

* Remove use of ed25519-dalek fork

* Monomorphize more dependencies

* Add compatibility hack for rand

Cargo allows a crate to depend on multiple versions of another, but
`cargo-web` panics in that situation.  Use a wrapper crate to work
around the panic.

* Use @tomaka’s idea for using a newer `rand`

instead of my own ugly hack.

* Switch to Parity master

as its dependency-bumping PR has been merged.

* Update some depenendencies again

* Remove unwraps and `#[allow(deprecated)]`.

* Remove spurious changes to dependencies

Bumping minor or patch versions is not needed, and increases likelyhood
of merge conflicts.

* Remove some redundant Cargo.toml changes

* Replace a retry loop with an expect

`ed25519::SecretKey::from_bytes` will never fail for 32-byte inputs.

* Revert changes that don’t belong in this PR

* Remove using void to bypass ICE (#1295)

* Publish 0.13.0 (#1294)
2019-11-06 16:09:15 +01:00
Pierre Krieger
c6e8e6328a
Add peer id inlining for small public keys (#1237)
* Add peer id inlining for small public keys

* Apply @twittner suggestions

* Restore hashing
2019-09-04 19:40:28 +02:00
Pierre Krieger
4b6d1f8449
Bump multihash to 0.1.3 (#1207) 2019-07-22 11:43:10 +02:00
Toralf Wittner
8af4a28152
multihash: Use Bytes instead of Vec<u8> internally. (#1187)
multihash: Use `Bytes` instead of `Vec<u8>` internally.

To improve the efficiency of cloning multi-hashes (e.g. as the
representation of `PeerId`s), this PR replaces the `Vec<u8>`
representation with `Bytes`. The API is kept backwards
compatible and does not leak the representation type.
2019-07-03 14:27:26 +02:00
Roman Borschel
a2550215a0 Add AsRef<u8> for Multihash. (#1161)
* Add AsRef<u8> for Multihash.

* Bump patch version of multihash.
2019-06-05 10:27:06 +02:00
Pierre Krieger
b4345ee8ba
Bump to 0.7.0 (#1081)
* Bump to 0.7.0

* Update CHANGELOG.md

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>

* Update for #1078

* New version of multihash and multiaddr as well
2019-04-23 13:03:29 +02:00
Pierre Krieger
a4173705db
Add some TryFrom implementations (#1060) 2019-04-17 14:16:50 +02:00
Artyom Pavlov
3f05de6d7c Replace sha1 and tiny-keccak with RustCrypto crates (#1014)
* replace sha1 and tiny-keccak with RustCrypto crates

* Update misc/multihash/src/lib.rs

Co-Authored-By: newpavlov <newpavlov@gmail.com>
2019-03-20 19:19:50 +01:00
Roman Borschel
eeed66707b Address edition-2018 idioms. (#929) 2019-02-11 14:58:15 +01:00
Dan Robertson
fe4fc8c363 Move final crates to 2018 edition (#886) 2019-01-29 11:02:29 +01:00
Pierre Krieger
bdc071a270
Remove readme = entries in Cargo.toml (#812) 2019-01-02 14:52:29 +01:00
Pierre Krieger
d94a768bd9
Rename multiaddr and mulithash to parity-* (#737)
* Rename multiaddr and mulithash to parity-*

* Fix doctests
2018-12-07 15:40:02 +01:00
Pierre Krieger
95ebee5841
Update some dependencies (#686)
* Update many dependencies

* Upgrade some secio deps
2018-11-27 10:35:47 +01:00
Pierre Krieger
b213fd7bd7
Add PeerId::random() (#661) 2018-11-20 13:44:36 +01:00
Eyal Kalderon
ad0807b3f3 Use unsigned-varints, add BLAKE2 support in multihash (#525)
* Add support for unsigned varints

* Depend on unsigned-varint 0.2 without default features

* Change hash code type from u8 to u64

* Fix hash codes and enum variants for BLAKE2 to fit the standard (see #524)

* Run cargo fmt on crate

* Expand hash_types test to include all variants

* Add support for BLAKE2b-512 and BLAKE2s-256

* Depend on blake2 crate 0.7 with no default features

* Update encode! macro for support for blake2 crate

* Update all tests to include BLAKE2b-512 and BLAKE2s-256

* Reduce hash code size from u64 to u16

* Fix typo in doc comment

* Bump tiny-keccak to version 1.4

* Remove unnecessary default-features = false in Cargo.toml
2018-10-01 09:58:11 +02:00
Benjamin Kampmann
2ea49718f3
Clean up directory structure (#426)
* Remove unused circular-buffer crate
* Move transports into subdirectory
* Move misc into subdirectory
* Move stores into subdirectory
* Move multiplexers
* Move protocols
* Move libp2p top layer
* Fix Test: skip doctest if secio isn't enabled
2018-08-29 11:24:44 +02:00