Git Product home page Git Product logo

cid-utils-website's Introduction

multiformats

The main repository for discussing multiformats

Multiformats is a set of self-describing protocol values. These values are foundational in that they are low-level building blocks for both data and network layers of the composable protocols making up IPFS, IPLD, libp2p, and many other decentralized data systems. This repository's issues and pull requests are currently the primary venue for the coordination between the various registries making up the group, each of which is separately being hardened as specifications and public, formal registries over time.
See contributing.md for more details on governance and process.

Current Registries

Currently, we have the following formats, each of which corresponds to a specification and a registry. More formats are being discussed and may be added over time, but the following are the mature ones to date:

Repo Status Specification
multiaddr stable TBD
multibase stable W3C CCG
multicodec stable TBD
multihash stable W3C CCG

See the project directory, below, for implementations and other related repositories.

Table of Contents

Background

Every choice in computing has a tradeoff. This includes formats, algorithms, encodings, and so on. And even with a great deal of planning, decisions may lead to breaking changes down the road, or to solutions which are no longer optimal. Allowing systems to evolve and grow is important.

Multiformats is a collection of protocols which aim to future-proof systems, today. They do this mainly by allowing data to be self-describable. This allows interoperability, protocol agility, and helps us avoid various forms of lock-in. Currently, these interlocking protocols (both works in progress and implemented) cover the following areas:

Several of the multiformats are stable, and work on the others is ongoing. Implementers and refiners of the drafts of any one of these registries or their tooling are welcome to contribute, without needing to understand deeply or track progress on the others. Across these otherwise different use-cases and mechanisms, the self-describing aspects of the protocols have a few design goals in common:

  • the "prefixes" use to self-describe a value must be inline with the value (not passed out-of-band, in function calls, implicit choices, or documentation);
  • they must be compact and have a binary-packed representation (as opposed to a sparser encoding) or they will hinder performance;
  • they must have a human-readable representation.

A note on the word Multiformats

Multiformats is the name for the community (and the "organization" in GitHub's access control model), but multiformats can also be used to refer to protocols; for instance, in the sentence "Use one of the multiformats". Formats is interchangeable with protocols, here, as each format is designed in tandem with one or more protocols which handle those self-describing values centrally. We try to capitalize Multiformats when it refers to the organization.

Project Directory

Below, a list of all of the projects in the Multiformats organization is listed.

Maintainers are the active leads for each project, even if the specification is still under construction. Their responsibilities are to make sure that issues and pull requests are attended to in a timely manner, and general upkeep. If you have questions about a repository, or need feedback, please contact them as appropriate. If any of the specifications defining these formats are formalized in a standards body, these maintainers may continue on as Registrars of the table of entries which can keep growing after stabilizing the syntax and tooling interfaces.

Implementations

There are no official or maintained implementations of the entire set of multiformats specifications and registries. The readme file of each multiformat specification repository includes a list of known implementations, some of which are hosted in this GitHub organization.

Maintainers

Maintainers of the each multiformats specification are listed in the appropriate repositories. The external standardization of multiformats specifications and registries is currently managed and coordinated by @bumblefudge of learningProof UG.

Contribute

Check out our contributing document for more information on how we work, and about contributing in general.

License

This repository is only for documents. All of these are licensed under the CC-BY-SA 3.0 license Β© 2016 Protocol Labs Inc. Any code is under a MIT Β© 2016 Protocol Labs Inc.

cid-utils-website's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cid-utils-website's Issues

Add error reporting

If anything goes wrong while we're unpacking the CID, because of a malformed CID or we have a bug, then the error is currently just logged to the console.

Malformed CID errors should be show to the user, a form that helps them figure out what's wrong with their CID where possible.

show multihash for a cid

the ipfs block commands work with multihashes rather than CIDs. It would he helpful to be able to paste in a CID and see it's base encoded multihash that could be pasted into one of those commands.

in the meantime you can

$ ipfs --offline cid format -f %m zb2rhe5P4gXftAwvA4eXQ5HJwsER2owDyS9sKaQRRVQPn93bA                                                                                                 
zQmVmkadKS2uvxyD6YJJzd3Umem6SWV7QxYnL7kbpdWAsPS

Can't decode CAR CIDs

There is a multicodec for CARs now. CIDs exist in the wild for them. This site can't decode them yet as it's got an old version of the multicodecs table.

The old ways must give way to the new. multicodecs is not updated. multiformats is where the action is.

As suggested by @ribasushi It might be worth reworking this site so that we don't have to redeploy it every time the table is updated. Historical note, it was built this way so that it was self contained, and the site would work entire offline if you have the dag for the site root.

Add a link to this repo

Link to this repo from the tool itself so that people can open issues if things don't work as expected or if they have ideas for improvements.

Can't decode emoji CIDs

Adjustable CID parameters

https://cid.ipfs.io/#bafk2bzaceaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa tells the user about the CID, however, it'd be nice if some of the parameters were dropdowns so you could see what the CID looks like if slightly changed.

e.g. Changing Name: base32 to Name: base36 with a dropdown menu that shows all multibases available. This is especially useful since some encodings mean the characters don't neatly align to a single, whole byte each.

It might also be of benefit to give the user the option to manually type in multiformat codes to see how non-standard multiformats would be encoded.

Add regression tests

We should have a test for each:

  • CIDv0 (QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR)
  • CIDv1 base32
    • dag-pb
    • raw
    • dag-json
    • dag-cbor
  • CIDv1 base36
    • libp2p-key codec
  • PeerID (not a CID, but pasting 12D3KooWJHxkQKX8C5KAyqEPhn2ssT2in4TExyG9SXxi519tycL9 should show meaningful error as noted in #48)

Support legacy (raw) PeerIDs in Base58btc

Context: https://github.com/libp2p/specs/blob/master/RFC/0001-text-peerid-cid.md

In short, PeerIDs are not CIDs, but can be represented as one (CIDv1 with libp2p-key codec).

Due to this, easy UX win is to detect raw PeerID like 12D3KooWJHxkQKX8C5KAyqEPhn2ssT2in4TExyG9SXxi519tycL9
and should show meaningful error that pasted identifier is not a CID, but can be represented as one, and show the CIDified version:

$ ipfs id --peerid-base base36 12D3KooWJHxkQKX8C5KAyqEPhn2ssT2in4TExyG9SXxi519tycL9 --offline | jq  .ID
k51qzi5uqu5djbl2zsl8ooauuh7wb1ycesq93g72iym71shji1pbntl1vuyuk2

Add favicon (IPFS logo)

Just noticed that the CID Inspector, unlike the Block Explorer, is missing a favicon. Would be great to copy that one over.

Add binary byte length of a CID

It would be useful to know how long a CID is in bytes.

This would be especially useful for folks storing CIDs in space constraints environments like blockchains.

This was also partially inspired by Ryan's blog post https://blag.thedisco.zone/?post=cidfacts

Let's say I have a v0 CID:

QmXS8zmXsBVGvdPzj3QFVrzJUcKaaUkEVhHMFvgxUJdVFT
I can convert it to a v1 CID:

$ ipfs cid base32 QmXS8zmXsBVGvdPzj3QFVrzJUcKaaUkEVhHMFvgxUJdVFT
bafybeieheejcn4tspx5re74waw2ixp6hw6rvsssjlf6c3eivcy7oooqjay
But that got longer, so what if I wanted to include it in an NFT, using as little data as possible? Well then I'd use the [identity base with raw encoding](https://github.com/multiformats/multicodec/blob/master/table.csv):

$ ipfs cid format -b identity -c raw bafybeieheejcn4tspx5re74waw2ixp6hw6rvsssjlf6c3eivcy7oooqjay
p ?!&?r}?????Η·?YJIY|-?>?:
We went from our 46 byte v0 CID, to a 59 byte v1 CID, to a 37 byte raw CID. We can easily go back the same way we initially got the v1 CID as well:

$ ipfs cid format -b identity -c raw bafybeieheejcn4tspx5re74waw2ixp6hw6rvsssjlf6c3eivcy7oooqjay > rawcid
$ cat rawcid | ipfs cid base32
bafybeieheejcn4tspx5re74waw2ixp6hw6rvsssjlf6c3eivcy7oooqjay

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.