Coder Social home page Coder Social logo

blockchain-network's Introduction

Blockchain Network: Creating a Decentralized Network of Blockchains

Objective

The goal of this project is to create a network of BlockChains using the given class structures. This is an extension of Simple-Blockchain-Implementation.

Description

In this project, we have an additional class called blockNetwork that includes four fields: numNodes, allNodes, u, and v. The input file provides a list of u-v values representing the connections between nodes.

Input File Explanation

The input file is structured as follows:

  • Number of Nodes: Specifies the total number of nodes in the network.
  • Number of Transactions per Block: Indicates the number of transactions per block.
  • Total Number of Transactions: Represents the overall number of transactions.
  • Number of Edges: Specifies the number of edges connecting nodes.
  • Edge List: Lists the edges connecting nodes u and v.
  • Transactions: Provides the transactions in the format: Transaction ID, FromID, ToID, Amount, and Timestamp.

Implementation Guidelines

  1. Understand the provided class structures and relationships.
  2. Parse the input file and extract relevant information.
  3. Use the provided boilerplate code as a starting point.
  4. Implement logic to track fromValue and toValue for each transaction.
  5. Update the blockchain for each node based on the transactions.

Running the Program

Visual Studio (Windows)

  1. Open or create a new project.
  2. Go to Project > Project Properties.
  3. Expand Configuration Properties and select Debugging.
  4. In the Command Arguments field, type <input_filename.
  5. Build and run the program.

macOS/Linux/PowerShell

If you have g++ installed, compile and run the program using the terminal:

    g++ project4.cpp -o p4
    ./p4 < input1.txt

For powershell:

    Get-Content input1.txt | ./p4

blockchain-network's People

Contributors

pdj555 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.