subject
Engineering, 25.09.2021 20:20 abenjamin489

Problem definition Bitcoins are the most popular crypto-currency in common use. At their heart, bitcoins use the hardness of cryptographic hashing to ensure a limited “supply” of coins. In particular, the key component in a bit-coin is an input that, when “hashed” produces an output smaller than a target value. In practice, the comparison values have leading 0’s, thus the bitcoin is required to have a given number of leading 0’s (to ensure 3 leading 0’s, you look for hashes smaller than0x001000... or smaller or equal to 0x000ffThe hash you are required to use is SHA-256. You can check your version against this online hasher:http://www. xorbin. com/tools/sha256-hash-calculator. For example, when the text “COP5615 is a boring class” is hashed, the value 0xe9a425077e7b492076b5f32f58d5eb682 4b1875621e6237f1a2430c6b77e467c is obtained. For the coins, you find, check your answer with this calculator to ensure correctness. The goal of this first project is to use F# and the actor model to build a good solution to this problem that runs well on multi-core machines.

Requirements

Input: The input provided (as command line to yourproject1.fsx) will be, the required number of 0’s of the bitcoin.1

Output: Print, on independent

entry lines, the input string, and the correspondingSHA256 hash separated by a TAB, for each of the bitcoins you find. Obviously, your SHA256 hash must have the required number of leading 0s (k= 3 means3 0’s in the hash notation). An extra requirement, to ensure every group finds different coins, is to have the input string prefixed by the gator link ID of one of the team members.

Example 1:

1

adobra;kjsdfk11 0d402337f95d018438aad6c7dd75ad6e923 9d6060444a7a6b26299b261aa9a8b

indicates that the coin with 1 leading 0 is adobra;kjsdfk11and it is prefixed by the gatorlink ID adobra.

Distributed implementation

The more cores you have to more coins you can mine. To this end, enlisting other machines adds to your coin mining capabilities. Extendproject1.scalaso that the argument is a computer address or IP address of the server. This program then becomes a “worker” and contacts the server to get work. This second program will not display anything. All the coins found have to be displayed by the server.

Example 2:

myprogram 10.22.13.155

will start a worker that contacts the F# server hosted at 10.22.13.155 and participates in mining. Hint. when testing this, have your project partner start a server, find the IP address of the server and then start the worker. Notice, your server should be able to mine coins without any workers but has to accommodate workers as they become available.

Actor modeling

In this project, you have to use exclusively the AKKA actor library in F# (projects that do not use multiple actors or use any other form of parallelism will receive no credit). A model similar to the one indicated in class for the problem of adding up a lot of numbers can be used here, in particular, define worker actors that are given a range of problems to solve and boss that keeps track of all the problems and perform the job assignment.

README file

In the README file, you have to include the following mate-rial:

Size of the work unit that you determined results in the best performance for your implementation and an explanation of how you determined it. The size of the work unit refers to the number of sub-problems that a worker gets in a single request from the boss.
The result of running your program for input 4
The running time for the above as reported by time for the above and report the time. The ratio of CPU time to REAL TIME tells you how many cores were effectively used in the computation. If you are close to 1 you have almost no parallelism (points will be subtracted).
The coin with the most 0s you managed to find.
The largest number of working machines you were able to run your code with.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 19:10
Asteel wire of 2 mm diameter is fixed between two points located 2 m apart. the tensile force in the wire is 250n, if its density of steel is given by 7830 kg/m3 the fundamental frequency of vibration hz? ?
Answers: 3
question
Engineering, 04.07.2019 19:10
An electric kettle is made out of stainless steel, weighs two pounds (when empty) and is equipped with a heating element that consumes 2 kw of electricity. assuming that the water and the kettle are at the same uniform temperature at any moment of time, calculate the shortest possible time to bring 2 quarts of water from room temperature to the onset of boiling
Answers: 2
question
Engineering, 04.07.2019 19:10
A)-explain briefly the importance of standards in engineering design. b)- what is patent? c)-explain the relationship between these standards: b.s. and b.s.en d)- in engineering design concepts, types of loads and how they act are important factors. explain.
Answers: 3
question
Engineering, 04.07.2019 19:20
Acommercial grade cubical freezer, 4 m on a side, has a composite wall consisting of an exterior sheet of 5.0-mm thick plain carbon steel (kst= 60.5 w/m k), an intermediate layer of 100-mm thick polyurethane insulation (kins 0.02 w/m k), and an inner sheet of 5.0- mm thick aluminium alloy (kal polyurethane insulation and both metallic sheets are each characterized by a thermal contact resistance of r 2.5 x 104 m2 k/w. (a) what is the steady-state cooling load that must be maintained by the refrigerator under conditions for which the outer and inner surface temperatures are 25°c and -5°c, respectively? (b) for power saving purpose, which wall material should be increased/reduced in. thickness in order to reduce 50% of the cooling load found in part (a)? redesign the thickness of the proposed material. 177 w/m-k). adhesive interfaces between the q=575.93 w
Answers: 2
You know the right answer?
Problem definition Bitcoins are the most popular crypto-currency in common use. At their heart, bi...
Questions
question
Business, 14.07.2021 09:20
question
Physics, 14.07.2021 09:20
question
Mathematics, 14.07.2021 09:40
question
Mathematics, 14.07.2021 09:40
Questions on the website: 13722362