Giter VIP home page Giter VIP logo

blockchain's Introduction

用Python从零开始创建区块链

本文是博客:用Python从零开始创建区块链 的源码. 翻译自Building a Blockchain

博客地址| 英文README

安装

  1. 安装 Python 3.6+ is installed.
  2. 安装 pipenv.
$ pip install pipenv 
  1. 创建virtual env.
$ pipenv --python=python3.6
  1. 安装依赖.
$ pipenv install 
  1. 运行节点:
    • $ pipenv run python blockchain.py
    • $ pipenv run python blockchain.py -p 5001
    • $ pipenv run python blockchain.py --port 5002

Docker运行

另一种方式是使用Docker运行:

  1. 克隆库
  2. 构建docker容器
$ docker build -t blockchain .
  1. 运行
$ docker run --rm -p 80:5000 blockchain
  1. 添加多个节点:
$ docker run --rm -p 81:5000 blockchain
$ docker run --rm -p 82:5000 blockchain
$ docker run --rm -p 83:5000 blockchain

贡献

深入浅出区块链 想做好的区块链学习博客。 博客地址 欢迎大家一起参与贡献,一起推动区块链技术发展。

blockchain's People

Contributors

dvf avatar hannah98 avatar xilibi2003 avatar marius92mc avatar massa142 avatar

Watchers

James Cloos avatar  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.