3
3 years agoby martindaleat difficulty 2

In an effort to help prevent automated spam (at least of the high-volume sort), I'm experimenting with utilizing a proof of work for submission of content. You can test this feature by submitting a new top-level post. The functionality has not yet been ported to the comments system.

Some notable changes to Adam Back's original scheme:

  • I've added a new field at position 2 that indicates the hashing algorithm used (sha256 for now)
  • I've modified the expected input to explicitly expect a hex string, adding convenience to inputs that might have unexpected data.
  • the protocol version is bumped from 1 to 2 to reflect these breaking changes.

Also noteworthy is that no matter how computationally complex the hash, the browser performance should not be affected as I've decided to use the Web Worker API. This creates a background thread upon which a message-capable worker computes a "cash" of appropriate difficulty, then notifies the main UI thread when it has completed. You can browse code for the UI thread or the worker itself on GitHub.

My original goal was to record these postings directly in an Alpha-powered Sidechain, but I spent much more time on implementing this feature than I intended. I'll tackle blockchain-permanence in an upcoming update.

2:2:sha256:20150711:004e006f0077002000540065007300740069006e0067002000480061007300680063006100730068::tsonx:0
Only showing top-level comments. To see a thread, click "reply".

For now, we require a user account to participate. If you'd like to change this, look at martindale/converse#7.

Built with Maki and deployed to the Fabric network.

decentralize all the things.