Question: Consider the following Solidity function contained in a Ethereum contract: function foo ( uint 2 5 6 x , uint 2 5 6 y )

Consider the following Solidity function contained in a Ethereum contract:
function foo(uint256 x, uint256 y){
while (uint256(sha3(x))!= y)
x++;
}
Using an x and a y for which this function never terminates, explain how a malicious miner could use this function to waste other miners resources, without spending any of its own resources. (10 pts)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!