merkle Trees (JAVA)

Goal: The purpose of this assignment is to write a Java program that implements a MerkleTree to be
used in a blockchain. Then you will write a brief report describing your results, in the comments of your
program; see the end of this document.

1. This assignment is self-contained. We do not expect you to know how Blockchain works. However, by
the end of this assignment, if you read the code well enough, you will learn Blockchain in detail.
2. You will be surprised how this Blockchain technology, considered revolutionary, is built on such simple
ideas that a beginner student can code. And later in life you can mention that you were writing
blockchains in your second year of undergraduate.
3. A transaction is a transfer of coins from a set of addresses (i.e., senders) to another set of addresses
2
(i.e., receivers).
4. Each sender or receiver is an address, which is stored in a String variable (see Transaction.java). In
real life, people can create and use many addresses. We cannot know the owner of an address by just
looking at the string.
5. A Bitcoin transaction can have many senders and receivers. This is why transactions in Figure 1 have
dierent shape sizes. For this assignment, we simplify the transaction model to only one sender and
one receiver (see Transaction.java).
6. A transaction has sender, receiver and amount attributes. In Bitcoin, transactions are created by ordi-
nary users and sent to a Peer to Peer network. Miners listen to the network, discover new transactions
and create blocks out of them. In this assignment, we will not have a real Peer to Peer network.
The PeerToPeerNetwork.java simulates this, and returns a random number of articial transactions
whenever someone calls the collectNewTransactions() function.
7. A miner is a user (anyone can choose to be a miner) who wants to create a block. The process of
getting transactions, putting them into a block and solving the Proof-of-Work puzzle is called mining
a block.
8. Proof-of-Work (see mineTheBlock() in Blockchain.java) involves creating a string from the block-
Hash of the previous block, topHash of the MerkleTree, and a long integer (called nonce). Once the
SHA256 hash is applied to this string, a 256 bit integer is computed. If the integer is less than a
predened diculty, the nonce is said to satisfy the diculty. The block is said to be mined.
9. Any helper function that you need (e.g., to hash SHA256) is already given in the les.
What you should implement: Implement the following algorithms and methods (you can

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational