From 27e2d8bfb5678e79d956b9f1aa50c1b14177d748 Mon Sep 17 00:00:00 2001 From: super3 Date: Tue, 15 Oct 2013 23:14:30 -0400 Subject: Finished /Contrib Index. Standardized READMEs. File and Link Fix. --- contrib/README.md | 20 ++++- contrib/bitrpc/README.md | 2 + contrib/gitian-descriptors/README | 88 ---------------------- contrib/gitian-descriptors/README.md | 90 ++++++++++++++++++++++ contrib/linearize/README.md | 2 + contrib/linearize/example-linearize.cfg | 12 +++ contrib/linearize/linearize.py | 129 ++++++++++++++++++++++++++++++++ contrib/macdeploy/README.md | 19 +++++ contrib/macdeploy/notes.txt | 14 ---- contrib/misc/example-linearize.cfg | 12 --- contrib/misc/linearize.py | 129 -------------------------------- contrib/pyminer/README | 6 -- contrib/pyminer/README.md | 7 ++ contrib/qos/README | 3 - contrib/qos/README.md | 5 ++ contrib/seeds/README | 9 --- contrib/seeds/README.md | 11 +++ contrib/spendfrom/README | 32 -------- contrib/spendfrom/README.md | 34 +++++++++ contrib/test-patches/README | 4 - contrib/test-patches/README.md | 7 ++ contrib/testgen/README | 1 - contrib/testgen/README.md | 8 ++ contrib/verifysfbinaries/README.md | 7 ++ contrib/wallettools/README.md | 2 + 25 files changed, 353 insertions(+), 300 deletions(-) create mode 100644 contrib/bitrpc/README.md delete mode 100644 contrib/gitian-descriptors/README create mode 100644 contrib/gitian-descriptors/README.md create mode 100644 contrib/linearize/README.md create mode 100644 contrib/linearize/example-linearize.cfg create mode 100644 contrib/linearize/linearize.py create mode 100644 contrib/macdeploy/README.md delete mode 100644 contrib/macdeploy/notes.txt delete mode 100644 contrib/misc/example-linearize.cfg delete mode 100755 contrib/misc/linearize.py delete mode 100644 contrib/pyminer/README create mode 100644 contrib/pyminer/README.md delete mode 100644 contrib/qos/README create mode 100644 contrib/qos/README.md delete mode 100644 contrib/seeds/README create mode 100644 contrib/seeds/README.md delete mode 100644 contrib/spendfrom/README create mode 100644 contrib/spendfrom/README.md delete mode 100644 contrib/test-patches/README create mode 100644 contrib/test-patches/README.md delete mode 100644 contrib/testgen/README create mode 100644 contrib/testgen/README.md create mode 100644 contrib/verifysfbinaries/README.md create mode 100644 contrib/wallettools/README.md (limited to 'contrib') diff --git a/contrib/README.md b/contrib/README.md index 11231ea3ca..7128fd5eb0 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -1,6 +1,9 @@ Contrib Index --------------------- +### [BitRPC](/contrib/bitrpc) ### +Added bitrpc.py which allows for sending of all standard Bitcoin commands via RPC rather than as command line args. + ### [Debian](/contrib/debian) ### Contains files used to package bitcoind/bitcoin-qt for Debian-based Linux systems. If you compile bitcoind/bitcoin-qt yourself, there are some useful files here. @@ -11,7 +14,10 @@ Gavin's notes on getting gitian builds up and running using KVM. ### [Gitian-downloader](/contrib/gitian-downloader) Various PGP files of core developers. -### [Macdeploy](/contrib/macdeploy) ### +### [Linearize](/contrib/linearize) ### +Construct a linear, no-fork, best version of the blockchain. + +### [MacDeploy](/contrib/macdeploy) ### Scripts and notes for Mac builds. ### [PyMiner](/contrib/pyminer) ### @@ -31,4 +37,14 @@ Use the raw transactions API to send coins received on a particular address (or addresses). ### [TestGen](/contrib/testgen) ### -Utilities to generate test vectors for the data-driven Bitcoin tests. \ No newline at end of file +Utilities to generate test vectors for the data-driven Bitcoin tests. + +### [Test Patches](/contrib/test-patches) ### +These patches are applied when the automated pull-tester +tests each pull and when master is tested using jenkins. + +### [Verify SF Binaries](/contrib/verifysfbinaries) ### +This script attempts to download and verify the signature file SHA256SUMS.asc from SourceForge. + +### [Wallet Tools](/contrib/wallettools) ### +Contains a wallet change password and unlock script. diff --git a/contrib/bitrpc/README.md b/contrib/bitrpc/README.md new file mode 100644 index 0000000000..2dde60a08e --- /dev/null +++ b/contrib/bitrpc/README.md @@ -0,0 +1,2 @@ +### BitRPC ### +Allows for sending of all standard Bitcoin commands via RPC rather than as command line args. \ No newline at end of file diff --git a/contrib/gitian-descriptors/README b/contrib/gitian-descriptors/README deleted file mode 100644 index e9c7d4efc2..0000000000 --- a/contrib/gitian-descriptors/README +++ /dev/null @@ -1,88 +0,0 @@ -Gavin's notes on getting gitian builds up and running using KVM: - -These instructions distilled from: - https://help.ubuntu.com/community/KVM/Installation -... see there for complete details. - -You need the right hardware: you need a 64-bit-capable CPU with hardware virtualization support (Intel VT-x or AMD-V). Not all modern CPUs support hardware virtualization. - -You probably need to enable hardware virtualization in your machine's BIOS. - -You need to be running a recent version of 64-bit-Ubuntu, and you need to install several prerequisites: - sudo apt-get install ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm - -Sanity checks: - sudo service apt-cacher-ng status # Should return apt-cacher-ng is running - ls -l /dev/kvm # Should show a /dev/kvm device - - -Once you've got the right hardware and software: - - git clone git://github.com/bitcoin/bitcoin.git - git clone git://github.com/devrandom/gitian-builder.git - mkdir gitian-builder/inputs - cd gitian-builder/inputs - # Inputs for Linux and Win32: - wget -O miniupnpc-1.6.tar.gz 'http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.6.tar.gz' - wget 'http://fukuchi.org/works/qrencode/qrencode-3.2.0.tar.bz2' - # Inputs for Win32: (Linux has packages for these) - wget 'https://downloads.sourceforge.net/project/boost/boost/1.50.0/boost_1_50_0.tar.bz2' - wget 'http://www.openssl.org/source/openssl-1.0.1c.tar.gz' - wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' - wget 'https://downloads.sourceforge.net/project/libpng/zlib/1.2.6/zlib-1.2.6.tar.gz' - wget 'https://downloads.sourceforge.net/project/libpng/libpng15/older-releases/1.5.9/libpng-1.5.9.tar.gz' - wget 'https://download.qt-project.org/archive/qt/4.8/4.8.3/qt-everywhere-opensource-src-4.8.3.tar.gz' - wget 'http://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2' - cd ../.. - - cd gitian-builder - bin/make-base-vm --arch i386 - bin/make-base-vm --arch amd64 - cd .. - - # Build Linux release: - cd bitcoin - git pull - cd ../gitian-builder - git pull - ./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/gitian.yml - - # Build Win32 dependencies: (only needs to be done once, or when dependency versions change) - ./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/boost-win32.yml - ./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/deps-win32.yml - ./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/qt-win32.yml - ./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/protobuf-win32.yml - - # Build Win32 release: - ./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/gitian-win32.yml - ---------------------- - -gitian-builder now also supports building using LXC. See - https://help.ubuntu.com/12.04/serverguide/lxc.html -... for how to get LXC up and running under Ubuntu. - -If your main machine is a 64-bit Mac or PC with a few gigabytes of memory -and at least 10 gigabytes of free disk space, you can gitian-build using -LXC running inside a virtual machine. - -Here's a description of Gavin's setup on OSX 10.6: - -1. Download and install VirtualBox from https://www.virtualbox.org/ - -2. Download the 64-bit Ubuntu Desktop 12.04 LTS .iso CD image from - http://www.ubuntu.com/ - -3. Run VirtualBox and create a new virtual machine, using the - Ubuntu .iso (see the VirtualBox documentation for details). - Create it with at least 2 gigabytes of memory and a disk - that is at least 20 gigabytes big. - -4. Inside the running Ubuntu desktop, install: - sudo apt-get install debootstrap lxc ruby apache2 git apt-cacher-ng python-vm-builder - -5. Still inside Ubuntu, tell gitian-builder to use LXC, then follow the "Once you've got the right - hardware and software" instructions above: - export USE_LXC=1 - git clone git://github.com/bitcoin/bitcoin.git - ... etc diff --git a/contrib/gitian-descriptors/README.md b/contrib/gitian-descriptors/README.md new file mode 100644 index 0000000000..40bdbd8e32 --- /dev/null +++ b/contrib/gitian-descriptors/README.md @@ -0,0 +1,90 @@ +### Gavin's notes on getting gitian builds up and running using KVM:### + +These instructions distilled from: +[ https://help.ubuntu.com/community/KVM/Installation]( https://help.ubuntu.com/community/KVM/Installation) +... see there for complete details. + +You need the right hardware: you need a 64-bit-capable CPU with hardware virtualization support (Intel VT-x or AMD-V). Not all modern CPUs support hardware virtualization. + +You probably need to enable hardware virtualization in your machine's BIOS. + +You need to be running a recent version of 64-bit-Ubuntu, and you need to install several prerequisites: + + sudo apt-get install ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm + +Sanity checks: + + sudo service apt-cacher-ng status # Should return apt-cacher-ng is running + ls -l /dev/kvm # Should show a /dev/kvm device + + +Once you've got the right hardware and software: + + git clone git://github.com/bitcoin/bitcoin.git + git clone git://github.com/devrandom/gitian-builder.git + mkdir gitian-builder/inputs + cd gitian-builder/inputs + + # Inputs for Linux and Win32: + wget -O miniupnpc-1.6.tar.gz 'http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.6.tar.gz' + wget 'http://fukuchi.org/works/qrencode/qrencode-3.2.0.tar.bz2' + + # Inputs for Win32: (Linux has packages for these) + wget 'https://downloads.sourceforge.net/project/boost/boost/1.50.0/boost_1_50_0.tar.bz2' + wget 'http://www.openssl.org/source/openssl-1.0.1c.tar.gz' + wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' + wget 'https://downloads.sourceforge.net/project/libpng/zlib/1.2.6/zlib-1.2.6.tar.gz' + wget 'https://downloads.sourceforge.net/project/libpng/libpng15/older-releases/1.5.9/libpng-1.5.9.tar.gz' + wget 'https://download.qt-project.org/archive/qt/4.8/4.8.3/qt-everywhere-opensource-src-4.8.3.tar.gz' + wget 'http://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2' + cd ../.. + + cd gitian-builder + bin/make-base-vm --arch i386 + bin/make-base-vm --arch amd64 + cd .. + + # Build Linux release: + cd bitcoin + git pull + cd ../gitian-builder + git pull + ./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/gitian.yml + + # Build Win32 dependencies: (only needs to be done once, or when dependency versions change) + ./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/boost-win32.yml + ./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/deps-win32.yml + ./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/qt-win32.yml + ./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/protobuf-win32.yml + + # Build Win32 release: + ./bin/gbuild --commit bitcoin=HEAD ../bitcoin/contrib/gitian-descriptors/gitian-win32.yml + +--------------------- + +`gitian-builder` now also supports building using LXC. See +[ https://help.ubuntu.com/12.04/serverguide/lxc.html]( https://help.ubuntu.com/12.04/serverguide/lxc.html) +... for how to get LXC up and running under Ubuntu. + +If your main machine is a 64-bit Mac or PC with a few gigabytes of memory +and at least 10 gigabytes of free disk space, you can `gitian-build` using +LXC running inside a virtual machine. + +Here's a description of Gavin's setup on OSX 10.6: + +1. Download and install VirtualBox from [https://www.virtualbox.org/](https://www.virtualbox.org/) + +2. Download the 64-bit Ubuntu Desktop 12.04 LTS .iso CD image from + [http://www.ubuntu.com/](http://www.ubuntu.com/) + +3. Run VirtualBox and create a new virtual machine, using the Ubuntu .iso (see the [VirtualBox documentation](https://www.virtualbox.org/wiki/Documentation) for details). Create it with at least 2 gigabytes of memory and a disk that is at least 20 gigabytes big. + +4. Inside the running Ubuntu desktop, install: + + sudo apt-get install debootstrap lxc ruby apache2 git apt-cacher-ng python-vm-builder + +5. Still inside Ubuntu, tell gitian-builder to use LXC, then follow the "Once you've got the right hardware and software" instructions above: + + export USE_LXC=1 + git clone git://github.com/bitcoin/bitcoin.git + ... etc \ No newline at end of file diff --git a/contrib/linearize/README.md b/contrib/linearize/README.md new file mode 100644 index 0000000000..70b9f034cd --- /dev/null +++ b/contrib/linearize/README.md @@ -0,0 +1,2 @@ +### Linearize ### +Construct a linear, no-fork, best version of the blockchain. \ No newline at end of file diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg new file mode 100644 index 0000000000..9e5aa404c2 --- /dev/null +++ b/contrib/linearize/example-linearize.cfg @@ -0,0 +1,12 @@ + +# bitcoind RPC settings +rpcuser=someuser +rpcpass=somepassword +host=127.0.0.1 +port=8332 + +# bootstrap.dat settings +netmagic=f9beb4d9 +max_height=250000 +output=bootstrap.dat + diff --git a/contrib/linearize/linearize.py b/contrib/linearize/linearize.py new file mode 100644 index 0000000000..2d8509f83c --- /dev/null +++ b/contrib/linearize/linearize.py @@ -0,0 +1,129 @@ +#!/usr/bin/python +# +# linearize.py: Construct a linear, no-fork, best version of the blockchain. +# +# +# Copyright (c) 2013 The Bitcoin developers +# Distributed under the MIT/X11 software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. +# + +import json +import struct +import re +import base64 +import httplib +import sys + +ERR_SLEEP = 15 +MAX_NONCE = 1000000L + +settings = {} + +class BitcoinRPC: + OBJID = 1 + + def __init__(self, host, port, username, password): + authpair = "%s:%s" % (username, password) + self.authhdr = "Basic %s" % (base64.b64encode(authpair)) + self.conn = httplib.HTTPConnection(host, port, False, 30) + def rpc(self, method, params=None): + self.OBJID += 1 + obj = { 'version' : '1.1', + 'method' : method, + 'id' : self.OBJID } + if params is None: + obj['params'] = [] + else: + obj['params'] = params + self.conn.request('POST', '/', json.dumps(obj), + { 'Authorization' : self.authhdr, + 'Content-type' : 'application/json' }) + + resp = self.conn.getresponse() + if resp is None: + print "JSON-RPC: no response" + return None + + body = resp.read() + resp_obj = json.loads(body) + if resp_obj is None: + print "JSON-RPC: cannot JSON-decode body" + return None + if 'error' in resp_obj and resp_obj['error'] != None: + return resp_obj['error'] + if 'result' not in resp_obj: + print "JSON-RPC: no result in object" + return None + + return resp_obj['result'] + def getblock(self, hash, verbose=True): + return self.rpc('getblock', [hash, verbose]) + def getblockhash(self, index): + return self.rpc('getblockhash', [index]) + +def getblock(rpc, settings, n): + hash = rpc.getblockhash(n) + hexdata = rpc.getblock(hash, False) + data = hexdata.decode('hex') + + return data + +def get_blocks(settings): + rpc = BitcoinRPC(settings['host'], settings['port'], + settings['rpcuser'], settings['rpcpass']) + + outf = open(settings['output'], 'wb') + + for height in xrange(settings['max_height']+1): + data = getblock(rpc, settings, height) + + outhdr = settings['netmagic'] + outhdr += struct.pack(" ../../src/test/data/base58_keys_valid.json + gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json \ No newline at end of file diff --git a/contrib/verifysfbinaries/README.md b/contrib/verifysfbinaries/README.md new file mode 100644 index 0000000000..caa4073605 --- /dev/null +++ b/contrib/verifysfbinaries/README.md @@ -0,0 +1,7 @@ +### Verify SF Binaries ### +This script attempts to download the signature file `SHA256SUMS.asc` from SourceForge. + +It first checks if the signature passes, and then downloads the files specified in +the file, and checks if the hashes of these files match those that are specified +in the signature file. The script returns 0 if everything passes the checks. It returns 1 if either the +signature check or the hash check doesn't pass. If an error occurs the return value is 2 \ No newline at end of file diff --git a/contrib/wallettools/README.md b/contrib/wallettools/README.md new file mode 100644 index 0000000000..358f52569e --- /dev/null +++ b/contrib/wallettools/README.md @@ -0,0 +1,2 @@ +### Wallet Tools ### +Contains a wallet change password and unlock script. -- cgit v1.2.3