0

I have created a Blockchain 'simulator' in JavaScript, for the purpose of helping explain how the technology works. It is complementary to a website I have set up years ago, where I attempt to explain blockchain technology in laymen's terms (I use the same coloring and design of elements, to stay in line with the design of the website).

It is made up of three basic components:

  • A Memory Pool
  • A Miner
  • 'The Blockchain' (an overview of the blocks mined)

It features:

  • SHA256 mining (with optional MD5 hashing, more of an experiment to see which is faster in JavaScript)
  • 32-bit string noncing
  • Adjustable hash rate (with a clock-multiplier boost)
  • Difficulty adjustment
  • Auto-replenishing Memory Pool (generates random transactions to prevent running dry, unless paused)
  • Actual individual transactions (represented as SHA256 hashes)
  • Miner and Memory Pool are individually pausable (or both at once, using the master control)

Everything is 'to scale', in that I have chosen a block target time of 10 seconds, as opposed to 10 minutes*. Furthermore, difficulty adjustment occurs every 5 blocks, and blocks only contain 9 transactions + 1 coinbase transaction. All this is done to benefit the comprehension (obviously no one is going to wait 10 minutes for a block to complete).

*Still working on/experimenting with these values, as hashing seems to be too erratic to reach a good constant 10 seconds.

Here's the link to the simulator

What I'm looking for

I am looking for any feedback on its basic workings, mainly to see if/where I made mistakes, and what I can do to make it even easier to understand. Besides that, I'm very curious as to what you think!

If this is not the place to ask for feedback, I do apologize and will remove asap.

1
  • If you downvote, it would really help if you leave a comment why, so I can adjust/change/delete my topic.
    – c_kick
    Apr 15 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.