Coder Social home page Coder Social logo

bitcoin_go's Introduction

This project is based on Jeiwan/blockchain_go and his related blog post.

This project is only a simplified bitcoin implementation not intended to be compatible with current bitcoin protocols.

Designs

Roles

There are no roles such as miner, full nodes and SPVs. Each node will store the whole chain, do PoWs and validate blocks. There is a seperate Cli tool to act like a wallet to send/receive coins.

Tech Stack

  • Serialization: protobuf, this is used both for network traffic and data persistence
  • Network communication: grpc
  • Key-Value Database: bbolt
  • Cli framework: cobra

Implemetation details

  • node discovery: one node must manually specify a node to connect, then it can use RPC to get other nodes' info
    • since our nodes' number is relatively small, all nodes are connected directly to each other
    • a node periodically announces its connected nodes to all its neighbours

References

Things which are not implemented

  • Merkle Tree
  • Scripts

Issues

  • TODO: when verifying a block, need to check if an output is spent twice
  • when to update uxto set?
  • we can't use an UTXO twice in one block

bitcoin_go's People

Contributors

cjc7373 avatar

Watchers

 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.