Skip to content

Instantly share code, notes, and snippets.

@dominictarr
Last active March 4, 2026 07:13
Show Gist options
  • Select an option

  • Save dominictarr/5990143 to your computer and use it in GitHub Desktop.

Select an option

Save dominictarr/5990143 to your computer and use it in GitHub Desktop.
Cypherlinks
@luk-
Copy link

luk- commented Jul 13, 2013

img

@luk-
Copy link

luk- commented Jul 13, 2013

I think this sounds awesome

@sveisvei
Copy link

Im leaving a comment!

@navaru
Copy link

navaru commented Jul 13, 2013

Would this create a similar system to a graph database? Cause it abstracts the data model into a node, and nodes are linked. Am I correct?

@mbrevoort
Copy link

Immutability + only linking to existing objects + subset replication + these very simple rules... seems like an amazing distributed foundation. Are the links immutable as well? Like hyperlinks on the Internet, need to think about what happens when an immutable object disappears, perhaps this is much better because there's a greater chance of replicas existing in the ether, immutability being key.

To @navaru's point do the links (edges) have meaning?

@mbrevoort
Copy link

And then there's the hash collision problem. What if the hash had some scheme like the time since epoch appended of something, still can be calculated from the object (since you must know time of origination), but name spaced at millisecond resolution?

@dominictarr
Copy link
Author

@navaru as long as you take into account of the direction of the edges, it can only be a tree.
to make this work as a graph (where cycles, etc, are possible) you'd have to index the edges,
and then ignore where they came from.

For example: As a tree

// x -> y means that x includes the hash of y in it's body.
// aka, x links to y
A -> B
C -> A
D -> A
D -> C

That would be the view of reality you'd get from reading D,
and then reading the documents that it's hashes link to.

If you ignored the directions, (you'd have to index the links separately), you'd get this:

// x <-> y means either x -> y, or y -> x is true..
// aka, x links to y or y links to x.
A <-> B
C <-> A
D <-> A
D <-> C
//then, we have a cycle
D <-> C <-> A <-> D

However, it's rather difficult to ignore the direction,
If you have a document, you know about the outgoing links,
but unless you actually have the documents that are the sources of those links,
(which would enable you to create a document linking to those sources, making it a rooted tree)
then you never know what is the total set of incoming links.

@mbrevoort so if you are worried about a important link disappearing, you just copy it to your machine.
since it's immutable, it doesn't matter who has it. You can ever redistribute it, and anyone looking for it will
be able to verify it's correct.

Also, the links are generally meaningful, although, that meaning is dependant on what the object represents,
so consider a blog post that links to images, raw text, the public key of the author, etc - that is all data that is essential to displaying the post.

Incoming links, on the other hand, can be anything... a document could be linked to by comments, other blog posts, spam... anything. In the case of comments and other posts, the author of the original document is probably eager to know of documents that link to him. If this case, they could be replicated to his machine via something like a git push!

Naturally, we will need to start using an expanded hash at some point...
Any suggestions on the best way to do so are highly welcome!

@navaru
Copy link

navaru commented Jul 23, 2013

Sorry for the late response, my job is time consuming. A few questions to wrap my head around some simple mechanics.

How would an object structure look like?

docA = {
  __hash: 'hashA'    // every doc created needs to have an unique hash
, __prev: null       // internal cyperlink
, otherDoc: 'hashN'  // external cyperlink
, _id: 'uuid'
, name: 'Smith'
}

update(docA, { name: 'John Smith' }) // => docA

{
  __hash: 'hashB'
, __prev: 'hashA'  
, otherDoc: 'hashN'
, _id: 'uuid'  
, name: 'John Smith'
}

A document MUST link to it's previous version.
A document CAN link to other documents (or sources?)

"the links are generally meaningful, although, that meaning is dependant on what the object represents", can u provide a short example?

I want do draw a diagram, any detailed example would be useful, thanks.

@dominictarr
Copy link
Author

@navaru a doc has a hash, but cannot contain it's own hash. This is impossible, because you do not know what the hash is when you create the document.

Also, not all documents require "previous versions". For example, there is no previous version of a git commit.
A commit just is. by "meaning dependant on what the object represents" I mean that there are many possible types of objects, and an object may link to multiple different types of objects.

An example might be a blog post:

{
title: 'first post',
author: HASH_OF_PUBKEY,
contents: HASH_OF_MARKDOWN_TEXT
date: new Date()
}

This document has two cypherlinks, one to the text of the document, another to the author's key...

A comment might look like this:

{
  commentOn: HASH_OF_POST,
  content: 'wat. i dont even.'
  author: HASH_OF_PUBKEY_OF_COMMENT_AUTHOR
}

This comment points to the original post.
and to it's author.

Both of these would require other signing documents, that might look like this:

{
  signer: HASH_OF_PUBKEY, //who does the signing
  signed: HASH_OF_DOC, //this is the value signed.
  signature: SIGNATURE................................... //this is the signature.
}

There are lots of other ways you could represent such data,
this is just an example. The idea here is to realize the core features,
hashes, signatures, links, and then experiment on the best ways to represent actual data.

@micahredding
Copy link

How can I follow the progress of this idea? Are you going to be working on this in any other space, or just here for now?

@djcoin
Copy link

djcoin commented Jul 25, 2013

I had your idea too in some way. What sucks on internet is that anything is evolving, its get deleted or changed. If you really want to link data between them, there should be another layer on top of it that ensure that everything is immutable and authentic, hash and merkle tree for compound objects are the tools.

You should take a look to the CCNx ( http://www.ccnx.org/ - described as the future of the internet, you request "data" and not a url) and some ingoing implementation in JS (like: https://github.com/named-data/ndn-js ).
Basically, this is "storing" data in a distributed way on "routers" that also use caching. Data is cut in chunks and signed (keys are being passed around not so clear to me).
This project is awesome for several reason, i will give only two: 1/ of course you get immutability but also 2/ it can be YOUR content that is distributed in all those node and thus if your content is popular you benefits from all the caching infrastructure - don't need to have the firepower of google to handle the load.

Even more, Leveldb would be a great fit as a backend for this. I was thinking about making a lightweight javascript implementation of some CCNx inspired system but it seemed as too much work in a field that I don't master, but I would be happy to contribute to such a project.

@djcoin
Copy link

djcoin commented Jul 25, 2013

A few links:

Regarding the CCNx implementation, the core is in C, some tools are in Java, and the format is XML...
Specifications exist for many things, so we should be aware of it and choose to/or not to use it (eg: Json Web Signature).
I was thinking of using JavaScript and JSON (with b64 encoded stuff) and a leveldb backend.

Heh, this is mad|strong science :)

@dominictarr
Copy link
Author

this looks quite interesting.

@gobengo
Copy link

gobengo commented Jun 2, 2015

@arlettemessenger
Copy link

That's an interesting idea you have there! Can you explain how hash pointers ensure integrity and traceability in distributed systems? merge fruits wonders.

@neuerloyed
Copy link

You've got a really intriguing idea there! Now let's go clicking, plan your renovations, and see how quickly your candy collection expands in candy clicker !

@minmin886
Copy link


スプランキーは、音とキャラクターを組み合わせてオリジナルのビートを作る新感覚の音楽ゲームです。シンプルな操作で、自分だけの音楽スタイルを表現できます。

@minmin886
Copy link

スプランキーでは、ポップからホラーまで幅広いスタイルの音楽を簡単に制作可能。無料で試せるこの音楽アプリで、あなただけの音を作ってみよう!https://sprunkiphase4.net/ja/sprunki-phase-3.html

@928380504
Copy link

The language style is relaxed and humorous, making it stress free to readstimulation clicker

@basketballbros12
Copy link

Suit up in Basketball Bros and play intense basketball duels, pulling off insane alley-oops and crossovers in pixel-powered glory against rivals.

@geometrydashofficial
Copy link

This idea of using cypherlinks to build verifiable chains of content really opens up wild possibilities, especially if you imagine applying it to something like Geometry Dash. Imagine if every level was a hash-linked object: immutable, signed by its creator, and modifiable only by linking to a previous version. You could have a fully decentralized level-sharing system where edits, forks, and comments form a public, tamper-proof graph. No central servers, just chains of trust. Players could even verify the provenance and authenticity of levels, like code commits. The whole game could float in the same unbounded namespace you're talking about a global cypherspace of levels, mods, scores, and history. That’s next-level!

@Audio2Text
Copy link

I saw that each PolyTrack race offers new track designs, and it seems like every round keeps players on their toes! It's such a cool twist that ensures the gameplay never feels stale. It's amazing how much variety there is in just one game. Watermark Remover

@sadfkljlskafj
Copy link

This is a fascinating exploration of "cypherlinks" and their potential. The idea of immutable, hash-addressed objects and building systems top-down from this foundation is really compelling, especially the implications for replication and versioning without explicit queries. It reminds me of how crucial accurate transcriptions can be for understanding complex topics, and for that, I often use the YouTube Transcript Generator.

@sadfkljlskafj
Copy link

This is a fascinating concept! The idea of "cypherlinks" as immutable, hash-addressed objects really resonates, especially how it relates to systems like Git and CouchDB. It opens up so many possibilities for distributed data structures and efficient replication. For anyone inspired by these foundational ideas and looking to create unique visual content, I found Image to Pixel Art Converter to be a fantastic tool for turning images into pixel art. It might even be interesting to explore how such a system could integrate with generative art!

@sadfkljlskafj
Copy link

This exploration of "Cypherlinks" is fascinating! The idea of using hash pointers as a foundational concept for building various systems, from Git to decentralized applications, is really insightful. It definitely makes you think about how data is structured and interconnected. For anyone working with text, especially AI-generated content, getting it perfectly polished is key. I've found AI Cleaner Text to be incredibly helpful for removing those tricky invisible characters and normalizing punctuation in one click.

@sadfkljlskafj
Copy link

This is a fascinating exploration of "Cypherlinks" and their potential! The concept of immutable, hash-addressed data and the implications for replication and building complex systems from simple primitives are really well articulated. It reminds me a bit of how important a strong first impression is, something you can explore with the Attractive Test. This article definitely sparked some new ideas!

@sadfkljlskafj
Copy link

This is a fascinating exploration of "cypherlinks"! The concept of immutable, hash-addressed objects and the potential for building systems like Git or even decentralized blogs from this foundation is really compelling. It's inspiring to see how these core ideas, present in systems like Git and Bitcoin, can be adapted. If you're looking for a creative outlet to visualize some of these abstract concepts, I found AI Image Generator By Nano Banana Pro to be quite useful for generating images quickly.

@sadfkljlskafj
Copy link

This is a really fascinating concept! The idea of "cypherlinks" and building systems directly on top of them, rather than trying to replicate git's entire structure, feels like a much more foundational and flexible approach. I especially like the implication for easier replication and the potential for such a decentralized, hash-addressed data model. It sparks some creative thinking. For anyone working with digital assets, I'd also recommend checking out Converter PNG to SVG for their online tools.

@sadfkljlskafj
Copy link

This is a fascinating exploration of "Cypherlinks"! The concept of immutable, hash-addressed objects and the idea of building systems from them rather than replicating existing ones like Git is really compelling. The implications for replication and decentralized data management are huge. If you're ever working with markdown and need to convert it, you might find MD to Word Converter quite handy for quick document transformations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment