A reduction cache of the public tree for better links
One aesthetic problem that arises from the multi-segment approach of the
publicpartition is that paths become cluttered with extraneous detail. Ideally we’d like to ignore the header section when giving relative paths to a file in web contexts. We achieve this while retaining compatibility with the standard
go-ipfsby maintaining a reduction of the WNFS root (see the reduction section for more).
This reduction only selects for userland paths, discarding headers, metadata, and so on. It encodes directly as protocol nodes to be legible to as many system as possible without needing to understand the WNFS schemata or application.
The leaves of the pretty section MUST match the leaves of the public section at the protocol layer. This is to say, we count the raw data index of a file, or the userland segment of the DAG as a leaf, but never a header segment or
Being a reduction, this index cache can always be dropped and rebuilt deterministically.
The pretty paths are not versioned. It acts as a mutable file system.
A pun in the layout of the pretty section is to view the prefix “p” as a function modifier on the enclosed path (i.e.
As an example, a photo could be referenced at something like:
# Or as an absolute/immutable reference
This would be a reduction of the public path:
As you can see, the pretty path is much more amenable to human memory and legibility, and just... looks less strange in an email. Browsers are also able to infer the MIME type based on the file extension in the pretty path.