Giter Club home page Giter Club logo

clj-multihash'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.

clj-multihash's People

Contributors

greglook avatar plexus avatar richardlitt avatar rvagg avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

clj-multihash's Issues

Publish docs

Generate API docs with Codox and literate docs with Marginalia.

ClojureScript compatibility

I've started to work on this a bit in the cljs-support branch. The main differences so far are:

  • Declaring the type itself, as cljs has a different set of protocols and method names than clj does for the same roles, e.g. clojure.lang.ILookup/valAt vs cljs.core.ILookup/-lookup.
  • Encoding and decoding base58 from bytes, which I've handled by creating a new cross-compiled library alphabase. Also includes many utilities for working with bytes generically across the two runtimes.
  • Clojure can leverage java.security.MessageDigest to get native SHA1 and SHA2 implementations, while cljs doesn't have an equivalent. I'll probably omit them for now and rely on the backend for hashing, or users can find another library to support them.

tools.analyzer.jvm trips over extension to byte array

Hi @greglook !

Clerk cannot analyze this library using tools.analyzer.jvm since tools.analyzer trips over this expression:

#?(:clj (class (byte-array 0))

Repro:

$ clj -Sdeps '{:deps {org.clojure/tools.analyzer.jvm {:mvn/version "RELEASE"} mvxcvi/alphabase {:mvn/version "RELEASE"}  mvxcvi/multihash {:mvn/version "RELEASE"}}}'
Downloading: mvxcvi/alphabase/maven-metadata.xml from clojars
Clojure 1.11.0
user=> (require '[clojure.tools.analyzer.jvm :as ana :as j])
nil
user=> (do (j/analyze-ns 'multihash.core) nil)
Execution error (ExceptionInfo) at clojure.tools.analyzer.passes.jvm.validate/validate-tag (validate.clj:235).
Class not found: (class (byte-array 0))

Are you open to a PR which fixes this problem?

String rendering

Saw this in readme:

hash:sha2-256:dbd318c1c462aee872f41109a4dfd3048871a03dedd0fe0e757ced57dad6f2d7

nice-- i ran into the same need when making the CID spec here: https://github.com/ipld/cid#human-readable-cids. I would discourage use of : end prefer - because it would be great if people use the compressed representation in URNs instead of the expanded one... but i can be persuaded.

(I would want to ensure people don't use the string versions to rely on them for identifiers-- as the whole copy-pastability and versatility of multihash goes down with that).

See also

Move to Multiformats?

Hey @greglook!

Thanks so much for this. As you may know, we recently created the Multiformats organization to be a home for all of the multiformats - multiaddr, multihash, etc. Would you be interested in moving this repository to that organization? You would still have admin rights on the repository, but it would be a part of a wider organization. This would mean more relevant eyes on it (most likely) and better cross-repository issue tracking. We'd also add a line mentioning you as the original author, and of course your commits would stay the same.

Of course, keeping it on your profile is also cool; we'll still link to this from the main multihash repository at github.com/multiformats/multihash.

Thanks for taking the time to read this. ๐Ÿ‘

Tracking issue, here: multiformats/multiformats#4.

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.