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

Consider an inline representation for small multiaddrs #36

Open
rklaehn opened this issue Feb 17, 2020 · 0 comments
Open

Consider an inline representation for small multiaddrs #36

rklaehn opened this issue Feb 17, 2020 · 0 comments

Comments

@rklaehn
Copy link
Contributor

rklaehn commented Feb 17, 2020

Similar to multiformats/rust-multihash#47

Using the same approach, for a total size of 64 bytes, you get 62 bytes of data. That is enough to store a multiaddr like /ip4/<32 bit addr>/tcp/<port>/ipfs/<256 bit node hash> or even /ip6/<128 bit addr>/tcp/<port>/ipfs/<256 bit node hash> inline, which should be quite useful.

Rust-libp2p nodes frequently store peer ids multiple times, so this would be a nice optimisation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant