Distributed-Blockchain-

所属分类:加密货币
开发工具:Elixir
文件大小:20KB
下载次数:0
上传日期:2019-03-23 23:22:03
上 传 者sh-1993
说明:  ...节点必须始终具有区块链的相同副本。如果任何......在区块链中发生任何变化...
(GROUP INFORMATION: Number Member names UFID 1 Niraja Ganpule 17451951 2 Harshal Patil 55528581 Project Description We have successfully implemented the Distributed Bitcoin protocol and displayed the bitcoin transaction details on a webpage using the Phoenix framework. We have tested it for 100 nodes. The concepts implemented are: 1. Distributed ...)

文件列表:
bitcoinmine.ex (259, 2019-03-24)
bitcoinmine (0, 2019-03-24)
bitcoinmine\application.ex (1051, 2019-03-24)
bitcoinmine\repo.ex (272, 2019-03-24)
bitcoinmine_web.ex (1649, 2019-03-24)
bitcoinmine_web (0, 2019-03-24)
bitcoinmine_web\channels (0, 2019-03-24)
bitcoinmine_web\channels\room_channel.ex (868, 2019-03-24)
bitcoinmine_web\channels\user_socket.ex (1183, 2019-03-24)
bitcoinmine_web\controllers (0, 2019-03-24)
bitcoinmine_web\controllers\page_controller.ex (179, 2019-03-24)
bitcoinmine_web\endpoint.ex (1668, 2019-03-24)
bitcoinmine_web\gettext.ex (720, 2019-03-24)
bitcoinmine_web\router.ex (537, 2019-03-24)
bitcoinmine_web\templates (0, 2019-03-24)
bitcoinmine_web\templates\layout (0, 2019-03-24)
bitcoinmine_web\templates\layout\app.html.eex (1268, 2019-03-24)
bitcoinmine_web\templates\page (0, 2019-03-24)
bitcoinmine_web\templates\page\index.html.eex (169, 2019-03-24)
bitcoinmine_web\views (0, 2019-03-24)
bitcoinmine_web\views\error_helpers.ex (1488, 2019-03-24)
bitcoinmine_web\views\error_view.ex (499, 2019-03-24)
bitcoinmine_web\views\layout_view.ex (71, 2019-03-24)
bitcoinmine_web\views\page_view.ex (69, 2019-03-24)
bitnode.ex (4174, 2019-03-24)
block.ex (1731, 2019-03-24)
blockchain.ex (3410, 2019-03-24)
encode.ex (1117, 2019-03-24)
mix.exs (1631, 2019-03-24)
start.ex (6531, 2019-03-24)
transaction.ex (333, 2019-03-24)
wallet.ex (5298, 2019-03-24)

# Distributed-Blockchain- GROUP INFORMATION: Number Member names UFID 1 Niraja Ganpule 17451951 2 Harshal Patil 55528581 Project Description We have successfully implemented the Distributed Bitcoin protocol and displayed the bitcoin transaction details on a webpage using the Phoenix framework. We have tested it for 100 nodes. The concepts implemented are: 1. Distributed Architecture for nodes Each node is a GenServer that contains the state in the format: a. Blockchain Each node must have the same copy of the blockchain at all times. If there is any change in the blockchain made by any node, it must be advertised to all other nodes and all nodes must synchronize to this b. Wallet Each node has its own wallet with the Bitcoin address, private key and balance. In this design, all the nodes can participate in transactions and also mine blocks. 2. Implemented a simulation with at least 100 participants in which coins get mined and transacted. 3. Implemented a web interface using the Phoenix that allows access to the ongoing simulation using a web browser The Phoenix webpage dynamically displays the following a. Transactions from sender to receiver and the amount sent as and when the transaction happens b. Once all the transactions are mined by a node and a block is added to the blockchain, the balance of every node is calculated by traversing the blockchain using the wallet address of node and displayed c. A graph of balance of each node versus the nodes id is plotted to show variation of balance between nodes after transactions are mined 4. Mining/transacting scenarios include random selection of sender and receiver nodes. Other features are : . Bitcoin transaction . Bitcoin wallet . Bitcoin mining or Proof of work . Creating the bitcoin address as done by the real Bitcoin System based on steps described here https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses . Creating a blockchain with a genesis block, adding a new block to the blockchain after a node mines pending transactions,checking authenticity of the blockchain and maintaining synchronization between successive blocks. . Signing transactions with private key of the wallet and verifying them with public key at any point for security and authentication . Finding the balance of a user wallet by the same user or any other user using only the current blockchain as input. Here, computations are made based on transactions recorded in every block in the blockchain to find the balance of a particular user. Execution Instructions To compile and run a demonstration of the built-in functionalities in the application : In the main folder bitcoinmine, on the commandline, run the command : mix phx.server Go to your favorite browser and type URL http://localhost:4000 To change number of nodes, in lib/start.ex in the main function, change the value of numnodes variable to whatever you want to set it to To change number of transactions per block, in lib/start.ex in the handle/1 function, change the value of numtransact variable to whatever you want to set it to

近期下载者

相关文件


收藏者