Giter Site home page Giter Site logo

blockchain's Introduction

LAYOUT

. ├── src │ ├── blockchain.cpp │ ├── block.cpp │ ├── consensus.cpp │ ├── main.cpp │ ├── node.cpp │ ├── p2p.cpp │ ├── rpc.cpp │ ├── storage.cpp │ ├── authentication.cpp │ └── transaction.cpp ├── lib │ ├── crypto.a │ ├── tls.a │ ├── rpc.a │ └── ... ├── test │ ├── blockchain │ │ ├── test_add_block.cpp │ │ ├── test_validate_block.cpp │ │ └── ... │ ├── node │ │ ├── test_connect.cpp │ │ ├── test_sync_chain.cpp │ │ └── ... │ ├── p2p │ │ ├── test_gossip.cpp │ │ ├── test_peer_discovery.cpp │ │ └── .... │ ├── rpc │ │ ├── test_call.cpp │ │ ├── test_response.cpp │ │ └── ... │ ├── storage │ │ ├── test_store.cpp │ │ └── ... │ ├── authentication │ │ ├── test_login.cpp │ │ └── ... │ ├── transaction │ │ ├── test_validate.cpp │ │ └── ... │ └── ... ├── doc │ ├── design.md │ ├── user_guide.md │ ├── api_reference.md │ └── ...

FILE REQUIREMENTS.

src/blockchain.h

  • The blockchain header file should define the Blockchain class and its public methods and members.
  • The Blockchain class should store a list of blocks, the current chain length, and any other necessary information.
  • The Blockchain class should have methods for adding new blocks to the chain, validating blocks, and performing other necessary operations.

src/blockchain.cpp

  • The blockchain source file should implement the Blockchain class and its methods.
  • The Blockchain class should be able to add new blocks to the chain, validate blocks, and perform other necessary operations.
  • The Blockchain class should use the PoS algorithm for consensus and prevent transaction malleability and double spending.
  • The Blockchain class should handle pending transactions using pools at each node, which should be synchronized.

src/block.h

  • The block header file should define the Block class and its public methods and members.
  • The Block class should store the block header and body, as well as any other necessary information.
  • The Block class should have methods for validating the block and performing other necessary operations.

src/block.cpp

  • The block source file should implement the Block class and its methods.
  • The Block class should be able to validate the block and perform other necessary operations.
  • The Block class should store the block header and body, as well as any transactions included in the block.

src/consensus.h

  • The consensus header file should define the Consensus class and its public methods and members.
  • The Consensus class should have methods for implementing the PoS algorithm and achieving consensus among nodes.

src/consensus.cpp

  • The consensus source file should implement the Consensus class and its methods.
  • The Consensus class should use the PoS algorithm to achieve consensus among nodes.

src/node.h

  • The node header file should define the Node class and its public methods and members.
  • The Node class should store information about the node, including its address and the blockchain it is connected to.
  • The Node class should have methods for connecting to other nodes, synchronizing the blockchain, and performing other necessary operations.

src/node.cpp

  • The node source file should implement the Node class and its methods.
  • The Node class should be able to connect to other nodes, synchronize the blockchain, and perform other necessary operations.
  • The Node class should store information about the node, including its address and the blockchain it is connected to.
  • The Node class should have methods for handling pending transactions using pools, which should be synchronized with other nodes.
  • The Node class should use the RPC class to handle incoming and outgoing RPC calls.
  • The Node class should use the Storage class to store and retrieve data, including blocks and transactions.
  • The Node class should use the Authentication class to verify user credentials and grant access to the blockchain.

src/rpc.h

  • The RPC header file should define the RPC class and its public methods and members.
  • The RPC class should have methods for handling incoming and outgoing RPC calls, including authentication and error handling.

src/rpc.cpp

  • The RPC source file should implement the RPC class and its methods.
  • The RPC class should be able to handle incoming and outgoing RPC calls, including authentication and error handling.

src/storage.h

  • The storage header file should define the Storage class and its public methods and members.
  • The Storage class should have methods for storing and retrieving data, including blocks, transactions, and other necessary information.

src/storage.cpp

  • The storage source file should implement the Storage class and its methods.
  • The Storage class should be able to store and retrieve data, including blocks, transactions, and other necessary information.

src/authentication.h

  • The authentication header file should define the Authentication class and its public methods and members.
  • The Authentication class should have methods for verifying user credentials and granting access to the blockchain.

src/authentication.cpp

  • The authentication source file should implement the Authentication class and its methods.
  • The Authentication class should be able to verify user credentials and grant access to the blockchain.

src/transaction.h

  • The transaction header file should define the Transaction class and its public methods and members.
  • The Transaction class should store information about a transaction, including the sender, recipient, and amount.
  • The Transaction class should have methods for validating transactions and performing other necessary operations.

src/transaction.cpp

  • The transaction source file should implement the Transaction class and its methods.
  • The Transaction class should be able to validate transactions and perform other necessary operations.

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.