GithubHelp home page GithubHelp logo

python-bitcoin's Introduction

This python script (node.py) is a client node for the bitcoin
network.  It is based on ArtForz' public domain half-a-node at
http://pastebin.com/ZSM7iHZw

In its current form, node.py does nothing more than listen for new
transactions and blocks, perform verification checks on the data, and
store them in a database.  Script verification is a separate, manual
process (testscript.py).  It is therefore not safe for general use.
See BUGS and TODO files.  A simple HTTP server for JSON-RPC API calls
is also included.  Send the "help" RPC call for a list of supported
commands.

It might be useful as the base for a P2P monitoring node, or similar
tasks.

Dependencies:

	GEvent, http://www.gevent.org/
	python-leveldb, http://code.google.com/p/py-leveldb/

Command line usage:

	./node.py my-config-file

The configuration file is a key=value text file, with the following settings:

	# hostname or IP address of network node to connect to
	host=127.0.0.1

	# port of network node to connect to (default: 8333)
	port=8333

	# JSON-RPC server user, password.  Uses HTTP Basic authentication.
	rpcuser=XXXX
	rpcpass=YYYY

	# JSON-RPC server incoming TCP port (default: 9332)
	rpcport=9332

	# database directory
	db=/tmp/chaindb

	# log filename, or '-' or no-value for standard output
	log=/tmp/chaindb/node.log

	# if present, import these blocks into the block database
	loadblock=/tmp/blk0001.dat

	# if present, disable all signature checking in new blocks
	# (disabled by default)
	nosig=1

	# if present, force signature checking on all blocks,
	# even those normally skipped because they were prior
	# to a checkpoint.
	# (disabled by default)
	forcesig=1

node.py connects to a single remote node, and does not accept incoming
P2P connections.  If the connection is lost, node.py exits.

See the "mini-node" branch for a single-file, non-chaindb node.

python-bitcoin's People

Contributors

amiller 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.