Add Ipfs-DagSize and/or Ipfs-DataSize to gateway responses
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
- Ambito
- api, networking
Direzione di ricerca
Inizia trasformando in una specifica i requisiti dichiarati per Ipfs-DagSize e Ipfs-DataSize, quindi confronta gli approcci proposti basati su intestazioni HTTP e content type personalizzati. Definisci l’ambito relativo a UnixFS, single-block dag-cbor, alle risposte HEAD e alla semantica delle dimensioni. Il lavoro è concluso quando sono stati concordati un’API e un piano di implementazione per i client gateway.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This is a placeholder issue for writing spec and tracking implementation.
The need is to expose equivalent of ipfs files stat's Size and CumulativeSize on HTTP gateway somehow, allowing light clients to understand how big is the DAG before fetching it as a CAR etc.
Ipfs-DagSizetotal size of the DAG (user data + DAG metadata, IPLD envelopes etc)Ipfs-DataSizetotal size of the raw data (without DAG metadata, IPLD envelopes etc)
We don't want expensive equivalent of ipfs dag stat for Unixfs, we want to leverage hints from UnixFS. It could be limited to formats like UnixFS, or single-block dag-cbor etc, which include total sizes in the root blocks, removing the need for expensive ipfs dag stat of entire DAG.
Implementation options
- 🟢 HTTP Headers
Ipfs-DagSizeandIpfs-DataSizeheaders with value in bytes- pro: simple and easy to implement, JS apps already use
Content-Typefor this (because without compression it matches payload size), we should not break them without giving a replacement header - 💡 caveat: unnecessary work on every request, unless we limit them to
HEADresponses
- ⛔ Custom content type that returns useful metadata
- would be opt-in
AcceptHTTP header orformatURL arg) - pro: could be leveraged for things other than size info
- con: complexity, need to decide on JSON schema, harder for gateways and clients to adopt
- would be opt-in
cc @vasco-santos I know you needed something like this a while ago
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ipfs/specs
-
Simplify Spec StatusesApertaneed/triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
need/triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
-
dnslink:// URIsApertaneed/triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
need/triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ElectronicWave/Elemental#265 ·
I maintainer di solito rispondono entro 1 giorno
-
feature needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
BoardGamesEmpire/board-games-empire-backend#1306 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
MattiaPARRINELLO/backstage#80 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
harvester/harvester#12311 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno