/Blockchain

Primary LanguageJavaMIT LicenseMIT

Contributors Forks Stargazers Issues MIT License


Logo

Blockchain

How to implement a blockchain in Java! 😄
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Contributing
  5. License
  6. Contact

About The Project

I really wanted to get an insight of what it meant to code a blockchain, that's why I signed to follow a HyperSkill Blockchain Java project, that has really helped me in this regard, therefore I'm taking the opportunity to share it in case some of you would be interested.

This is indeed a naive implementation based on the HyperSkill problems that were asked to be solved, also, it is not decentralized nor distributed, but it gives the insight I expected to get the same.

Blockchains are data structures where blocks are inseparably connected. What makes blockchains so special is the security level they offer due to the way they are constructed. Blockchains are not hackable, so it makes perfect sense why cryptocurrency makes use of this technology.

Learning outcomes:

Get a profound understanding of how blockchains work, apply your hashing and multithreading skills and learn about (de)serialization: many great topics in one exciting project.

Here is the Java code of the project I created based on that with the blockchain code itself and 2 implementations as examples of how it could be used for:

💬 Chat System 💬 💰 Virtual Coin 💰
Logo Logo

(back to top)

Getting Started

You can import it into your favorite IDE or follow the instructions below to run it on the command line.

Prerequisites

Install JDK 17

Install Maven >= 3.8.x

Build and run

Below is an example of how you can build and run the code. This implementation doesn't rely on any external dependencies or services.

  1. Clone the repo
    git clone https://github.com/doublefx/Blockchain.git
  2. Enter the Blockchain
    cd Blockchain
  3. Run the Maven build
    mvn package
  4. Run the built Jar
    java -jar target/blockchain-1.0-SNAPSHOT.jar

(back to top)

Roadmap

  • Add MIT License
  • Add README.md
  • Add Maven support
  • Add a Kotlin version

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Double FX - @webDoubleFx

Project Link: https://github.com/doublefx/Blockchain

(back to top)