Question: Note: Please seperate javascript and html and show proof that it works. Information Before starting this assignment you should watch 2 videos How Does Blockchain
Note: Please seperate javascript and html and show proof that it works.
Information
Before starting this assignment you should watch 2 videos
How Does Blockchain Work https://www.youtube.com/watch?v=SSo_EIwHSd4
Creating a Blockchain with Javascript https://www.youtube.com/watch?v=zVqczFZr124
Please note that neither of these video segments are ones I created. There are reasons; first is every programmer has their own personal style and syntax. Sanjee is an excellent programmer and demonstrates some different ways of doing things. It is worth noting that the syntax he uses in his Javascript, such as use of the class keyword does not work in every browser. The second is he programs in Visual Studio, which if you continue to program you will become very familiar with and this is a good exposure to VS.
Assignment
You are going to create your own Blockchain (just like in the video) with only one little difference. He uses an Array to store his Blockchain, you are simply going to do this making the Blockchain a List.
Differences will be;
Block object will need a pointer to next (and previous if implemented doubly which I recommend)
Your Block will NOT need an index
Your Block will NOT need a timestamp.
Blockchain Object will need a pointer to head and tail.
Blockchain will need to implement push (you should have this).
The key will be writing the isChainValid() function
You must use a 64 bit or greater Hash Function
For the output you will create a Blockchain that allows the user to input data and push that onto the end of the node. When the user does that the output should be the results of the isChainValid() function.
You will then create a Button that will invalidate the Blockchain by directly changing the content of the head. It should then output isChainValid() to show that isChainValid() works correctly.
Note: You do not need to implement the Proof of Work capability.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
