Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

PoDSI Piece Browser

Interactive browser for Filecoin Data Segment Index entries. Point it at a raw piece or sector file (or URL) and it parses the trailing index, then serves an HTML UI for browsing entries.

screenshot

Supported Formats

Format Entry Size Description
v1 (FRC-0058) 64 B (2 nodes) Original data segment index. CommDs + padded offset/size.
v2-orig (Nov 2025 proposal) 128 B (4 nodes) Extended index with CommDS, pre-Fr32 offset/size/rawSize, multicodec, ACL.
v2 (revised, Mar 2026) 128 B (4 nodes) CID-based index with multihash, multicodec, flexible alignment.

Format is auto-detected by examining the file tail for a valid sentinel entry and checksum validation.

Install

go install github.com/magik6k/podsiv2-parser@latest

Or build from source:

git clone https://github.com/magik6k/podsiv2-parser
cd podsiv2-parser
go build -o piecebrowser .

Usage

piecebrowser <file | url>

Opens a local HTTP server and launches the browser. Examples:

# Local file
piecebrowser /path/to/piece.data

# HTTP URL (downloads to temp file first)
piecebrowser https://example.com/piece.data

The UI provides:

  • Summary bar with file size, detected format, and entry count
  • Paginated table (handles millions of entries)
  • Click any row to expand full details (all fields, hex dump, checksum status)
  • Search / filter by CID, commitment hash, offset, codec name
  • Sentinel entries highlighted

API

The server also exposes JSON endpoints:

  • GET /api/info -- file metadata, format, entry count, warnings
  • GET /api/entries?offset=0&limit=100&search=... -- paginated entries

Entry Layouts

v1 (FRC-0058)

[0:32]  CommDs        (254 bits, piece commitment)
[32:40] Offset        (uint64, padded bytes)
[40:48] Size          (uint64, padded bytes)
[48:64] Checksum      (126-bit SHA-256)

v2-orig (Nov 2025 proposal)

Node 1 [0:32]:   CommDS           (254 bits)
Node 2 [32:64]:  Offset(8) | Size(8) | RawSize(8) | Multicodec(8)
Node 3 [64:96]:  MulticodecDependent (254 bits)
Node 4 [96:128]: ACLType(1) | ACLData(8) | Reserved(7) | Checksum(16)

v2 revised (Mar 2026, CID-based)

Node 1 [0:32]:   CommData         (254 bits of hash digest)
Node 2 [32:64]:  Multicodec(8) | Multihash(8) | Reserved(15) | CommDataTail(2 bits)
Node 3 [64:96]:  Reserved(8) | Offset(8) | Size(8) | RawSize(8)
Node 4 [96:128]: ACLType(1) | ACLData(8) | Reserved(7) | Checksum(16)

All sizes in v2 are pre-Fr32-padding bytes. Checksum is SHA-256 of the full entry with the checksum field zeroed, truncated to 126 bits.

Related

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages