. ├── 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 │ └── ...
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.