avoid breaking network compatibility
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- rust
- 领域
- networking
调研方向
首先阅读 multiaddr parser 和 Protocol representation,重点关注协议段及其参数是如何进行验证的。当能够在不破坏与旧节点通信的情况下,将语法有效但未知的地址与无效地址区分开,并且该行为由 parser 测试覆盖时,issue 就完成了。
由索引模型根据 Issue 内容生成。
描述
As witnessed in https://github.com/libp2p/rust-libp2p/issues/3244#issuecomment-1352743020 adding a new protocol to the multiaddr implementation breaks communication between nodes using the new feature and nodes using an older version of this library. This would be warranted if understanding the meaning of a multiaddr is always mandatory, but there are cases (like the identify protocol) where that is not the case.
Breakage for such cases could be avoided by adding a new layer of validation: besides syntactically invalid and fully understood there could be a class that is syntactically valid but not fully understood.
Due to the design of multiaddr syntax, this is not a trivial question: a protocol segment may have arguments, like /tcp/1234, and without understanding the protocol name it is impossible to know the number of arguments. It would have been possible to choose different separator characters (like /tcp=1324 or some such), but that ship has sailed. So the only way to express syntactically valid but not fully understood addresses is to add a variant like Protocol::Unknown(Cow<'a, str>), where /tcp2/1234 would lead to two unknown segments (with tcp2 and 1234 payloads, respectively).
The alternative to handling this in this library is to always deserialize a multiaddr property as String first and then check whether it can be fully parsed if needed. However, given that multiaddr aims to offer an abstraction over various addressing schemes, I think it is reasonable to expect that this scheme itself is extensible and handles extensions in a graceful fashion.
- 主要语言
- Rust
- 星标
- 101
- 派生
- 56
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
multiformats/rust-multiaddr 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
multiformats/rust-multiaddr#134 · 1 条评论 ·
-
difficulty:easy help wanted
难度 2/5 1-3 小时 新手友好度 47/100
multiformats/rust-multiaddr#100 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 25/100
multiformats/rust-multiaddr#90 · 2 条评论 ·
查看 multiformats/rust-multiaddr 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
software-challenge/player_rust#22 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
foundry-rs/foundry#17175 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
github/copilot-sdk#2793 ·
维护者通常 1 天内回复