This repository has been archived by the owner on Feb 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 94
/
README
65 lines (45 loc) · 1.88 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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:
python-bitcoinlib, https://github.com/jgarzik/python-bitcoinlib
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.