Closed thomaseizinger closed 1 year ago
- We can consider moving
PeerRecord
andSignedEnvelope
into this crate as well or extract them into their own. I am undecided here.
Already running into the first issue as I am starting to work on this.
A PeerRecord
depends on Multiaddr
as well as PeerId
. If we want multiaddr
to depend on libp2p-identity
, we can't define PeerRecord
within libp2p-identity
otherwise we have a circular dependency!
- We can consider moving
PeerRecord
andSignedEnvelope
into this crate as well or extract them into their own. I am undecided here.Already running into the first issue as I am starting to work on this.
A
PeerRecord
depends onMultiaddr
as well asPeerId
. If we wantmultiaddr
to depend onlibp2p-identity
, we can't definePeerRecord
withinlibp2p-identity
otherwise we have a circular dependency!
The solution to this turned out to be to not use the proto definition of PeerId
in PeerRecord
but treat it as opaque bytes instead that we parse through the functions available in libp2p-identity::PeerId
.
This issue is part of https://github.com/libp2p/rust-libp2p/issues/3271.
multiaddr
crate: https://github.com/multiformats/rust-multiaddr/issues/73PeerRecord
andSignedEnvelope
into this crate as well or extract them into their own. I am undecided here.