Commit Graph

18 Commits

Author SHA1 Message Date
Yusef Napora
972454490a doc comments 2020-01-17 10:42:26 -05:00
Yusef Napora
39d8cbc758 doc comments 2020-01-17 10:42:26 -05:00
Yusef Napora
77a03aaf83 rename SignedEnvelope -> Envelope, unmarshal payload in ConsumeEnvelope 2020-01-17 10:42:26 -05:00
Yusef Napora
8dc249ddde use Record type for envelope payloads 2020-01-17 10:42:26 -05:00
Yusef Napora
1ff557877c comments for PeerRecord proto message
also removes the seq field from PeerMessage proto,
since it was moved to the SignedEnvelope
2020-01-17 10:42:26 -05:00
Yusef Napora
be3fa5fd3f fix proto_path in Makefile 2020-01-17 10:42:26 -05:00
Yusef Napora
5f6b601ac9 hoist Seq from PeerRecord to SignedEnvelope 2020-01-17 10:42:26 -05:00
Yusef Napora
59348dea5a test that PeerRecords can't be signed by wrong key 2020-01-17 10:42:26 -05:00
Yusef Napora
2e8cabcc87 rename RoutingStateRecord -> PeerRecord
also removes embedded reference to Envelope from the record,
as that was confusing.

as a result, the CertifiedAddrBook now accepts/returns
record.SignedEnvelope instead of a specialized type.
2020-01-17 10:42:26 -05:00
Steven Allen
dc718fa4da feat: support encoding/decoding peer IDs as CIDs _in text_ 2019-10-02 08:45:33 -07:00
Cole Brown
d50ea9bc1f Ensure all tests pass without weak RSA key flag 2019-08-28 11:34:22 -04:00
Alex Stokes
686c1736fd
Compare multihash Code to IDENTITY when extracting public key
This PR is a non-substantive change with the goal of making this method
`ExtractPublicKey` from a `peer.ID` clearer to the reader. This goal is
accomplished by using the full name of the identity hash code `IDENTITY` instead
of the deprecated `ID` code. This change makes its clearer to the reader that
there is a trivial way to compute the public key given the digest. Without this
change it is easy to confuse `ID` with a concept relating to peer IDs (and thus
implying this function somehow computes a hash pre-image to get the
corrresponding public key.
2019-08-14 14:27:04 -07:00
Steven Allen
c2a62a74af feat(peer): implement AddrInfosFromP2pAddrs and SplitAddr
* SplitAddr is a simpler way to split an address into a multiaddr and an ID.
* AddrInfosFromP2pAddrs converts a set of multiaddrs into a set of AddrInfos.
2019-05-31 12:25:57 -07:00
Steven Allen
ecce2522bf fix: handle empty addrs case 2019-05-30 22:25:37 -07:00
Steven Allen
5ea5a0797b chore: cleanup address parsing
* Use SplitLast to avoid allocating too much.
* Avoid converting to/from strings when working with multiaddrs.
2019-05-30 21:57:09 -07:00
Raúl Kripalani
79bf30a5a4 fix duplicated import. 2019-05-23 16:14:50 +01:00
Raúl Kripalani
07fbce0b46
absorb {crypto,peer} test utils. (#8)
Avoids circular module dependency.
2019-05-23 16:07:58 +01:00
Raúl Kripalani
6e566d10f4
Absorb go-libp2p abstractions and core types into this module (#1) 2019-05-22 18:31:11 +01:00