GithubHelp home page GithubHelp logo

sensaipicsou / phoenix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from muneebtator/phoenix

0.0 0.0 0.0 10 KB

A PHP project to create a distributed and decentralized system for selecting lottery winners and to ensure game fairness with an open system.

License: MIT License

PHP 100.00%

phoenix's Introduction

alt text

A phoenix depicted in a book by FJ Bertuch

Phoenix

A PHP project to create a distributed and decentralized system for selecting lottery winners and to ensure game fairness with an open system.

This is a project that is currently under development. I'll keep updating this repository.

Read the wiki for more info.

Update Log

This is the first commit in the Phoenix repository with any code. We have laid down the basic foundations for the blockchain ledger.

Phoenix follows the the front controller software design pattern; an application with a single controller that handles all the requests - in this case, the controller is the init.php file.

For the sake of simplicity, Phoenix will use HTTP GET requests during early days of development. Though we will use POST requests or sockets as we implement the networking functionality.

Creating blockchains and blocks

- Creating blockchains

Just as we mentioned in the wiki, Phoenix consists of rounds and each round has it's own blockchain.

You can make a blockchain by making a GET request with the parameter createBlockchain. This will result in a blockchain generated with a random round ID.

As we said in the wiki before, blockchains in Phoenix are in the JSON file format, thus you can find the newly generated blockchain in the 'blockchain' folder.

It will look something like this

As you can see, a genesis block with the special key is automatically generated.

- Creating blocks

You can create blocks by making GET requests with the parameters createBlock and roundId.

After adding two blocks to the blockchain, this is how it looks like

In the next few versions, we are going to work further on the blockchain, introduce the network architecture and integrate Bitcoin.

phoenix's People

Contributors

muneebtator 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.