Overview: For this assignment, you are responsible for architecting and implementing a mockversion of the Ethereum protocol by augmenting the solution provided for assignment #2.
Building upon our work in assignments #1 and #2, you are responsible for architecting and implementing a mock version of the Ethereum protocol.This prototype should enhance the solution code provided for assignment #2 to include core functionality specific to Ethereum (as indicated below).
Core features include:
- Providing existing functionality like: mining, transactions, wallet generation, verification of blocks and the blockchain’s validity, etc.via a JSON-powered web interface. Some of this functionality needs to be modified slightly to meet additional criteria.
- Providing both external and contract accounts.
- The ability for accounts to send coins to each other using transactions that include standard fields.
- The ability for accounts to send data to each other using messages that include standard fields.
- A gas system implemented similarly to the Ethereum protocol, of which applies only to messages (i.e. paying to call/execute contracts and not paying to send transactions).
- Simple, callable contracts that run their associated code. Some specific requirements:
- The executed code should securely execute real Python code included in the contract.
- Contracts should not transact coins or value; rather, they should only receive data, run their code, possibly store long-term data, and return a responseto the user.
- Contracts should read their last state (i.e. a dictionary of key:value pairs) from the last block, execute their code, and push the updated state into the new block.
- You must showcase one useful contract as an example in your submission (include its code and a description as a comment)!
- Mining should occur just like in assignment #2; however, blocks should now include a separate data field to hold contract states. A second Merkle root field should be added to the block header, used specifically for the contract states. It’s up to you to determine the best way to calculate a useful Merkle root for the block’s state data.
Submitted code should be clear, concise, and capable of handling user mistakes. Submissions will be evaluated relative to each other!
Last Updated on February 11, 2019 by EssayPro