gateway: rollback IPNS

未关闭
#397 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
go

调研方向

从 issue 中描述的 ipfs name resolve -s $SOME_IPNS_NAME 行为开始,跟踪 gateway serving 如何等待 IPNS 解析。由于没有指定源文件或测试,首先确定 gateway 和 IPNS 解析的入口点。完成的标准是 serving 可以从第一条记录开始,保留响应,并在找到更好的记录时将其替换。

由索引模型根据 Issue 内容生成。

描述

need/triage

Currently IPNS over the DHT is very fast to find a record but it then waits for a while trying to contact various nodes trying to ensure this record is updated until a timeout is reached.
(see ipfs name resolve -s $SOME_IPNS_NAME)

We should start the gateway serving process as soon as the first record is found, but hold onto serving response.
If an other better record is found we can cancel the first request and make a new one, "rolling back".
Given reaching consensus on IPNS is often the longest thing before first byte, it would make the TTFB === IPNS resolution time, since initial data resolution (traversing path and ranges in the file until we find the first piece of data), provider record resolution and bitswap session building would be pipelined into quorum process.

Given bitswap sessions and the block cache it's also likely doing an outdated request first will accelerate the real request later. For example if I found you host an old version of some IPNS name, I think it's reasonable to optimistically ask you for the newer one when I learn about it even tho I didn't finished my provider record step yet.

主要语言
Go
星标
326
派生
165
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ipfs/boxo 的其他 Issue

查看 ipfs/boxo 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。