MdGolam-Kibria / Rudichain

Creating a blockchain from scratch in Java.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rudichain

The goal of Rudichain is to simulate how transactions occur in real time on a blockchain based system, and by no means a “production ready” implementation of a cryptocurrency, but rather tries to show that the basic principles in a cryptocurrency can be implemented in a concise way using pure Java.

Installation

  1. If you have JRE and Maven installed, then download zip and:
cd Rudichain-main/rudichain
mvn exec:java
  1. For Windows users only: If you don't have the above mentioned software installed, then download the zip here, then:
  • Extract RudiWallet and go to rudichain sub-folder then, double click or run the run windows batch file.

Backend only Rudichain Wallet

Visit our backend version of Rudichain here. This utilizes SpringBoot for directing requests to mappings in localhost and Postman software is required for sending and receiving GET and POST requests.

Navigate

├───main
│   └───java
│       └───com
│           └───rudichain
│               │   constants.java
│               │   RudichainApplication.java
│               │
│               ├───backend
│               │       block.java
│               │       blockchain.java
│               │
│               ├───cryptography
│               │       ECDSA.java
│               │       Hash.java
│               │
│               ├───frontend
│               │   │   BlockChainPage.java
│               │   │   chainPageHelper.java
│               │   │   helper2.java
│               │   │   HomePage.java
│               │   │   LoginFrame.java
│               │   │   mine.java
│               │   │   TransactionsFrame.java
│               │   │
│               │   └───images
│               │           image1.png
│               │           image2.png
│               │           logo.PNG
│               │
│               ├───network
│               │       pubsub.java
│               │
│               └───wallet
│                       Input.java
│                       InvalidTransaction.java
│                       Transaction.java
│                       TransactionMiner.java
│                       TransactionPool.java
│                       Wallet.java
│
└───test
    └───java
        └───com
            └───rudichain
                    RudichainApplicationTest.java

Project Demo

  • The first pop up would be the Login window, which enables you to login if you already have the public/private key pair, or you could generate new keys for yourself.

loginPageRudichain


  • You would then be navigated to the Home window where you could view your keys, balance and send transactions to others using their public key:

HomePageRudichain


  • You can mine the transactions available in the transaction pool by clicking mine button in Transaction Pool window, and note that it may take time, and a reward amount will be given on successful mining of a new block.

TransactionPoolRudichain


  • You can view the blockchain in Rudichain window, which consists of all the blocks that are added to the chain since the Genesis block:

BlockchainRudichain


  • You can view your transactions in My Transactions window:

MyTransactionsRudichain


Java API's and Dependencies used

  • com.google.code.gson to format Objects into Json Strings and vice-versa.
  • com.pubnub to implement Publisher-Subscriber architecture model in Java for the blokchain network. To know more about PubNub, visit here.
  • org.web3j to use elliptic key curve cyptography for hashing and generating keys. To know more ECC, visit here.
  • com.google.bitcoin.core for conversion to/from Base58.

  • Swing is used for frontend interface.
  • Maven is used for managing dependencies and build purposes.

License

This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details.

About

Creating a blockchain from scratch in Java.

License:Apache License 2.0


Languages

Language:Java 100.0%