Learn more by joining the Handshake Discord Community
Zooko is a working-example, proof-of-concept proving that you can have a decentralized, immutable, and uncensorable microblog platform (like "twitter") in a truly decentralized manner without needing any 3rd party APIs and simply relying on cryptography.
Zooko uses the Handshake blockchain which allows you to fully own and control a name. While many use cases exist for Handshake, including federalist, DNS, and decentralized identity, Handshake is a versatile blockchain that also allows you to build any number of applications on top of it, without the need of smart contracts.
Zooko was named after Zooko Wilcox O'Hearn, one of the few remaining, original, Cypherpunks.
We're still writing code.
Handshake is an incredibly secure blockchain. While many other chains are easy to abuse, Handshake is not one of them. That being said, there was one outlet that we could take advantage of, and that is the UPDATE covenant which allows for a DNS resource record with several types, GLUE, NS, among others, and most importantly, TXT.
This is what we take advantage of.
You can only call 1 UPDATE per block. This means that with our implementation, you can only Zooko once per block. Additionally, TXT has a limit. We are prepending our TXT with "zooko:" so the limit is 249 characters (255 less 6). That's 9 more than the leading microblog!
Zooko will copy your DNS resource records over everytime you post, while replacing the last Zooko. Since TXT records are ignored when a NS record is present, this will not affect anything as we are using on-chain TXT records as opposed to authoritative server served TXT records which are preferred when an NS is present.
This is a quick, and simple, proof of concept. If someone was to build this into a full blown microblogging platform, a lot more "protocol" would likely need to be developed to integrate different kinds of interactions as well as 'compound interactions' using multiple strings in TXT records, which could allow for more than 1 action per block only limited by resource record max size limit. One could also hook this into the websocket to watch both the mempool and, as well, for new blocks. Finally, of course, someone could utilize web technologies and build a beautiful interface for this.
Handshake has been gaining incredible traction, including from institutional bodies like Namecheap, the second biggest DNS registrar on the Internet. This traction means that Handshake is winning favor with the community and that the Handshake blockchain has secured its space in the cyberworld. Some questions arise as to whether or not Zooko will bloat the blockchain. With the UPDATE limitation to one (1) per block, I don't think it will. However, it was important to use Handshake because doing so anywhere else would cause this to be blockable. By leveraging Handshake, the entire blockchain would have to be blocked in order to block Zooko. This is highly unlikely because Handshake is too popular.
This is why I chose to build this on Handshake.
- Clone
git clone https://github.com/publiusfederalist/zooko
- Get prepared
cd zooko
npm install hs-client hsd prepend readline stream consoleinout
-
Setup wallet and node keys in the
keys
folder. -
Now, just try it!
Updates the latest posts.
./zpull
Reads the posts.
./zread
./zread <name>
./zread <block>
Posts a new microblog.
./zpost <wallet-id> <name> "<message>"
This will prompt you for your password (the password will not echo back to the terminal).
(C) 2022 Publius Federalist
All Rights Reserved.
MIT LICENSED