[Solved] CSCI301 Assignment 3

$25

File Name: CSCI301_Assignment_3.zip
File Size: 188.4 KB

SKU: [Solved] CSCI301 Assignment 3 Category: Tag:
5/5 - (1 vote)

Create a simple blockchain system simulating proof-of-work between two parties, Alice and Bob. Use the blockchain system given in Lab 4 and create blocks by competing with each other using proof-of-work.

  1. Both players have an initial block and series of transactions in a genesis block given in Lab 4 to start their play.
  2. When the system is initialized, both Alice and Bob compete with each other to add a new block in the system using proof-of-work. Therefore, they compute <Nounce> of the new block which satisfies the following condition:

SHA256(<New block>) < 2236

  1. To make Alice and Bobs mining time different. Let Alice and Bob search a valid <Nonce> value in a new block from 0 and 1,000,000,000, respectively and increase it by 1.
  2. If one finds a valid <Nonce> value for a new block, it broadcasts the block (or necessary information to form the block) using the PubNub system. The other party then verifies the received block in a way discussed in Task 8 of Lab 4 Note. If the received block is valid, it stops the current mining process and starts mining of the next block.

[Alternative] Stopping a process in the middle computation needs some advanced coding skills to implement and manage threads. If you are not familiar with thread computing, you can implement that the receiver waits until the current mining is finished and send a completion message to the sender. Therefore, both parties start the next block generation if the mining of the current block for both parties finishes. It should be noted that only the block generated first is considered as a valid block. The block created later (from the receiver) will be discarded.

Marks

  • Implementation of the proof-of-work process. (20 marks)
  • Block validation process implementation. (10 marks)
  • The other basic requirements of the system (e.g., block generation) (30 marks)
  • Implementation of the blocks exchange protocol (PubNub) (30 marks)
  • Report (10 marks)

1

CSCI301 Contemporary Topics in Security

This material is copyrighted. It must not be distributed without permission from Jongkil Kim

Submission

Make a folder named Assignment3 and include Programs for Alice and Bob.

  • The history of one of the completed games (e.g., block0.txt, block1.txt, , and txt)
  • Report explaining the requirements to execute your program and the expected outcome of your program.

Compress the Assignment3 folder using a zip program to create yourSurname_Assignment3.zip.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSCI301 Assignment 3
$25