| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Add GET /manifest/{address}/{path}, which walks the Mantaray trie
server-side and returns entries as JSON, so clients no longer need to
fetch and traverse the trie chunk by chunk just to list a collection.
Semantics follow S3 ListObjectsV2: optional path prefix, an optional
delimiter for shallow (pseudo-directory) listings, lexicographic
pagination via limit/after, and opt-in per-entry sizes.
- pkg/manifest: add the optional EntryWalker interface (+ ErrStopWalk)
and implement WalkEntry on the mantaray manifest over the existing
sorted WalkNode, without expanding the core Interface.
- pkg/api: manifestListHandler + route, reusing the /bzz manifest
resolution and ACT decryption chain; per-entry size via the root
chunk span.
- openapi: document the path plus ManifestList/ManifestListEntry schemas.
- tests: recursive, delimiter, prefix, pagination and 404 cases over a
real mantaray fixture, including the empty root-metadata entry.
Refs ethersphere#5535
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
OpenAPI requires every in:path parameter to be required:true; an optional path parameter fails spec validation and broke the OpenAPI Preview CI check. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Raise the manifest listing page cap to 1000000 and document what it bounds (per-request buffered memory, not total enumeration, which stays unbounded via after/nextMarker). An over-cap limit now returns 400 rather than being silently clamped, so the client keeps an accurate view of its page size; a non-positive limit falls back to the default. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Summary
Adds a read-only, server-side manifest listing endpoint, implementing the read half of #5535.
GET /manifest/{address}/{prefix}Bee currently has no way to enumerate a manifest's contents over HTTP — clients must download and walk the Mantaray trie themselves, chunk by chunk via /bytes (one round trip per node). This endpoint walks the trie on the node and returns entries as JSON, turning O(trie nodes) round trips into O(pages). Semantics mirror S3 ListObjectsV2:
Response: { entries[], commonPrefixes[], truncated, nextMarker }.
This is deliberately listing only. The companion server-side mutation endpoint sketched in #5535 is a separate follow-up.
Implementation
Everything needed already existed in the tree:
No new storage, protocol, or incentive-layer behavior — purely a local read amplification of data the node already serves.
Testing
Known limitations / scope (draft — feedback welcome on the API shape)
Opening as a draft to agree the API before polishing. Deliberately out of scope here, happy to address based on review:
Refs #5535.