Coder Social home page Coder Social logo

bitcoin-peer-client's Introduction

BitCoin-Peer-Client

Connects to an active BitCoin Peer, and locates a predetermined block number (height) by downloading block headers. Once required block height is required, the program will display information regarding the specific block such as block hash, merkle root hash, and transaction details.

Log.txt contains output example of a run.

Usage

  1. Clone onto local machine
  git clone https://github.com/henryxsong/BitCoin-Peer-Client.git
  1. Navigate to local repository directory

  2. Run the program

  python3 lab5.py
  1. (Optional) Edit global variables to change block lookup number in lab5.py
  # change FIND_THIS_BLOCK to the block height you want to find
  # currently locates block #2021. 
  # per updated instructions in Teams, an arbitrary block height over 1000 is used :) 
  # set FIND_THIS_BLOCK = MY_SUID % 700000 to lookup originally specified block height
  FIND_THIS_BLOCK = 712500#2021 # MY_SUID % 700000 
  1. (Optional) Edit BitCoin peer address in lab5.py
  # Hardcoded Bitcoin peer to connect to
  # Usually works consistently, but sometimes stalls and never finishes
  # Change this IP address if this peer is not functional
  # List of known working peers: 
  # - 67.210.228.203
  # - 81.171.22.143
  # - 185.64.116.15
  # - 217.64.47.138
  # - 51.68.36.57
  PEER_HOST = ('67.210.228.203', 8333)

bitcoin-peer-client's People

Contributors

henryxsong avatar

Stargazers

 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.