Giter Site home page Giter Site logo

seeboom / simulation_of_bitcoin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from varodek/simulation_of_bitcoin

1.0 2.0 0.0 63 KB

UNDER CONSTRUCTION. A realistic simulation of how crypto-currency works. Using very basic C codes.

Python 2.63% C 97.37%

simulation_of_bitcoin's Introduction

Simulation_of_bitcoin

Steps for using this version is given at last.

1- We will use several POSIX machines and connect them to Internet using a signle router. Hence there will be zero probability of conflicting hostnames.

2- Then we will make SCP protocols between those machines passwordless, by making SSH passwordless, as both SCP and SSH work with some same setting files.

3- Whole "Betacoin" will not be written in a single .c file. The project will be divided in various .c files, each performing their own task.

4- For example, there will be sepearte .c programs to request transaction, create block, make merkle tree etc.

5- Suppose, 1st program generated an output which is an argument for another c program. Since project is divided into different .c files, we will save that ouput in a file so that when another program executes, it can read for arguments.

6- All the data, of which sha256 has to be created, will be written in " ~/bitcoin/miner/input.txt " file. So that another 'c' program can read it from there and the output will be saved in " ~/bitcoin/miner/output.txt " file.

7- To generate sha256, we will not write 'c' function for it. sha256 is builtin in python, hence we will integrate python program to generate sha.

Steps for usage of this version Note: only merkle tree has been built, and "first_run.c".

Step1- Compile and run "first_run.c" . This will create necessary folders on your system and copy some fies.

Step2- To test merkle tree, we need some fake transaction records. Hence, compile and run "create_temp_transaction.c". Enter name for that file and amount of transaction.In future updates of UI, the names for transaction files will be automatically generated. (Fake transactions will remain fake, once blockhain formation starts.)

Step3- Now compile and run "merkle_tree.c". Then go to " ~/betacoin/miner " folder and open "merkle_hash.txt", you will get your sha256 of your merkle tree.

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.