IPNS: clarify serialization and the type of ValidityType, TTL and Seq fields
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- go
调研方向
从 IPNS 记录规范中关于 TTL、序列和有效性的章节开始,然后将 #319 和 #376 中关于 v1 和 v2 的背景与所引用的 boxo/ipns record.go 和 go-ipld-prime 代码进行比较。当规范使用与语言无关的整数术语,并清楚记录 v1 的 protobuf uint64 表示形式与 v2 的 DAG-CBOR int64 表示形式时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Problem
IPNS Record spec lists Validity, TTL and Seq as uint64:
- https://specs.ipfs.tech/ipns/ipns-record/#ttl-uint64
- https://specs.ipfs.tech/ipns/ipns-record/#sequence-uint64
- https://specs.ipfs.tech/ipns/ipns-record/#validity-type-uint64
..but this only applies to the protobuf fields from IPNS v1.
For wider background, documentation and cleanup of v1 vs v2 was done in #319, #376.
In IPNS v2 we store values in DAG-CBOR map in Data field, and fields like the TTL read from v2 Data field (DAG-CBOR) is represented as int64 (see boxo/ipns code).
In other words, in GO impl. time.Duration is represented as int64, and that is how "uint64" fields like TTL are stored in v2 Data field (CBOR). This is also confirmed by the way IPLD data model impl. at go-ipld-prime/node/basic works.
Solution
Ideas welcome. My initial idea is to move away from go specific.
Clarify this in the IPFS specification and mark these fields as language-agnostic integer and then add bullet points in their respective section that when represented in legacy v1, the type for protobuf is uint64, and when represented in v2 (dag-cbor) it is int64.
cc @2color as you've been working with TTL in JS recently.
- 主要语言
- HTML
- 星标
- 1.2k
- 派生
- 250
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ipfs/specs 的其他 Issue
-
need/triage
难度 2/5 1-3 小时 新手友好度 68/100
-
need/triage
难度 5/5 一周以上 新手友好度 30/100
-
dnslink:// URIs未关闭need/triage
难度 5/5 一周以上 新手友好度 30/100
-
难度 5/5 一周以上 新手友好度 35/100
-
need/triage
难度 3/5 1-2 天 新手友好度 55/100
相似的 Issue
-
hermes-queue
难度 1/5 1-3 小时 新手友好度 85/100
chrisalunlloyd2-sudo/mindpalace#403 ·
维护者通常 1 天内回复
-
[Sync EN] Pdo\Pgsql: document session state reset on persistent connections (PHP 8.6) (#6084)可能已有人在做 @lacatoire 今天认领。 未关闭sync-en
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
Documentation: Fix parameter markup, legacy branch link, and phrasing in Detachable Joints and Model Command tutorials可能已有人在做 @patelshivani2283-lab 今天认领。 未关闭
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
ACK_WAITING HELP_WANTED UPDATE_CS
难度 1/5 1 小时以内 新手友好度 88/100
OWASP/CheatSheetSeries#2977 ·
维护者通常 1 天内回复
-
documentation enhancement
难度 2/5 1-3 小时 新手友好度 84/100