OtsProofBot internals

Valerio Vaccaro
3 min readNov 6, 2017

The OtsProofBot is twitter bot useful for save and timestamp tweets using the OpenTimestamps protocol (https://opentimestamps.org/).

How it works

You can timestamp your tweets in this way:

  • add @otsproofbot at your messages,
  • the bot will reply with a message with text and embedded proof.
The proof

In the proof you can find:

  • the original text, date and user,
  • the JSON created with all relevant information,
  • the hash of the previous generate JSON (calculated with SHA256 hashing function)

Internals

OtsProofBot is based on the Node-RED (https://nodered.org/) opensource platform that allows to code complex message orchestrators in a simple visual way.

We use the Twitter node (https://flows.nodered.org/node/node-red-node-twitter) in order to read new tweets and answer back with the proof. When a new tweet containing @otsproofbot has produced the text and relevant information are stored in a database, the JSON is composed and the OpenTimestamps protocol is called in order to generate the proof.

Node-RED internals

The OpenTimestamps proof is generated using the relative node (https://www.npmjs.com/package/node-red-contrib-opentimestamps) and the result is saved in the database. Then the system creates the text of the response tweet and reply to the original message.

Every hour another thread try to update all the proofs on the database that are not in a final state.

Some other blocks allow us to publish dinamic pages used to read the text and reach the proof, in the same time we record the number of times a certain page is requested.

Based on this information we can simply generate some charts like the following that show usage and users that use the bot.

It’s time to follow (and use) @otsproofbot on Twitter (https://twitter.com/otsproofbot)

F.A.Q.

What’s the price of this service?
OtsProofBot is free to use.

Where is tweet text stored?
The text of every tweet, proof and other data are stored in a private cloud database. This database is not accessible from third parties.

What happens if I delete a previously timestamped tweet?
Nothing! The tweet with proof will be never deleted from us, you will be always able to see the text of the original tweet using the proof page.

How can I timestamp a tweet of another user?
Actually is not possible but anyway we are working on it and we have a simple web interface for timestamp a tweet giving an URL.
In future we plan to allow timestamp tweet from another user in this simple way:

  • decide the tweet you want to timestamp and copy the URL,
  • write a message with @otsproofbot and the URL copied,
  • check the proofs generated.

--

--

Valerio Vaccaro

Engineer, Bitcoiner, Data Scientist, IoT Expert and Tech Enthusiast. Co-founder of @scamcoinbot. Dad of @otsproofbot.