Raúl Kripalani
d17a62c365
move protobuf files; adjust imports everywhere.
2019-12-27 20:26:08 +00:00
Raúl Kripalani
9a771f9d94
move envelope to record package.
2019-12-27 20:09:43 +00:00
Raúl Kripalani
9bbe26ca5f
envelope: use byte slices from pool; adjust interface.
2019-12-27 20:07:28 +00:00
Yusef Napora
b57c5023fb
remove SignedRoutingStateFromHost helper
...
moving this to go-libp2p
2019-12-20 16:15:44 -05:00
Yusef Napora
1d5e4adf71
add events for updated addresses and routing state
2019-12-20 16:15:01 -05:00
Yusef Napora
15623e878c
filter private addrs from signed routing records
2019-12-20 16:15:01 -05:00
Yusef Napora
1d207a334e
rm stray ref to golang/protobuf
2019-12-20 16:14:10 -05:00
Yusef Napora
9844518f63
remove payloadType check when unmarhaling
2019-12-20 16:14:10 -05:00
Yusef Napora
f24669b805
fix: rebuild protos with new gogofaster generator
2019-12-20 16:14:10 -05:00
Yusef Napora
982d6a05fe
use camelCase in protos for consistency
2019-12-20 16:13:11 -05:00
Yusef Napora
6d57752bb9
use multiformats uvarint for length-prefixes
2019-12-20 16:13:11 -05:00
Yusef Napora
5887c40119
expose struct fields & remove accessors
2019-12-20 16:13:11 -05:00
Yusef Napora
b0f6ab1b9f
whitespace
2019-12-20 16:13:11 -05:00
Yusef Napora
7611d378ae
rm batching SignedRoutingStates accessor in peerstore
...
the datastore peerstore implementation doesn't support batched reads, so
it's no more efficient to get a bunch of states at once than it
is to call SignedRoutingState multiple times.
2019-12-20 16:13:11 -05:00
Yusef Napora
e8ab218f27
get rid of unsigned RoutingState struct, only expose SignedRoutingState
2019-12-20 16:13:11 -05:00
Yusef Napora
8f13c6042b
use test helpers
2019-12-20 16:13:11 -05:00
Yusef Napora
08da615203
rename Equals -> Equal, add some comments
2019-12-20 16:13:11 -05:00
Yusef Napora
295e3eca01
go fmt
2019-12-20 16:13:11 -05:00
Yusef Napora
1274af3f6e
tests for RoutingState
2019-12-20 16:13:11 -05:00
Yusef Napora
647b39f3e3
use buffer pool for envelope signatures
2019-12-20 16:13:11 -05:00
Yusef Napora
6014637275
make envelope fields private & validate on unmarshal
2019-12-20 16:13:11 -05:00
Yusef Napora
52cd6ac767
use proto3 for routing records
2019-12-20 16:13:11 -05:00
Yusef Napora
9cc8ee1b44
use proto3 & rename fields to match spec changes
2019-12-20 16:13:11 -05:00
Yusef Napora
41d8bd9d4b
just use nanoseconds
2019-12-20 16:13:11 -05:00
Yusef Napora
774b0122d8
update to match spec changes
2019-12-20 16:13:11 -05:00
Yusef Napora
4528eacfbf
add method to peerstore to retrieve signed routing records
2019-12-20 16:13:11 -05:00
Yusef Napora
8996a208d9
go fmt
2019-12-20 16:13:11 -05:00
Yusef Napora
37987396db
fix doc comment
2019-12-20 16:13:11 -05:00
Yusef Napora
b8de7fa7f3
add helpers to make routing records for Host
2019-12-20 16:13:11 -05:00
Yusef Napora
83260dfd12
add routing state records, extend peerstore API
2019-12-20 16:13:11 -05:00
Yusef Napora
10ff6fca32
tests for SignedEnvelopes
2019-12-20 16:11:40 -05:00
Yusef Napora
38bf94611f
doc comments for envelopes
2019-12-20 16:11:40 -05:00
Yusef Napora
7dd3a0884c
use struct for SignedEnvelope instead of exposing protobuf directly
2019-12-20 16:11:40 -05:00
Yusef Napora
e6ef922b7b
add SignedEnvelope type
2019-12-20 16:11:40 -05:00
Steven Allen
4c2606ef48
Merge pull request #103 from Mikerah/master
...
Update README.md
2019-12-20 16:15:28 +01:00
Mikerah
f86f7e0ef7
Update README.md
2019-12-19 09:57:16 -05:00
Steven Allen
2ee848f4f1
Merge pull request #102 from libp2p/dependabot/go_modules/github.com/ipfs/go-cid-0.0.4
...
build(deps): bump github.com/ipfs/go-cid from 0.0.3 to 0.0.4
2019-12-17 12:44:27 +01:00
dependabot-preview[bot]
94fac75dea
build(deps): bump github.com/ipfs/go-cid from 0.0.3 to 0.0.4
...
Bumps [github.com/ipfs/go-cid](https://github.com/ipfs/go-cid ) from 0.0.3 to 0.0.4.
- [Release notes](https://github.com/ipfs/go-cid/releases )
- [Commits](https://github.com/ipfs/go-cid/compare/v0.0.3...v0.0.4 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-16 11:20:22 +00:00
Steven Allen
6f2516674a
Merge pull request #100 from Mikerah/patch-1
...
typo fix
2019-12-14 09:08:25 +01:00
Mikerah
e5d371f86c
typo fix
2019-12-13 15:24:15 -05:00
Steven Allen
f7f724862d
Merge pull request #98 from libp2p/dependabot/go_modules/github.com/multiformats/go-multiaddr-0.2.0
...
build(deps): bump github.com/multiformats/go-multiaddr from 0.1.2 to 0.2.0
2019-12-11 14:59:31 +01:00
dependabot-preview[bot]
ee9d9da3cf
build(deps): bump github.com/multiformats/go-multiaddr
...
Bumps [github.com/multiformats/go-multiaddr](https://github.com/multiformats/go-multiaddr ) from 0.1.2 to 0.2.0.
- [Release notes](https://github.com/multiformats/go-multiaddr/releases )
- [Commits](https://github.com/multiformats/go-multiaddr/compare/v0.1.2...v0.2.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-11 11:34:55 +00:00
Marcin Rataj
ba9101b589
feat: support encoding/decoding peer IDs as CIDs in text ( #41 )
...
What:
1. Supports decoding CIDs (of libp2p keys) as peer IDs
(https://github.com/libp2p/specs/issues/216 )
2. Continues to encode peer IDs as base58 multihashes by default.
3. Adds functions for converting between peer IDs and CIDs.
4. Deprecates IDB58{Decode,Encode}, replacing them with {Decode,Encode}.
Why:
1. We _need_ to support multibase somehow, so we can put peer IDs in domains.
2. This makes peer IDs fully self describing. That is, the CID itself indicates that it's a hash of a libp2p public key.
3. It's much easier to upgrade wire protocols than text. This change punts
pids-as-cids on the wire down the road but that's something we can revisit if it ever becomes relevant.
See https://github.com/libp2p/specs/issues/111 for context.
Deviations from that issue:
* This _retains_ the current peer ID inlining of ed25519 keys. That turned out to be a nightmare, one I'd like to punt a bit more down the road.
* Likewise, this _punts_ the question of embedding the multi-hash algorithm in the public key.
2019-12-10 17:51:54 +01:00
Marcin Rataj
4184c18976
Merge branch 'master' into feat/parse-cid-as-pid
...
License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2019-12-10 13:33:41 +01:00
Steven Allen
edd5242a11
Merge pull request #95 from libp2p/chore/update-rest
...
chore(dep): update btc (sekp) and openssl libraries
2019-12-09 06:35:17 -06:00
Steven Allen
af4f53a061
chore(dep): update btc (sekp) and openssl libraries
...
* The btc (sekp crypto) library now uses go mod.
* Our openssl library now supports a few more platforms.
2019-12-09 13:19:02 +01:00
Steven Allen
c4d6359d16
Merge pull request #96 from libp2p/dependabot/go_modules/github.com/libp2p/go-openssl-0.0.4
...
build(deps): bump github.com/libp2p/go-openssl from 0.0.3 to 0.0.4
2019-12-09 05:53:59 -06:00
dependabot-preview[bot]
a986079787
build(deps): bump github.com/libp2p/go-openssl from 0.0.3 to 0.0.4
...
Bumps [github.com/libp2p/go-openssl](https://github.com/libp2p/go-openssl ) from 0.0.3 to 0.0.4.
- [Release notes](https://github.com/libp2p/go-openssl/releases )
- [Commits](https://github.com/libp2p/go-openssl/compare/v0.0.3...v0.0.4 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-09 11:20:31 +00:00
Steven Allen
f93c24de5d
Merge pull request #94 from libp2p/feat/std-ed25519
...
use standard library "crypto/ed25519"
2019-12-07 10:50:16 -05:00
Steven Allen
d25b4807f3
docs(readme): specify minimum go version
2019-12-07 10:33:12 -05:00