Change UnixFS dag-pb protobuf field ordering

Abierto
#533 0 comentarios 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo

Línea de trabajo

Empieza leyendo la especificación enlazada del formato de serialización dag-pb y las referencias a los pull requests IPIP-499 y specs para comprender el contexto de compatibilidad y de los perfiles. El trabajo estará terminado cuando la propuesta de ordenación, sus implicaciones para el formato wire y cualquier ruta de actualización a unixfs-v1-2026 estén claramente especificadas y aceptadas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

need/triage

The .proto definition of a PBNode is this (spec):

message PBNode {
  // refs to other objects
  repeated PBLink Links = 2;

  // opaque user data
  optional bytes Data = 1;
}

Implementations are expected to write the repeated Links messages to the output buffer first, then the Data field, even though the field IDs are ordered the opposite way (not disallowed by the protobuf spec, though some off the shelf encoders will write in ID order).

When the PBNode represents a directory, the Links objects could be either flat directory entries, or HAMT shard entries - the information needed to ascertain this is contained in the Data field.

This means when processing an incoming PBNode message, we typically read all of the Links, and then use the Data to decide how to process them.

If we are performing a graph traversal, a streaming parser would let us process the PBNode message as it arrives, and to select the Link message we wish to traverse through or resolve to, however this is not currently possible since we need to process the Data field before we can return a Link. This can add significant overhead when there are many thousands of Links.

We should allow ordering the Data field first, this would enable the streaming use-case and help with IPFS code running in resource-constrained environments such as web browsers.

Since IPIP-499 we now have CID profiles which could be an upgrade path for the network. This proposal could be part of a unixfs-v1-2026 profile.

Lenguaje dominante
HTML
Estrellas
1.2k
Forks
250
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ipfs/specs

Todos los issues de ipfs/specs

Issues similares

Más issues de Distributed Systems

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.