Giter Club home page Giter Club logo

chainly's Introduction

Chainly

This is just a simple blockchain with basic functionality.

Installation

Ensure you have php7.4 and php-apcu extension for cache installed. You may find the apcu extension via ppa:ondrej/php

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update

Installing chainly

git clone https://github.com/samweru/chainly
cd chainly
composer update

Install python httpie which is a commandline http client.

pip install httpie

Getting Started

  1. Run nodes in separate terminals as ports in php in-built server 8080,8081,8082

Note: If you are using windows, you may need to run php development server individually for every port or you will get dying connections if you run php supervisor.php with the transactions.

php -S {host}:{port} index.php

Alternitively, you can run a docker container. Please see steps in bin/docker-setup

  1. Add transactions to a node
http -f POST :8080/add/trx sender="sam" recipient="max" amount="100"
  1. View chain
http GET :8080/chain
  1. Mine chain
http GET :8080/mine
  1. Register nodes in different node
http GET :8081/register/nodes nodes:='["localhost:8080","localhost:8082"]'
  1. View registered node
http GET :8081/nodes
  1. View chain on node 8081 first then do consensus
http GET :8081/consensus
  1. View chain on node 8081 again.

chainly's People

Contributors

pitsolu avatar

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.