Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ApexChain - A Java-Based Blockchain Implementation

ApexChain is a simple blockchain implementation in Java that simulates wallet creation, transactions, and block mining. It demonstrates the core concepts of blockchain technology, including cryptographic signatures, proof-of-work, and transaction validation.


Features

  • Wallet Creation: Generate public and private keys using Elliptic Curve Cryptography (ECC).
  • Transactions: Send funds between wallets with secure cryptographic signatures.
  • Block Mining: Mine blocks using a proof-of-work algorithm (hash with leading zeros).
  • UTXO Model: Track unspent transaction outputs (UTXOs) to validate transactions.
  • Blockchain Validation: Verify the integrity of the blockchain by checking block hashes and transaction signatures.

How It Works

  1. Genesis Block: The first block in the blockchain is created with an initial transaction.
  2. Wallets: Users can create wallets, which generate public and private key pairs.
  3. Transactions: Wallets can send funds to each other by creating and signing transactions.
  4. Mining: Transactions are added to blocks, which are mined by solving a proof-of-work problem.
  5. Validation: The blockchain is validated by checking the integrity of each block and its transactions.

Getting Started

  1. Clone the repository:

    git clone https://github.com/your-username/ApexChain.git
  2. Navigate to the project directory:

    cd ApexChain
  3. Compile and run the project:

    javac ApexChain.java
    java ApexChain

Project Structure

  • ApexChain.java: Main class to run the blockchain simulation.
  • Wallet.java: Handles wallet creation and transaction signing.
  • Block.java: Represents a block in the blockchain.
  • Transaction.java: Handles transactions between wallets.
  • StringUtil.java: Utility class for cryptographic operations (SHA-256, ECDSA).

Technologies Used

  • Java: Core programming language.
  • BouncyCastle: Cryptographic library for ECC and SHA-256.
  • SHA-256: Hashing algorithm for block hashes.
  • ECDSA: Elliptic Curve Digital Signature Algorithm for transaction signing.

Future Improvements

  • Add a graphical user interface (GUI) for better user interaction.
  • Implement a peer-to-peer network for decentralized blockchain.
  • Add support for smart contracts.
  • Improve transaction validation and error handling.

Contributing

Contributions are welcome! If you'd like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes.
  4. Submit a pull request.

Contact

For questions or feedback, feel free to reach out:

Commit and Push Your Changes

  1. Open your terminal or command prompt.
  2. Navigate to the repository folder.
  3. Run the following commands to add, commit, and push your changes:
    git add .
    git commit -m "Initial commit: Added ApexChain project files and README"
    git push origin main

About

A Java-based blockchain implementation simulating wallet creation, transactions, and block mining. Demonstrates core blockchain concepts like cryptographic signatures, proof-of-work, and transaction validation.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages