GithubHelp home page GithubHelp logo

gallo-json / cryptocurrency-blockchain Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 270 KB

Blockchain implementation in Java for a simple cryptocurrency

Java 100.00%
blockchain miners java peers cryptocurrency

cryptocurrency-blockchain's Introduction

Blockchain for a Cryptocurrency

A blockchain implementation in Java for a cryptocurrency. The blockchain is modeled after Bitcoin.

Date

Late October of 2020. 10th grade.

How does it work?

It is a command line interface over the blockchain to:

  • Be either a miner or just a listening node (pulling the blockchain real time, but not mining)
  • Mine the pending transactions into a block
  • Make a transaction
  • View blockchain
  • View your balance

Tech Stack

  • Java Programming Language & OOP (inheritance)
  • Gradle

Specs

I tried to make this cryptocurrency as robust to my abilities. This included signing transactions, validating blocks in a chain, and a basic P2P network.

Keys

  • secp256k1 key cryptography
  • SHA256withECDSA transaction signature algorithm

Blockchain

  • Blocks are stored in an ArrayList
  • Blocks hashed with SHA256 algorithm
  • Blocks mined like in Bitcoin (specified number of zeros at the beginning of hash)

Peer to peer network

  • Only on LAN (localhost)
  • Can connect and listen to other peers, assigning you a port
  • Miners can broadcast newly mined blocks to other nodes (only full nodes, not other miners, for now)

How to run

./gradlew run --console plain

Useful links

Useful links that helped guide me:

cryptocurrency-blockchain's People

Contributors

gallo-json avatar

Stargazers

 avatar

Watchers

 avatar

cryptocurrency-blockchain's Issues

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.