All Projects → cosme12 → Simplecoin

cosme12 / Simplecoin

Licence: mit
Just a really simple, insecure and incomplete implementation of a blockchain for a cryptocurrency made in Python as educational material. In other words, a simple Bitcoin clone.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Simplecoin

Bitcoinml
Bitcoin data-structures library for OCaml
Stars: ✭ 38 (-97.76%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Bitcoin.org
Bitcoin.org Website
Stars: ✭ 1,090 (-35.66%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Pycoinbin
Python Wrapper for coinbin.org
Stars: ✭ 43 (-97.46%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Odyn
A prototype anonymous proof-of-work blockchain
Stars: ✭ 13 (-99.23%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Stocklook
crypto currency library for trading & market making bots, account management, and data analysis
Stars: ✭ 119 (-92.98%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Bluewallet
Bitcoin thin client for iOS & Android. Built with React Native
Stars: ✭ 878 (-48.17%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Cryptolights
Live visualisation of blockchain transactions for popular cryptocurrencies
Stars: ✭ 54 (-96.81%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Blockchain Reading List
Blockchain Manchester Meetups, Talks and Reading List
Stars: ✭ 17 (-99%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Awesome Privacy On Blockchains
A curated list of privacy on blockchains resources
Stars: ✭ 86 (-94.92%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Lightning Rfc
Lightning Network Specifications
Stars: ✭ 1,224 (-27.74%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Crypto Supplies
Cryptocurrency circulating, maximum and total supplies
Stars: ✭ 26 (-98.47%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Awesome Cryptocurrency Security
😎 Curated list about cryptocurrency security (reverse / exploit / fuzz..)
Stars: ✭ 102 (-93.98%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Aeternity
æternity: solving scalability problems by making sense of state-channels
Stars: ✭ 923 (-45.51%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Blockchain Papers
区块链相关的有价值的文献
Stars: ✭ 20 (-98.82%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Eclair
A scala implementation of the Lightning Network.
Stars: ✭ 892 (-47.34%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Blockchainage
「区块链技术指北」相关资料。
Stars: ✭ 51 (-96.99%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Lbry Sdk
The LBRY SDK for building decentralized, censorship resistant, monetized, digital content apps.
Stars: ✭ 7,169 (+323.2%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Ebookcoin
Ebookcoin has been updated to DDN Blockchain,please get it from https://github.com/ddnlink/ddn
Stars: ✭ 789 (-53.42%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
The Journal Of Blockchain
区块链自媒体、专注区块链技术学习和实践、IPFS/Filecoin、Bitcoin、Ethereum、EOS、Cosmos、区块链、白皮书、Coinmarketcap、Coindesk、Safe Network、Telegram、Docker、社会治理、经济激励
Stars: ✭ 63 (-96.28%)
Mutual labels:  blockchain, bitcoin, cryptocurrency
Coinpare
Compare cryptocurrency trading data across multiple exchanges and blockchains in the comfort of your terminal
Stars: ✭ 89 (-94.75%)
Mutual labels:  blockchain, bitcoin, cryptocurrency

SimpleCoin

Buy Me A Coffee

Just a really simple, insecure and incomplete implementation of a blockchain for a cryptocurrency made in Python. The goal of this project is to make a working blockchain currency, keeping it as simple as possible and to be used as educational material.

This project is just being made for fun. If you want to make your own cryptocurrency you should probably take a look at the Bitcoin Repository.

What is a blockchain?

Taking a look at the Bitcoin organization wiki website we can find this definition:

A block chain is a transaction database shared by all nodes participating in a system based on the Bitcoin protocol. A full copy of a currency's block chain contains every transaction ever executed in the currency. With this information, one can find out how much value belonged to each address at any point in history.

You can find more information in the original Bitcoin Paper.

How to run it

First, install requirements.txt.

pip install -r requirements.txt

Then you have 2 options:

  • Run miner.py to become a node and start mining
  • Run wallet.py to become a user and send transactions (to send transactions you must run a node, in other words, you must run miner.py too)

Important: DO NOT run it in the python IDLE, run it in your console. The miner.py uses parallel processing that doesn't work in the python IDLE.

How this code work?

There are 2 main scripts:

  • miner.py
  • wallet.py

Miner.py

This file is probably the most important. Running it will create a node (like a server). From here you can connect to the blockchain and process transactions (that other users send) by mining. As a reward for this work, you recieve some coins. The more nodes exist, the more secure the blockchain gets.

miner.py has 2 processes running in parallel:

  1. The first process takes care of mining, updating new blockchains and finding the proof of work.

  2. The second process runs the flask server where peer nodes and users can connect to ask for the entire blockchain or submit new transactions.

Parallel processes don't run in python IDLE, so make sure you are running it from the console.

miner

Wallet.py

This file is for those who don't want to be nodes but simple users. Running this file allows you to generate a new address, send coins and check your transaction history (keep in mind that if you are running this in a local server, you will need a "miner" to process your transaction). When creating a wallet address, a new file will be generated with all your security credentials. You are supposed to keep it safe.

wallet

Contribution

Anybody is welcome to collaborate in this project. Feel free to push any pull request (even if you are new to coding). See CONTRIBUTING.md to learn how to contribute.

Note: the idea of this project is to build a really simple blockchain system, so make sure all your code is easy to read (avoid too much code in 1 line) and don't introduce complex updates if they are not critical. In other words, keep it simple.

Disclaimer

By no means this project should be used for real purposes, it lacks security and may contain several bugs.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].