Include IPNS Record in Gateway CAR responses

Aperta
#369 8 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma

Direzione di ricerca

Inizia dalla specifica di Trustless Gateway e dai materiali collegati di IPIP-351, IPIP-402 e IPIP-412, quindi esamina la struttura CAR proposta nell’issue, basata prima sui record. Risolvi le domande aperte sulle radici CAR e sulla segnalazione delle requests, e definisci il comportamento richiesto di Trustless Gateway e Kubo per l’importazione e l’esportazione dei content-paths; il lavoro è completato quando la specifica e l’ambito dell’implementazione non sono più ambigui.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

IPIP need/triage

IPIP-351: IPNS Signed Records Response Format on HTTP Gateways will return a raw IPNS record, allowing a custom light client to verify IPNS without having to run DHT client.

Users asked for the ability to export both CIDs and IPNS record into a CAR, transport over sneakernet and load this on airgapped node, which is a good use case.

Another use case is Decentralized Gateway WG, which could benefit from the ability to have a single round-trip that includes full or partial CAR with content + ipns-record.

Broad strokes UX we want to accommodate:

$ curl http://gateway.foo/ipns/{id}?format=car&something > ipns-site-dump.car
$ ipfs import ipns-site-dump.car # imaginary command that goes beyond DAGs 
$ ipfs resolve /ipns/{id}   # works, even in offline mode
$ ipfs dag stat  /ipns/{id} # works, even in offline mode

Initial notes / subtasks

  • need to add a new ipns-record codec, to indicate special meaning of this additional block. Done: https://github.com/multiformats/multicodec/pull/312
  • Extend Trustless Gateway spec to support verifiable responses of /ipns/{libp2p-key} paths: decide if returned CAR should include two roots. One for data, second for ipns-record block. Specify if ipfs-records should be at the beginning of the CAR returned by /ipns/{id}?format=car[&something?] - to allow quick validation of response without wasting time for hashing invalid blocks that do not belong to CID in IPNS record.
    • ?format=ipns-record on /ipns/{key} landed in IPIP-351 (spec)
    • record inside the CAR response
  • Kubo CLI should have top level import / export that operates on content paths (instead of raw dags like ipfs dag versions), include all parent blocks and not just the final terminating element recursively, and be smart enough to use ipns-record and import it to local namesys cache if a block with ipns-record codec is present in a CAR

Status as of 2026Q3

Nobody is working on this. Summary of what exists and what is missing, so it can be picked up.

Trustless two-step retrieval works today, over plain HTTP:

  1. GET /ipns/{name}?format=ipns-record (IPIP-351): the client verifies the signature and resolves the record to /ipfs/{cid}, or stops on mismatch.
  2. GET /ipfs/{cid}?format=car with dag-scope, entity-bytes and order=dfs (IPIP-402): the client verifies each block as it arrives and drops the connection on the first block that fails its hash or is not expected in the DAG.

What is missing is the single round trip. GET /ipns/{name}?format=car today returns the CAR of the resolved content without the record, so the client cannot verify the IPNS step from that response alone. The smallest useful shape: a CAR with the ipns-record block (codec 0x0300) first, then the IPIP-402 stream from the root the record points at. The client checks the record before hashing anything else and can drop the connection after the first bad block. Plain HTTP, no new protocol or transport needed.

Open questions, unchanged from the list above:

  • CAR roots: only the record, only the data root, or both.
  • Request signal: an explicit format value or a CAR content-type parameter (IPIP-412 style), so a client can tell a record-first CAR from a plain one served by an older gateway.

Kubo side: no content-path import/export exists, and ipfs dag import does not know the ipns-record codec.

Lingua principale
HTML
Stelle
1.2k
Fork
250
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ipfs/specs

Tutte le issue di ipfs/specs

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.