multiformats / multiformats/rust-multiaddr
Change Multiaddr internal structure to store parsed address
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 101
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
As of now, Multiaddr stores a byte array, representing the serialized version of the address.
Although this allows very fast serialization (array copy), I believe this is not the most appropriate format.
Indeed, operations on Multiaddr (eg. decapsulate) actually work on the list of protocols, and not on the byte representation. The bug mentioned in PR #18 is a good example of it.
I see two possible representations:
- Make Multiaddr store a
Vec<Addr>, withAddrbeing an Enum for all supported protocols - Make Multiaddr only store an
Addrand anOption<Multiaddr>for the inner and/or outer multiaddr.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the current Multiaddr representation and the decapsulate operation, then review the bug referenced in PR #18. Compare the proposed Vec and nested Addr/Option designs, and define the chosen representation's impact on parsing, serialization, and protocol-list operations before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100