Giter Club home page Giter Club logo

blockchain-rust-a's Introduction

blockchain-rust - 用 rust 从零开始构建区块链(Bitcoin)系列

Actions Status License

reimplement blockchain_go in rust, and not only blockchain_go;

a simple blockchain demo for learning

the code for each article

  1. part1: Basic Prototype 基本原型 commit bd0efe7
  2. part2: Proof-of-Work 工作量证明 commit 9d9370a
  3. part3: Persistence and CLI 持久化、命令行、日志 commit e2094c0
  4. part4: Transactions 1 交易(1) commit bdbdcec
  5. part5: Addresses 地址和签名 commit 440cba2
  6. part6: Transactions 2 交易(2) commit 4912743
  7. part7: Network 网络和分布式一致性算法 master

Chinese Documents

  • 基本原型和工作量证明算法: part1.md

usage

  • Create wallet:
    cargo run createwallet
  • Create blockchain:
    cargo run createblockchain <address>
    
  • send coins (if -m is specified, the block will be mined immediately in the same node):
    cargo run send <from> <to> <amount> -m 
    
  • start server:
    cargo run startnode <port>
    
    or start miner node:
    cargo run startminer <port> <address>
    
  • get balance:
    cargo run getbalance <address>
    

You can use the RUST_LOG=info to print the log.

reference

blockchain-rust-a's People

Contributors

yunwei37 avatar dependabot[bot] 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.