arborchat / protocol Goto Github PK
View Code? Open in Web Editor NEWSpecification for the Arbor chat protocol
License: BSD 3-Clause "New" or "Revised" License
Specification for the Arbor chat protocol
License: BSD 3-Clause "New" or "Revised" License
To move arbor from using UUIDs to identify Posts (messages) to using verifiable hashes of message data (thereby making the chat history into a Merkle Tree), a procedure for obtaining those hashes must be established. This is a proposal for how to obtain those hashes:
Firstly, let's use multibase-encoded multihashes to avoid being locked in to any specific hash implementation in the long run.
Secondly, let's assume that Posts have the following schema:
{
"parent": "multibase-encoded-multihash",
"content": "the message itself (UTF8 string)",
"username": "who sent it (UTF8 string)",
"timestamp": 64-bit number of nanoseconds since Epoch,
"meta": {
"nosig/pgp": "multibase-encoded-message-signature",
"arbitrary": "some other client protocol extension data"
}
}
Posts are not necessarily represented as JSON, but it serves to demonstrate their inherent structure.
To derive the ID of a Post, do the following:
The use of NULL bytes is intended to prevent collisions between messages with the same content, but different metadata. It would also work to length-prefix each piece of data, but that might be more complicated. Definitely open to suggestions there.
Another issue is whether the metadata field is detachable. A similar approach would be to sort and hash just the metadata field, and then include the multihash of the metadata in the hash of the whole post. This would allow you to validate a Post's integrity without having the metadata, but I'm uncertain whether that's desirable.
The ability to query for message with ID foo
and its ancestry for up to X messages would be really handy.
I am no longer convinced that NEW_MESSAGE should be used for both query response and realtime message delivery from other users.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.