Giter Site home page Giter Site logo

rgreschner / my-blockchain Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 411 KB

๐Ÿ’ฐ Sample blockchain using the LotionJS Framework & Tendermint consensus

License: MIT License

TypeScript 100.00%
blockchain lotion lotionjs tendermint-consensus typescript

my-blockchain's Introduction

My Blockchain - Sample blockchain using LotionJS

This is an example of writing a simple Tendermint consensus powered blockchain using the LotionJS Framework in TypeScript/ES5.

Done as part of an assignment for School of AI's Decentralized Apps Course by @llSourcell / Siraj Raval.

Getting Started

Instructions for getting started with this repository's two subprojects, test client & actual blockchain, are detailed here.

Prerequisites

To build and run these project the following prerequisites must be met:

  • Node.js in at least v8.10.0
  • Operating System capable of running all imported NPM modules, only tested on Ubuntu Linux so far
  • TypeScript compiler in v3.1.6 (npm i -g [email protected])

Build Instructions

The build instructions for both projects are the same.

After navigating to the corresponding project directory in packages, install NPM dependencies and execute npm run build on the command-line in this directory to build the subproject. The compiled JavaScript files are contained in the subfolder ./dist.

E.g. to build the blockchain sample use

> cd packages/my-blockchain
> npm i
> npm run build
> ls ./dist

Sample Blockchain

The project for the actual sample blockchain resides in packages/my-blockchain.

After building it as detailed above, execute npm start in the blockchain project directory to start the blockchain process. This will output some startup information like used ports and most importantly the GCI (Global Chain Identifier) which you will need for testing the blockchain.

Test Client

The project for a test client implementation using the sample blockchain resides in packages/test-client.

After building it as detailed above, execute npm start <GCI> in the blockchain project directory to start the blockchain process. The GCI must be the Global Chain Identifier printed by the my-blockchain proces on startup.

Once started the test client will perform a simple blockchain transaction every 5 seconds which will increment a nonce counter and update a block timestamp.

License

This project is licensed under the terms of the MIT license, see LICENSE to check out the full license.

my-blockchain's People

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

woss

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.