aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorlangerhans <[email protected]>2019-06-09 19:49:48 +0200
committerlangerhans <[email protected]>2019-06-09 19:51:03 +0200
commitd278efaccdc45e7155147d2c86a50f193eafdc07 (patch)
tree05cf92afa059fafff80e460c1619edd5bec231b3 /contrib
parentRevert "Change fPIE to fPIC (#1420)" (#1447) (diff)
parentMark 1.14 ready for release (diff)
downloadarchived-discoin-d278efaccdc45e7155147d2c86a50f193eafdc07.tar.xz
archived-discoin-d278efaccdc45e7155147d2c86a50f193eafdc07.zip
Merge branch '1.14-branding'
Diffstat (limited to 'contrib')
-rw-r--r--contrib/README.md43
-rw-r--r--contrib/bitcoin-qt.pro2
-rw-r--r--contrib/bitrpc/README.md8
-rw-r--r--contrib/bitrpc/bitrpc.py335
-rw-r--r--contrib/debian/changelog149
-rw-r--r--contrib/debian/control43
-rw-r--r--contrib/debian/copyright155
-rw-r--r--contrib/debian/dogecoin-qt.desktop5
-rw-r--r--contrib/debian/dogecoin-qt.install2
-rw-r--r--contrib/debian/dogecoin-qt.manpages1
-rw-r--r--contrib/debian/dogecoin-tx.bash-completion1
-rw-r--r--contrib/debian/dogecoin-tx.install1
-rw-r--r--contrib/debian/dogecoin-tx.manpages1
-rw-r--r--contrib/debian/dogecoind.bash-completion1
-rw-r--r--contrib/debian/dogecoind.install2
-rw-r--r--contrib/debian/dogecoind.manpages5
-rw-r--r--contrib/debian/examples/dogecoin.conf40
-rw-r--r--contrib/debian/manpages/dogecoin-cli.148
-rw-r--r--contrib/debian/manpages/dogecoin-qt.1203
-rw-r--r--contrib/debian/manpages/dogecoin.conf.589
-rw-r--r--contrib/debian/manpages/dogecoind.1208
-rwxr-xr-xcontrib/debian/rules7
-rw-r--r--contrib/devtools/README.md146
-rwxr-xr-xcontrib/devtools/check-doc.py45
-rwxr-xr-xcontrib/devtools/clang-format-diff.py164
-rwxr-xr-xcontrib/devtools/copyright_header.py610
-rwxr-xr-xcontrib/devtools/fix-copyright-headers.py53
-rwxr-xr-xcontrib/devtools/gen-manpages.sh29
-rwxr-xr-xcontrib/devtools/git-subtree-check.sh3
-rwxr-xr-xcontrib/devtools/github-merge.py251
-rwxr-xr-xcontrib/devtools/github-merge.sh181
-rwxr-xr-xcontrib/devtools/optimize-pngs.py11
-rwxr-xr-xcontrib/devtools/security-check.py216
-rw-r--r--contrib/devtools/split-debug.sh.in10
-rwxr-xr-xcontrib/devtools/symbol-check.py77
-rwxr-xr-xcontrib/devtools/test-security-check.py62
-rwxr-xr-xcontrib/devtools/update-translations.py32
-rw-r--r--contrib/dogecoin-cli.bash-completion154
-rw-r--r--contrib/dogecoin-tx.bash-completion57
-rw-r--r--contrib/dogecoind.bash-completion111
-rwxr-xr-xcontrib/gitian-build.sh392
-rw-r--r--contrib/gitian-descriptors/README.md15
-rw-r--r--contrib/gitian-descriptors/gitian-linux.yml128
-rw-r--r--contrib/gitian-descriptors/gitian-osx-signer.yml9
-rw-r--r--contrib/gitian-descriptors/gitian-osx.yml60
-rw-r--r--contrib/gitian-descriptors/gitian-win-signer.yml3
-rw-r--r--contrib/gitian-descriptors/gitian-win.yml88
-rw-r--r--contrib/gitian-downloader/linux-download-config30
-rw-r--r--contrib/gitian-downloader/rnicoll-key.pgp30
-rw-r--r--contrib/gitian-downloader/win32-download-config29
-rw-r--r--contrib/gitian-keys/README.md16
-rw-r--r--contrib/gitian-keys/langerhans-key.pgp (renamed from contrib/gitian-downloader/langerhans-key.pgp)0
-rw-r--r--contrib/gitian-keys/patricklodder-key.pgp (renamed from contrib/gitian-downloader/patricklodder-key.pgp)0
-rw-r--r--contrib/gitian-keys/rnicoll-key.pgp58
-rw-r--r--contrib/gitian-keys/stapler117.pgp (renamed from contrib/gitian-downloader/stapler117.pgp)0
-rw-r--r--contrib/gitian-keys/whit.pgp (renamed from contrib/gitian-downloader/whit.pgp)0
-rw-r--r--contrib/init/README.md1
-rw-r--r--contrib/init/dogecoind.openrc66
-rw-r--r--contrib/init/dogecoind.openrcconf6
-rw-r--r--contrib/init/org.dogecoin.dogecoind.plist15
-rw-r--r--contrib/linearize/README.md55
-rw-r--r--contrib/linearize/example-linearize.cfg39
-rwxr-xr-xcontrib/linearize/linearize-data.py93
-rwxr-xr-xcontrib/linearize/linearize-hashes.py49
-rw-r--r--contrib/macdeploy/Base.lproj/InfoPlist.strings1
-rw-r--r--contrib/macdeploy/background.pngbin78918 -> 0 bytes
-rw-r--r--contrib/macdeploy/background.psdbin1185561 -> 0 bytes
-rw-r--r--contrib/macdeploy/background.svg34
-rw-r--r--contrib/macdeploy/[email protected]bin209674 -> 0 bytes
-rwxr-xr-xcontrib/macdeploy/custom_dsstore.py60
-rwxr-xr-xcontrib/macdeploy/detached-sig-apply.sh4
-rwxr-xr-xcontrib/macdeploy/detached-sig-create.sh6
-rwxr-xr-xcontrib/macdeploy/extract-osx-sdk.sh33
-rwxr-xr-xcontrib/macdeploy/macdeployqtplus188
-rw-r--r--contrib/qos/README.md6
-rw-r--r--contrib/qos/tc.sh32
-rwxr-xr-xcontrib/qt_translations.py22
-rw-r--r--contrib/rpm/README.md185
-rw-r--r--contrib/rpm/bitcoin-0.12.0-libressl.patch24
-rw-r--r--contrib/rpm/bitcoin.fc8
-rw-r--r--contrib/rpm/bitcoin.if157
-rw-r--r--contrib/rpm/bitcoin.spec440
-rw-r--r--contrib/rpm/bitcoin.te81
-rw-r--r--contrib/seeds/README.md19
-rwxr-xr-xcontrib/seeds/generate-seeds.py138
-rwxr-xr-xcontrib/seeds/makeseeds.py92
-rw-r--r--contrib/seeds/nodes_main.txt1168
-rw-r--r--contrib/seeds/nodes_test.txt11
-rw-r--r--contrib/spendfrom/README.md35
-rw-r--r--contrib/spendfrom/setup.py9
-rwxr-xr-xcontrib/spendfrom/spendfrom.py267
-rw-r--r--contrib/test-patches/README.md7
-rw-r--r--contrib/test-patches/temp-revert-2.patch20
-rw-r--r--contrib/testgen/base58.py4
-rwxr-xr-xcontrib/testgen/gen_base58_test_vectors.py8
-rwxr-xr-xcontrib/tidy_datadir.sh3
-rw-r--r--contrib/verify-commits/README.md26
-rw-r--r--contrib/verify-commits/allow-revsig-commits104
-rwxr-xr-xcontrib/verify-commits/gpg.sh28
-rwxr-xr-xcontrib/verify-commits/pre-push-hook.sh6
-rw-r--r--contrib/verify-commits/trusted-git-root2
-rwxr-xr-xcontrib/verify-commits/verify-commits.sh22
-rw-r--r--contrib/verifybinaries/README.md33
-rwxr-xr-xcontrib/verifybinaries/verify.sh127
-rwxr-xr-xcontrib/zmq/zmq_sub.py43
105 files changed, 5968 insertions, 2228 deletions
diff --git a/contrib/README.md b/contrib/README.md
index b972f89a6..6f750106e 100644
--- a/contrib/README.md
+++ b/contrib/README.md
@@ -1,30 +1,19 @@
-Wallet Tools
----------------------
-
-### [BitRPC](/contrib/bitrpc) ###
-Allows for sending of all standard Dogecoin commands via RPC rather than as command line args.
-
-### [SpendFrom](/contrib/spendfrom) ###
-
-Use the raw transactions API to send coins received on a particular
-address (or addresses).
-
Repository Tools
---------------------
### [Developer tools](/contrib/devtools) ###
Specific tools for developers working on this repository.
-Contains the script `github-merge.sh` for merging github pull requests securely and signing them using GPG.
+Contains the script `github-merge.py` for merging GitHub pull requests securely and signing them using GPG.
### [Verify-Commits](/contrib/verify-commits) ###
-Tool to verify that every merge commit was signed by a developer using the above `github-merge.sh` script.
+Tool to verify that every merge commit was signed by a developer using the above `github-merge.py` script.
### [Linearize](/contrib/linearize) ###
Construct a linear, no-fork, best version of the blockchain.
### [Qos](/contrib/qos) ###
-A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Dogecoin network. This means one can have an always-on dogecoind instance running, and another local dogecoind/dogecoin-qt instance which connects to this node and receives blocks from it.
+A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Bitcoin network. This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it.
### [Seeds](/contrib/seeds) ###
Utility to generate the pnSeed[] array that is compiled into the client.
@@ -33,27 +22,29 @@ Build Tools and Keys
---------------------
### [Debian](/contrib/debian) ###
-Contains files used to package dogecoind/dogecoin-qt
-for Debian-based Linux systems. If you compile dogecoind/dogecoin-qt yourself, there are some useful files here.
+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.
### [Gitian-descriptors](/contrib/gitian-descriptors) ###
-Gavin's notes on getting gitian builds up and running using KVM.
+Notes on getting Gitian builds up and running using KVM.
-### [Gitian-downloader](/contrib/gitian-downloader)
-Various PGP files of core developers.
+### [Gitian-keys](/contrib/gitian-keys)
+PGP keys used for signing Bitcoin Core [Gitian release](/doc/release-process.md) results.
### [MacDeploy](/contrib/macdeploy) ###
Scripts and notes for Mac builds.
+### [RPM](/contrib/rpm) ###
+RPM spec file for building bitcoin-core on RPM based distributions
+
+### [Gitian-build](/contrib/gitian-build.sh) ###
+Script for running full Gitian builds.
+
Test and Verify Tools
---------------------
### [TestGen](/contrib/testgen) ###
-Utilities to generate test vectors for the data-driven Dogecoin 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.
+Utilities to generate test vectors for the data-driven Bitcoin tests.
-### [Verify SF Binaries](/contrib/verifysfbinaries) ###
-This script attempts to download and verify the signature file SHA256SUMS.asc from SourceForge.
+### [Verify Binaries](/contrib/verifybinaries) ###
+This script attempts to download and verify the signature file SHA256SUMS.asc from bitcoin.org.
diff --git a/contrib/bitcoin-qt.pro b/contrib/bitcoin-qt.pro
index ce6ad1d6e..9915f3b3c 100644
--- a/contrib/bitcoin-qt.pro
+++ b/contrib/bitcoin-qt.pro
@@ -11,7 +11,7 @@ FORMS += \
../src/qt/forms/overviewpage.ui \
../src/qt/forms/receivecoinsdialog.ui \
../src/qt/forms/receiverequestdialog.ui \
- ../src/qt/forms/rpcconsole.ui \
+ ../src/qt/forms/debugwindow.ui \
../src/qt/forms/sendcoinsdialog.ui \
../src/qt/forms/sendcoinsentry.ui \
../src/qt/forms/signverifymessagedialog.ui \
diff --git a/contrib/bitrpc/README.md b/contrib/bitrpc/README.md
deleted file mode 100644
index f5ef2f040..000000000
--- a/contrib/bitrpc/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-### BitRPC
-Allows for sending of all standard Bitcoin commands via RPC rather than as command line args.
-
-### Looking for Wallet Tools?
-BitRPC.py is able to do the exact same thing as `walletchangepass.py` and `walletunlock.py`. Their respective commands in BitRPC.py are:
-
- bitrpc.py walletpassphrasechange
- bitrpc.py walletpassphrase \ No newline at end of file
diff --git a/contrib/bitrpc/bitrpc.py b/contrib/bitrpc/bitrpc.py
deleted file mode 100644
index f67584730..000000000
--- a/contrib/bitrpc/bitrpc.py
+++ /dev/null
@@ -1,335 +0,0 @@
-from jsonrpc import ServiceProxy
-import sys
-import string
-import getpass
-
-# ===== BEGIN USER SETTINGS =====
-# if you do not set these you will be prompted for a password for every command
-rpcuser = ""
-rpcpass = ""
-# ====== END USER SETTINGS ======
-
-
-if rpcpass == "":
- access = ServiceProxy("http://127.0.0.1:22555")
-else:
- access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:22555")
-cmd = sys.argv[1].lower()
-
-if cmd == "backupwallet":
- try:
- path = raw_input("Enter destination path/filename: ")
- print access.backupwallet(path)
- except Exception as inst:
- print inst
-
-elif cmd == "encryptwallet":
- try:
- pwd = getpass.getpass(prompt="Enter passphrase: ")
- pwd2 = getpass.getpass(prompt="Repeat passphrase: ")
- if pwd == pwd2:
- access.encryptwallet(pwd)
- print "\n---Wallet encrypted. Server stopping, restart to run with encrypted wallet---\n"
- else:
- print "\n---Passphrases do not match---\n"
- except Exception as inst:
- print inst
-
-elif cmd == "getaccount":
- try:
- addr = raw_input("Enter a Bitcoin address: ")
- print access.getaccount(addr)
- except Exception as inst:
- print inst
-
-elif cmd == "getaccountaddress":
- try:
- acct = raw_input("Enter an account name: ")
- print access.getaccountaddress(acct)
- except Exception as inst:
- print inst
-
-elif cmd == "getaddressesbyaccount":
- try:
- acct = raw_input("Enter an account name: ")
- print access.getaddressesbyaccount(acct)
- except Exception as inst:
- print inst
-
-elif cmd == "getbalance":
- try:
- acct = raw_input("Enter an account (optional): ")
- mc = raw_input("Minimum confirmations (optional): ")
- try:
- print access.getbalance(acct, mc)
- except:
- print access.getbalance()
- except Exception as inst:
- print inst
-
-elif cmd == "getblockbycount":
- try:
- height = raw_input("Height: ")
- print access.getblockbycount(height)
- except Exception as inst:
- print inst
-
-elif cmd == "getblockcount":
- try:
- print access.getblockcount()
- except Exception as inst:
- print inst
-
-elif cmd == "getblocknumber":
- try:
- print access.getblocknumber()
- except Exception as inst:
- print inst
-
-elif cmd == "getconnectioncount":
- try:
- print access.getconnectioncount()
- except Exception as inst:
- print inst
-
-elif cmd == "getdifficulty":
- try:
- print access.getdifficulty()
- except Exception as inst:
- print inst
-
-elif cmd == "getgenerate":
- try:
- print access.getgenerate()
- except Exception as inst:
- print inst
-
-elif cmd == "gethashespersec":
- try:
- print access.gethashespersec()
- except Exception as inst:
- print inst
-
-elif cmd == "getinfo":
- try:
- print access.getinfo()
- except Exception as inst:
- print inst
-
-elif cmd == "getnewaddress":
- try:
- acct = raw_input("Enter an account name: ")
- try:
- print access.getnewaddress(acct)
- except:
- print access.getnewaddress()
- except Exception as inst:
- print inst
-
-elif cmd == "getreceivedbyaccount":
- try:
- acct = raw_input("Enter an account (optional): ")
- mc = raw_input("Minimum confirmations (optional): ")
- try:
- print access.getreceivedbyaccount(acct, mc)
- except:
- print access.getreceivedbyaccount()
- except Exception as inst:
- print inst
-
-elif cmd == "getreceivedbyaddress":
- try:
- addr = raw_input("Enter a Bitcoin address (optional): ")
- mc = raw_input("Minimum confirmations (optional): ")
- try:
- print access.getreceivedbyaddress(addr, mc)
- except:
- print access.getreceivedbyaddress()
- except Exception as inst:
- print inst
-
-elif cmd == "gettransaction":
- try:
- txid = raw_input("Enter a transaction ID: ")
- print access.gettransaction(txid)
- except Exception as inst:
- print inst
-
-elif cmd == "getwork":
- try:
- data = raw_input("Data (optional): ")
- try:
- print access.gettransaction(data)
- except:
- print access.gettransaction()
- except Exception as inst:
- print inst
-
-elif cmd == "help":
- try:
- cmd = raw_input("Command (optional): ")
- try:
- print access.help(cmd)
- except:
- print access.help()
- except Exception as inst:
- print inst
-
-elif cmd == "listaccounts":
- try:
- mc = raw_input("Minimum confirmations (optional): ")
- try:
- print access.listaccounts(mc)
- except:
- print access.listaccounts()
- except Exception as inst:
- print inst
-
-elif cmd == "listreceivedbyaccount":
- try:
- mc = raw_input("Minimum confirmations (optional): ")
- incemp = raw_input("Include empty? (true/false, optional): ")
- try:
- print access.listreceivedbyaccount(mc, incemp)
- except:
- print access.listreceivedbyaccount()
- except Exception as inst:
- print inst
-
-elif cmd == "listreceivedbyaddress":
- try:
- mc = raw_input("Minimum confirmations (optional): ")
- incemp = raw_input("Include empty? (true/false, optional): ")
- try:
- print access.listreceivedbyaddress(mc, incemp)
- except:
- print access.listreceivedbyaddress()
- except Exception as inst:
- print inst
-
-elif cmd == "listtransactions":
- try:
- acct = raw_input("Account (optional): ")
- count = raw_input("Number of transactions (optional): ")
- frm = raw_input("Skip (optional):")
- try:
- print access.listtransactions(acct, count, frm)
- except:
- print access.listtransactions()
- except Exception as inst:
- print inst
-
-elif cmd == "move":
- try:
- frm = raw_input("From: ")
- to = raw_input("To: ")
- amt = raw_input("Amount:")
- mc = raw_input("Minimum confirmations (optional): ")
- comment = raw_input("Comment (optional): ")
- try:
- print access.move(frm, to, amt, mc, comment)
- except:
- print access.move(frm, to, amt)
- except Exception as inst:
- print inst
-
-elif cmd == "sendfrom":
- try:
- frm = raw_input("From: ")
- to = raw_input("To: ")
- amt = raw_input("Amount:")
- mc = raw_input("Minimum confirmations (optional): ")
- comment = raw_input("Comment (optional): ")
- commentto = raw_input("Comment-to (optional): ")
- try:
- print access.sendfrom(frm, to, amt, mc, comment, commentto)
- except:
- print access.sendfrom(frm, to, amt)
- except Exception as inst:
- print inst
-
-elif cmd == "sendmany":
- try:
- frm = raw_input("From: ")
- to = raw_input("To (in format address1:amount1,address2:amount2,...): ")
- mc = raw_input("Minimum confirmations (optional): ")
- comment = raw_input("Comment (optional): ")
- try:
- print access.sendmany(frm,to,mc,comment)
- except:
- print access.sendmany(frm,to)
- except Exception as inst:
- print inst
-
-elif cmd == "sendtoaddress":
- try:
- to = raw_input("To (in format address1:amount1,address2:amount2,...): ")
- amt = raw_input("Amount:")
- comment = raw_input("Comment (optional): ")
- commentto = raw_input("Comment-to (optional): ")
- try:
- print access.sendtoaddress(to,amt,comment,commentto)
- except:
- print access.sendtoaddress(to,amt)
- except Exception as inst:
- print inst
-
-elif cmd == "setaccount":
- try:
- addr = raw_input("Address: ")
- acct = raw_input("Account:")
- print access.setaccount(addr,acct)
- except Exception as inst:
- print inst
-
-elif cmd == "setgenerate":
- try:
- gen= raw_input("Generate? (true/false): ")
- cpus = raw_input("Max processors/cores (-1 for unlimited, optional):")
- try:
- print access.setgenerate(gen, cpus)
- except:
- print access.setgenerate(gen)
- except Exception as inst:
- print inst
-
-elif cmd == "settxfee":
- try:
- amt = raw_input("Amount:")
- print access.settxfee(amt)
- except Exception as inst:
- print inst
-
-elif cmd == "stop":
- try:
- print access.stop()
- except Exception as inst:
- print inst
-
-elif cmd == "validateaddress":
- try:
- addr = raw_input("Address: ")
- print access.validateaddress(addr)
- except Exception as inst:
- print inst
-
-elif cmd == "walletpassphrase":
- try:
- pwd = getpass.getpass(prompt="Enter wallet passphrase: ")
- access.walletpassphrase(pwd, 60)
- print "\n---Wallet unlocked---\n"
- except Exception as inst:
- print inst
-
-elif cmd == "walletpassphrasechange":
- try:
- pwd = getpass.getpass(prompt="Enter old wallet passphrase: ")
- pwd2 = getpass.getpass(prompt="Enter new wallet passphrase: ")
- access.walletpassphrasechange(pwd, pwd2)
- print
- print "\n---Passphrase changed---\n"
- except Exception as inst:
- print inst
-
-else:
- print "Command not found or not supported"
diff --git a/contrib/debian/changelog b/contrib/debian/changelog
index 7ce3babc1..33dab9b63 100644
--- a/contrib/debian/changelog
+++ b/contrib/debian/changelog
@@ -1,3 +1,152 @@
+bitcoin (0.14.1-trusty4) trusty; urgency=medium
+
+ * Re-enable UPnP support.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Fri, 05 May 2017 13:28:00 -0400
+
+bitcoin (0.14.1-trusty3) trusty; urgency=medium
+
+ * Build with qt5 if we are on a non-Ubuntu (ie non-Unity) distro.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Thu, 04 May 2017 17:13:00 -0400
+
+bitcoin (0.14.1-trusty2) trusty; urgency=medium
+
+ * Bump minimum boost version in deps.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Thu, 04 May 2017 17:12:00 -0400
+
+bitcoin (0.14.1-trusty1) trusty; urgency=medium
+
+ * New upstream release.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Sat, 22 Apr 2017 17:10:00 -0400
+
+bitcoin (0.14.0-trusty1) trusty; urgency=medium
+
+ * New upstream release.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Wed, 08 Mar 2017 10:30:00 -0500
+
+bitcoin (0.13.2-trusty1) trusty; urgency=medium
+
+ * New upstream release.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Thu, 05 Jan 2017 09:59:00 -0500
+
+bitcoin (0.13.1-trusty2) trusty; urgency=medium
+
+ * Revert to Qt4, due to https://github.com/bitcoin/bitcoin/issues/9038
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Mon, 31 Oct 2016 11:16:00 -0400
+
+bitcoin (0.13.1-trusty1) trusty; urgency=medium
+
+ * New upstream release.
+ * Backport updated bitcoin-qt.desktop from upstream master
+ * Add zmq dependency
+ * Switch to Qt5 (breaks precise, but that was already broken by C++11)
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Thu, 27 Oct 2016 17:32:00 -0400
+
+bitcoin (0.13.0-trusty1) trusty; urgency=medium
+
+ * New upstream release.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Sun, 04 Sep 2016 22:09:00 -0400
+
+bitcoin (0.12.1-trusty1) trusty; urgency=medium
+
+ * New upstream release.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Mon, 18 Apr 2016 14:26:00 -0700
+
+bitcoin (0.12.0-trusty6) trusty; urgency=medium
+
+ * Fix program-options dep.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Fri, 25 Mar 2016 21:41:00 -0700
+
+bitcoin (0.12.0-trusty5) trusty; urgency=medium
+
+ * Test explicit --with-gui
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Tue, 23 Feb 2015 23:25:00 -0800
+
+bitcoin (0.12.0-trusty4) trusty; urgency=medium
+
+ * Fix libevent-dev dep.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Tue, 23 Feb 2015 23:25:00 -0800
+
+bitcoin (0.12.0-trusty3) trusty; urgency=medium
+
+ * Fix precise boost dep.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Tue, 23 Feb 2015 19:55:00 -0800
+
+bitcoin (0.12.0-trusty2) trusty; urgency=medium
+
+ * Fix libevent dep.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Tue, 23 Feb 2015 19:53:00 -0800
+
+bitcoin (0.12.0-trusty1) trusty; urgency=medium
+
+ * New upstream release
+ * Various updates to contrib/debian were merged, a few were not
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Tue, 23 Feb 2015 19:29:00 -0800
+
+bitcoin (0.11.2-trusty1) trusty; urgency=low
+
+ * New upstream release.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Fri, 13 Nov 2015 18:39:00 -0800
+
+bitcoin (0.11.1-trusty2) trusty; urgency=low
+
+ * Remove minupnpc builddep.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Wed, 14 Oct 2015 23:06:00 -1000
+
+bitcoin (0.11.1-trusty1) trusty; urgency=high
+
+ * New upstream release.
+ * Disable all UPnP support.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Wed, 14 Oct 2015 13:57:00 -1000
+
+bitcoin (0.11.0-precise1) precise; urgency=medium
+
+ * New upstream release.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Tue, 14 Jul 2015 14:39:00 -1000
+
+bitcoin (0.10.2-precise1) precise; urgency=medium
+
+ * New upstream release.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Mon, 29 Jun 2015 17:33:00 -1000
+
+bitcoin (0.10.1-precise3) precise; urgency=medium
+
+ * Fix build dep (include python).
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Tue, 5 May 2015 09:28:00 -1000
+
+bitcoin (0.10.1-precise2) precise; urgency=medium
+
+ * Fix miniupnpc dep.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Tue, 5 May 2015 00:33:00 -1000
+
+bitcoin (0.10.1-precise1) precise; urgency=medium
+
+ * New upstream release.
+
+ -- Matt Corallo (BlueMatt) <[email protected]> Tue, 5 May 2015 00:07:00 -1000
+
bitcoin (0.10.0-precise1) precise; urgency=medium
* New upstream releases.
diff --git a/contrib/debian/control b/contrib/debian/control
index cfa035281..d5a4c78da 100644
--- a/contrib/debian/control
+++ b/contrib/debian/control
@@ -1,26 +1,30 @@
Source: dogecoin
Section: utils
Priority: optional
-Maintainer: Jonas Smedegaard <[email protected]>
-Uploaders: Micah Anderson <[email protected]>
+Maintainer: Matt Corallo <[email protected]>
+Uploaders: Matt Corallo <[email protected]>
Build-Depends: debhelper,
devscripts,
automake,
libtool,
bash-completion,
- libboost-system-dev (>> 1.35) | libboost-system1.35-dev,
libdb4.8++-dev,
libssl-dev,
pkg-config,
- libminiupnpc8-dev | libminiupnpc-dev (>> 1.6),
- libboost-filesystem-dev (>> 1.35) | libboost-filesystem1.35-dev,
- libboost-program-options-dev (>> 1.35) | libboost-program-options1.35-dev,
- libboost-thread-dev (>> 1.35) | libboost-thread1.35-dev,
- libboost-test-dev (>> 1.35) | libboost-test1.35-dev,
- qt4-qmake,
- libqt4-dev,
+ libevent-dev,
+ libboost-system1.48-dev | libboost-system-dev (>> 1.47),
+ libboost-filesystem1.48-dev | libboost-filesystem-dev (>> 1.47),
+ libboost-program-options1.48-dev | libboost-program-options-dev (>> 1.47),
+ libboost-thread1.48-dev | libboost-thread-dev (>> 1.47),
+ libboost-test1.48-dev | libboost-test-dev (>> 1.47),
+ libboost-chrono1.48-dev | libboost-chrono-dev (>> 1.47),
+ libminiupnpc8-dev | libminiupnpc-dev,
+ qt4-qmake, libqt4-dev,
+ qttools5-dev-tools, qttools5-dev,
libqrencode-dev,
- libprotobuf-dev, protobuf-compiler
+ libprotobuf-dev, protobuf-compiler,
+ python,
+ libzmq3-dev
Standards-Version: 3.9.2
Homepage: http://www.dogecoin.com/
Vcs-Git: git://github.com/dogecoin/dogecoin.git
@@ -52,7 +56,18 @@ Description: peer-to-peer network based digital currency - Qt GUI
transact directly with each other, with the help of a P2P network to
check for double-spending.
.
- Full transaction history is stored locally at each client. This
- requires 20+ GB of space, slowly growing.
- .
This package provides Dogecoin-Qt, a GUI for Dogecoin based on Qt.
+
+Package: dogecoin-tx
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: peer-to-peer digital currency - standalone transaction tool
+ Dogecoin is a free open source peer-to-peer electronic cash system that
+ is completely decentralized, without the need for a central server or
+ trusted parties. Users hold the crypto keys to their own money and
+ transact directly with each other, with the help of a P2P network to
+ check for double-spending.
+ .
+ This package provides dogecoin-tx, a command-line transaction creation
+ tool which can be used without a dogecoin daemon. Some means of
+ exchanging minimal transaction data with peers is still required.
diff --git a/contrib/debian/copyright b/contrib/debian/copyright
index 55ebcaab4..72d64ce62 100644
--- a/contrib/debian/copyright
+++ b/contrib/debian/copyright
@@ -1,82 +1,90 @@
-Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Bitcoin
Upstream-Contact: Satoshi Nakamoto <[email protected]>
Source: https://github.com/bitcoin/bitcoin
Files: *
-Copyright: 2009-2012, Bitcoin Core Developers
+Copyright: 2009-2017, Bitcoin Core Developers
License: Expat
Comment: The Bitcoin Core Developers encompasses the current developers listed on bitcoin.org,
as well as the numerous contributors to the project.
-Files: src/json/*
-Copyright: 2007-2009, John W. Wilkinson
-License: Expat
-
Files: debian/*
Copyright: 2010-2011, Jonas Smedegaard <[email protected]>
2011, Matt Corallo <[email protected]>
License: GPL-2+
-Files: debian/manpages/*
-Copyright: Micah Anderson <[email protected]>
-License: GPL-3+
-
-Files: src/qt/res/icons/clock*.png, src/qt/res/icons/tx*.png,
- src/qt/res/src/*.svg
-Copyright: Wladimir van der Laan
+Files: src/qt/res/icons/add.png
+ src/qt/res/icons/address-book.png
+ src/qt/res/icons/chevron.png
+ src/qt/res/icons/configure.png
+ src/qt/res/icons/debugwindow.png
+ src/qt/res/icons/edit.png
+ src/qt/res/icons/editcopy.png
+ src/qt/res/icons/editpaste.png
+ src/qt/res/icons/export.png
+ src/qt/res/icons/eye.png
+ src/qt/res/icons/filesave.png
+ src/qt/res/icons/history.png
+ src/qt/res/icons/info.png
+ src/qt/res/icons/key.png
+ src/qt/res/icons/lock_*.png
+ src/qt/res/icons/open.png
+ src/qt/res/icons/overview.png
+ src/qt/res/icons/quit.png
+ src/qt/res/icons/receive.png
+ src/qt/res/icons/remove.png
+ src/qt/res/icons/send.png
+ src/qt/res/icons/synced.png
+ src/qt/res/icons/transaction*.png
+ src/qt/res/icons/tx_output.png
+ src/qt/res/icons/warning.png
+Copyright: Stephen Hutchings (and more)
+ http://typicons.com
License: Expat
-
-Files: src/qt/res/icons/address-book.png, src/qt/res/icons/export.png,
- src/qt/res/icons/history.png, src/qt/res/icons/key.png,
- src/qt/res/icons/lock_*.png, src/qt/res/icons/overview.png,
- src/qt/res/icons/receive.png, src/qt/res/icons/send.png,
- src/qt/res/icons/synced.png, src/qt/res/icons/filesave.png
-Copyright: David Vignoni ([email protected])
- ICON KING - www.icon-king.com
-License: LGPL
-Comment: NUVOLA ICON THEME for KDE 3.x
- Original icons: kaddressbook, klipper_dock, view-list-text,
- key-password, encrypted/decrypted, go-home, go-down,
- go-next, dialog-ok
- Site: http://www.icon-king.com/projects/nuvola/
+Comment: Site: https://github.com/stephenhutchings/typicons.font
Files: src/qt/res/icons/connect*.png
-Copyright: schollidesign
-License: GPL-3+
-Comment: Icon Pack: Human-O2
- Site: http://findicons.com/icon/93743/blocks_gnome_netstatus_0
-
-Files: src/qt/res/icons/transaction*.png
-Copyright: md2k7
+ src/qt/res/src/connect-*.svg
+ src/qt/res/icons/network_disabled.png
+ src/qt/res/src/network_disabled.svg
+Copyright: Marco Falke
+ Luke Dashjr
License: Expat
-Comment: Site: https://bitcointalk.org/index.php?topic=15276.0
-
-Files: src/qt/res/icons/configure.png, src/qt/res/icons/quit.png,
- src/qt/res/icons/editcopy.png, src/qt/res/icons/editpaste.png,
- src/qt/res/icons/add.png, src/qt/res/icons/edit.png,
- src/qt/res/icons/remove.png
-Copyright: http://www.everaldo.com
-License: LGPL
-Comment: Icon Pack: Crystal SVG
+Comment: Inspired by Stephan Hutchings Typicons
+
+Files: src/qt/res/icons/tx_mined.png
+ src/qt/res/src/mine.svg
+ src/qt/res/icons/fontbigger.png
+ src/qt/res/icons/fontsmaller.png
+ src/qt/res/icons/hd_disabled.png
+ src/qt/res/src/hd_disabled.svg
+ src/qt/res/icons/hd_enabled.png
+ src/qt/res/src/hd_enabled.svg
+Copyright: Jonas Schnelli
+License: Expat
+Comment:
-Files: src/qt/res/icons/bitcoin.png, src/qt/res/icons/toolbar.png
-Copyright: Bitboy (optimized for 16x16 by Wladimir van der Laan)
-License: PUB-DOM
+Files: src/qt/res/icons/clock*.png
+ src/qt/res/icons/eye_*.png
+ src/qt/res/icons/verify.png
+ src/qt/res/icons/tx_in*.png
+ src/qt/res/src/clock_*.svg
+ src/qt/res/src/tx_*.svg
+ src/qt/res/src/verify.svg
+Copyright: Stephan Hutching, Jonas Schnelli
+License: Expat
+Comment: Modifications of Stephan Hutchings Typicons
+
+Files: src/qt/res/icons/about.png
+ src/qt/res/icons/bitcoin.*
+ share/pixmaps/bitcoin*
+ src/qt/res/src/bitcoin.svg
+Copyright: Bitboy, Jonas Schnelli
+License: public-domain
Comment: Site: https://bitcointalk.org/?topic=1756.0
-Files: scripts/img/reload.xcf, src/qt/res/movies/*.png
-Copyright: Everaldo (Everaldo Coelho)
-License: GPL-3+
-Comment: Icon Pack: Kids
- Site: http://findicons.com/icon/17102/reload?id=17102
-
-Files: src/qt/res/images/splash2.jpg
-License: PUB-DOM
-Copyright: Crobbo (forum)
-Comment: Site: https://bitcointalk.org/index.php?topic=32273.0
-
License: Expat
Permission is hereby granted, free of charge, to any person obtaining a
@@ -98,20 +106,6 @@ License: Expat
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-License: ISC
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- .
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
- BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
- OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- SOFTWARE.
-
License: GPL-2+
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -140,22 +134,5 @@ Comment:
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
-License: LGPL
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- .
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-Comment:
- On Debian systems the GNU Lesser General Public License (LGPL) is
- located in '/usr/share/common-licenses/LGPL'.
- .
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-License: PUB-DOM
+License: public-domain
This work is in the public domain.
diff --git a/contrib/debian/dogecoin-qt.desktop b/contrib/debian/dogecoin-qt.desktop
index 1bc3779f2..003d025b9 100644
--- a/contrib/debian/dogecoin-qt.desktop
+++ b/contrib/debian/dogecoin-qt.desktop
@@ -1,7 +1,8 @@
[Desktop Entry]
Encoding=UTF-8
-Name=Dogecoin
-Comment=Dogecoin P2P Cryptocurrency
+Name=Dogecoin Core
+Comment=Connect to the Dogecoin P2P Network
+Comment[de]=Verbinde mit dem Dogecoin peer-to-peer Netzwerk
Comment[fr]=Dogecoin, monnaie virtuelle cryptographique pair à pair
Comment[tr]=Dogecoin, eÅŸten eÅŸe kriptografik sanal para birimi
Exec=dogecoin-qt %u
diff --git a/contrib/debian/dogecoin-qt.install b/contrib/debian/dogecoin-qt.install
index df105e235..383d11729 100644
--- a/contrib/debian/dogecoin-qt.install
+++ b/contrib/debian/dogecoin-qt.install
@@ -3,4 +3,4 @@ share/pixmaps/bitcoin32.xpm usr/share/pixmaps
share/pixmaps/bitcoin16.xpm usr/share/pixmaps
share/pixmaps/bitcoin128.png usr/share/pixmaps
debian/dogecoin-qt.desktop usr/share/applications
-debian/dogecoin-qt.protocol usr/share/kde4/services/
+debian/dogecoin-qt.protocol usr/share/kde4/services/ \ No newline at end of file
diff --git a/contrib/debian/dogecoin-qt.manpages b/contrib/debian/dogecoin-qt.manpages
new file mode 100644
index 000000000..2a6af96e6
--- /dev/null
+++ b/contrib/debian/dogecoin-qt.manpages
@@ -0,0 +1 @@
+doc/man/dogecoin-qt.1
diff --git a/contrib/debian/dogecoin-tx.bash-completion b/contrib/debian/dogecoin-tx.bash-completion
new file mode 100644
index 000000000..47712d68c
--- /dev/null
+++ b/contrib/debian/dogecoin-tx.bash-completion
@@ -0,0 +1 @@
+contrib/dogecoin-tx.bash-completion dogecoin-tx
diff --git a/contrib/debian/dogecoin-tx.install b/contrib/debian/dogecoin-tx.install
new file mode 100644
index 000000000..c176b49c4
--- /dev/null
+++ b/contrib/debian/dogecoin-tx.install
@@ -0,0 +1 @@
+usr/local/bin/dogecoin-tx usr/bin
diff --git a/contrib/debian/dogecoin-tx.manpages b/contrib/debian/dogecoin-tx.manpages
new file mode 100644
index 000000000..d323ba7ef
--- /dev/null
+++ b/contrib/debian/dogecoin-tx.manpages
@@ -0,0 +1 @@
+doc/man/dogecoin-tx.1
diff --git a/contrib/debian/dogecoind.bash-completion b/contrib/debian/dogecoind.bash-completion
index 34f65f9a3..dfc8b6993 100644
--- a/contrib/debian/dogecoind.bash-completion
+++ b/contrib/debian/dogecoind.bash-completion
@@ -1 +1,2 @@
contrib/dogecoind.bash-completion dogecoind
+contrib/dogecoin-cli.bash-completion dogecoin-cli
diff --git a/contrib/debian/dogecoind.install b/contrib/debian/dogecoind.install
index 5dc610b9c..27cb31d60 100644
--- a/contrib/debian/dogecoind.install
+++ b/contrib/debian/dogecoind.install
@@ -1,2 +1,2 @@
usr/local/bin/dogecoind usr/bin
-usr/local/bin/dogecoin-cli usr/bin
+usr/local/bin/dogecoin-cli usr/bin \ No newline at end of file
diff --git a/contrib/debian/dogecoind.manpages b/contrib/debian/dogecoind.manpages
index 64dc22ed3..f2f18b37a 100644
--- a/contrib/debian/dogecoind.manpages
+++ b/contrib/debian/dogecoind.manpages
@@ -1,3 +1,2 @@
-debian/manpages/dogecoind.1
-debian/manpages/dogecoin.conf.5
-debian/manpages/dogecoin-cli.1
+doc/man/dogecoind.1
+doc/man/dogecoin-cli.1
diff --git a/contrib/debian/examples/dogecoin.conf b/contrib/debian/examples/dogecoin.conf
index a3e3ece35..d82492979 100644
--- a/contrib/debian/examples/dogecoin.conf
+++ b/contrib/debian/examples/dogecoin.conf
@@ -60,20 +60,41 @@
# JSON-RPC options (for controlling a running Dogecoin/dogecoind process)
#
-# server=1 tells Dogecoin-QT and dogecoind to accept JSON-RPC commands
+# server=1 tells Dogecoin-Qt and dogecoind to accept JSON-RPC commands
#server=0
# Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6.
# This option can be specified multiple times (default: bind to all interfaces)
#rpcbind=<addr>
-# You must set rpcuser and rpcpassword to secure the JSON-RPC api
+# If no rpcpassword is set, rpc cookie auth is sought. The default `-rpccookiefile` name
+# is .cookie and found in the `-datadir` being used for dogecoind. This option is typically used
+# when the server and client are run as the same user.
+#
+# If not, you must set rpcuser and rpcpassword to secure the JSON-RPC api. The first
+# method(DEPRECATED) is to set this pair for the server and client:
#rpcuser=Ulysseys
#rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593
+#
+# The second method `rpcauth` can be added to server startup argument. It is set at intialization time
+# using the output from the script in share/rpcuser/rpcuser.py after providing a username:
+#
+# ./share/rpcuser/rpcuser.py alice
+# String to be appended to dogecoin.conf:
+# rpcauth=alice:f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae
+# Your password:
+# DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
+#
+# On client-side, you add the normal user/password pair to send commands:
+#rpcuser=alice
+#rpcpassword=DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
+#
+# You can even add multiple entries of these to the server conf file, and client can use any of them:
+# rpcauth=bob:b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99
# How many seconds dogecoin will wait for a complete RPC HTTP request.
# after the HTTP connection is established.
-#rpctimeout=30
+#rpcclienttimeout=30
# By default, only RPC connections from localhost are allowed.
# Specify as many rpcallowip= settings as you like to allow connections from other hosts,
@@ -82,8 +103,8 @@
# NOTE: opening up the RPC port to hosts outside your local trusted network is NOT RECOMMENDED,
# because the rpcpassword is transmitted over the network unencrypted.
-# server=1 tells Dogecoin-QT to accept JSON-RPC commands.
-# it is also read by dogecoind to determine if RPC should be enabled
+# server=1 tells Dogecoin-Qt to accept JSON-RPC commands.
+# it is also read by dogecoind to determine if RPC should be enabled
#rpcallowip=10.1.1.34/255.255.255.0
#rpcallowip=1.2.3.4/24
#rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96
@@ -95,15 +116,6 @@
# running on another host using this option:
#rpcconnect=127.0.0.1
-# Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate
-# with Dogecoin -server or dogecoind
-#rpcssl=1
-
-# OpenSSL settings used when rpcssl=1
-#rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH
-#rpcsslcertificatechainfile=server.cert
-#rpcsslprivatekeyfile=server.pem
-
# Transaction Fee Changes in 0.10.0
# Send transactions as zero-fee transactions if possible (default: 0)
diff --git a/contrib/debian/manpages/dogecoin-cli.1 b/contrib/debian/manpages/dogecoin-cli.1
deleted file mode 100644
index b05797650..000000000
--- a/contrib/debian/manpages/dogecoin-cli.1
+++ /dev/null
@@ -1,48 +0,0 @@
-.TH DOGECOIN-CLI "1" "February 2015" "dogecoin-cli 0.10"
-.SH NAME
-dogecoin-cli \- a remote procedure call client for Dogecoin Core.
-.SH SYNOPSIS
-dogecoin-cli [options] <command> [params] \- Send command to Dogecoin Core.
-.TP
-dogecoin-cli [options] help \- Asks Dogecoin Core for a list of supported commands.
-.SH DESCRIPTION
-This manual page documents the dogecoin-cli program. dogecoin-cli is an RPC client used to send commands to Dogecoin Core.
-
-.SH OPTIONS
-.TP
-\fB\-?\fR
-Show the help message.
-.TP
-\fB\-conf=\fR<file>
-Specify configuration file (default: dogecoin.conf).
-.TP
-\fB\-datadir=\fR<dir>
-Specify data directory.
-.TP
-\fB\-testnet\fR
-Connect to a Dogecoin Core instance running in testnet mode.
-.TP
-\fB\-regtest\fR
-Connect to a Dogecoin Core instance running in regtest mode (see documentation for -regtest on dogecoind).
-.TP
-\fB\-rpcuser=\fR<user>
-Username for JSON\-RPC connections.
-.TP
-\fB\-rpcpassword=\fR<pw>
-Password for JSON\-RPC connections.
-.TP
-\fB\-rpcport=\fR<port>
-Listen for JSON\-RPC connections on <port> (default: 22555 or testnet: 44555).
-.TP
-\fB\-rpcconnect=\fR<ip>
-Send commands to node running on <ip> (default: 127.0.0.1).
-.TP
-\fB\-rpcssl\fR=\fI1\fR
-Use OpenSSL (https) for JSON\-RPC connections (see the Bitcoin Wiki for SSL setup instructions).
-
-.SH "SEE ALSO"
-\fBdogecoind\fP, \fBdogecoin.conf\fP
-.SH AUTHOR
-This manual page was written by Ciemon Dunville <[email protected]>. Permission is granted to copy, distribute and/or modify this document under the terms of the MIT License.
-
-The complete text of the MIT License can be found on the web at \fIhttp://opensource.org/licenses/MIT\fP.
diff --git a/contrib/debian/manpages/dogecoin-qt.1 b/contrib/debian/manpages/dogecoin-qt.1
deleted file mode 100644
index 6a2c0d0df..000000000
--- a/contrib/debian/manpages/dogecoin-qt.1
+++ /dev/null
@@ -1,203 +0,0 @@
-.TH DOGECOIN-QT "1" "April 2013" "dogecoin-qt 1"
-.SH NAME
-dogecoin-qt \- peer-to-peer network based digital currency
-.SH DESCRIPTION
-.SS "Usage:"
-.IP
-dogecoin\-qt [command\-line options]
-.SH OPTIONS
-.TP
-\-?
-This help message
-.TP
-\fB\-conf=\fR<file>
-Specify configuration file (default: dogecoin.conf)
-.TP
-\fB\-pid=\fR<file>
-Specify pid file (default: dogecoind.pid)
-.TP
-\fB\-gen\fR
-Generate coins
-.TP
-\fB\-gen\fR=\fI0\fR
-Don't generate coins
-.TP
-\fB\-datadir=\fR<dir>
-Specify data directory
-.TP
-\fB\-dbcache=\fR<n>
-Set database cache size in megabytes (default: 25)
-.TP
-\fB\-timeout=\fR<n>
-Specify connection timeout in milliseconds (default: 5000)
-.TP
-\fB\-proxy=\fR<ip:port>
-Connect through SOCKS5 proxy
-.TP
-\fB\-tor=\fR<ip:port>
-Use proxy to reach tor hidden services (default: same as \fB\-proxy\fR)
-.TP
-\fB\-dns\fR
-Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR
-.TP
-\fB\-port=\fR<port>
-Listen for connections on <port> (default: 22556 or testnet: 44556)
-.TP
-\fB\-maxconnections=\fR<n>
-Maintain at most <n> connections to peers (default: 125)
-.TP
-\fB\-addnode=\fR<ip>
-Add a node to connect to and attempt to keep the connection open
-.TP
-\fB\-connect=\fR<ip>
-Connect only to the specified node(s)
-.TP
-\fB\-seednode=\fR<ip>
-Connect to a node to retrieve peer addresses, and disconnect
-.TP
-\fB\-externalip=\fR<ip>
-Specify your own public address
-.TP
-\fB\-onlynet=\fR<net>
-Only connect to nodes in network <net> (IPv4, IPv6 or Tor)
-.TP
-\fB\-discover\fR
-Discover own IP address (default: 1 when listening and no \fB\-externalip\fR)
-.TP
-\fB\-checkpoints\fR
-Only accept block chain matching built\-in checkpoints (default: 1)
-.TP
-\fB\-listen\fR
-Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\fR)
-.TP
-\fB\-bind=\fR<addr>
-Bind to given address and always listen on it. Use [host]:port notation for IPv6
-.TP
-\fB\-dnsseed\fR
-Find peers using DNS lookup (default: 1 unless \fB\-connect\fR)
-.TP
-\fB\-banscore=\fR<n>
-Threshold for disconnecting misbehaving peers (default: 100)
-.TP
-\fB\-bantime=\fR<n>
-Number of seconds to keep misbehaving peers from reconnecting (default: 86400)
-.TP
-\fB\-maxreceivebuffer=\fR<n>
-Maximum per\-connection receive buffer, <n>*1000 bytes (default: 5000)
-.TP
-\fB\-maxsendbuffer=\fR<n>
-Maximum per\-connection send buffer, <n>*1000 bytes (default: 1000)
-.TP
-\fB\-upnp\fR
-Use UPnP to map the listening port (default: 1 when listening)
-.TP
-\fB\-paytxfee=\fR<amt>
-Fee per KB to add to transactions you send
-.TP
-\fB\-server\fR
-Accept command line and JSON\-RPC commands
-.TP
-\fB\-testnet\fR
-Use the test network
-.TP
-\fB\-debug\fR
-Output extra debugging information. Implies all other \fB\-debug\fR* options
-.TP
-\fB\-debugnet\fR
-Output extra network debugging information
-.TP
-\fB\-logtimestamps\fR
-Prepend debug output with timestamp
-.TP
-\fB\-shrinkdebugfile\fR
-Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR)
-.TP
-\fB\-printtoconsole\fR
-Send trace/debug info to console instead of debug.log file
-.TP
-\fB\-rpcuser=\fR<user>
-Username for JSON\-RPC connections
-.TP
-\fB\-rpcpassword=\fR<pw>
-Password for JSON\-RPC connections
-.TP
-\fB\-rpcport=\fR<port>
-Listen for JSON\-RPC connections on <port> (default: 22555 or testnet: 44555)
-.TP
-\fB\-rpcallowip=\fR<ip>
-Allow JSON\-RPC connections from specified IP address
-.TP
-\fB\-rpcthreads=\fR<n>
-Set the number of threads to service RPC calls (default: 4)
-.TP
-\fB\-blocknotify=\fR<cmd>
-Execute command when the best block changes (%s in cmd is replaced by block hash)
-.TP
-\fB\-walletnotify=\fR<cmd>
-Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)
-.TP
-\fB\-alertnotify=\fR<cmd>
-Execute command when a relevant alert is received (%s in cmd is replaced by message)
-.TP
-\fB\-upgradewallet\fR
-Upgrade wallet to latest format
-.TP
-\fB\-keypool=\fR<n>
-Set key pool size to <n> (default: 100)
-.TP
-\fB\-rescan\fR
-Rescan the block chain for missing wallet transactions
-.TP
-\fB\-salvagewallet\fR
-Attempt to recover private keys from a corrupt wallet.dat
-.TP
-\fB\-checkblocks=\fR<n>
-How many blocks to check at startup (default: 288, 0 = all)
-.TP
-\fB\-checklevel=\fR<n>
-How thorough the block verification is (0\-4, default: 3)
-.TP
-\fB\-txindex\fR
-Maintain a full transaction index (default: 0)
-.TP
-\fB\-loadblock=\fR<file>
-Imports blocks from external blk000??.dat file
-.TP
-\fB\-reindex\fR
-Rebuild block chain index from current blk000??.dat files
-.TP
-\fB\-par=\fR<n>
-Set the number of script verification threads (1\-16, 0=auto, default: 0)
-.SS "Block creation options:"
-.TP
-\fB\-blockminsize=\fR<n>
-Set minimum block size in bytes (default: 0)
-.TP
-\fB\-blockmaxsize=\fR<n>
-Set maximum block size in bytes (default: 250000)
-.HP
-\fB\-blockprioritysize=\fR<n> Set maximum size of high\-priority/low\-fee transactions in bytes (default: 27000)
-.PP
-SSL options: (see the Dogecoin Wiki for SSL setup instructions)
-.TP
-\fB\-rpcssl\fR
-Use OpenSSL (https) for JSON\-RPC connections
-.TP
-\fB\-rpcsslcertificatechainfile=\fR<file.cert>
-Server certificate file (default: server.cert)
-.TP
-\fB\-rpcsslprivatekeyfile=\fR<file.pem>
-Server private key (default: server.pem)
-.TP
-\fB\-rpcsslciphers=\fR<ciphers>
-Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
-.SS "UI options:"
-.TP
-\fB\-lang=\fR<lang>
-Set language, for example "de_DE" (default: system locale)
-.TP
-\fB\-min\fR
-Start minimized
-.TP
-\fB\-splash\fR
-Show splash screen on startup (default: 1)
diff --git a/contrib/debian/manpages/dogecoin.conf.5 b/contrib/debian/manpages/dogecoin.conf.5
deleted file mode 100644
index 75eb783a0..000000000
--- a/contrib/debian/manpages/dogecoin.conf.5
+++ /dev/null
@@ -1,89 +0,0 @@
-.TH DOGECOIN.CONF "5" "January 2011" "dogecoin.conf 3.19"
-.SH NAME
-dogecoin.conf \- dogecoin configuration file
-.SH SYNOPSIS
-All command-line options (except for '\-conf') may be specified in a configuration file, and all configuration file options may also be specified on the command line. Command-line options override values set in the configuration file.
-.TP
-The configuration file is a list of 'setting=value' pairs, one per line, with optional comments starting with the '#' character.
-.TP
-The configuration file is not automatically created; you can create it using your favorite plain-text editor. By default, dogecoind(1) will look for a file named dogecoin.conf(5) in the dogecoin data directory, but both the data directory and the configuration file path may be changed using the '\-datadir' and '\-conf' command-line arguments.
-.SH LOCATION
-dogecoin.conf should be located in $HOME/.dogecoin
-.SH NETWORK-RELATED SETTINGS
-.TP
-.TP
-\fBtestnet=\fR[\fI'1'\fR|\fI'0'\fR]
-Enable or disable run on the test network instead of the real *dogecoin* network.
-.TP
-\fBproxy=\fR\fI'127.0.0.1:9050'\fR
-Connect via a socks4 proxy.
-.TP
-\fBaddnode=\fR\fI'10.0.0.2:22556'\fR
-Use as many *addnode=* settings as you like to connect to specific peers.
-.TP
-\fBconnect=\fR\fI'10.0.0.1:22556'\fR
-Use as many *connect=* settings as you like to connect ONLY to specific peers.
-.TP
-\fRmaxconnections=\fR\fI'value'\fR
-Maximum number of inbound+outbound connections.
-.SH JSON-RPC OPTIONS
-.TP
-\fBserver=\fR[\fI'1'\fR|\fI'0'\fR]
-Tells *dogecoin* to accept or not accept JSON-RPC commands.
-.TP
-\fBrpcuser=\fR\fI'username'\fR
-You must set *rpcuser* to secure the JSON-RPC api.
-.TP
-\fBrpcpassword=\fR\fI'password'\fR
-You must set *rpcpassword* to secure the JSON-RPC api.
-.TP
-\fBrpcallowip=\fR\fI'192.168.1.*'\fR
-By default, only RPC connections from localhost are allowed. Specify as many *rpcallowip=* settings as you like to allow connections from other hosts (and you may use * as a wildcard character).
-.TP
-\fBrpcport=\fR\fI'22555'\fR
-Listen for RPC connections on this TCP port.
-.TP
-\fBrpcconnect=\fR\fI'127.0.0.1'\fR
-You can use *dogecoin* or *dogecoind(1)* to send commands to *dogecoin*/*dogecoind(1)* running on another host using this option.
-.TP
-\fBrpcssl=\fR\fI'1'\fR
-Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate with *dogecoin* '\-server' or *dogecoind(1)*. Example of OpenSSL settings used when *rpcssl*='1':
-.TP
-\fB\-rpcsslciphers=\fR<ciphers>
-Acceptable ciphers (default: TLSv1+HIGH:\:!SSLv2:\:!aNULL:\:!eNULL:\:!AH:\:!3DES:\:@STRENGTH)
-.TP
-\fBrpcsslcertificatechainfile=\fR\fI'server.cert'\fR
-.TP
-\fBrpcsslprivatekeyfile=\fR\fI'server.pem'\fR
-.TP
-.SH MISCELLANEOUS OPTIONS
-.TP
-\fBgen=\fR[\fI'0'\fR|\fI'1'\fR]
-Enable or disable attempt to generate dogecoins.
-.TP
-\fB4way=\fR[\fI'0'\fR|\fI'1'\fR]
-Enable or disable use SSE instructions to try to generate dogecoins faster.
-.TP
-\fBkeypool=\fR\fI'100'\fR
-Pre-generate this many public/private key pairs, so wallet backups will be valid for both prior transactions and several dozen future transactions.
-.TP
-\fBpaytxfee=\fR\fI'0.00'\fR
-Pay an optional transaction fee every time you send dogecoins. Transactions with fees are more likely than free transactions to be included in generated blocks, so may be validated sooner.
-.TP
-\fBallowreceivebyip=\fR\fI'1'\fR
-Allow direct connections for the 'pay via IP address' feature.
-.TP
-.SH USER INTERFACE OPTIONS
-.TP
-\fBmin=\fR[\fI'0'\fR|\fI'1'\fR]
-Enable or disable start dogecoind minimized.
-.TP
-\fBminimizetotray=\fR[\fI'0'\fR|\fI'1'\fR]
-Enable or disable minimize to the system tray.
-.SH "SEE ALSO"
-dogecoind(1)
-.SH AUTHOR
-This manual page was written by Micah Anderson <[email protected]> for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation.
-
-On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
-
diff --git a/contrib/debian/manpages/dogecoind.1 b/contrib/debian/manpages/dogecoind.1
deleted file mode 100644
index db3a40cf8..000000000
--- a/contrib/debian/manpages/dogecoind.1
+++ /dev/null
@@ -1,208 +0,0 @@
-.TH DOGECOIND "1" "January 2011" "dogecoind 3.19"
-.SH NAME
-dogecoind \- peer-to-peer network based digital currency
-.SH SYNOPSIS
-dogecoin [options] <command> [params]
-.TP
-dogecoin [options] help <command> \- Get help for a command
-.SH DESCRIPTION
-This manual page documents the dogecoind program. Dogecoin is a peer-to-peer digital currency. Peer-to-peer (P2P) means that there is no central authority to issue new money or keep track of transactions. Instead, these tasks are managed collectively by the nodes of the network. Advantages:
-
-Dogecoins can be sent easily through the Internet, without having to trust middlemen. Transactions are designed to be irreversible. Be safe from instability caused by fractional reserve banking and central banks. The limited inflation of the Dogecoin system’s money supply is distributed evenly (by CPU power) throughout the network, not monopolized by banks.
-
-.SH OPTIONS
-.TP
-\fB\-conf=\fR<file>
-Specify configuration file (default: dogecoin.conf)
-.TP
-\fB\-gen\fR
-Generate coins
-.TP
-\fB\-gen\fR=\fI0\fR
-Don't generate coins
-.TP
-\fB\-min\fR
-Start minimized
-.TP
-\fB\-datadir=\fR<dir>
-Specify data directory
-.TP
-\fB\-proxy=\fR<ip:port>
-Connect through SOCKS5 proxy
-.TP
-\fB\-addnode=\fR<ip>
-Add a node to connect to
-.TP
-\fB\-connect=\fR<ip>
-Connect only to the specified node
-.TP
-\fB\-paytxfee=\fR<amt>
-Fee per KB to add to transactions you send
-.TP
-\fB\-server\fR
-Accept command line and JSON\-RPC commands
-.TP
-\fB\-daemon\fR
-Run in the background as a daemon and accept commands
-.TP
-\fB\-testnet\fR
-Use the test network
-.TP
-\fB\-rpcuser=\fR<user>
-Username for JSON\-RPC connections
-.TP
-\fB\-rpcpassword=\fR<pw>
-Password for JSON\-RPC connections
-.TP
-\fB\-rpcport=\fR<port>
-Listen for JSON\-RPC connections on <port>
-.TP
-\fB\-rpcallowip=\fR<ip>
-Allow JSON\-RPC connections from specified IP address
-.TP
-\fB\-rpcconnect=\fR<ip>
-Send commands to node running on <ip>
-.PP
-SSL options: (see the Dogecoin Wiki for SSL setup instructions)
-.TP
-\fB\-rpcssl\fR=\fI1\fR
-Use OpenSSL (https) for JSON\-RPC connections
-.TP
-\fB\-rpcsslcertificatchainfile=\fR<file.cert>
-Server certificate file (default: server.cert)
-.TP
-\fB\-rpcsslprivatekeyfile=\fR<file.pem>
-Server private key (default: server.pem)
-.TP
-\fB\-rpcsslciphers=\fR<ciphers>
-Acceptable ciphers (default: TLSv1+HIGH:\:!SSLv2:\:!aNULL:\:!eNULL:\:!AH:\:!3DES:\:@STRENGTH)
-.TP
-\-?
-This help message
-.SH COMMANDS
-.TP
-\fBbackupwallet 'destination'\fR
-Safely copies *wallet.dat* to 'destination', which can be a directory or a path with filename.
-.TP
-\fBgetaccount 'dogecoinaddress'\fR
-DEPRECATED. Returns the account associated with the given address.
-.TP
-\fBsetaccount 'dogecoinaddress' ['account']\fR
-DEPRECATED. Sets the ['account'] associated with the given address. ['account'] may be omitted to remove an address from ['account'].
-.TP
-\fBgetaccountaddress 'account'\fR
-DEPRECATED. Returns a new dogecoin address for 'account'.
-.TP
-\fBgetaddressesbyaccount 'account'\fR
-DEPRECATED. Returns the list of addresses associated with the given 'account'.
-.TP
-\fBgetbalance 'account'\fR
-Returns the server's available balance, or the balance for 'account' (accounts are deprecated).
-.TP
-\fBgetblockcount\fR
-Returns the number of blocks in the longest block chain.
-.TP
-\fBgetblocknumber\fR
-Returns the block number of the latest block in the longest block chain.
-.TP
-\fBgetconnectioncount\fR
-Returns the number of connections to other nodes.
-.TP
-\fBgetdifficulty\fR
-Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
-.TP
-\fBgetgenerate\fR
-Returns boolean true if server is trying to generate dogecoins, false otherwise.
-.TP
-\fBsetgenerate 'generate' ['genproclimit']\fR
-Generation is limited to ['genproclimit'] processors, \-1 is unlimited.
-.TP
-\fBgethashespersec\fR
-Returns a recent hashes per second performance measurement while generating.
-.TP
-\fBgetinfo\fR
-Returns an object containing server information.
-.TP
-\fBgetnewaddress 'account'\fR
-Returns a new dogecoin address for receiving payments. If 'account' is specified (deprecated), it is added to the address book so payments received with the address will be credited to 'account'.
-.TP
-\fBgetreceivedbyaccount 'account' ['minconf=1']\fR
-DEPRECATED. Returns the total amount received by addresses associated with 'account' in transactions with at least ['minconf'] confirmations.
-.TP
-\fBgetreceivedbyaddress 'dogecoinaddress' ['minconf=1']\fR
-Returns the total amount received by 'dogecoinaddress' in transactions with at least ['minconf'] confirmations.
-.TP
-\fBgettransaction 'txid'\fR
-Returns information about a specific transaction, given hexadecimal transaction ID.
-.TP
-\fBgetwork 'data'\fR
-If 'data' is specified, tries to solve the block and returns true if it was successful. If 'data' is not specified, returns formatted hash 'data' to work on:
-
- "midstate" : precomputed hash state after hashing the first half of the data.
- "data" : block data.
- "hash1" : formatted hash buffer for second hash.
- "target" : little endian hash target.
-.TP
-\fBhelp 'command'\fR
-List commands, or get help for a command.
-.TP
-\fBlistaccounts ['minconf=1']\fR
-DEPRECATED. List accounts and their current balances.
-.TP
-\fBlistreceivedbyaccount ['minconf=1'] ['includeempty=false']\fR
-['minconf'] is the minimum number of confirmations before payments are included. ['includeempty'] whether to include addresses that haven't received any payments. Returns an array of objects containing:
-
- "account" : DEPRECATED. the account of the receiving address.
- "amount" : total amount received by the address.
- "confirmations" : number of confirmations of the most recent transaction included.
-.TP
-\fBlistreceivedbyaddress ['minconf=1'] ['includeempty=false']\fR
-['minconf'] is the minimum number of confirmations before payments are included. ['includeempty'] whether to include addresses that haven't received any payments. Returns an array of objects containing:
-
- "address" : receiving address.
- "account" : DEPRECATED. the account of the receiving address.
- "amount" : total amount received by the address.
- "confirmations" : number of confirmations of the most recent transaction included.
-.TP
-\fBlisttransactions 'account' ['count=10']\fR
-Returns a list of the last ['count'] transactions for 'account' \- for all accounts if 'account' is not specified or is "*". Each entry in the list may contain:
-
- "category" : will be generate, send, receive, or move.
- "amount" : amount of transaction.
- "fee" : Fee (if any) paid (only for send transactions).
- "confirmations" : number of confirmations (only for generate/send/receive).
- "txid" : transaction ID (only for generate/send/receive).
- "otheraccount" : account funds were moved to or from (only for move).
- "message" : message associated with transaction (only for send).
- "to" : message-to associated with transaction (only for send).
-
- *note: requires dogecoin 0.3.20 or later.
-.TP
-\fBmove <'fromaccount'> <'toaccount'> <'amount'> ['minconf=1'] ['comment']\fR
-DEPRECATED. Moves funds between accounts.
-.TP
-\fBsendfrom* <'account'> <'dogecoinaddress'> <'amount'> ['minconf=1'] ['comment'] ['comment-to']\fR
-DEPRECATED. Sends amount from account's balance to 'dogecoinaddress'. This method will fail if there is less than amount dogecoins with ['minconf'] confirmations in the account's balance (unless account is the empty-string-named default account; it behaves like the *sendtoaddress* method). Returns transaction ID on success.
-.TP
-\fBsendtoaddress 'dogecoinaddress' 'amount' ['comment'] ['comment-to']\fR
-Sends amount from the server's available balance to 'dogecoinaddress'. amount is a real and is rounded to the nearest 0.01. Returns transaction id on success.
-.TP
-\fBstop\fR
-Stops the dogecoin server.
-.TP
-\fBvalidateaddress 'dogecoinaddress'\fR
-Checks that 'dogecoinaddress' looks like a proper dogecoin address. Returns an object containing:
-
- "isvalid" : true or false.
- "ismine" : true if the address is in the server's wallet.
- "address" : dogecoinaddress.
-
- *note: ismine and address are only returned if the address is valid.
-
-.SH "SEE ALSO"
-dogecoin.conf(5)
-.SH AUTHOR
-This manual page was written by Micah Anderson <[email protected]> for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation.
-
-On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
-
diff --git a/contrib/debian/rules b/contrib/debian/rules
index 0fb1a065d..e6901969f 100755
--- a/contrib/debian/rules
+++ b/contrib/debian/rules
@@ -6,9 +6,6 @@
#build/dogecoind::
# $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),,src/test_dogecoin)
-DEB_INSTALL_EXAMPLES_dogecoind += debian/examples/*
-DEB_INSTALL_MANPAGES_dogecoind += debian/manpages/*
-
%:
dh --with bash-completion $@
@@ -16,10 +13,12 @@ override_dh_auto_clean:
if [ -f Makefile ]; then $(MAKE) distclean; fi
rm -rf Makefile.in aclocal.m4 configure src/Makefile.in src/bitcoin-config.h.in src/build-aux src/qt/Makefile.in src/qt/test/Makefile.in src/test/Makefile.in
+QT=$(shell dpkg-vendor --derives-from Ubuntu && echo qt4 || echo qt5)
+
# Yea, autogen should be run on the source archive, but I like doing git archive
override_dh_auto_configure:
./autogen.sh
- ./configure
+ ./configure --with-gui=$(QT)
override_dh_auto_test:
make check
diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md
index f90afa7f2..67c5e15a1 100644
--- a/contrib/devtools/README.md
+++ b/contrib/devtools/README.md
@@ -1,15 +1,115 @@
Contents
-===========
+========
This directory contains tools for developers working on this repository.
-github-merge.sh
-==================
+check-doc.py
+============
+
+Check if all command line args are documented. The return value indicates the
+number of undocumented args.
+
+clang-format-diff.py
+===================
+
+A script to format unified git diffs according to [.clang-format](../../src/.clang-format).
+
+For instance, to format the last commit with 0 lines of context,
+the script should be called from the git root folder as follows.
+
+```
+git diff -U0 HEAD~1.. | ./contrib/devtools/clang-format-diff.py -p1 -i -v
+```
+
+copyright\_header.py
+====================
+
+Provides utilities for managing copyright headers of `The Bitcoin Core
+developers` in repository source files. It has three subcommands:
+
+```
+$ ./copyright_header.py report <base_directory> [verbose]
+$ ./copyright_header.py update <base_directory>
+$ ./copyright_header.py insert <file>
+```
+Running these subcommands without arguments displays a usage string.
+
+copyright\_header.py report \<base\_directory\> [verbose]
+---------------------------------------------------------
+
+Produces a report of all copyright header notices found inside the source files
+of a repository. Useful to quickly visualize the state of the headers.
+Specifying `verbose` will list the full filenames of files of each category.
+
+copyright\_header.py update \<base\_directory\> [verbose]
+---------------------------------------------------------
+Updates all the copyright headers of `The Bitcoin Core developers` which were
+changed in a year more recent than is listed. For example:
+```
+// Copyright (c) <firstYear>-<lastYear> The Bitcoin Core developers
+```
+will be updated to:
+```
+// Copyright (c) <firstYear>-<lastModifiedYear> The Bitcoin Core developers
+```
+where `<lastModifiedYear>` is obtained from the `git log` history.
+
+This subcommand also handles copyright headers that have only a single year. In
+those cases:
+```
+// Copyright (c) <year> The Bitcoin Core developers
+```
+will be updated to:
+```
+// Copyright (c) <year>-<lastModifiedYear> The Bitcoin Core developers
+```
+where the update is appropriate.
+
+copyright\_header.py insert \<file\>
+------------------------------------
+Inserts a copyright header for `The Bitcoin Core developers` at the top of the
+file in either Python or C++ style as determined by the file extension. If the
+file is a Python file and it has `#!` starting the first line, the header is
+inserted in the line below it.
+
+The copyright dates will be set to be `<year_introduced>-<current_year>` where
+`<year_introduced>` is according to the `git log` history. If
+`<year_introduced>` is equal to `<current_year>`, it will be set as a single
+year rather than two hyphenated years.
+
+If the file already has a copyright for `The Bitcoin Core developers`, the
+script will exit.
+
+gen-manpages.sh
+===============
+
+A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
+This requires help2man which can be found at: https://www.gnu.org/software/help2man/
+
+git-subtree-check.sh
+====================
+
+Run this script from the root of the repository to verify that a subtree matches the contents of
+the commit it claims to have been updated to.
+
+To use, make sure that you have fetched the upstream repository branch in which the subtree is
+maintained:
+* for `src/secp256k1`: https://github.com/bitcoin-core/secp256k1.git (branch master)
+* for `src/leveldb`: https://github.com/bitcoin-core/leveldb.git (branch bitcoin-fork)
+* for `src/univalue`: https://github.com/bitcoin-core/univalue.git (branch master)
+* for `src/crypto/ctaes`: https://github.com/bitcoin-core/ctaes.git (branch master)
+
+Usage: `git-subtree-check.sh DIR (COMMIT)`
+
+`COMMIT` may be omitted, in which case `HEAD` is used.
+
+github-merge.py
+===============
A small script to automate merging pull-requests securely and sign them with GPG.
For example:
- ./github-merge.sh bitcoin/bitcoin 3077
+ ./github-merge.py 3077
(in any git repository) will help you merge pull request #3077 for the
bitcoin/bitcoin repository.
@@ -25,7 +125,7 @@ check or whatever).
This means that there are no potential race conditions (where a
pullreq gets updated while you're reviewing it, but before you click
-merge), and when using GPG signatures, that even a compromised github
+merge), and when using GPG signatures, that even a compromised GitHub
couldn't mess with the sources.
Setup
@@ -36,24 +136,22 @@ Configuring the github-merge tool for the bitcoin repository is done in the foll
git config githubmerge.testcmd "make -j4 check" (adapt to whatever you want to use for testing)
git config --global user.signingkey mykeyid (if you want to GPG sign)
-fix-copyright-headers.py
-===========================
+optimize-pngs.py
+================
-Every year newly updated files need to have its copyright headers updated to reflect the current year.
-If you run this script from src/ it will automatically update the year on the copyright header for all
-.cpp and .h files if these have a git commit from the current year.
+A script to optimize png files in the bitcoin
+repository (requires pngcrush).
-For example a file changed in 2014 (with 2014 being the current year):
-```// Copyright (c) 2009-2013 The Bitcoin Core developers```
+security-check.py and test-security-check.py
+============================================
-would be changed to:
-```// Copyright (c) 2009-2014 The Bitcoin Core developers```
+Perform basic ELF security checks on a series of executables.
symbol-check.py
-==================
+===============
A script to check that the (Linux) executables produced by gitian only contain
-allowed gcc, glibc and libstdc++ version symbols. This makes sure they are
+allowed gcc, glibc and libstdc++ version symbols. This makes sure they are
still compatible with the minimum supported Linux distribution versions.
Example usage after a gitian build:
@@ -70,7 +168,7 @@ If there are 'unsupported' symbols, the return value will be 1 a list like this
.../64/test_bitcoin: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15
update-translations.py
-=======================
+======================
Run this script from the root of the repository to update all translations from transifex.
It will do the following automatically:
@@ -80,17 +178,3 @@ It will do the following automatically:
- add missing translations to the build system (TODO)
See doc/translation-process.md for more information.
-
-git-subtree-check.sh
-====================
-
-Run this script from the root of the repository to verify that a subtree matches the contents of
-the commit it claims to have been updated to.
-
-To use, make sure that you have fetched the upstream repository branch in which the subtree is
-maintained:
-* for src/secp256k1: https://github.com/bitcoin/secp256k1.git (branch master)
-* for sec/leveldb: https://github.com/bitcoin/leveldb.git (branch bitcoin-fork)
-
-Usage: git-subtree-check.sh DIR COMMIT
-COMMIT may be omitted, in which case HEAD is used.
diff --git a/contrib/devtools/check-doc.py b/contrib/devtools/check-doc.py
new file mode 100755
index 000000000..249214e93
--- /dev/null
+++ b/contrib/devtools/check-doc.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+# Copyright (c) 2015-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+'''
+This checks if all command line args are documented.
+Return value is 0 to indicate no error.
+
+Author: @MarcoFalke
+'''
+
+from subprocess import check_output
+import re
+
+FOLDER_GREP = 'src'
+FOLDER_TEST = 'src/test/'
+CMD_ROOT_DIR = '`git rev-parse --show-toplevel`/%s' % FOLDER_GREP
+CMD_GREP_ARGS = r"egrep -r -I '(map(Multi)?Args(\.count\(|\[)|Get(Bool)?Arg\()\"\-[^\"]+?\"' %s | grep -v '%s'" % (CMD_ROOT_DIR, FOLDER_TEST)
+CMD_GREP_DOCS = r"egrep -r -I 'HelpMessageOpt\(\"\-[^\"=]+?(=|\")' %s" % (CMD_ROOT_DIR)
+REGEX_ARG = re.compile(r'(?:map(?:Multi)?Args(?:\.count\(|\[)|Get(?:Bool)?Arg\()\"(\-[^\"]+?)\"')
+REGEX_DOC = re.compile(r'HelpMessageOpt\(\"(\-[^\"=]+?)(?:=|\")')
+# list unsupported, deprecated and duplicate args as they need no documentation
+SET_DOC_OPTIONAL = set(['-rpcssl', '-benchmark', '-h', '-help', '-socks', '-tor', '-debugnet', '-whitelistalwaysrelay', '-prematurewitness', '-walletprematurewitness', '-promiscuousmempoolflags', '-blockminsize'])
+
+def main():
+ used = check_output(CMD_GREP_ARGS, shell=True)
+ docd = check_output(CMD_GREP_DOCS, shell=True)
+
+ args_used = set(re.findall(REGEX_ARG,used))
+ args_docd = set(re.findall(REGEX_DOC,docd)).union(SET_DOC_OPTIONAL)
+ args_need_doc = args_used.difference(args_docd)
+ args_unknown = args_docd.difference(args_used)
+
+ print "Args used : %s" % len(args_used)
+ print "Args documented : %s" % len(args_docd)
+ print "Args undocumented: %s" % len(args_need_doc)
+ print args_need_doc
+ print "Args unknown : %s" % len(args_unknown)
+ print args_unknown
+
+ exit(len(args_need_doc))
+
+if __name__ == "__main__":
+ main()
diff --git a/contrib/devtools/clang-format-diff.py b/contrib/devtools/clang-format-diff.py
new file mode 100755
index 000000000..7ea49b65e
--- /dev/null
+++ b/contrib/devtools/clang-format-diff.py
@@ -0,0 +1,164 @@
+#!/usr/bin/env python
+#
+#===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License.
+#
+# ============================================================
+#
+# University of Illinois/NCSA
+# Open Source License
+#
+# Copyright (c) 2007-2015 University of Illinois at Urbana-Champaign.
+# All rights reserved.
+#
+# Developed by:
+#
+# LLVM Team
+#
+# University of Illinois at Urbana-Champaign
+#
+# http://llvm.org
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy of
+# this software and associated documentation files (the "Software"), to deal with
+# the Software without restriction, including without limitation the rights to
+# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+# of the Software, and to permit persons to whom the Software is furnished to do
+# so, subject to the following conditions:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimers.
+#
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimers in the
+# documentation and/or other materials provided with the distribution.
+#
+# * Neither the names of the LLVM Team, University of Illinois at
+# Urbana-Champaign, nor the names of its contributors may be used to
+# endorse or promote products derived from this Software without specific
+# prior written permission.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+# SOFTWARE.
+#
+# ============================================================
+#
+#===------------------------------------------------------------------------===#
+
+r"""
+ClangFormat Diff Reformatter
+============================
+
+This script reads input from a unified diff and reformats all the changed
+lines. This is useful to reformat all the lines touched by a specific patch.
+Example usage for git/svn users:
+
+ git diff -U0 HEAD^ | clang-format-diff.py -p1 -i
+ svn diff --diff-cmd=diff -x-U0 | clang-format-diff.py -i
+
+"""
+
+import argparse
+import difflib
+import re
+import string
+import subprocess
+import StringIO
+import sys
+
+
+# Change this to the full path if clang-format is not on the path.
+binary = 'clang-format'
+
+
+def main():
+ parser = argparse.ArgumentParser(description=
+ 'Reformat changed lines in diff. Without -i '
+ 'option just output the diff that would be '
+ 'introduced.')
+ parser.add_argument('-i', action='store_true', default=False,
+ help='apply edits to files instead of displaying a diff')
+ parser.add_argument('-p', metavar='NUM', default=0,
+ help='strip the smallest prefix containing P slashes')
+ parser.add_argument('-regex', metavar='PATTERN', default=None,
+ help='custom pattern selecting file paths to reformat '
+ '(case sensitive, overrides -iregex)')
+ parser.add_argument('-iregex', metavar='PATTERN', default=
+ r'.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hpp|m|mm|inc|js|ts|proto'
+ r'|protodevel|java)',
+ help='custom pattern selecting file paths to reformat '
+ '(case insensitive, overridden by -regex)')
+ parser.add_argument('-sort-includes', action='store_true', default=False,
+ help='let clang-format sort include blocks')
+ parser.add_argument('-v', '--verbose', action='store_true',
+ help='be more verbose, ineffective without -i')
+ args = parser.parse_args()
+
+ # Extract changed lines for each file.
+ filename = None
+ lines_by_file = {}
+ for line in sys.stdin:
+ match = re.search('^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
+ if match:
+ filename = match.group(2)
+ if filename == None:
+ continue
+
+ if args.regex is not None:
+ if not re.match('^%s$' % args.regex, filename):
+ continue
+ else:
+ if not re.match('^%s$' % args.iregex, filename, re.IGNORECASE):
+ continue
+
+ match = re.search('^@@.*\+(\d+)(,(\d+))?', line)
+ if match:
+ start_line = int(match.group(1))
+ line_count = 1
+ if match.group(3):
+ line_count = int(match.group(3))
+ if line_count == 0:
+ continue
+ end_line = start_line + line_count - 1
+ lines_by_file.setdefault(filename, []).extend(
+ ['-lines', str(start_line) + ':' + str(end_line)])
+
+ # Reformat files containing changes in place.
+ for filename, lines in lines_by_file.iteritems():
+ if args.i and args.verbose:
+ print 'Formatting', filename
+ command = [binary, filename]
+ if args.i:
+ command.append('-i')
+ if args.sort_includes:
+ command.append('-sort-includes')
+ command.extend(lines)
+ command.extend(['-style=file', '-fallback-style=none'])
+ p = subprocess.Popen(command, stdout=subprocess.PIPE,
+ stderr=None, stdin=subprocess.PIPE)
+ stdout, stderr = p.communicate()
+ if p.returncode != 0:
+ sys.exit(p.returncode)
+
+ if not args.i:
+ with open(filename) as f:
+ code = f.readlines()
+ formatted_code = StringIO.StringIO(stdout).readlines()
+ diff = difflib.unified_diff(code, formatted_code,
+ filename, filename,
+ '(before formatting)', '(after formatting)')
+ diff_string = string.join(diff, '')
+ if len(diff_string) > 0:
+ sys.stdout.write(diff_string)
+
+if __name__ == '__main__':
+ main()
diff --git a/contrib/devtools/copyright_header.py b/contrib/devtools/copyright_header.py
new file mode 100755
index 000000000..9f35c378b
--- /dev/null
+++ b/contrib/devtools/copyright_header.py
@@ -0,0 +1,610 @@
+#!/usr/bin/env python3
+# Copyright (c) 2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+import re
+import fnmatch
+import sys
+import subprocess
+import datetime
+import os
+
+################################################################################
+# file filtering
+################################################################################
+
+EXCLUDE = [
+ # libsecp256k1:
+ 'src/secp256k1/include/secp256k1.h',
+ 'src/secp256k1/include/secp256k1_ecdh.h',
+ 'src/secp256k1/include/secp256k1_recovery.h',
+ 'src/secp256k1/include/secp256k1_schnorr.h',
+ 'src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c',
+ 'src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h',
+ 'src/secp256k1/src/java/org_bitcoin_Secp256k1Context.c',
+ 'src/secp256k1/src/java/org_bitcoin_Secp256k1Context.h',
+ # auto generated:
+ 'src/univalue/lib/univalue_escapes.h',
+ 'src/qt/bitcoinstrings.cpp',
+ 'src/chainparamsseeds.h',
+ # other external copyrights:
+ 'src/tinyformat.h',
+ 'src/leveldb/util/env_win.cc',
+ 'src/crypto/ctaes/bench.c',
+ 'qa/rpc-tests/test_framework/bignum.py',
+ # python init:
+ '*__init__.py',
+]
+EXCLUDE_COMPILED = re.compile('|'.join([fnmatch.translate(m) for m in EXCLUDE]))
+
+INCLUDE = ['*.h', '*.cpp', '*.cc', '*.c', '*.py']
+INCLUDE_COMPILED = re.compile('|'.join([fnmatch.translate(m) for m in INCLUDE]))
+
+def applies_to_file(filename):
+ return ((EXCLUDE_COMPILED.match(filename) is None) and
+ (INCLUDE_COMPILED.match(filename) is not None))
+
+################################################################################
+# obtain list of files in repo according to INCLUDE and EXCLUDE
+################################################################################
+
+GIT_LS_CMD = 'git ls-files'
+
+def call_git_ls():
+ out = subprocess.check_output(GIT_LS_CMD.split(' '))
+ return [f for f in out.decode("utf-8").split('\n') if f != '']
+
+def get_filenames_to_examine():
+ filenames = call_git_ls()
+ return sorted([filename for filename in filenames if
+ applies_to_file(filename)])
+
+################################################################################
+# define and compile regexes for the patterns we are looking for
+################################################################################
+
+
+COPYRIGHT_WITH_C = 'Copyright \(c\)'
+COPYRIGHT_WITHOUT_C = 'Copyright'
+ANY_COPYRIGHT_STYLE = '(%s|%s)' % (COPYRIGHT_WITH_C, COPYRIGHT_WITHOUT_C)
+
+YEAR = "20[0-9][0-9]"
+YEAR_RANGE = '(%s)(-%s)?' % (YEAR, YEAR)
+YEAR_LIST = '(%s)(, %s)+' % (YEAR, YEAR)
+ANY_YEAR_STYLE = '(%s|%s)' % (YEAR_RANGE, YEAR_LIST)
+ANY_COPYRIGHT_STYLE_OR_YEAR_STYLE = ("%s %s" % (ANY_COPYRIGHT_STYLE,
+ ANY_YEAR_STYLE))
+
+ANY_COPYRIGHT_COMPILED = re.compile(ANY_COPYRIGHT_STYLE_OR_YEAR_STYLE)
+
+def compile_copyright_regex(copyright_style, year_style, name):
+ return re.compile('%s %s %s' % (copyright_style, year_style, name))
+
+EXPECTED_HOLDER_NAMES = [
+ "Satoshi Nakamoto\n",
+ "The Bitcoin Core developers\n",
+ "The Bitcoin Core developers \n",
+ "Bitcoin Core Developers\n",
+ "the Bitcoin Core developers\n",
+ "The Bitcoin developers\n",
+ "The LevelDB Authors\. All rights reserved\.\n",
+ "BitPay Inc\.\n",
+ "BitPay, Inc\.\n",
+ "University of Illinois at Urbana-Champaign\.\n",
+ "MarcoFalke\n",
+ "Pieter Wuille\n",
+ "Pieter Wuille +\*\n",
+ "Pieter Wuille, Gregory Maxwell +\*\n",
+ "Pieter Wuille, Andrew Poelstra +\*\n",
+ "Andrew Poelstra +\*\n",
+ "Wladimir J. van der Laan\n",
+ "Jeff Garzik\n",
+ "Diederik Huys, Pieter Wuille +\*\n",
+ "Thomas Daede, Cory Fields +\*\n",
+ "Jan-Klaas Kollhof\n",
+ "Sam Rushing\n",
+ "ArtForz -- public domain half-a-node\n",
+]
+
+DOMINANT_STYLE_COMPILED = {}
+YEAR_LIST_STYLE_COMPILED = {}
+WITHOUT_C_STYLE_COMPILED = {}
+
+for holder_name in EXPECTED_HOLDER_NAMES:
+ DOMINANT_STYLE_COMPILED[holder_name] = (
+ compile_copyright_regex(COPYRIGHT_WITH_C, YEAR_RANGE, holder_name))
+ YEAR_LIST_STYLE_COMPILED[holder_name] = (
+ compile_copyright_regex(COPYRIGHT_WITH_C, YEAR_LIST, holder_name))
+ WITHOUT_C_STYLE_COMPILED[holder_name] = (
+ compile_copyright_regex(COPYRIGHT_WITHOUT_C, ANY_YEAR_STYLE,
+ holder_name))
+
+################################################################################
+# search file contents for copyright message of particular category
+################################################################################
+
+def get_count_of_copyrights_of_any_style_any_holder(contents):
+ return len(ANY_COPYRIGHT_COMPILED.findall(contents))
+
+def file_has_dominant_style_copyright_for_holder(contents, holder_name):
+ match = DOMINANT_STYLE_COMPILED[holder_name].search(contents)
+ return match is not None
+
+def file_has_year_list_style_copyright_for_holder(contents, holder_name):
+ match = YEAR_LIST_STYLE_COMPILED[holder_name].search(contents)
+ return match is not None
+
+def file_has_without_c_style_copyright_for_holder(contents, holder_name):
+ match = WITHOUT_C_STYLE_COMPILED[holder_name].search(contents)
+ return match is not None
+
+################################################################################
+# get file info
+################################################################################
+
+def read_file(filename):
+ return open(os.path.abspath(filename), 'r').read()
+
+def gather_file_info(filename):
+ info = {}
+ info['filename'] = filename
+ c = read_file(filename)
+ info['contents'] = c
+
+ info['all_copyrights'] = get_count_of_copyrights_of_any_style_any_holder(c)
+
+ info['classified_copyrights'] = 0
+ info['dominant_style'] = {}
+ info['year_list_style'] = {}
+ info['without_c_style'] = {}
+ for holder_name in EXPECTED_HOLDER_NAMES:
+ has_dominant_style = (
+ file_has_dominant_style_copyright_for_holder(c, holder_name))
+ has_year_list_style = (
+ file_has_year_list_style_copyright_for_holder(c, holder_name))
+ has_without_c_style = (
+ file_has_without_c_style_copyright_for_holder(c, holder_name))
+ info['dominant_style'][holder_name] = has_dominant_style
+ info['year_list_style'][holder_name] = has_year_list_style
+ info['without_c_style'][holder_name] = has_without_c_style
+ if has_dominant_style or has_year_list_style or has_without_c_style:
+ info['classified_copyrights'] = info['classified_copyrights'] + 1
+ return info
+
+################################################################################
+# report execution
+################################################################################
+
+SEPARATOR = '-'.join(['' for _ in range(80)])
+
+def print_filenames(filenames, verbose):
+ if not verbose:
+ return
+ for filename in filenames:
+ print("\t%s" % filename)
+
+def print_report(file_infos, verbose):
+ print(SEPARATOR)
+ examined = [i['filename'] for i in file_infos]
+ print("%d files examined according to INCLUDE and EXCLUDE fnmatch rules" %
+ len(examined))
+ print_filenames(examined, verbose)
+
+ print(SEPARATOR)
+ print('')
+ zero_copyrights = [i['filename'] for i in file_infos if
+ i['all_copyrights'] == 0]
+ print("%4d with zero copyrights" % len(zero_copyrights))
+ print_filenames(zero_copyrights, verbose)
+ one_copyright = [i['filename'] for i in file_infos if
+ i['all_copyrights'] == 1]
+ print("%4d with one copyright" % len(one_copyright))
+ print_filenames(one_copyright, verbose)
+ two_copyrights = [i['filename'] for i in file_infos if
+ i['all_copyrights'] == 2]
+ print("%4d with two copyrights" % len(two_copyrights))
+ print_filenames(two_copyrights, verbose)
+ three_copyrights = [i['filename'] for i in file_infos if
+ i['all_copyrights'] == 3]
+ print("%4d with three copyrights" % len(three_copyrights))
+ print_filenames(three_copyrights, verbose)
+ four_or_more_copyrights = [i['filename'] for i in file_infos if
+ i['all_copyrights'] >= 4]
+ print("%4d with four or more copyrights" % len(four_or_more_copyrights))
+ print_filenames(four_or_more_copyrights, verbose)
+ print('')
+ print(SEPARATOR)
+ print('Copyrights with dominant style:\ne.g. "Copyright (c)" and '
+ '"<year>" or "<startYear>-<endYear>":\n')
+ for holder_name in EXPECTED_HOLDER_NAMES:
+ dominant_style = [i['filename'] for i in file_infos if
+ i['dominant_style'][holder_name]]
+ if len(dominant_style) > 0:
+ print("%4d with '%s'" % (len(dominant_style),
+ holder_name.replace('\n', '\\n')))
+ print_filenames(dominant_style, verbose)
+ print('')
+ print(SEPARATOR)
+ print('Copyrights with year list style:\ne.g. "Copyright (c)" and '
+ '"<year1>, <year2>, ...":\n')
+ for holder_name in EXPECTED_HOLDER_NAMES:
+ year_list_style = [i['filename'] for i in file_infos if
+ i['year_list_style'][holder_name]]
+ if len(year_list_style) > 0:
+ print("%4d with '%s'" % (len(year_list_style),
+ holder_name.replace('\n', '\\n')))
+ print_filenames(year_list_style, verbose)
+ print('')
+ print(SEPARATOR)
+ print('Copyrights with no "(c)" style:\ne.g. "Copyright" and "<year>" or '
+ '"<startYear>-<endYear>":\n')
+ for holder_name in EXPECTED_HOLDER_NAMES:
+ without_c_style = [i['filename'] for i in file_infos if
+ i['without_c_style'][holder_name]]
+ if len(without_c_style) > 0:
+ print("%4d with '%s'" % (len(without_c_style),
+ holder_name.replace('\n', '\\n')))
+ print_filenames(without_c_style, verbose)
+
+ print('')
+ print(SEPARATOR)
+
+ unclassified_copyrights = [i['filename'] for i in file_infos if
+ i['classified_copyrights'] < i['all_copyrights']]
+ print("%d with unexpected copyright holder names" %
+ len(unclassified_copyrights))
+ print_filenames(unclassified_copyrights, verbose)
+ print(SEPARATOR)
+
+def exec_report(base_directory, verbose):
+ original_cwd = os.getcwd()
+ os.chdir(base_directory)
+ filenames = get_filenames_to_examine()
+ file_infos = [gather_file_info(f) for f in filenames]
+ print_report(file_infos, verbose)
+ os.chdir(original_cwd)
+
+################################################################################
+# report cmd
+################################################################################
+
+REPORT_USAGE = """
+Produces a report of all copyright header notices found inside the source files
+of a repository.
+
+Usage:
+ $ ./copyright_header.py report <base_directory> [verbose]
+
+Arguments:
+ <base_directory> - The base directory of a bitcoin source code repository.
+ [verbose] - Includes a list of every file of each subcategory in the report.
+"""
+
+def report_cmd(argv):
+ if len(argv) == 2:
+ sys.exit(REPORT_USAGE)
+
+ base_directory = argv[2]
+ if not os.path.exists(base_directory):
+ sys.exit("*** bad <base_directory>: %s" % base_directory)
+
+ if len(argv) == 3:
+ verbose = False
+ elif argv[3] == 'verbose':
+ verbose = True
+ else:
+ sys.exit("*** unknown argument: %s" % argv[2])
+
+ exec_report(base_directory, verbose)
+
+################################################################################
+# query git for year of last change
+################################################################################
+
+GIT_LOG_CMD = "git log --pretty=format:%%ai %s"
+
+def call_git_log(filename):
+ out = subprocess.check_output((GIT_LOG_CMD % filename).split(' '))
+ return out.decode("utf-8").split('\n')
+
+def get_git_change_years(filename):
+ git_log_lines = call_git_log(filename)
+ if len(git_log_lines) == 0:
+ return [datetime.date.today().year]
+ # timestamp is in ISO 8601 format. e.g. "2016-09-05 14:25:32 -0600"
+ return [line.split(' ')[0].split('-')[0] for line in git_log_lines]
+
+def get_most_recent_git_change_year(filename):
+ return max(get_git_change_years(filename))
+
+################################################################################
+# read and write to file
+################################################################################
+
+def read_file_lines(filename):
+ f = open(os.path.abspath(filename), 'r')
+ file_lines = f.readlines()
+ f.close()
+ return file_lines
+
+def write_file_lines(filename, file_lines):
+ f = open(os.path.abspath(filename), 'w')
+ f.write(''.join(file_lines))
+ f.close()
+
+################################################################################
+# update header years execution
+################################################################################
+
+COPYRIGHT = 'Copyright \(c\)'
+YEAR = "20[0-9][0-9]"
+YEAR_RANGE = '(%s)(-%s)?' % (YEAR, YEAR)
+HOLDER = 'The Bitcoin Core developers'
+UPDATEABLE_LINE_COMPILED = re.compile(' '.join([COPYRIGHT, YEAR_RANGE, HOLDER]))
+
+def get_updatable_copyright_line(file_lines):
+ index = 0
+ for line in file_lines:
+ if UPDATEABLE_LINE_COMPILED.search(line) is not None:
+ return index, line
+ index = index + 1
+ return None, None
+
+def parse_year_range(year_range):
+ year_split = year_range.split('-')
+ start_year = year_split[0]
+ if len(year_split) == 1:
+ return start_year, start_year
+ return start_year, year_split[1]
+
+def year_range_to_str(start_year, end_year):
+ if start_year == end_year:
+ return start_year
+ return "%s-%s" % (start_year, end_year)
+
+def create_updated_copyright_line(line, last_git_change_year):
+ copyright_splitter = 'Copyright (c) '
+ copyright_split = line.split(copyright_splitter)
+ # Preserve characters on line that are ahead of the start of the copyright
+ # notice - they are part of the comment block and vary from file-to-file.
+ before_copyright = copyright_split[0]
+ after_copyright = copyright_split[1]
+
+ space_split = after_copyright.split(' ')
+ year_range = space_split[0]
+ start_year, end_year = parse_year_range(year_range)
+ if end_year == last_git_change_year:
+ return line
+ return (before_copyright + copyright_splitter +
+ year_range_to_str(start_year, last_git_change_year) + ' ' +
+ ' '.join(space_split[1:]))
+
+def update_updatable_copyright(filename):
+ file_lines = read_file_lines(filename)
+ index, line = get_updatable_copyright_line(file_lines)
+ if not line:
+ print_file_action_message(filename, "No updatable copyright.")
+ return
+ last_git_change_year = get_most_recent_git_change_year(filename)
+ new_line = create_updated_copyright_line(line, last_git_change_year)
+ if line == new_line:
+ print_file_action_message(filename, "Copyright up-to-date.")
+ return
+ file_lines[index] = new_line
+ write_file_lines(filename, file_lines)
+ print_file_action_message(filename,
+ "Copyright updated! -> %s" % last_git_change_year)
+
+def exec_update_header_year(base_directory):
+ original_cwd = os.getcwd()
+ os.chdir(base_directory)
+ for filename in get_filenames_to_examine():
+ update_updatable_copyright(filename)
+ os.chdir(original_cwd)
+
+################################################################################
+# update cmd
+################################################################################
+
+UPDATE_USAGE = """
+Updates all the copyright headers of "The Bitcoin Core developers" which were
+changed in a year more recent than is listed. For example:
+
+// Copyright (c) <firstYear>-<lastYear> The Bitcoin Core developers
+
+will be updated to:
+
+// Copyright (c) <firstYear>-<lastModifiedYear> The Bitcoin Core developers
+
+where <lastModifiedYear> is obtained from the 'git log' history.
+
+This subcommand also handles copyright headers that have only a single year. In those cases:
+
+// Copyright (c) <year> The Bitcoin Core developers
+
+will be updated to:
+
+// Copyright (c) <year>-<lastModifiedYear> The Bitcoin Core developers
+
+where the update is appropriate.
+
+Usage:
+ $ ./copyright_header.py update <base_directory>
+
+Arguments:
+ <base_directory> - The base directory of a bitcoin source code repository.
+"""
+
+def print_file_action_message(filename, action):
+ print("%-52s %s" % (filename, action))
+
+def update_cmd(argv):
+ if len(argv) != 3:
+ sys.exit(UPDATE_USAGE)
+
+ base_directory = argv[2]
+ if not os.path.exists(base_directory):
+ sys.exit("*** bad base_directory: %s" % base_directory)
+ exec_update_header_year(base_directory)
+
+################################################################################
+# inserted copyright header format
+################################################################################
+
+def get_header_lines(header, start_year, end_year):
+ lines = header.split('\n')[1:-1]
+ lines[0] = lines[0] % year_range_to_str(start_year, end_year)
+ return [line + '\n' for line in lines]
+
+CPP_HEADER = '''
+// Copyright (c) %s The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+'''
+
+def get_cpp_header_lines_to_insert(start_year, end_year):
+ return reversed(get_header_lines(CPP_HEADER, start_year, end_year))
+
+PYTHON_HEADER = '''
+# Copyright (c) %s The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+'''
+
+def get_python_header_lines_to_insert(start_year, end_year):
+ return reversed(get_header_lines(PYTHON_HEADER, start_year, end_year))
+
+################################################################################
+# query git for year of last change
+################################################################################
+
+def get_git_change_year_range(filename):
+ years = get_git_change_years(filename)
+ return min(years), max(years)
+
+################################################################################
+# check for existing core copyright
+################################################################################
+
+def file_already_has_core_copyright(file_lines):
+ index, _ = get_updatable_copyright_line(file_lines)
+ return index != None
+
+################################################################################
+# insert header execution
+################################################################################
+
+def file_has_hashbang(file_lines):
+ if len(file_lines) < 1:
+ return False
+ if len(file_lines[0]) <= 2:
+ return False
+ return file_lines[0][:2] == '#!'
+
+def insert_python_header(filename, file_lines, start_year, end_year):
+ if file_has_hashbang(file_lines):
+ insert_idx = 1
+ else:
+ insert_idx = 0
+ header_lines = get_python_header_lines_to_insert(start_year, end_year)
+ for line in header_lines:
+ file_lines.insert(insert_idx, line)
+ write_file_lines(filename, file_lines)
+
+def insert_cpp_header(filename, file_lines, start_year, end_year):
+ header_lines = get_cpp_header_lines_to_insert(start_year, end_year)
+ for line in header_lines:
+ file_lines.insert(0, line)
+ write_file_lines(filename, file_lines)
+
+def exec_insert_header(filename, style):
+ file_lines = read_file_lines(filename)
+ if file_already_has_core_copyright(file_lines):
+ sys.exit('*** %s already has a copyright by The Bitcoin Core developers'
+ % (filename))
+ start_year, end_year = get_git_change_year_range(filename)
+ if style == 'python':
+ insert_python_header(filename, file_lines, start_year, end_year)
+ else:
+ insert_cpp_header(filename, file_lines, start_year, end_year)
+
+################################################################################
+# insert cmd
+################################################################################
+
+INSERT_USAGE = """
+Inserts a copyright header for "The Bitcoin Core developers" at the top of the
+file in either Python or C++ style as determined by the file extension. If the
+file is a Python file and it has a '#!' starting the first line, the header is
+inserted in the line below it.
+
+The copyright dates will be set to be:
+
+"<year_introduced>-<current_year>"
+
+where <year_introduced> is according to the 'git log' history. If
+<year_introduced> is equal to <current_year>, the date will be set to be:
+
+"<current_year>"
+
+If the file already has a copyright for "The Bitcoin Core developers", the
+script will exit.
+
+Usage:
+ $ ./copyright_header.py insert <file>
+
+Arguments:
+ <file> - A source file in the bitcoin repository.
+"""
+
+def insert_cmd(argv):
+ if len(argv) != 3:
+ sys.exit(INSERT_USAGE)
+
+ filename = argv[2]
+ if not os.path.isfile(filename):
+ sys.exit("*** bad filename: %s" % filename)
+ _, extension = os.path.splitext(filename)
+ if extension not in ['.h', '.cpp', '.cc', '.c', '.py']:
+ sys.exit("*** cannot insert for file extension %s" % extension)
+
+ if extension == '.py':
+ style = 'python'
+ else:
+ style = 'cpp'
+ exec_insert_header(filename, style)
+
+################################################################################
+# UI
+################################################################################
+
+USAGE = """
+copyright_header.py - utilities for managing copyright headers of 'The Bitcoin
+Core developers' in repository source files.
+
+Usage:
+ $ ./copyright_header <subcommand>
+
+Subcommands:
+ report
+ update
+ insert
+
+To see subcommand usage, run them without arguments.
+"""
+
+SUBCOMMANDS = ['report', 'update', 'insert']
+
+if __name__ == "__main__":
+ if len(sys.argv) == 1:
+ sys.exit(USAGE)
+ subcommand = sys.argv[1]
+ if subcommand not in SUBCOMMANDS:
+ sys.exit(USAGE)
+ if subcommand == 'report':
+ report_cmd(sys.argv)
+ elif subcommand == 'update':
+ update_cmd(sys.argv)
+ elif subcommand == 'insert':
+ insert_cmd(sys.argv)
diff --git a/contrib/devtools/fix-copyright-headers.py b/contrib/devtools/fix-copyright-headers.py
deleted file mode 100755
index 5e8495254..000000000
--- a/contrib/devtools/fix-copyright-headers.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env python
-'''
-Run this script inside of src/ and it will look for all the files
-that were changed this year that still have the last year in the
-copyright headers, and it will fix the headers on that file using
-a perl regex one liner.
-
-For example: if it finds something like this and we're in 2014
-
-// Copyright (c) 2009-2013 The Bitcoin Core developers
-
-it will change it to
-
-// Copyright (c) 2009-2014 The Bitcoin Core developers
-
-It will do this for all the files in the folder and its children.
-
-Author: @gubatron
-'''
-import os
-import time
-
-year = time.gmtime()[0]
-last_year = year - 1
-command = "perl -pi -e 's/%s The Bitcoin/%s The Bitcoin/' %s"
-listFilesCommand = "find . | grep %s"
-
-extensions = [".cpp",".h"]
-
-def getLastGitModifiedDate(filePath):
- gitGetLastCommitDateCommand = "git log " + filePath +" | grep Date | head -n 1"
- p = os.popen(gitGetLastCommitDateCommand)
- result = ""
- for l in p:
- result = l
- break
- result = result.replace("\n","")
- return result
-
-n=1
-for extension in extensions:
- foundFiles = os.popen(listFilesCommand % extension)
- for filePath in foundFiles:
- filePath = filePath[1:-1]
- if filePath.endswith(extension):
- filePath = os.getcwd() + filePath
- modifiedTime = getLastGitModifiedDate(filePath)
- if len(modifiedTime) > 0 and str(year) in modifiedTime:
- print n,"Last Git Modified: ", modifiedTime, " - ", filePath
- os.popen(command % (last_year,year,filePath))
- n = n + 1
-
-
diff --git a/contrib/devtools/gen-manpages.sh b/contrib/devtools/gen-manpages.sh
new file mode 100755
index 000000000..e8838db52
--- /dev/null
+++ b/contrib/devtools/gen-manpages.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
+SRCDIR=${SRCDIR:-$TOPDIR/src}
+MANDIR=${MANDIR:-$TOPDIR/doc/man}
+
+BITCOIND=${BITCOIND:-$SRCDIR/dogecoind}
+BITCOINCLI=${BITCOINCLI:-$SRCDIR/dogecoin-cli}
+BITCOINTX=${BITCOINTX:-$SRCDIR/dogecoin-tx}
+BITCOINQT=${BITCOINQT:-$SRCDIR/qt/dogecoin-qt}
+
+[ ! -x $BITCOIND ] && echo "$BITCOIND not found or not executable." && exit 1
+
+# The autodetected version git tag can screw up manpage output a little bit
+BTCVER=($($BITCOINCLI --version | head -n1 | awk -F'[ -]' '{ print $6, $7 }'))
+
+# Create a footer file with copyright content.
+# This gets autodetected fine for dogecoind if --version-string is not set,
+# but has different outcomes for dogecoin-qt and dogecoin-cli.
+echo "[COPYRIGHT]" > footer.h2m
+$BITCOIND --version | sed -n '1!p' >> footer.h2m
+
+for cmd in $BITCOIND $BITCOINCLI $BITCOINTX $BITCOINQT; do
+ cmdname="${cmd##*/}"
+ help2man -N --version-string=${BTCVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd}
+ sed -i "s/\\\-${BTCVER[1]}//g" ${MANDIR}/${cmdname}.1
+done
+
+rm -f footer.h2m
diff --git a/contrib/devtools/git-subtree-check.sh b/contrib/devtools/git-subtree-check.sh
index 1cb82fe68..2384d66ca 100755
--- a/contrib/devtools/git-subtree-check.sh
+++ b/contrib/devtools/git-subtree-check.sh
@@ -1,4 +1,7 @@
#!/bin/sh
+# Copyright (c) 2015 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
DIR="$1"
COMMIT="$2"
diff --git a/contrib/devtools/github-merge.py b/contrib/devtools/github-merge.py
new file mode 100755
index 000000000..0cee0921b
--- /dev/null
+++ b/contrib/devtools/github-merge.py
@@ -0,0 +1,251 @@
+#!/usr/bin/env python3
+# Copyright (c) 2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+# This script will locally construct a merge commit for a pull request on a
+# github repository, inspect it, sign it and optionally push it.
+
+# The following temporary branches are created/overwritten and deleted:
+# * pull/$PULL/base (the current master we're merging onto)
+# * pull/$PULL/head (the current state of the remote pull request)
+# * pull/$PULL/merge (github's merge)
+# * pull/$PULL/local-merge (our merge)
+
+# In case of a clean merge that is accepted by the user, the local branch with
+# name $BRANCH is overwritten with the merged result, and optionally pushed.
+from __future__ import division,print_function,unicode_literals
+import os
+from sys import stdin,stdout,stderr
+import argparse
+import subprocess
+import json,codecs
+try:
+ from urllib.request import Request,urlopen
+except:
+ from urllib2 import Request,urlopen
+
+# External tools (can be overridden using environment)
+GIT = os.getenv('GIT','git')
+BASH = os.getenv('BASH','bash')
+
+# OS specific configuration for terminal attributes
+ATTR_RESET = ''
+ATTR_PR = ''
+COMMIT_FORMAT = '%h %s (%an)%d'
+if os.name == 'posix': # if posix, assume we can use basic terminal escapes
+ ATTR_RESET = '\033[0m'
+ ATTR_PR = '\033[1;36m'
+ COMMIT_FORMAT = '%C(bold blue)%h%Creset %s %C(cyan)(%an)%Creset%C(green)%d%Creset'
+
+def git_config_get(option, default=None):
+ '''
+ Get named configuration option from git repository.
+ '''
+ try:
+ return subprocess.check_output([GIT,'config','--get',option]).rstrip().decode('utf-8')
+ except subprocess.CalledProcessError as e:
+ return default
+
+def retrieve_pr_info(repo,pull):
+ '''
+ Retrieve pull request information from github.
+ Return None if no title can be found, or an error happens.
+ '''
+ try:
+ req = Request("https://api.github.com/repos/"+repo+"/pulls/"+pull)
+ result = urlopen(req)
+ reader = codecs.getreader('utf-8')
+ obj = json.load(reader(result))
+ return obj
+ except Exception as e:
+ print('Warning: unable to retrieve pull information from github: %s' % e)
+ return None
+
+def ask_prompt(text):
+ print(text,end=" ",file=stderr)
+ stderr.flush()
+ reply = stdin.readline().rstrip()
+ print("",file=stderr)
+ return reply
+
+def parse_arguments():
+ epilog = '''
+ In addition, you can set the following git configuration variables:
+ githubmerge.repository (mandatory),
+ user.signingkey (mandatory),
+ githubmerge.host (default: [email protected]),
+ githubmerge.branch (no default),
+ githubmerge.testcmd (default: none).
+ '''
+ parser = argparse.ArgumentParser(description='Utility to merge, sign and push github pull requests',
+ epilog=epilog)
+ parser.add_argument('pull', metavar='PULL', type=int, nargs=1,
+ help='Pull request ID to merge')
+ parser.add_argument('branch', metavar='BRANCH', type=str, nargs='?',
+ default=None, help='Branch to merge against (default: githubmerge.branch setting, or base branch for pull, or \'master\')')
+ return parser.parse_args()
+
+def main():
+ # Extract settings from git repo
+ repo = git_config_get('githubmerge.repository')
+ host = git_config_get('githubmerge.host','[email protected]')
+ opt_branch = git_config_get('githubmerge.branch',None)
+ testcmd = git_config_get('githubmerge.testcmd')
+ signingkey = git_config_get('user.signingkey')
+ if repo is None:
+ print("ERROR: No repository configured. Use this command to set:", file=stderr)
+ print("git config githubmerge.repository <owner>/<repo>", file=stderr)
+ exit(1)
+ if signingkey is None:
+ print("ERROR: No GPG signing key set. Set one using:",file=stderr)
+ print("git config --global user.signingkey <key>",file=stderr)
+ exit(1)
+
+ host_repo = host+":"+repo # shortcut for push/pull target
+
+ # Extract settings from command line
+ args = parse_arguments()
+ pull = str(args.pull[0])
+
+ # Receive pull information from github
+ info = retrieve_pr_info(repo,pull)
+ if info is None:
+ exit(1)
+ title = info['title']
+ # precedence order for destination branch argument:
+ # - command line argument
+ # - githubmerge.branch setting
+ # - base branch for pull (as retrieved from github)
+ # - 'master'
+ branch = args.branch or opt_branch or info['base']['ref'] or 'master'
+
+ # Initialize source branches
+ head_branch = 'pull/'+pull+'/head'
+ base_branch = 'pull/'+pull+'/base'
+ merge_branch = 'pull/'+pull+'/merge'
+ local_merge_branch = 'pull/'+pull+'/local-merge'
+
+ devnull = open(os.devnull,'w')
+ try:
+ subprocess.check_call([GIT,'checkout','-q',branch])
+ except subprocess.CalledProcessError as e:
+ print("ERROR: Cannot check out branch %s." % (branch), file=stderr)
+ exit(3)
+ try:
+ subprocess.check_call([GIT,'fetch','-q',host_repo,'+refs/pull/'+pull+'/*:refs/heads/pull/'+pull+'/*'])
+ except subprocess.CalledProcessError as e:
+ print("ERROR: Cannot find pull request #%s on %s." % (pull,host_repo), file=stderr)
+ exit(3)
+ try:
+ subprocess.check_call([GIT,'log','-q','-1','refs/heads/'+head_branch], stdout=devnull, stderr=stdout)
+ except subprocess.CalledProcessError as e:
+ print("ERROR: Cannot find head of pull request #%s on %s." % (pull,host_repo), file=stderr)
+ exit(3)
+ try:
+ subprocess.check_call([GIT,'log','-q','-1','refs/heads/'+merge_branch], stdout=devnull, stderr=stdout)
+ except subprocess.CalledProcessError as e:
+ print("ERROR: Cannot find merge of pull request #%s on %s." % (pull,host_repo), file=stderr)
+ exit(3)
+ try:
+ subprocess.check_call([GIT,'fetch','-q',host_repo,'+refs/heads/'+branch+':refs/heads/'+base_branch])
+ except subprocess.CalledProcessError as e:
+ print("ERROR: Cannot find branch %s on %s." % (branch,host_repo), file=stderr)
+ exit(3)
+ subprocess.check_call([GIT,'checkout','-q',base_branch])
+ subprocess.call([GIT,'branch','-q','-D',local_merge_branch], stderr=devnull)
+ subprocess.check_call([GIT,'checkout','-q','-b',local_merge_branch])
+
+ try:
+ # Create unsigned merge commit.
+ if title:
+ firstline = 'Merge #%s: %s' % (pull,title)
+ else:
+ firstline = 'Merge #%s' % (pull,)
+ message = firstline + '\n\n'
+ message += subprocess.check_output([GIT,'log','--no-merges','--topo-order','--pretty=format:%h %s (%an)',base_branch+'..'+head_branch]).decode('utf-8')
+ try:
+ subprocess.check_call([GIT,'merge','-q','--commit','--no-edit','--no-ff','-m',message.encode('utf-8'),head_branch])
+ except subprocess.CalledProcessError as e:
+ print("ERROR: Cannot be merged cleanly.",file=stderr)
+ subprocess.check_call([GIT,'merge','--abort'])
+ exit(4)
+ logmsg = subprocess.check_output([GIT,'log','--pretty=format:%s','-n','1']).decode('utf-8')
+ if logmsg.rstrip() != firstline.rstrip():
+ print("ERROR: Creating merge failed (already merged?).",file=stderr)
+ exit(4)
+
+ print('%s#%s%s %s %sinto %s%s' % (ATTR_RESET+ATTR_PR,pull,ATTR_RESET,title,ATTR_RESET+ATTR_PR,branch,ATTR_RESET))
+ subprocess.check_call([GIT,'log','--graph','--topo-order','--pretty=format:'+COMMIT_FORMAT,base_branch+'..'+head_branch])
+ print()
+ # Run test command if configured.
+ if testcmd:
+ # Go up to the repository's root.
+ toplevel = subprocess.check_output([GIT,'rev-parse','--show-toplevel']).strip()
+ os.chdir(toplevel)
+ if subprocess.call(testcmd,shell=True):
+ print("ERROR: Running %s failed." % testcmd,file=stderr)
+ exit(5)
+
+ # Show the created merge.
+ diff = subprocess.check_output([GIT,'diff',merge_branch+'..'+local_merge_branch])
+ subprocess.check_call([GIT,'diff',base_branch+'..'+local_merge_branch])
+ if diff:
+ print("WARNING: merge differs from github!",file=stderr)
+ reply = ask_prompt("Type 'ignore' to continue.")
+ if reply.lower() == 'ignore':
+ print("Difference with github ignored.",file=stderr)
+ else:
+ exit(6)
+ reply = ask_prompt("Press 'd' to accept the diff.")
+ if reply.lower() == 'd':
+ print("Diff accepted.",file=stderr)
+ else:
+ print("ERROR: Diff rejected.",file=stderr)
+ exit(6)
+ else:
+ # Verify the result manually.
+ print("Dropping you on a shell so you can try building/testing the merged source.",file=stderr)
+ print("Run 'git diff HEAD~' to show the changes being merged.",file=stderr)
+ print("Type 'exit' when done.",file=stderr)
+ if os.path.isfile('/etc/debian_version'): # Show pull number on Debian default prompt
+ os.putenv('debian_chroot',pull)
+ subprocess.call([BASH,'-i'])
+ reply = ask_prompt("Type 'm' to accept the merge.")
+ if reply.lower() == 'm':
+ print("Merge accepted.",file=stderr)
+ else:
+ print("ERROR: Merge rejected.",file=stderr)
+ exit(7)
+
+ # Sign the merge commit.
+ reply = ask_prompt("Type 's' to sign off on the merge.")
+ if reply == 's':
+ try:
+ subprocess.check_call([GIT,'commit','-q','--gpg-sign','--amend','--no-edit'])
+ except subprocess.CalledProcessError as e:
+ print("Error signing, exiting.",file=stderr)
+ exit(1)
+ else:
+ print("Not signing off on merge, exiting.",file=stderr)
+ exit(1)
+
+ # Put the result in branch.
+ subprocess.check_call([GIT,'checkout','-q',branch])
+ subprocess.check_call([GIT,'reset','-q','--hard',local_merge_branch])
+ finally:
+ # Clean up temporary branches.
+ subprocess.call([GIT,'checkout','-q',branch])
+ subprocess.call([GIT,'branch','-q','-D',head_branch],stderr=devnull)
+ subprocess.call([GIT,'branch','-q','-D',base_branch],stderr=devnull)
+ subprocess.call([GIT,'branch','-q','-D',merge_branch],stderr=devnull)
+ subprocess.call([GIT,'branch','-q','-D',local_merge_branch],stderr=devnull)
+
+ # Push the result.
+ reply = ask_prompt("Type 'push' to push the result to %s, branch %s." % (host_repo,branch))
+ if reply.lower() == 'push':
+ subprocess.check_call([GIT,'push',host_repo,'refs/heads/'+branch])
+
+if __name__ == '__main__':
+ main()
+
diff --git a/contrib/devtools/github-merge.sh b/contrib/devtools/github-merge.sh
deleted file mode 100755
index ec7a1f4c4..000000000
--- a/contrib/devtools/github-merge.sh
+++ /dev/null
@@ -1,181 +0,0 @@
-#!/bin/bash
-
-# This script will locally construct a merge commit for a pull request on a
-# github repository, inspect it, sign it and optionally push it.
-
-# The following temporary branches are created/overwritten and deleted:
-# * pull/$PULL/base (the current master we're merging onto)
-# * pull/$PULL/head (the current state of the remote pull request)
-# * pull/$PULL/merge (github's merge)
-# * pull/$PULL/local-merge (our merge)
-
-# In case of a clean merge that is accepted by the user, the local branch with
-# name $BRANCH is overwritten with the merged result, and optionally pushed.
-
-REPO="$(git config --get githubmerge.repository)"
-if [[ "d$REPO" == "d" ]]; then
- echo "ERROR: No repository configured. Use this command to set:" >&2
- echo "git config githubmerge.repository <owner>/<repo>" >&2
- echo "In addition, you can set the following variables:" >&2
- echo "- githubmerge.host (default [email protected])" >&2
- echo "- githubmerge.branch (default master)" >&2
- echo "- githubmerge.testcmd (default none)" >&2
- exit 1
-fi
-
-HOST="$(git config --get githubmerge.host)"
-if [[ "d$HOST" == "d" ]]; then
-fi
-
-BRANCH="$(git config --get githubmerge.branch)"
-if [[ "d$BRANCH" == "d" ]]; then
- BRANCH="master"
-fi
-
-TESTCMD="$(git config --get githubmerge.testcmd)"
-
-PULL="$1"
-
-if [[ "d$PULL" == "d" ]]; then
- echo "Usage: $0 pullnumber [branch]" >&2
- exit 2
-fi
-
-if [[ "d$2" != "d" ]]; then
- BRANCH="$2"
-fi
-
-# Initialize source branches.
-git checkout -q "$BRANCH"
-if git fetch -q "$HOST":"$REPO" "+refs/pull/$PULL/*:refs/heads/pull/$PULL/*"; then
- if ! git log -q -1 "refs/heads/pull/$PULL/head" >/dev/null 2>&1; then
- echo "ERROR: Cannot find head of pull request #$PULL on $HOST:$REPO." >&2
- exit 3
- fi
- if ! git log -q -1 "refs/heads/pull/$PULL/merge" >/dev/null 2>&1; then
- echo "ERROR: Cannot find merge of pull request #$PULL on $HOST:$REPO." >&2
- exit 3
- fi
-else
- echo "ERROR: Cannot find pull request #$PULL on $HOST:$REPO." >&2
- exit 3
-fi
-if git fetch -q "$HOST":"$REPO" +refs/heads/"$BRANCH":refs/heads/pull/"$PULL"/base; then
- true
-else
- echo "ERROR: Cannot find branch $BRANCH on $HOST:$REPO." >&2
- exit 3
-fi
-git checkout -q pull/"$PULL"/base
-git branch -q -D pull/"$PULL"/local-merge 2>/dev/null
-git checkout -q -b pull/"$PULL"/local-merge
-TMPDIR="$(mktemp -d -t ghmXXXXX)"
-
-function cleanup() {
- git checkout -q "$BRANCH"
- git branch -q -D pull/"$PULL"/head 2>/dev/null
- git branch -q -D pull/"$PULL"/base 2>/dev/null
- git branch -q -D pull/"$PULL"/merge 2>/dev/null
- git branch -q -D pull/"$PULL"/local-merge 2>/dev/null
- rm -rf "$TMPDIR"
-}
-
-# Create unsigned merge commit.
-(
- echo "Merge pull request #$PULL"
- echo ""
- git log --no-merges --topo-order --pretty='format:%h %s (%an)' pull/"$PULL"/base..pull/"$PULL"/head
-)>"$TMPDIR/message"
-if git merge -q --commit --no-edit --no-ff -m "$(<"$TMPDIR/message")" pull/"$PULL"/head; then
- if [ "d$(git log --pretty='format:%s' -n 1)" != "dMerge pull request #$PULL" ]; then
- echo "ERROR: Creating merge failed (already merged?)." >&2
- cleanup
- exit 4
- fi
-else
- echo "ERROR: Cannot be merged cleanly." >&2
- git merge --abort
- cleanup
- exit 4
-fi
-
-# Run test command if configured.
-if [[ "d$TESTCMD" != "d" ]]; then
- # Go up to the repository's root.
- while [ ! -d .git ]; do cd ..; done
- if ! $TESTCMD; then
- echo "ERROR: Running $TESTCMD failed." >&2
- cleanup
- exit 5
- fi
- # Show the created merge.
- git diff pull/"$PULL"/merge..pull/"$PULL"/local-merge >"$TMPDIR"/diff
- git diff pull/"$PULL"/base..pull/"$PULL"/local-merge
- if [[ "$(<"$TMPDIR"/diff)" != "" ]]; then
- echo "WARNING: merge differs from github!" >&2
- read -p "Type 'ignore' to continue. " -r >&2
- if [[ "d$REPLY" =~ ^d[iI][gG][nN][oO][rR][eE]$ ]]; then
- echo "Difference with github ignored." >&2
- else
- cleanup
- exit 6
- fi
- fi
- read -p "Press 'd' to accept the diff. " -n 1 -r >&2
- echo
- if [[ "d$REPLY" =~ ^d[dD]$ ]]; then
- echo "Diff accepted." >&2
- else
- echo "ERROR: Diff rejected." >&2
- cleanup
- exit 6
- fi
-else
- # Verify the result.
- echo "Dropping you on a shell so you can try building/testing the merged source." >&2
- echo "Run 'git diff HEAD~' to show the changes being merged." >&2
- echo "Type 'exit' when done." >&2
- if [[ -f /etc/debian_version ]]; then # Show pull number in prompt on Debian default prompt
- export debian_chroot="$PULL"
- fi
- bash -i
- read -p "Press 'm' to accept the merge. " -n 1 -r >&2
- echo
- if [[ "d$REPLY" =~ ^d[Mm]$ ]]; then
- echo "Merge accepted." >&2
- else
- echo "ERROR: Merge rejected." >&2
- cleanup
- exit 7
- fi
-fi
-
-# Sign the merge commit.
-read -p "Press 's' to sign off on the merge. " -n 1 -r >&2
-echo
-if [[ "d$REPLY" =~ ^d[Ss]$ ]]; then
- if [[ "$(git config --get user.signingkey)" == "" ]]; then
- echo "ERROR: No GPG signing key set, not signing. Set one using:" >&2
- echo "git config --global user.signingkey <key>" >&2
- cleanup
- exit 1
- else
- git commit -q --gpg-sign --amend --no-edit
- fi
-else
- echo "Not signing off on merge, exiting."
- cleanup
- exit 1
-fi
-
-# Clean up temporary branches, and put the result in $BRANCH.
-git checkout -q "$BRANCH"
-git reset -q --hard pull/"$PULL"/local-merge
-cleanup
-
-# Push the result.
-read -p "Type 'push' to push the result to $HOST:$REPO, branch $BRANCH. " -r >&2
-if [[ "d$REPLY" =~ ^d[Pp][Uu][Ss][Hh]$ ]]; then
- git push "$HOST":"$REPO" refs/heads/"$BRANCH"
-fi
diff --git a/contrib/devtools/optimize-pngs.py b/contrib/devtools/optimize-pngs.py
index b6d6a097d..9286ab731 100755
--- a/contrib/devtools/optimize-pngs.py
+++ b/contrib/devtools/optimize-pngs.py
@@ -1,6 +1,9 @@
#!/usr/bin/env python
+# Copyright (c) 2014-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
-Run this scrip every time you change one of the png files. Using pngcrush, it will optimize the png files, remove various color profiles, remove ancillary chunks (alla) and text chunks (text).
+Run this script every time you change one of the png files. Using pngcrush, it will optimize the png files, remove various color profiles, remove ancillary chunks (alla) and text chunks (text).
#pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text
'''
import os
@@ -18,12 +21,12 @@ def content_hash(filename):
'''Return hash of RGBA contents of image'''
i = Image.open(filename)
i = i.convert('RGBA')
- data = i.tostring()
+ data = i.tobytes()
return hashlib.sha256(data).hexdigest()
pngcrush = 'pngcrush'
git = 'git'
-folders = ["src/qt/res/movies", "src/qt/res/icons"]
+folders = ["src/qt/res/movies", "src/qt/res/icons", "share/pixmaps"]
basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel']).rstrip('\n')
totalSaveBytes = 0
noHashChange = True
@@ -36,7 +39,7 @@ for folder in folders:
if extension.lower() == '.png':
print("optimizing "+file+"..."),
file_path = os.path.join(absFolder, file)
- fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)};
+ fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)}
fileMetaMap['contentHashPre'] = content_hash(file_path)
pngCrushOutput = ""
diff --git a/contrib/devtools/security-check.py b/contrib/devtools/security-check.py
new file mode 100755
index 000000000..c90541e27
--- /dev/null
+++ b/contrib/devtools/security-check.py
@@ -0,0 +1,216 @@
+#!/usr/bin/env python
+# Copyright (c) 2015-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+'''
+Perform basic ELF security checks on a series of executables.
+Exit status will be 0 if successful, and the program will be silent.
+Otherwise the exit status will be 1 and it will log which executables failed which checks.
+Needs `readelf` (for ELF) and `objdump` (for PE).
+'''
+from __future__ import division,print_function,unicode_literals
+import subprocess
+import sys
+import os
+
+READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
+OBJDUMP_CMD = os.getenv('OBJDUMP', '/usr/bin/objdump')
+NONFATAL = {'HIGH_ENTROPY_VA'} # checks which are non-fatal for now but only generate a warning
+
+def check_ELF_PIE(executable):
+ '''
+ Check for position independent executable (PIE), allowing for address space randomization.
+ '''
+ p = subprocess.Popen([READELF_CMD, '-h', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
+ (stdout, stderr) = p.communicate()
+ if p.returncode:
+ raise IOError('Error opening file')
+
+ ok = False
+ for line in stdout.split(b'\n'):
+ line = line.split()
+ if len(line)>=2 and line[0] == b'Type:' and line[1] == b'DYN':
+ ok = True
+ return ok
+
+def get_ELF_program_headers(executable):
+ '''Return type and flags for ELF program headers'''
+ p = subprocess.Popen([READELF_CMD, '-l', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
+ (stdout, stderr) = p.communicate()
+ if p.returncode:
+ raise IOError('Error opening file')
+ in_headers = False
+ count = 0
+ headers = []
+ for line in stdout.split(b'\n'):
+ if line.startswith(b'Program Headers:'):
+ in_headers = True
+ if line == b'':
+ in_headers = False
+ if in_headers:
+ if count == 1: # header line
+ ofs_typ = line.find(b'Type')
+ ofs_offset = line.find(b'Offset')
+ ofs_flags = line.find(b'Flg')
+ ofs_align = line.find(b'Align')
+ if ofs_typ == -1 or ofs_offset == -1 or ofs_flags == -1 or ofs_align == -1:
+ raise ValueError('Cannot parse elfread -lW output')
+ elif count > 1:
+ typ = line[ofs_typ:ofs_offset].rstrip()
+ flags = line[ofs_flags:ofs_align].rstrip()
+ headers.append((typ, flags))
+ count += 1
+ return headers
+
+def check_ELF_NX(executable):
+ '''
+ Check that no sections are writable and executable (including the stack)
+ '''
+ have_wx = False
+ have_gnu_stack = False
+ for (typ, flags) in get_ELF_program_headers(executable):
+ if typ == b'GNU_STACK':
+ have_gnu_stack = True
+ if b'W' in flags and b'E' in flags: # section is both writable and executable
+ have_wx = True
+ return have_gnu_stack and not have_wx
+
+def check_ELF_RELRO(executable):
+ '''
+ Check for read-only relocations.
+ GNU_RELRO program header must exist
+ Dynamic section must have BIND_NOW flag
+ '''
+ have_gnu_relro = False
+ for (typ, flags) in get_ELF_program_headers(executable):
+ # Note: not checking flags == 'R': here as linkers set the permission differently
+ # This does not affect security: the permission flags of the GNU_RELRO program header are ignored, the PT_LOAD header determines the effective permissions.
+ # However, the dynamic linker need to write to this area so these are RW.
+ # Glibc itself takes care of mprotecting this area R after relocations are finished.
+ # See also http://permalink.gmane.org/gmane.comp.gnu.binutils/71347
+ if typ == b'GNU_RELRO':
+ have_gnu_relro = True
+
+ have_bindnow = False
+ p = subprocess.Popen([READELF_CMD, '-d', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
+ (stdout, stderr) = p.communicate()
+ if p.returncode:
+ raise IOError('Error opening file')
+ for line in stdout.split(b'\n'):
+ tokens = line.split()
+ if len(tokens)>1 and tokens[1] == b'(BIND_NOW)' or (len(tokens)>2 and tokens[1] == b'(FLAGS)' and b'BIND_NOW' in tokens[2]):
+ have_bindnow = True
+ return have_gnu_relro and have_bindnow
+
+def check_ELF_Canary(executable):
+ '''
+ Check for use of stack canary
+ '''
+ p = subprocess.Popen([READELF_CMD, '--dyn-syms', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
+ (stdout, stderr) = p.communicate()
+ if p.returncode:
+ raise IOError('Error opening file')
+ ok = False
+ for line in stdout.split(b'\n'):
+ if b'__stack_chk_fail' in line:
+ ok = True
+ return ok
+
+def get_PE_dll_characteristics(executable):
+ '''
+ Get PE DllCharacteristics bits.
+ Returns a tuple (arch,bits) where arch is 'i386:x86-64' or 'i386'
+ and bits is the DllCharacteristics value.
+ '''
+ p = subprocess.Popen([OBJDUMP_CMD, '-x', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
+ (stdout, stderr) = p.communicate()
+ if p.returncode:
+ raise IOError('Error opening file')
+ arch = ''
+ bits = 0
+ for line in stdout.split('\n'):
+ tokens = line.split()
+ if len(tokens)>=2 and tokens[0] == 'architecture:':
+ arch = tokens[1].rstrip(',')
+ if len(tokens)>=2 and tokens[0] == 'DllCharacteristics':
+ bits = int(tokens[1],16)
+ return (arch,bits)
+
+IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA = 0x0020
+IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE = 0x0040
+IMAGE_DLL_CHARACTERISTICS_NX_COMPAT = 0x0100
+
+def check_PE_DYNAMIC_BASE(executable):
+ '''PIE: DllCharacteristics bit 0x40 signifies dynamicbase (ASLR)'''
+ (arch,bits) = get_PE_dll_characteristics(executable)
+ reqbits = IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE
+ return (bits & reqbits) == reqbits
+
+# On 64 bit, must support high-entropy 64-bit address space layout randomization in addition to DYNAMIC_BASE
+# to have secure ASLR.
+def check_PE_HIGH_ENTROPY_VA(executable):
+ '''PIE: DllCharacteristics bit 0x20 signifies high-entropy ASLR'''
+ (arch,bits) = get_PE_dll_characteristics(executable)
+ if arch == 'i386:x86-64':
+ reqbits = IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA
+ else: # Unnecessary on 32-bit
+ assert(arch == 'i386')
+ reqbits = 0
+ return (bits & reqbits) == reqbits
+
+def check_PE_NX(executable):
+ '''NX: DllCharacteristics bit 0x100 signifies nxcompat (DEP)'''
+ (arch,bits) = get_PE_dll_characteristics(executable)
+ return (bits & IMAGE_DLL_CHARACTERISTICS_NX_COMPAT) == IMAGE_DLL_CHARACTERISTICS_NX_COMPAT
+
+CHECKS = {
+'ELF': [
+ ('PIE', check_ELF_PIE),
+ ('NX', check_ELF_NX),
+ ('RELRO', check_ELF_RELRO),
+ ('Canary', check_ELF_Canary)
+],
+'PE': [
+ ('DYNAMIC_BASE', check_PE_DYNAMIC_BASE),
+ ('HIGH_ENTROPY_VA', check_PE_HIGH_ENTROPY_VA),
+ ('NX', check_PE_NX)
+]
+}
+
+def identify_executable(executable):
+ with open(filename, 'rb') as f:
+ magic = f.read(4)
+ if magic.startswith(b'MZ'):
+ return 'PE'
+ elif magic.startswith(b'\x7fELF'):
+ return 'ELF'
+ return None
+
+if __name__ == '__main__':
+ retval = 0
+ for filename in sys.argv[1:]:
+ try:
+ etype = identify_executable(filename)
+ if etype is None:
+ print('%s: unknown format' % filename)
+ retval = 1
+ continue
+
+ failed = []
+ warning = []
+ for (name, func) in CHECKS[etype]:
+ if not func(filename):
+ if name in NONFATAL:
+ warning.append(name)
+ else:
+ failed.append(name)
+ if failed:
+ print('%s: failed %s' % (filename, ' '.join(failed)))
+ retval = 1
+ if warning:
+ print('%s: warning %s' % (filename, ' '.join(warning)))
+ except IOError:
+ print('%s: cannot open' % filename)
+ retval = 1
+ exit(retval)
+
diff --git a/contrib/devtools/split-debug.sh.in b/contrib/devtools/split-debug.sh.in
new file mode 100644
index 000000000..deda49cc5
--- /dev/null
+++ b/contrib/devtools/split-debug.sh.in
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if [ $# -ne 3 ];
+ then echo "usage: $0 <input> <stripped-binary> <debug-binary>"
+fi
+
+@OBJCOPY@ --enable-deterministic-archives -p --only-keep-debug $1 $3
+@OBJCOPY@ --enable-deterministic-archives -p --strip-debug $1 $2
+@STRIP@ --enable-deterministic-archives -p -s $2
+@OBJCOPY@ --enable-deterministic-archives -p --add-gnu-debuglink=$3 $2
diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py
index fad891f80..8f8685006 100755
--- a/contrib/devtools/symbol-check.py
+++ b/contrib/devtools/symbol-check.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -11,10 +11,11 @@ Example usage:
find ../gitian-builder/build -type f -executable | xargs python contrib/devtools/symbol-check.py
'''
-from __future__ import division, print_function
+from __future__ import division, print_function, unicode_literals
import subprocess
import re
import sys
+import os
# Debian 6.0.9 (Squeeze) has:
#
@@ -41,12 +42,34 @@ MAX_VERSIONS = {
'GLIBCXX': (3,4,13),
'GLIBC': (2,11)
}
+# See here for a description of _IO_stdin_used:
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634261#109
+
# Ignore symbols that are exported as part of every executable
IGNORE_EXPORTS = {
-'_edata', '_end', '_init', '__bss_start', '_fini'
+b'_edata', b'_end', b'_init', b'__bss_start', b'_fini', b'_IO_stdin_used'
+}
+READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
+CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt')
+# Allowed NEEDED libraries
+ALLOWED_LIBRARIES = {
+# bitcoind and bitcoin-qt
+b'libgcc_s.so.1', # GCC base support
+b'libc.so.6', # C library
+b'libpthread.so.0', # threading
+b'libanl.so.1', # DNS resolve
+b'libm.so.6', # math library
+b'librt.so.1', # real-time (clock)
+b'ld-linux-x86-64.so.2', # 64-bit dynamic linker
+b'ld-linux.so.2', # 32-bit dynamic linker
+# bitcoin-qt only
+b'libX11-xcb.so.1', # part of X11
+b'libX11.so.6', # part of X11
+b'libxcb.so.1', # part of X11
+b'libfontconfig.so.1', # font support
+b'libfreetype.so.6', # font parsing
+b'libdl.so.2' # programming interface to dynamic linker
}
-READELF_CMD = '/usr/bin/readelf'
-CPPFILT_CMD = '/usr/bin/c++filt'
class CPPFilt(object):
'''
@@ -58,7 +81,8 @@ class CPPFilt(object):
self.proc = subprocess.Popen(CPPFILT_CMD, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
def __call__(self, mangled):
- self.proc.stdin.write(mangled + '\n')
+ self.proc.stdin.write(mangled + b'\n')
+ self.proc.stdin.flush()
return self.proc.stdout.readline().rstrip()
def close(self):
@@ -76,28 +100,44 @@ def read_symbols(executable, imports=True):
if p.returncode:
raise IOError('Could not read symbols for %s: %s' % (executable, stderr.strip()))
syms = []
- for line in stdout.split('\n'):
+ for line in stdout.split(b'\n'):
line = line.split()
- if len(line)>7 and re.match('[0-9]+:$', line[0]):
- (sym, _, version) = line[7].partition('@')
- is_import = line[6] == 'UND'
- if version.startswith('@'):
+ if len(line)>7 and re.match(b'[0-9]+:$', line[0]):
+ (sym, _, version) = line[7].partition(b'@')
+ is_import = line[6] == b'UND'
+ if version.startswith(b'@'):
version = version[1:]
if is_import == imports:
syms.append((sym, version))
return syms
def check_version(max_versions, version):
- if '_' in version:
- (lib, _, ver) = version.rpartition('_')
+ if b'_' in version:
+ (lib, _, ver) = version.rpartition(b'_')
else:
lib = version
ver = '0'
- ver = tuple([int(x) for x in ver.split('.')])
+ ver = tuple([int(x) for x in ver.split(b'.')])
if not lib in max_versions:
return False
return ver <= max_versions[lib]
+def read_libraries(filename):
+ p = subprocess.Popen([READELF_CMD, '-d', '-W', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
+ (stdout, stderr) = p.communicate()
+ if p.returncode:
+ raise IOError('Error opening file')
+ libraries = []
+ for line in stdout.split(b'\n'):
+ tokens = line.split()
+ if len(tokens)>2 and tokens[1] == b'(NEEDED)':
+ match = re.match(b'^Shared library: \[(.*)\]$', b' '.join(tokens[2:]))
+ if match:
+ libraries.append(match.group(1))
+ else:
+ raise ValueError('Unparseable (NEEDED) specification')
+ return libraries
+
if __name__ == '__main__':
cppfilt = CPPFilt()
retval = 0
@@ -105,14 +145,19 @@ if __name__ == '__main__':
# Check imported symbols
for sym,version in read_symbols(filename, True):
if version and not check_version(MAX_VERSIONS, version):
- print('%s: symbol %s from unsupported version %s' % (filename, cppfilt(sym), version))
+ print('%s: symbol %s from unsupported version %s' % (filename, cppfilt(sym).decode('utf-8'), version.decode('utf-8')))
retval = 1
# Check exported symbols
for sym,version in read_symbols(filename, False):
if sym in IGNORE_EXPORTS:
continue
- print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym)))
+ print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym).decode('utf-8')))
retval = 1
+ # Check dependency libraries
+ for library_name in read_libraries(filename):
+ if library_name not in ALLOWED_LIBRARIES:
+ print('%s: NEEDED library %s is not allowed' % (filename, library_name.decode('utf-8')))
+ retval = 1
exit(retval)
diff --git a/contrib/devtools/test-security-check.py b/contrib/devtools/test-security-check.py
new file mode 100755
index 000000000..18f9835fa
--- /dev/null
+++ b/contrib/devtools/test-security-check.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python2
+# Copyright (c) 2015-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+'''
+Test script for security-check.py
+'''
+from __future__ import division,print_function
+import subprocess
+import unittest
+
+def write_testcode(filename):
+ with open(filename, 'w') as f:
+ f.write('''
+ #include <stdio.h>
+ int main()
+ {
+ printf("the quick brown fox jumps over the lazy god\\n");
+ return 0;
+ }
+ ''')
+
+def call_security_check(cc, source, executable, options):
+ subprocess.check_call([cc,source,'-o',executable] + options)
+ p = subprocess.Popen(['./security-check.py',executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
+ (stdout, stderr) = p.communicate()
+ return (p.returncode, stdout.rstrip())
+
+class TestSecurityChecks(unittest.TestCase):
+ def test_ELF(self):
+ source = 'test1.c'
+ executable = 'test1'
+ cc = 'gcc'
+ write_testcode(source)
+
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro']),
+ (1, executable+': failed PIE NX RELRO Canary'))
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fno-stack-protector','-Wl,-znorelro']),
+ (1, executable+': failed PIE RELRO Canary'))
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro']),
+ (1, executable+': failed PIE RELRO'))
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-pie','-fPIE']),
+ (1, executable+': failed RELRO'))
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE']),
+ (0, ''))
+
+ def test_PE(self):
+ source = 'test1.c'
+ executable = 'test1.exe'
+ cc = 'i686-w64-mingw32-gcc'
+ write_testcode(source)
+
+ self.assertEqual(call_security_check(cc, source, executable, []),
+ (1, executable+': failed PIE NX'))
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat']),
+ (1, executable+': failed PIE'))
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase']),
+ (0, ''))
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/contrib/devtools/update-translations.py b/contrib/devtools/update-translations.py
index f955e4a1f..201184100 100755
--- a/contrib/devtools/update-translations.py
+++ b/contrib/devtools/update-translations.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -29,6 +29,8 @@ TX = 'tx'
SOURCE_LANG = 'bitcoin_en.ts'
# Directory with locale files
LOCALE_DIR = 'src/qt/locale'
+# Minimum number of messages for translation to be considered at all
+MIN_NUM_MESSAGES = 10
def check_at_repository_root():
if not os.path.exists('.git'):
@@ -37,7 +39,7 @@ def check_at_repository_root():
exit(1)
def fetch_all_translations():
- if subprocess.call([TX, 'pull', '-f']):
+ if subprocess.call([TX, 'pull', '-f', '-a']):
print('Error while fetching translations', file=sys.stderr)
exit(1)
@@ -63,6 +65,14 @@ def split_format_specifiers(specifiers):
else:
other.append(s)
+ # If both numeric format specifiers and "others" are used, assume we're dealing
+ # with a Qt-formatted message. In the case of Qt formatting (see https://doc.qt.io/qt-5/qstring.html#arg)
+ # only numeric formats are replaced at all. This means "(percentage: %1%)" is valid, without needing
+ # any kind of escaping that would be necessary for strprintf. Without this, this function
+ # would wrongly detect '%)' as a printf format specifier.
+ if numeric:
+ other = []
+
# numeric (Qt) can be present in any order, others (strprintf) must be in specified order
return set(numeric),other
@@ -70,7 +80,7 @@ def sanitize_string(s):
'''Sanitize string for printing'''
return s.replace('\n',' ')
-def check_format_specifiers(source, translation, errors):
+def check_format_specifiers(source, translation, errors, numerus):
source_f = split_format_specifiers(find_format_specifiers(source))
# assert that no source messages contain both Qt and strprintf format specifiers
# if this fails, go change the source as this is hacky and confusing!
@@ -78,10 +88,13 @@ def check_format_specifiers(source, translation, errors):
try:
translation_f = split_format_specifiers(find_format_specifiers(translation))
except IndexError:
- errors.append("Parse error in translation '%s'" % sanitize_string(translation))
+ errors.append("Parse error in translation for '%s': '%s'" % (sanitize_string(source), sanitize_string(translation)))
return False
else:
if source_f != translation_f:
+ if numerus and source_f == (set(), ['n']) and translation_f == (set(), []) and translation.find('%') == -1:
+ # Allow numerus translations to omit %n specifier (usually when it only has one possible value)
+ return True
errors.append("Mismatch between '%s' and '%s'" % (sanitize_string(source), sanitize_string(translation)))
return False
return True
@@ -148,7 +161,7 @@ def postprocess_translations(reduce_diff_hacks=False):
if translation is None:
continue
errors = []
- valid = check_format_specifiers(source, translation, errors)
+ valid = check_format_specifiers(source, translation, errors, numerus)
for error in errors:
print('%s: %s' % (filename, error))
@@ -166,6 +179,15 @@ def postprocess_translations(reduce_diff_hacks=False):
if translation_node.get('type') == 'unfinished':
context.remove(message)
+ # check if document is (virtually) empty, and remove it if so
+ num_messages = 0
+ for context in root.findall('context'):
+ for message in context.findall('message'):
+ num_messages += 1
+ if num_messages < MIN_NUM_MESSAGES:
+ print('Removing %s, as it contains only %i messages' % (filepath, num_messages))
+ continue
+
# write fixed-up tree
# if diff reduction requested, replace some XML to 'sanitize' to qt formatting
if reduce_diff_hacks:
diff --git a/contrib/dogecoin-cli.bash-completion b/contrib/dogecoin-cli.bash-completion
new file mode 100644
index 000000000..732981fe7
--- /dev/null
+++ b/contrib/dogecoin-cli.bash-completion
@@ -0,0 +1,154 @@
+# bash programmable completion for bitcoin-cli(1)
+# Copyright (c) 2012-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+# call $bitcoin-cli for RPC
+_bitcoin_rpc() {
+ # determine already specified args necessary for RPC
+ local rpcargs=()
+ for i in ${COMP_LINE}; do
+ case "$i" in
+ -conf=*|-datadir=*|-regtest|-rpc*|-testnet)
+ rpcargs=( "${rpcargs[@]}" "$i" )
+ ;;
+ esac
+ done
+ $bitcoin_cli "${rpcargs[@]}" "$@"
+}
+
+# Add wallet accounts to COMPREPLY
+_bitcoin_accounts() {
+ local accounts
+ accounts=$(_bitcoin_rpc listaccounts | awk -F '"' '{ print $2 }')
+ COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) )
+}
+
+_bitcoin_cli() {
+ local cur prev words=() cword
+ local bitcoin_cli
+
+ # save and use original argument to invoke bitcoin-cli for -help, help and RPC
+ # as bitcoin-cli might not be in $PATH
+ bitcoin_cli="$1"
+
+ COMPREPLY=()
+ _get_comp_words_by_ref -n = cur prev words cword
+
+ if ((cword > 5)); then
+ case ${words[cword-5]} in
+ sendtoaddress)
+ COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
+ return 0
+ ;;
+ esac
+ fi
+
+ if ((cword > 4)); then
+ case ${words[cword-4]} in
+ importaddress|listtransactions|setban)
+ COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
+ return 0
+ ;;
+ signrawtransaction)
+ COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) )
+ return 0
+ ;;
+ esac
+ fi
+
+ if ((cword > 3)); then
+ case ${words[cword-3]} in
+ addmultisigaddress)
+ _bitcoin_accounts
+ return 0
+ ;;
+ getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock)
+ COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
+ return 0
+ ;;
+ esac
+ fi
+
+ if ((cword > 2)); then
+ case ${words[cword-2]} in
+ addnode)
+ COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) )
+ return 0
+ ;;
+ setban)
+ COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) )
+ return 0
+ ;;
+ fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction)
+ COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
+ return 0
+ ;;
+ move|setaccount)
+ _bitcoin_accounts
+ return 0
+ ;;
+ esac
+ fi
+
+ case "$prev" in
+ backupwallet|dumpwallet|importwallet)
+ _filedir
+ return 0
+ ;;
+ getaddednodeinfo|getrawmempool|lockunspent|setgenerate)
+ COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
+ return 0
+ ;;
+ getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany)
+ _bitcoin_accounts
+ return 0
+ ;;
+ esac
+
+ case "$cur" in
+ -conf=*)
+ cur="${cur#*=}"
+ _filedir
+ return 0
+ ;;
+ -datadir=*)
+ cur="${cur#*=}"
+ _filedir -d
+ return 0
+ ;;
+ -*=*) # prevent nonsense completions
+ return 0
+ ;;
+ *)
+ local helpopts commands
+
+ # only parse -help if senseful
+ if [[ -z "$cur" || "$cur" =~ ^- ]]; then
+ helpopts=$($bitcoin_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
+ fi
+
+ # only parse help if senseful
+ if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
+ commands=$(_bitcoin_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }')
+ fi
+
+ COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) )
+
+ # Prevent space if an argument is desired
+ if [[ $COMPREPLY == *= ]]; then
+ compopt -o nospace
+ fi
+ return 0
+ ;;
+ esac
+} &&
+complete -F _bitcoin_cli bitcoin-cli
+
+# Local variables:
+# mode: shell-script
+# sh-basic-offset: 4
+# sh-indent-comment: t
+# indent-tabs-mode: nil
+# End:
+# ex: ts=4 sw=4 et filetype=sh
diff --git a/contrib/dogecoin-tx.bash-completion b/contrib/dogecoin-tx.bash-completion
new file mode 100644
index 000000000..a83d2979e
--- /dev/null
+++ b/contrib/dogecoin-tx.bash-completion
@@ -0,0 +1,57 @@
+# bash programmable completion for bitcoin-tx(1)
+# Copyright (c) 2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+_bitcoin_tx() {
+ local cur prev words=() cword
+ local bitcoin_tx
+
+ # save and use original argument to invoke bitcoin-tx for -help
+ # it might not be in $PATH
+ bitcoin_tx="$1"
+
+ COMPREPLY=()
+ _get_comp_words_by_ref -n =: cur prev words cword
+
+ case "$cur" in
+ load=*:*)
+ cur="${cur#load=*:}"
+ _filedir
+ return 0
+ ;;
+ *=*) # prevent attempts to complete other arguments
+ return 0
+ ;;
+ esac
+
+ if [[ "$cword" == 1 || ( "$prev" != "-create" && "$prev" == -* ) ]]; then
+ # only options (or an uncompletable hex-string) allowed
+ # parse bitcoin-tx -help for options
+ local helpopts
+ helpopts=$($bitcoin_tx -help | sed -e '/^ -/ p' -e d )
+ COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) )
+ else
+ # only commands are allowed
+ # parse -help for commands
+ local helpcmds
+ helpcmds=$($bitcoin_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d )
+ COMPREPLY=( $( compgen -W "$helpcmds" -- "$cur" ) )
+ fi
+
+ # Prevent space if an argument is desired
+ if [[ $COMPREPLY == *= ]]; then
+ compopt -o nospace
+ fi
+
+ return 0
+} &&
+complete -F _bitcoin_tx bitcoin-tx
+
+# Local variables:
+# mode: shell-script
+# sh-basic-offset: 4
+# sh-indent-comment: t
+# indent-tabs-mode: nil
+# End:
+# ex: ts=4 sw=4 et filetype=sh
diff --git a/contrib/dogecoind.bash-completion b/contrib/dogecoind.bash-completion
index 1fb740e8d..f5bed8bed 100644
--- a/contrib/dogecoind.bash-completion
+++ b/contrib/dogecoind.bash-completion
@@ -1,102 +1,21 @@
-# bash programmable completion for dogecoind(1) and dogecoin-cli(1)
-# Copyright (c) 2012,2014 Christian von Roques <[email protected]>
+# bash programmable completion for dogecoind(1) and bitcoin-qt(1)
+# Copyright (c) 2012-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-have dogecoind && {
-
-# call $dogecoind for RPC
-_dogecoin_rpc() {
- # determine already specified args necessary for RPC
- local rpcargs=()
- for i in ${COMP_LINE}; do
- case "$i" in
- -conf=*|-proxy*|-rpc*)
- rpcargs=( "${rpcargs[@]}" "$i" )
- ;;
- esac
- done
- $dogecoind "${rpcargs[@]}" "$@"
-}
-
-# Add dogecoin accounts to COMPREPLY
-_dogecoin_accounts() {
- local accounts
- accounts=$(_dogecoin_rpc listaccounts | awk '/".*"/ { a=$1; gsub(/"/, "", a); print a}')
- COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) )
-}
-
_dogecoind() {
local cur prev words=() cword
local dogecoind
- # save and use original argument to invoke dogecoind
- # dogecoind might not be in $PATH
+ # save and use original argument to invoke dogecoind for -help
+ # it might not be in $PATH
dogecoind="$1"
COMPREPLY=()
_get_comp_words_by_ref -n = cur prev words cword
- if ((cword > 4)); then
- case ${words[cword-4]} in
- listtransactions)
- COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
- return 0
- ;;
- signrawtransaction)
- COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) )
- return 0
- ;;
- esac
- fi
-
- if ((cword > 3)); then
- case ${words[cword-3]} in
- addmultisigaddress)
- _bitcoin_accounts
- return 0
- ;;
- getbalance|gettxout|importaddress|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock)
- COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
- return 0
- ;;
- esac
- fi
-
- if ((cword > 2)); then
- case ${words[cword-2]} in
- addnode)
- COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) )
- return 0
- ;;
- getblock|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction)
- COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
- return 0
- ;;
- move|setaccount)
- _dogecoin_accounts
- return 0
- ;;
- esac
- fi
-
- case "$prev" in
- backupwallet|dumpwallet|importwallet)
- _filedir
- return 0
- ;;
- getmempool|lockunspent|setgenerate)
- COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
- return 0
- ;;
- getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany)
- _dogecoin_accounts
- return 0
- ;;
- esac
-
case "$cur" in
- -conf=*|-pid=*|-loadblock=*|-wallet=*|-rpcsslcertificatechainfile=*|-rpcsslprivatekeyfile=*)
+ -conf=*|-pid=*|-loadblock=*|-rootcertificates=*|-rpccookiefile=*|-wallet=*)
cur="${cur#*=}"
_filedir
return 0
@@ -110,20 +29,14 @@ _dogecoind() {
return 0
;;
*)
- local helpopts commands
- # only parse --help if senseful
+ # only parse -help if senseful
if [[ -z "$cur" || "$cur" =~ ^- ]]; then
- helpopts=$($dogecoind --help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
+ local helpopts
+ helpopts=$($dogecoind -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
+ COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) )
fi
- # only parse help if senseful
- if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
- commands=$(_dogecoin_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }')
- fi
-
- COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) )
-
# Prevent space if an argument is desired
if [[ $COMPREPLY == *= ]]; then
compopt -o nospace
@@ -131,10 +44,8 @@ _dogecoind() {
return 0
;;
esac
-}
-
-complete -F _dogecoind dogecoind dogecoin-cli
-}
+} &&
+complete -F _dogecoind dogecoind bitcoin-qt
# Local variables:
# mode: shell-script
diff --git a/contrib/gitian-build.sh b/contrib/gitian-build.sh
new file mode 100755
index 000000000..6ee5df470
--- /dev/null
+++ b/contrib/gitian-build.sh
@@ -0,0 +1,392 @@
+# Copyright (c) 2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+# What to do
+sign=false
+verify=false
+build=false
+setupenv=false
+
+# Systems to build
+linux=true
+windows=true
+osx=true
+
+# Other Basic variables
+SIGNER=
+VERSION=
+commit=false
+url=https://github.com/bitcoin/bitcoin
+proc=2
+mem=2000
+lxc=true
+osslTarUrl=http://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz
+osslPatchUrl=https://bitcoincore.org/cfields/osslsigncode-Backports-to-1.7.1.patch
+scriptName=$(basename -- "$0")
+signProg="gpg --detach-sign"
+commitFiles=true
+
+# Help Message
+read -d '' usage <<- EOF
+Usage: $scriptName [-c|u|v|b|s|B|o|h|j|m|] signer version
+
+Run this script from the directory containing the bitcoin, gitian-builder, gitian.sigs, and bitcoin-detached-sigs.
+
+Arguments:
+signer GPG signer to sign each build assert file
+version Version number, commit, or branch to build. If building a commit or branch, the -c option must be specified
+
+Options:
+-c|--commit Indicate that the version argument is for a commit or branch
+-u|--url Specify the URL of the repository. Default is https://github.com/bitcoin/bitcoin
+-v|--verify Verify the gitian build
+-b|--build Do a gitian build
+-s|--sign Make signed binaries for Windows and Mac OSX
+-B|--buildsign Build both signed and unsigned binaries
+-o|--os Specify which Operating Systems the build is for. Default is lwx. l for linux, w for windows, x for osx
+-j Number of processes to use. Default 2
+-m Memory to allocate in MiB. Default 2000
+--kvm Use KVM instead of LXC
+--setup Setup the gitian building environment. Uses KVM. If you want to use lxc, use the --lxc option. Only works on Debian-based systems (Ubuntu, Debian)
+--detach-sign Create the assert file for detached signing. Will not commit anything.
+--no-commit Do not commit anything to git
+-h|--help Print this help message
+EOF
+
+# Get options and arguments
+while :; do
+ case $1 in
+ # Verify
+ -v|--verify)
+ verify=true
+ ;;
+ # Build
+ -b|--build)
+ build=true
+ ;;
+ # Sign binaries
+ -s|--sign)
+ sign=true
+ ;;
+ # Build then Sign
+ -B|--buildsign)
+ sign=true
+ build=true
+ ;;
+ # PGP Signer
+ -S|--signer)
+ if [ -n "$2" ]
+ then
+ SIGNER=$2
+ shift
+ else
+ echo 'Error: "--signer" requires a non-empty argument.'
+ exit 1
+ fi
+ ;;
+ # Operating Systems
+ -o|--os)
+ if [ -n "$2" ]
+ then
+ linux=false
+ windows=false
+ osx=false
+ if [[ "$2" = *"l"* ]]
+ then
+ linux=true
+ fi
+ if [[ "$2" = *"w"* ]]
+ then
+ windows=true
+ fi
+ if [[ "$2" = *"x"* ]]
+ then
+ osx=true
+ fi
+ shift
+ else
+ echo 'Error: "--os" requires an argument containing an l (for linux), w (for windows), or x (for Mac OSX)\n'
+ exit 1
+ fi
+ ;;
+ # Help message
+ -h|--help)
+ echo "$usage"
+ exit 0
+ ;;
+ # Commit or branch
+ -c|--commit)
+ commit=true
+ ;;
+ # Number of Processes
+ -j)
+ if [ -n "$2" ]
+ then
+ proc=$2
+ shift
+ else
+ echo 'Error: "-j" requires an argument'
+ exit 1
+ fi
+ ;;
+ # Memory to allocate
+ -m)
+ if [ -n "$2" ]
+ then
+ mem=$2
+ shift
+ else
+ echo 'Error: "-m" requires an argument'
+ exit 1
+ fi
+ ;;
+ # URL
+ -u)
+ if [ -n "$2" ]
+ then
+ url=$2
+ shift
+ else
+ echo 'Error: "-u" requires an argument'
+ exit 1
+ fi
+ ;;
+ # kvm
+ --kvm)
+ lxc=false
+ ;;
+ # Detach sign
+ --detach-sign)
+ signProg="true"
+ commitFiles=false
+ ;;
+ # Commit files
+ --no-commit)
+ commitFiles=false
+ ;;
+ # Setup
+ --setup)
+ setup=true
+ ;;
+ *) # Default case: If no more options then break out of the loop.
+ break
+ esac
+ shift
+done
+
+# Set up LXC
+if [[ $lxc = true ]]
+then
+ export USE_LXC=1
+ export LXC_BRIDGE=lxcbr0
+ sudo ifconfig lxcbr0 up 10.0.2.2
+fi
+
+# Check for OSX SDK
+if [[ ! -e "gitian-builder/inputs/MacOSX10.11.sdk.tar.gz" && $osx == true ]]
+then
+ echo "Cannot build for OSX, SDK does not exist. Will build for other OSes"
+ osx=false
+fi
+
+# Get signer
+if [[ -n"$1" ]]
+then
+ SIGNER=$1
+ shift
+fi
+
+# Get version
+if [[ -n "$1" ]]
+then
+ VERSION=$1
+ COMMIT=$VERSION
+ shift
+fi
+
+# Check that a signer is specified
+if [[ $SIGNER == "" ]]
+then
+ echo "$scriptName: Missing signer."
+ echo "Try $scriptName --help for more information"
+ exit 1
+fi
+
+# Check that a version is specified
+if [[ $VERSION == "" ]]
+then
+ echo "$scriptName: Missing version."
+ echo "Try $scriptName --help for more information"
+ exit 1
+fi
+
+# Add a "v" if no -c
+if [[ $commit = false ]]
+then
+ COMMIT="v${VERSION}"
+fi
+echo ${COMMIT}
+
+# Setup build environment
+if [[ $setup = true ]]
+then
+ sudo apt-get install ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm qemu-utils
+ git clone https://github.com/bitcoin-core/gitian.sigs.git
+ git clone https://github.com/bitcoin-core/bitcoin-detached-sigs.git
+ git clone https://github.com/devrandom/gitian-builder.git
+ pushd ./gitian-builder
+ if [[ -n "$USE_LXC" ]]
+ then
+ sudo apt-get install lxc
+ bin/make-base-vm --suite trusty --arch amd64 --lxc
+ else
+ bin/make-base-vm --suite trusty --arch amd64
+ fi
+ popd
+fi
+
+# Set up build
+pushd ./bitcoin
+git fetch
+git checkout ${COMMIT}
+popd
+
+# Build
+if [[ $build = true ]]
+then
+ # Make output folder
+ mkdir -p ./bitcoin-binaries/${VERSION}
+
+ # Build Dependencies
+ echo ""
+ echo "Building Dependencies"
+ echo ""
+ pushd ./gitian-builder
+ mkdir -p inputs
+ wget -N -P inputs $osslPatchUrl
+ wget -N -P inputs $osslTarUrl
+ make -C ../bitcoin/depends download SOURCES_PATH=`pwd`/cache/common
+
+ # Linux
+ if [[ $linux = true ]]
+ then
+ echo ""
+ echo "Compiling ${VERSION} Linux"
+ echo ""
+ ./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
+ ./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
+ mv build/out/bitcoin-*.tar.gz build/out/src/bitcoin-*.tar.gz ../bitcoin-binaries/${VERSION}
+ fi
+ # Windows
+ if [[ $windows = true ]]
+ then
+ echo ""
+ echo "Compiling ${VERSION} Windows"
+ echo ""
+ ./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
+ ./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
+ mv build/out/bitcoin-*-win-unsigned.tar.gz inputs/bitcoin-win-unsigned.tar.gz
+ mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../bitcoin-binaries/${VERSION}
+ fi
+ # Mac OSX
+ if [[ $osx = true ]]
+ then
+ echo ""
+ echo "Compiling ${VERSION} Mac OSX"
+ echo ""
+ ./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
+ ./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
+ mv build/out/bitcoin-*-osx-unsigned.tar.gz inputs/bitcoin-osx-unsigned.tar.gz
+ mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../bitcoin-binaries/${VERSION}
+ fi
+ popd
+
+ if [[ $commitFiles = true ]]
+ then
+ # Commit to gitian.sigs repo
+ echo ""
+ echo "Committing ${VERSION} Unsigned Sigs"
+ echo ""
+ pushd gitian.sigs
+ git add ${VERSION}-linux/${SIGNER}
+ git add ${VERSION}-win-unsigned/${SIGNER}
+ git add ${VERSION}-osx-unsigned/${SIGNER}
+ git commit -a -m "Add ${VERSION} unsigned sigs for ${SIGNER}"
+ popd
+ fi
+fi
+
+# Verify the build
+if [[ $verify = true ]]
+then
+ # Linux
+ pushd ./gitian-builder
+ echo ""
+ echo "Verifying v${VERSION} Linux"
+ echo ""
+ ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-linux ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
+ # Windows
+ echo ""
+ echo "Verifying v${VERSION} Windows"
+ echo ""
+ ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
+ # Mac OSX
+ echo ""
+ echo "Verifying v${VERSION} Mac OSX"
+ echo ""
+ ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
+ # Signed Windows
+ echo ""
+ echo "Verifying v${VERSION} Signed Windows"
+ echo ""
+ ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
+ # Signed Mac OSX
+ echo ""
+ echo "Verifying v${VERSION} Signed Mac OSX"
+ echo ""
+ ./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
+ popd
+fi
+
+# Sign binaries
+if [[ $sign = true ]]
+then
+
+ pushd ./gitian-builder
+ # Sign Windows
+ if [[ $windows = true ]]
+ then
+ echo ""
+ echo "Signing ${VERSION} Windows"
+ echo ""
+ ./bin/gbuild -i --commit signature=${COMMIT} ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
+ ./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-win-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
+ mv build/out/bitcoin-*win64-setup.exe ../bitcoin-binaries/${VERSION}
+ mv build/out/bitcoin-*win32-setup.exe ../bitcoin-binaries/${VERSION}
+ fi
+ # Sign Mac OSX
+ if [[ $osx = true ]]
+ then
+ echo ""
+ echo "Signing ${VERSION} Mac OSX"
+ echo ""
+ ./bin/gbuild -i --commit signature=${COMMIT} ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
+ ./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
+ mv build/out/bitcoin-osx-signed.dmg ../bitcoin-binaries/${VERSION}/bitcoin-${VERSION}-osx.dmg
+ fi
+ popd
+
+ if [[ $commitFiles = true ]]
+ then
+ # Commit Sigs
+ pushd gitian.sigs
+ echo ""
+ echo "Committing ${VERSION} Signed Sigs"
+ echo ""
+ git add ${VERSION}-win-signed/${SIGNER}
+ git add ${VERSION}-osx-signed/${SIGNER}
+ git commit -a -m "Add ${VERSION} signed binary sigs for ${SIGNER}"
+ popd
+ fi
+fi
diff --git a/contrib/gitian-descriptors/README.md b/contrib/gitian-descriptors/README.md
index 98ddd7d60..36d0a6878 100644
--- a/contrib/gitian-descriptors/README.md
+++ b/contrib/gitian-descriptors/README.md
@@ -1,8 +1,7 @@
-### Based on Gavin's notes on getting gitian builds up and running using KVM:###
+### Based on 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.
+These instructions distilled from
+[https://help.ubuntu.com/community/KVM/Installation](https://help.ubuntu.com/community/KVM/Installation).
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.
@@ -27,20 +26,20 @@ Once you've got the right hardware and software:
# Create base images
cd gitian-builder
- bin/make-base-vm --suite precise --arch amd64
+ bin/make-base-vm --suite trusty --arch amd64
cd ..
# Get inputs (see doc/release-process.md for exact inputs needed and where to get them)
...
- # For further build instructions see doc/release-notes.md
+ # For further build instructions see doc/release-process.md
...
---------------------
`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.
+[help.ubuntu.com](https://help.ubuntu.com/14.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
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index af19e61e1..677f4be3a 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -1,32 +1,46 @@
---
-name: "dogecoin-linux-1.10"
+name: "dogecoin-linux-1.14"
enable_cache: true
suites:
-- "precise"
+- "trusty"
architectures:
- "amd64"
-packages:
-- "g++-multilib"
+packages:
+- "curl"
+- "g++-aarch64-linux-gnu"
+- "g++-4.8-aarch64-linux-gnu"
+- "gcc-4.8-aarch64-linux-gnu"
+- "binutils-aarch64-linux-gnu"
+- "g++-arm-linux-gnueabihf"
+- "g++-4.8-arm-linux-gnueabihf"
+- "gcc-4.8-arm-linux-gnueabihf"
+- "binutils-arm-linux-gnueabihf"
+- "g++-4.8-multilib"
+- "gcc-4.8-multilib"
+- "binutils-gold"
- "git-core"
- "pkg-config"
-- "autoconf2.13"
+- "autoconf"
- "libtool"
- "automake"
- "faketime"
- "bsdmainutils"
-- "binutils-gold"
-- "libstdc++6-4.6-pic"
-reference_datetime: "2015-06-01 00:00:00"
+- "ca-certificates"
+- "python"
remotes:
- "url": "https://github.com/dogecoin/dogecoin.git"
"dir": "dogecoin"
files: []
script: |
+
WRAP_DIR=$HOME/wrapped
- HOSTS="i686-pc-linux-gnu x86_64-unknown-linux-gnu"
- CONFIGFLAGS="--enable-upnp-default --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
+ HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu"
+ CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests"
FAKETIME_HOST_PROGS=""
- FAKETIME_PROGS="date ar ranlib nm strip"
+ FAKETIME_PROGS="date ar ranlib nm"
+ HOST_CFLAGS="-O2 -g"
+ HOST_CXXFLAGS="-O2 -g"
+ HOST_LDFLAGS=-static-libstdc++
export QT_RCC_TEST=1
export GZIP="-9n"
@@ -40,47 +54,86 @@ script: |
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
fi
- # Create global faketime wrappers
+ function create_global_faketime_wrappers {
for prog in ${FAKETIME_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
- echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
- echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
+ echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
chmod +x ${WRAP_DIR}/${prog}
done
+ }
- # Create per-host faketime wrappers
+ function create_per-host_faketime_wrappers {
for i in $HOSTS; do
for prog in ${FAKETIME_HOST_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
- echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
- echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+ echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
chmod +x ${WRAP_DIR}/${i}-${prog}
done
done
+ }
+
+ # Faketime for depends so intermediate results are comparable
+ export PATH_orig=${PATH}
+ create_global_faketime_wrappers "2000-01-01 12:00:00"
+ create_per-host_faketime_wrappers "2000-01-01 12:00:00"
export PATH=${WRAP_DIR}:${PATH}
+ EXTRA_INCLUDES_BASE=$WRAP_DIR/extra_includes
+ mkdir -p $EXTRA_INCLUDES_BASE
+
+ # x86 needs /usr/include/i386-linux-gnu/asm pointed to /usr/include/x86_64-linux-gnu/asm,
+ # but we can't write there. Instead, create a link here and force it to be included in the
+ # search paths by wrapping gcc/g++.
+
+ mkdir -p $EXTRA_INCLUDES_BASE/i686-pc-linux-gnu
+ rm -f $WRAP_DIR/extra_includes/i686-pc-linux-gnu/asm
+ ln -s /usr/include/x86_64-linux-gnu/asm $EXTRA_INCLUDES_BASE/i686-pc-linux-gnu/asm
+
+ for prog in gcc g++; do
+ rm -f ${WRAP_DIR}/${prog}
+ cat << EOF > ${WRAP_DIR}/${prog}
+ #!/bin/bash
+ REAL="`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1`"
+ for var in "\$@"
+ do
+ if [ "\$var" = "-m32" ]; then
+ export C_INCLUDE_PATH="$EXTRA_INCLUDES_BASE/i686-pc-linux-gnu"
+ export CPLUS_INCLUDE_PATH="$EXTRA_INCLUDES_BASE/i686-pc-linux-gnu"
+ break
+ fi
+ done
+ \$REAL \$@
+ EOF
+ chmod +x ${WRAP_DIR}/${prog}
+ done
+
cd dogecoin
BASEPREFIX=`pwd`/depends
# Build dependencies for each host
for i in $HOSTS; do
+ EXTRA_INCLUDES="$EXTRA_INCLUDES_BASE/$i"
+ if [ -d "$EXTRA_INCLUDES" ]; then
+ export HOST_ID_SALT="$EXTRA_INCLUDES"
+ fi
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
+ unset HOST_ID_SALT
done
- # Ubuntu precise hack: Not an issue in later versions.
- # Precise's libstdc++.a is non-pic. There's an optional libstdc++6-4.6-pic
- # package which provides libstdc++_pic.a, but the linker can't find it.
- # Symlink it to a path that will be included in our link-line so that the
- # linker picks it up before the default libstdc++.a.
- # This is only necessary for 64bit.
- ln -s /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++_pic.a ${BASEPREFIX}/x86_64-unknown-linux-gnu/lib/libstdc++.a
+ # Faketime for binaries
+ export PATH=${PATH_orig}
+ create_global_faketime_wrappers "${REFERENCE_DATETIME}"
+ create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
+ export PATH=${WRAP_DIR}:${PATH}
# Create the release tarball using (arbitrarily) the first host
./autogen.sh
- ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
+ CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
make dist
SOURCEDIST=`echo dogecoin-*.tar.gz`
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
@@ -101,18 +154,31 @@ script: |
mkdir -p ${INSTALLPATH}
tar --strip-components=1 -xf ../$SOURCEDIST
- ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
+ CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}"
make ${MAKEOPTS}
- make install-strip
+ make ${MAKEOPTS} -C src check-security
+
+ #TODO: This is a quick hack that disables symbol checking for arm.
+ # Instead, we should investigate why these are popping up.
+ # For aarch64, we'll need to bump up the min GLIBC version, as the abi
+ # support wasn't introduced until 2.17.
+ case $i in
+ aarch64-*) : ;;
+ arm-*) : ;;
+ *) make ${MAKEOPTS} -C src check-symbols ;;
+ esac
+
+ make install DESTDIR=${INSTALLPATH}
cd installed
find . -name "lib*.la" -delete
find . -name "lib*.a" -delete
rm -rf ${DISTNAME}/lib/pkgconfig
- find ${DISTNAME} | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
+ find ${DISTNAME}/bin -type f -executable -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \;
+ find ${DISTNAME}/lib -type f -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \;
+ find ${DISTNAME} -not -name "*.dbg" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
+ find ${DISTNAME} -name "*.dbg" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}-debug.tar.gz
cd ../../
+ rm -rf distsrc-${i}
done
mkdir -p $OUTDIR/src
mv $SOURCEDIST $OUTDIR/src
- mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-linux64.tar.gz
- mv ${OUTDIR}/${DISTNAME}-i686-*.tar.gz ${OUTDIR}/${DISTNAME}-linux32.tar.gz
-
diff --git a/contrib/gitian-descriptors/gitian-osx-signer.yml b/contrib/gitian-descriptors/gitian-osx-signer.yml
index c10d74f26..2eb39e569 100644
--- a/contrib/gitian-descriptors/gitian-osx-signer.yml
+++ b/contrib/gitian-descriptors/gitian-osx-signer.yml
@@ -1,13 +1,11 @@
---
name: "dogecoin-dmg-signer"
suites:
-- "precise"
+- "trusty"
architectures:
- "amd64"
packages:
-- "libc6:i386"
- "faketime"
-reference_datetime: "2015-06-01 00:00:00"
remotes:
- "url": "https://github.com/dogecoin/dogecoin-detached-sigs.git"
"dir": "signature"
@@ -23,7 +21,7 @@ script: |
for prog in ${FAKETIME_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
- echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
chmod +x ${WRAP_DIR}/${prog}
@@ -33,6 +31,7 @@ script: |
SIGNED=dogecoin-osx-signed.dmg
tar -xf ${UNSIGNED}
+ OSX_VOLNAME="$(cat osx_volname)"
./detached-sig-apply.sh ${UNSIGNED} signature/osx
- ${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "Dogecoin-Core" -no-pad -r -apple -o uncompressed.dmg signed-app
+ ${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "${OSX_VOLNAME}" -no-pad -r -dir-mode 0755 -apple -o uncompressed.dmg signed-app
${WRAP_DIR}/dmg dmg uncompressed.dmg ${OUTDIR}/${SIGNED}
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index ae4c99102..e1ae624ed 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -1,33 +1,41 @@
---
-name: "dogecoin-osx-1.10"
+name: "dogecoin-osx-1.14"
enable_cache: true
suites:
-- "precise"
+- "trusty"
architectures:
- "amd64"
-packages:
+packages:
+- "ca-certificates"
+- "curl"
- "g++"
- "git-core"
- "pkg-config"
-- "autoconf2.13"
+- "autoconf"
+- "librsvg2-bin"
+- "libtiff-tools"
- "libtool"
- "automake"
- "faketime"
- "bsdmainutils"
- "cmake"
+- "imagemagick"
- "libcap-dev"
- "libz-dev"
- "libbz2-dev"
-reference_datetime: "2015-06-01 00:00:00"
+- "python"
+- "python-dev"
+- "python-setuptools"
+- "fonts-tuffy"
remotes:
- "url": "https://github.com/dogecoin/dogecoin.git"
"dir": "dogecoin"
files:
-- "MacOSX10.9.sdk.tar.gz"
+- "MacOSX10.11.sdk.tar.gz"
script: |
WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-apple-darwin11"
- CONFIGFLAGS="--enable-upnp-default --enable-reduce-exports GENISOIMAGE=$WRAP_DIR/genisoimage"
+ CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage"
FAKETIME_HOST_PROGS=""
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
@@ -45,43 +53,56 @@ script: |
export ZERO_AR_DATE=1
- # Create global faketime wrappers
+ function create_global_faketime_wrappers {
for prog in ${FAKETIME_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
- echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
- echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
+ echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
chmod +x ${WRAP_DIR}/${prog}
done
+ }
- # Create per-host faketime wrappers
+ function create_per-host_faketime_wrappers {
for i in $HOSTS; do
for prog in ${FAKETIME_HOST_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
- echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
- echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+ echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
chmod +x ${WRAP_DIR}/${i}-${prog}
done
done
+ }
+
+ # Faketime for depends so intermediate results are comparable
+ export PATH_orig=${PATH}
+ create_global_faketime_wrappers "2000-01-01 12:00:00"
+ create_per-host_faketime_wrappers "2000-01-01 12:00:00"
export PATH=${WRAP_DIR}:${PATH}
cd dogecoin
BASEPREFIX=`pwd`/depends
mkdir -p ${BASEPREFIX}/SDKs
- tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.9.sdk.tar.gz
+ tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.11.sdk.tar.gz
# Build dependencies for each host
for i in $HOSTS; do
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
done
+ # Faketime for binaries
+ export PATH=${PATH_orig}
+ create_global_faketime_wrappers "${REFERENCE_DATETIME}"
+ create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
+ export PATH=${WRAP_DIR}:${PATH}
+
# Create the release tarball using (arbitrarily) the first host
./autogen.sh
- ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
+ CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
make dist
SOURCEDIST=`echo dogecoin-*.tar.gz`
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
@@ -103,12 +124,15 @@ script: |
mkdir -p ${INSTALLPATH}
tar --strip-components=1 -xf ../$SOURCEDIST
- ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
+ CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
make ${MAKEOPTS}
- make install-strip
+ make install-strip DESTDIR=${INSTALLPATH}
+ make osx_volname
make deploydir
+ OSX_VOLNAME="$(cat osx_volname)"
mkdir -p unsigned-app-${i}
+ cp osx_volname unsigned-app-${i}/
cp contrib/macdeploy/detached-sig-apply.sh unsigned-app-${i}
cp contrib/macdeploy/detached-sig-create.sh unsigned-app-${i}
cp ${BASEPREFIX}/${i}/native/bin/dmg ${BASEPREFIX}/${i}/native/bin/genisoimage unsigned-app-${i}
@@ -120,7 +144,7 @@ script: |
popd
make deploy
- ${WRAP_DIR}/dmg dmg Dogecoin-Core.dmg ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
+ ${WRAP_DIR}/dmg dmg "${OSX_VOLNAME}.dmg" ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
cd installed
find . -name "lib*.la" -delete
diff --git a/contrib/gitian-descriptors/gitian-win-signer.yml b/contrib/gitian-descriptors/gitian-win-signer.yml
index d6904cf18..f2101228f 100644
--- a/contrib/gitian-descriptors/gitian-win-signer.yml
+++ b/contrib/gitian-descriptors/gitian-win-signer.yml
@@ -1,13 +1,12 @@
---
name: "dogecoin-win-signer"
suites:
-- "precise"
+- "trusty"
architectures:
- "amd64"
packages:
- "libssl-dev"
- "autoconf"
-reference_datetime: "2015-06-01 00:00:00"
remotes:
- "url": "https://github.com/dogecoin/dogecoin-detached-sigs.git"
"dir": "signature"
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index 2cd3adc9c..9ad12cc25 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -1,15 +1,16 @@
---
-name: "dogecoin-win-1.10"
+name: "dogecoin-win-1.14"
enable_cache: true
suites:
-- "precise"
+- "trusty"
architectures:
- "amd64"
-packages:
+packages:
+- "curl"
- "g++"
- "git-core"
- "pkg-config"
-- "autoconf2.13"
+- "autoconf"
- "libtool"
- "automake"
- "faketime"
@@ -18,17 +19,20 @@ packages:
- "g++-mingw-w64"
- "nsis"
- "zip"
-reference_datetime: "2015-06-01 00:00:00"
+- "ca-certificates"
+- "python"
remotes:
- "url": "https://github.com/dogecoin/dogecoin.git"
"dir": "dogecoin"
files: []
script: |
WRAP_DIR=$HOME/wrapped
- HOSTS="x86_64-w64-mingw32 i686-w64-mingw32"
- CONFIGFLAGS="--enable-upnp-default --enable-reduce-exports"
- FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip"
+ HOSTS="i686-w64-mingw32 x86_64-w64-mingw32"
+ CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests"
+ FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip objcopy"
FAKETIME_PROGS="date makensis zip"
+ HOST_CFLAGS="-O2 -g"
+ HOST_CXXFLAGS="-O2 -g"
export QT_RCC_TEST=1
export GZIP="-9n"
@@ -42,27 +46,59 @@ script: |
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
fi
- # Create global faketime wrappers
+ function create_global_faketime_wrappers {
for prog in ${FAKETIME_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
- echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
- echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
+ echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
chmod +x ${WRAP_DIR}/${prog}
done
+ }
- # Create per-host faketime wrappers
+ function create_per-host_faketime_wrappers {
for i in $HOSTS; do
for prog in ${FAKETIME_HOST_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
- echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
- echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+ echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
chmod +x ${WRAP_DIR}/${i}-${prog}
done
done
+ }
+
+ function create_per-host_linker_wrapper {
+ # This is only needed for trusty, as the mingw linker leaks a few bytes of
+ # heap, causing non-determinism. See discussion in https://github.com/bitcoin/bitcoin/pull/6900
+ for i in $HOSTS; do
+ mkdir -p ${WRAP_DIR}/${i}
+ for prog in collect2; do
+ echo '#!/bin/bash' > ${WRAP_DIR}/${i}/${prog}
+ REAL=$(${i}-gcc -print-prog-name=${prog})
+ echo "export MALLOC_PERTURB_=255" >> ${WRAP_DIR}/${i}/${prog}
+ echo "${REAL} \$@" >> $WRAP_DIR/${i}/${prog}
+ chmod +x ${WRAP_DIR}/${i}/${prog}
+ done
+ for prog in gcc g++; do
+ echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
+ echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+ echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
+ echo "export COMPILER_PATH=${WRAP_DIR}/${i}" >> ${WRAP_DIR}/${i}-${prog}
+ echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
+ chmod +x ${WRAP_DIR}/${i}-${prog}
+ done
+ done
+ }
+
+ # Faketime for depends so intermediate results are comparable
+ export PATH_orig=${PATH}
+ create_global_faketime_wrappers "2000-01-01 12:00:00"
+ create_per-host_faketime_wrappers "2000-01-01 12:00:00"
+ create_per-host_linker_wrapper "2000-01-01 12:00:00"
export PATH=${WRAP_DIR}:${PATH}
cd dogecoin
@@ -72,9 +108,16 @@ script: |
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
done
+ # Faketime for binaries
+ export PATH=${PATH_orig}
+ create_global_faketime_wrappers "${REFERENCE_DATETIME}"
+ create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
+ create_per-host_linker_wrapper "${REFERENCE_DATETIME}"
+ export PATH=${WRAP_DIR}:${PATH}
+
# Create the release tarball using (arbitrarily) the first host
./autogen.sh
- ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
+ CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
make dist
SOURCEDIST=`echo dogecoin-*.tar.gz`
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
@@ -98,21 +141,28 @@ script: |
mkdir -p ${INSTALLPATH}
tar --strip-components=1 -xf ../$SOURCEDIST
- ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
+ CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}"
make ${MAKEOPTS}
+ make ${MAKEOPTS} -C src check-security
make deploy
- make install-strip
+ make install DESTDIR=${INSTALLPATH}
cp -f dogecoin-*setup*.exe $OUTDIR/
cd installed
mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
find . -name "lib*.la" -delete
find . -name "lib*.a" -delete
rm -rf ${DISTNAME}/lib/pkgconfig
- find ${DISTNAME} -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}.zip
- cd ../..
+ find ${DISTNAME}/bin -type f -executable -exec ${i}-objcopy --only-keep-debug {} {}.dbg \; -exec ${i}-strip -s {} \; -exec ${i}-objcopy --add-gnu-debuglink={}.dbg {} \;
+ find ${DISTNAME}/lib -type f -exec ${i}-objcopy --only-keep-debug {} {}.dbg \; -exec ${i}-strip -s {} \; -exec ${i}-objcopy --add-gnu-debuglink={}.dbg {} \;
+ find ${DISTNAME} -not -name "*.dbg" -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}.zip
+ find ${DISTNAME} -name "*.dbg" -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}-debug.zip
+ cd ../../
+ rm -rf distsrc-${i}
done
cd $OUTDIR
rename 's/-setup\.exe$/-setup-unsigned.exe/' *-setup.exe
find . -name "*-setup-unsigned.exe" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz
+ mv ${OUTDIR}/${DISTNAME}-x86_64-*-debug.zip ${OUTDIR}/${DISTNAME}-win64-debug.zip
+ mv ${OUTDIR}/${DISTNAME}-i686-*-debug.zip ${OUTDIR}/${DISTNAME}-win32-debug.zip
mv ${OUTDIR}/${DISTNAME}-x86_64-*.zip ${OUTDIR}/${DISTNAME}-win64.zip
mv ${OUTDIR}/${DISTNAME}-i686-*.zip ${OUTDIR}/${DISTNAME}-win32.zip
diff --git a/contrib/gitian-downloader/linux-download-config b/contrib/gitian-downloader/linux-download-config
deleted file mode 100644
index 6ef1141e4..000000000
--- a/contrib/gitian-downloader/linux-download-config
+++ /dev/null
@@ -1,30 +0,0 @@
----
-name: dogecoin
-urls:
-- http://dogecoin.com/dogecoin-latest-linux-gitian.zip
-rss:
-- url:
- xpath: //item/link/text()
- pattern: bitcoin-\d+.\d+.\d+-linux-gitian.zip
-signers:
- 90DC2AC256201AD9377E15049142E5F7E533CE3B:
- weight: 40
- name: rnicoll
- key: rnicoll
- 1DDC450B45DB5ADCCF5DDA7F8E4217C6D47D946D:
- weight: 40
- name: langerhans
- key: langerhans
- 6E9C3630F63C1541054C9503B1C60A65E5E64D7B:
- weight: 20
- name: "Patrick Lodder"
- key: patricklodder-key
- B8273C8A55820B19C2152407279566AD6D852A36:
- weight: 20
- name: stapler117
- key: stapler117
- BEC5406F9FE5B07FD93964073AF52B1CB90A06E5:
- weight: 20
- name: whit
- key: whit
-minimum_weight: 120
diff --git a/contrib/gitian-downloader/rnicoll-key.pgp b/contrib/gitian-downloader/rnicoll-key.pgp
deleted file mode 100644
index 987598a65..000000000
--- a/contrib/gitian-downloader/rnicoll-key.pgp
+++ /dev/null
@@ -1,30 +0,0 @@
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.12 (GNU/Linux)
-
-mQENBFMx8ogBCAC9NqO+zmOI2OxulbP8alNBQIGt0uH7iT/EAyaVseA8E0bijcbi
-ZRVzIr53Bcn9npbQy0EYW9J6XxDyblRY3YLgLbjeZLghucUhF27DCR2x6jY/LU/p
-7AEN1lZN9Aq22nijsPnQ6repd+fcSpHobFK38BPgeaCpePTMvQRwNPwKKlKz1jWU
-ldQydgOcAYQPhp8RXCUXLnRHHoHHg+t16uiWU6hZTzxX6SgIJ8tHMEhIxTBNmhNI
-+WIfeL8UMIDpCVlFEnIt9KuBjaG7qI6swZHLo2K/Mz6AR9DDo6ZQRvpMhbj5krde
-czFaBcfd4C3wp+s5lChWaLVev4mC90tpO16hABEBAAG0HUogUm9zcyBOaWNvbGwg
-PGpybkBqcm4ubWUudWs+iQE+BBMBAgAoBQJTMfKIAhsDBQkJZgGABgsJCAcDAgYV
-CAIJCgsEFgIDAQIeAQIXgAAKCRCRQuX35TPOO3ekB/wNV3/1ZJjvIAVuq9tTO9Gn
-SW4agENY44Bk73pOxFJTNSAwUL1X+EUkU+asKz/vja0f+iZf3SayGNrL8vH7Y3hn
-PpTlZhQBUjgJi6EFIdlp/GiJAkp0tNAZMPtwz3tHYLKq6dSy7bScGeGs1mnNi/Lq
-7UiLJVLXmvo5NxrC0N1g/zzvptoMfw7Ca0yV5n5voWj3pMGlNEiVjPSENF7IdpMY
-zr/F0N5LFfiQRrqckan5ohWWlUoGFHE+tjtGy4IcDnCgEf/40L7pT+L660a0xkC5
-LZpEx+BhnJsjQ1t85e6CzbFWB4Gii8O2Rhu7BOBjfYnapCP8AtKvfsg6g0BUSDAL
-uQENBFMx8ogBCAD7kvsUub5dv+7+4G6nD5kyw3uo9PCRg3PCwbBt5E/wypjqOiUv
-Glhk6HTL69ri5xwo8EgMl3To92sXLBlB0aHUmvbUonZHPo00QKQTJ304u3H+x82f
-hvUPoBbKumfjJ7u1k/Nq+4UaYiKmaKrPM2l/niDb+j6ND8Vc1XUJV+F1g6eytp5I
-MgCkgJSagIPWTc1tWNwQoSvWSDjOJOovl9gEgRKZK11cP01XlwyD2c/OQIyJcAEC
-eYiIIha/FIh9VgCpin2O5LUOqcxmS37VvsF0OHfqNJWcWo0Zka5wEUujE9hqZ/tq
-xJKN73C1Is6+7jFPPNOhLR4HAcVEYGvMH3clABEBAAGJASUEGAECAA8FAlMx8ogC
-GwwFCQlmAYAACgkQkULl9+UzzjsLWAgAsQfe8Fn8oM9ciNnAEnbp/iB+NnD1F71B
-2c4yp2HHUCmzITqgWAMPjBA7Vg/V1hrsuH7VMPy7EuvDuxXRFpQYQsonS7eRAWX4
-/qqmz/8prIxqRMTSKEmIKnjwroCe/zupfL0wJrvd9+q9WAcsMt702OcjaLE34N7C
-9ZxbX6uLIFnNPAHZtgC8Jxd4tHWxUzg3LsanbsJ8FmXAAWlJw55Rad+jrQ0As54f
-zqjbaKQyQCaodxIFISvu+zXqwOgsrUeGvu3o8H/Ajz+XyyHoY3GXIF35YBjem06/
-fdIVuFLTEQNRoYOmnNxV9ppByntget3rq9oN3bNq7LUbwmyxFZ/9oA==
-=tSaM
------END PGP PUBLIC KEY BLOCK-----
diff --git a/contrib/gitian-downloader/win32-download-config b/contrib/gitian-downloader/win32-download-config
deleted file mode 100644
index ac00c1a9d..000000000
--- a/contrib/gitian-downloader/win32-download-config
+++ /dev/null
@@ -1,29 +0,0 @@
----
-name: dogecoin
-urls:
-- http://dogecoin.com/dogecoin-latest-win32-gitian.zip
-rss:
-- url:
- xpath: //item/link/text()
- pattern: dogecoin-\d+.\d+.\d+-win32-gitian.zip
-signers:
- 90DC2AC256201AD9377E15049142E5F7E533CE3B:
- weight: 40
- name: rnicoll
- key: rnicoll
- 1DDC450B45DB5ADCCF5DDA7F8E4217C6D47D946D:
- weight: 40
- name: langerhans
- key: langerhans
- 6E9C3630F63C1541054C9503B1C60A65E5E64D7B:
- weight: 20
- name: "Patrick Lodder"
- key: patricklodder-key
- B8273C8A55820B19C2152407279566AD6D852A36:
- weight: 20
- name: stapler117
- key: stapler117
- BEC5406F9FE5B07FD93964073AF52B1CB90A06E5:
- weight: 20
- name: whit
- key: whit
diff --git a/contrib/gitian-keys/README.md b/contrib/gitian-keys/README.md
new file mode 100644
index 000000000..439910330
--- /dev/null
+++ b/contrib/gitian-keys/README.md
@@ -0,0 +1,16 @@
+PGP keys
+========
+
+This folder contains the public keys of developers and active contributors.
+
+The keys are mainly used to sign git commits or the build results of gitian
+builds.
+
+You can import the keys into gpg as follows. Also, make sure to fetch the
+latest version from the key server to see if any key was revoked in the
+meantime.
+
+```sh
+gpg --import ./*.pgp
+gpg --refresh-keys
+```
diff --git a/contrib/gitian-downloader/langerhans-key.pgp b/contrib/gitian-keys/langerhans-key.pgp
index 9e3239be8..9e3239be8 100644
--- a/contrib/gitian-downloader/langerhans-key.pgp
+++ b/contrib/gitian-keys/langerhans-key.pgp
diff --git a/contrib/gitian-downloader/patricklodder-key.pgp b/contrib/gitian-keys/patricklodder-key.pgp
index af8af88d5..af8af88d5 100644
--- a/contrib/gitian-downloader/patricklodder-key.pgp
+++ b/contrib/gitian-keys/patricklodder-key.pgp
diff --git a/contrib/gitian-keys/rnicoll-key.pgp b/contrib/gitian-keys/rnicoll-key.pgp
new file mode 100644
index 000000000..928e31018
--- /dev/null
+++ b/contrib/gitian-keys/rnicoll-key.pgp
@@ -0,0 +1,58 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQINBFyTrWUBEACgfyQlnv2yluwdan4xT2pCvNOolkfN94T8Wj59kQEDM9vfIm7J
+P8H9bRK2UBeHA6jG/SyNwRB+tNnY/waS7bYvomXxK7N1ot8ZWLWa89sF/wMgCjn7
+hglMaJMyX6ngI199noPGIopv0fJRz4IMl0h7a/WZUsDCInoMpZTtn/UuzGcm67SQ
+HLnbY4hgPeS/I/C2OG7NH3vUg9HkluUfpuq3Qgc6z8Z7p36hKPlf5OUMJZwhKDYx
+lKepGC4+9UjIn5CARExljEZtaHIY1R/wY70dja9qFp4nCUckiPwgBxsR2uogXOqy
+6xstpHDwkPsru/sEUqVjY1d4jBw3U5Y7g18XvZIIEYnNr0zoupizSTbM/j4yXZJP
+mhag5YAkUo/QHp5KEc9Y4F52NwCCIV09O4+Ks6yyHBHnKvIrPrP7VVw/Od+wjClA
+uE93NJJtIUMXs9r3hZ2ek51PtABzX93j26l0CF3FZ+GLi2stn+d3ko+hqgH9wNLT
+zMxS+G4dm4yz3dzeHl7rsaDDQ3olefXYKVR6Uizc5liC8S/3oLAOZmiK3P32ETEC
+iMiVjwAoEbP8JbyFoIdw+UOZhjla6HTfTuz6t+V7ySyRxOk47XJ4/vG+QdFgZTY8
+ng7b+MRX1zQvHWl/KnOLQ/sjoiMCmw1BLgkr/xTSC8Q8YxyElQnj3ghYlwARAQAB
+tB1KIFJvc3MgTmljb2xsIDxqcm5AanJuLm1lLnVrPokCVAQTAQgAPhYhBFGi10au
+ilikEBpAMOZ54wwxK5TgBQJck61lAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQWAgMB
+Ah4BAheAAAoJEOZ54wwxK5Tg/MUP/RLyGbb9vhzv3hXPPiaw96aDxx53KP+dsyyA
+Z93rVgxji1YWroQNZMCNR2kjHYZlA1WsZTfNjzphSqjHZun93xQHdGaYbvRV5ZV6
+BxaY2JrRUVm6Wvph6ufL/xDhZUJFEvJEqyCh5mwNxl5Cvsva4bF5SEOhBevDXSvF
+JLrMMySmqa7mZGpQxrIi6Shwj6LEzUJFQXnstLGCsKOzYhp0OsTNwA0bG+qUoux3
+K4HTXhVC+C54NemJv4SmxNpUbOxD3xthe8cbO7lpmoJN2y4ZKJKMLxdU7dM7+Zwe
+wpdlYce7+k7RWjqnT9jI7cHh+ZDIQ2Na64FkDeqlGqkJXPeURueZ9R4OGXwfwNk9
+zUDUOl489/G03waGXjyyOYMWqYevjHdnAHnfNs24DzTeLCysqX7EgpArn4L82gsX
+dW185RsIVdlp9y1GWdorIpu5isiGGa6WiRvh/x5t+xY2k6hIFOF1IxPeta4L5UhG
+PmsNAka7BsE5efc+fikgBgSV/3lfO7nvO6nHiJFb5zAnAHHyqDBihFvbLG2rqfNW
+/xed76CvCfcFEwmIYQurXjTQamOO5iknad9vXYfakVcEa7NwiDpYgzJCgBW1/Uqg
+JWc8vxGoo4mBtmz/8E0bMkb76Ek7GBuNxBRAMz7fhXfXikVo6sXeuaoS2ElxEi5d
+gpyJ4uwZiQEzBBABCAAdFiEEkNwqwlYgGtk3fhUEkULl9+UzzjsFAlyTrf4ACgkQ
+kULl9+Uzzjub9Af/fOyBLVETk0GSmcnnGHQqqcPSl1HLqhQs9fD/IfR4ZHFK53uG
+LcSqU3NdGbB/yJJnPhO6nhQP/q1i4t+R3oBQu3TDZclBlrs2x/VNqUUyJrmEBg0s
+4rwc7c7J+7G68x8Dy1D7VMBWavlHj13I5sWMT/4oghyxUTLsN8UT+bUAsgJAeM3S
+6nthnKBsM/XUvu5OS6WgXXsSLy1a601xRqFaFkq/DBd0e1ksRpwqGrU5ptevTPhD
+Rs9uosNlx1IXj3svktNdZUSW4avJdsfYnGXtvwRL1OdZ9qjnqUZ6R1iPk8l3VCDh
+C/l0LnFTKvlnIyuOCC7W84g6sfS8jXFHxyGHvbkCDQRck61lARAA27toS+Sh6hMP
+q63vgnv7qbKMei9fKo9+A8XpnWXLU9n6KysqbcJg0XI8iTKQTZqkYdtOycNPgy17
+KeN0IEwDGjAjMJK9d8gvayuPIyUMznQ/gSWnSJoSP72dehx8luwmMDwxdqGh4G0V
+cpO2bzW5ntg9MYQWDSdUoOqFU0T3AXZieKMOyDcA8LIyBz98ZyS9D1LMGfX/vD4E
+gKS2pSwMrjRrHd0WS5vbWwzS3vGHTytUfjhilUzuhV9hPJFSrGmmxIxcwCFEOXda
+pEaXGBO/cXbEuxNshx7nOMl9ZpEjLVG7qA3vhlAjKpdxYSchCODzcwvbD3cKqHeH
+n4zRX6e76yggoz9/PXHodcUDF7NJfqFUY4sVyn7mCUA7NZDR3c8ZXHDffiD///Dp
+O+LVYLwkogrcxJkxMhUhMz+ERnFgwD+6HU+gcIfrkhiPD+5npMlj2SX9jglDX+lq
+RKEdxlW5u+7vrGuBKqT2xkUGKZcJ9m/ceCh9YEr4Se+S74LqyIy5Isb4QVY5xWXr
+t/uX03kOhQKOl0jwl3F0m2LNostz3+AV/ta/zKCiKzXAsGO2I/gdDggQPL0ImXUu
+r97ZIaQa/cakXTUEHZkdPxF7JkNby2bFKJqz1Ns8A0s4jk3ebnAyaksFtZ+Lm4IY
+aXOMDfjHik5NgOkm3hKcI8Lsh0zFC9cAEQEAAYkCPAQYAQgAJhYhBFGi10auilik
+EBpAMOZ54wwxK5TgBQJck61lAhsMBQkJZgGAAAoJEOZ54wwxK5Tg9YwP/j3aFO6i
+kd2Nr25jrkCtky3fTGM8M9EuBLOrXU+jMj1CPp/Bt0KPD620YPUqLyPnMIPuaErM
+290rvHoWeumALF2dAHcqqx07enC0iD5pf8i9Gguro9H8UI+hcHchCNskIwtgu/uK
+bLMojGEJrY6/lAH2+Ncih8f55Og1s87IW/+bQgN6kRhdFKv55Xsj3i7j/fIGQuHU
+BlgXrkSr7XdQW+Bnxu3/4FcSqueSkGv6LIP/MTGDjqyB8SNE+KDohWZH87Q497e+
+pdMSKnGz3N0vlZjVmDDYG7lf0SpWvUbdUVhxvNSikzRLhPkdMXmNK1O92jkgxMdX
++ywREr9rZ4ov3Bsxwgx87oAGixXbVnE6YIBiiv14Uw6VOgPfL/4Jijt6K+Kpz7TI
+Kb1qev7Ffrp9RZUoUkSY5a5HcqE2sZWDGjUsETQ5TRfqP06gyjBTPfKHT5kMpYlM
+FdLA4ArDieiNNTfCHQauL6CVYBvE7kM8nxuXCOB6ftJhz2k4THacfkolPXVESCOu
+UAgleCJOBNoNTgaOGaUaGbj7TXF7YJmmOSnbNqoWUhZ9WDTjcSNdJG9ewFSOoYII
+RpHwHTD6Cqgrg4QBz8BodhQsnuoG3PpnELhzitEP4zQ/bCYAgaOZ+++pycW470lb
+FKYLNPqwOusuv9DRJikyic1lwV5NOdATdlFo
+=B4YF
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/contrib/gitian-downloader/stapler117.pgp b/contrib/gitian-keys/stapler117.pgp
index 7f6531919..7f6531919 100644
--- a/contrib/gitian-downloader/stapler117.pgp
+++ b/contrib/gitian-keys/stapler117.pgp
diff --git a/contrib/gitian-downloader/whit.pgp b/contrib/gitian-keys/whit.pgp
index bd0634101..bd0634101 100644
--- a/contrib/gitian-downloader/whit.pgp
+++ b/contrib/gitian-keys/whit.pgp
diff --git a/contrib/init/README.md b/contrib/init/README.md
index 54a04a426..0f1517bce 100644
--- a/contrib/init/README.md
+++ b/contrib/init/README.md
@@ -5,6 +5,7 @@ Upstart: dogecoind.conf
OpenRC: dogecoind.openrc
dogecoind.openrcconf
CentOS: dogecoind.init
+OS X: org.dogecoin.dogecoind.plist
have been made available to assist packagers in creating node packages here.
diff --git a/contrib/init/dogecoind.openrc b/contrib/init/dogecoind.openrc
index d34133573..5d9c269d5 100644
--- a/contrib/init/dogecoind.openrc
+++ b/contrib/init/dogecoind.openrc
@@ -3,36 +3,40 @@
# backward compatibility for existing gentoo layout
#
if [ -d "/var/lib/dogecoin/.dogecoin" ]; then
- DOGECOIND_DEFAULT_DATADIR="/var/lib/dogecoin/.dogecoin"
+ BITCOIND_DEFAULT_DATADIR="/var/lib/dogecoin/.dogecoin"
else
- DOGECOIND_DEFAULT_DATADIR="/var/lib/dogecoind"
+ BITCOIND_DEFAULT_DATADIR="/var/lib/dogecoind"
fi
-DOGECOIND_CONFIGFILE=${DOGECOIND_CONFIGFILE:-/etc/dogecoin/dogecoin.conf}
-DOGECOIND_PIDDIR=${DOGECOIND_PIDDIR:-/var/run/dogecoind}
-DOGECOIND_PIDFILE=${DOGECOIND_PIDFILE:-${DOGECOIND_PIDDIR}/dogecoind.pid}
-DOGECOIND_DATADIR=${DOGECOIND_DATADIR:-${DOGECOIND_DEFAULT_DATADIR}}
-DOGECOIND_USER=${DOGECOIND_USER:-${DOGECOIN_USER:-dogecoin}}
-DOGECOIND_GROUP=${DOGECOIND_GROUP:-dogecoin}
-DOGECOIND_BIN=${DOGECOIND_BIN:-/usr/bin/dogecoind}
-DOGECOIND_NICE=${DOGECOIND_NICE:-${NICELEVEL:-0}}
-DOGECOIND_OPTS="${DOGECOIND_OPTS:-${DOGECOIN_OPTS}}"
+BITCOIND_CONFIGFILE=${BITCOIND_CONFIGFILE:-/etc/dogecoin/dogecoin.conf}
+BITCOIND_PIDDIR=${BITCOIND_PIDDIR:-/var/run/dogecoind}
+BITCOIND_PIDFILE=${BITCOIND_PIDFILE:-${BITCOIND_PIDDIR}/dogecoind.pid}
+BITCOIND_DATADIR=${BITCOIND_DATADIR:-${BITCOIND_DEFAULT_DATADIR}}
+BITCOIND_USER=${BITCOIND_USER:-${BITCOIN_USER:-dogecoin}}
+BITCOIND_GROUP=${BITCOIND_GROUP:-dogecoin}
+BITCOIND_BIN=${BITCOIND_BIN:-/usr/bin/dogecoind}
+BITCOIND_NICE=${BITCOIND_NICE:-${NICELEVEL:-0}}
+BITCOIND_OPTS="${BITCOIND_OPTS:-${BITCOIN_OPTS}}"
-name="Dogecoin Core Daemon"
-description="Dogecoin cryptocurrency P2P network daemon"
+name="Bitcoin Core Daemon"
+description="Bitcoin cryptocurrency P2P network daemon"
command="/usr/bin/dogecoind"
-command_args="-pid=\"${DOGECOIND_PIDFILE}\" \
- -conf=\"${DOGECOIND_CONFIGFILE}\" \
- -datadir=\"${DOGECOIND_DATADIR}\" \
+command_args="-pid=\"${BITCOIND_PIDFILE}\" \
+ -conf=\"${BITCOIND_CONFIGFILE}\" \
+ -datadir=\"${BITCOIND_DATADIR}\" \
-daemon \
- ${DOGECOIND_OPTS}"
+ ${BITCOIND_OPTS}"
-required_files="${DOGECOIND_CONFIGFILE}"
-start_stop_daemon_args="-u ${DOGECOIND_USER} \
- -N ${DOGECOIND_NICE} -w 2000"
-pidfile="${DOGECOIND_PIDFILE}"
-retry=60
+required_files="${BITCOIND_CONFIGFILE}"
+start_stop_daemon_args="-u ${BITCOIND_USER} \
+ -N ${BITCOIND_NICE} -w 2000"
+pidfile="${BITCOIND_PIDFILE}"
+
+# The retry schedule to use when stopping the daemon. Could be either
+# a timeout in seconds or multiple signal/timeout pairs (like
+# "SIGKILL/180 SIGTERM/300")
+retry="${BITCOIND_SIGTERM_TIMEOUT}"
depend() {
need localmount net
@@ -46,29 +50,29 @@ start_pre() {
checkpath \
-d \
--mode 0750 \
- --owner "${DOGECOIND_USER}:${DOGECOIND_GROUP}" \
- "${DOGECOIND_DATADIR}"
+ --owner "${BITCOIND_USER}:${BITCOIND_GROUP}" \
+ "${BITCOIND_DATADIR}"
checkpath \
-d \
--mode 0755 \
- --owner "${DOGECOIND_USER}:${DOGECOIND_GROUP}" \
- "${DOGECOIND_PIDDIR}"
+ --owner "${BITCOIND_USER}:${BITCOIND_GROUP}" \
+ "${BITCOIND_PIDDIR}"
checkpath -f \
- -o ${DOGECOIND_USER}:${DOGECOIND_GROUP} \
+ -o ${BITCOIND_USER}:${BITCOIND_GROUP} \
-m 0660 \
- ${DOGECOIND_CONFIGFILE}
+ ${BITCOIND_CONFIGFILE}
checkconfig || return 1
}
checkconfig()
{
- if ! grep -qs '^rpcpassword=' "${DOGECOIND_CONFIGFILE}" ; then
+ if ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then
eerror ""
eerror "ERROR: You must set a secure rpcpassword to run dogecoind."
- eerror "The setting must appear in ${DOGECOIND_CONFIGFILE}"
+ eerror "The setting must appear in ${BITCOIND_CONFIGFILE}"
eerror ""
eerror "This password is security critical to securing wallets "
eerror "and must not be the same as the rpcuser setting."
@@ -80,7 +84,7 @@ checkconfig()
eerror "It is also recommended that you also set alertnotify so you are "
eerror "notified of problems:"
eerror ""
- eerror "ie: alertnotify=echo %%s | mail -s \"Dogecoin Alert\"" \
+ eerror "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \
eerror ""
return 1
diff --git a/contrib/init/dogecoind.openrcconf b/contrib/init/dogecoind.openrcconf
index 0e9398f5b..307c9e2e5 100644
--- a/contrib/init/dogecoind.openrcconf
+++ b/contrib/init/dogecoind.openrcconf
@@ -25,3 +25,9 @@
# Additional options (avoid -conf and -datadir, use flags above)
DOGECOIND_OPTS="-disablewallet"
+# The timeout in seconds OpenRC will wait for dogecoind to terminate
+# after a SIGTERM has been raised.
+# Note that this will be mapped as argument to start-stop-daemon's
+# '--retry' option, which means you can specify a retry schedule
+# here. For more information see man 8 start-stop-daemon.
+DOGECOIND_SIGTERM_TIMEOUT=60
diff --git a/contrib/init/org.dogecoin.dogecoind.plist b/contrib/init/org.dogecoin.dogecoind.plist
new file mode 100644
index 000000000..b8b3ad213
--- /dev/null
+++ b/contrib/init/org.dogecoin.dogecoind.plist
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Label</key>
+ <string>org.dogecoin.dogecoind</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>/usr/local/bin/dogecoind</string>
+ <string>-daemon</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+</dict>
+</plist>
diff --git a/contrib/linearize/README.md b/contrib/linearize/README.md
index 2c0f5f59c..0971e7816 100644
--- a/contrib/linearize/README.md
+++ b/contrib/linearize/README.md
@@ -1,33 +1,54 @@
# Linearize
-Construct a linear, no-fork, best version of the blockchain.
+Construct a linear, no-fork, best version of the Bitcoin blockchain. The scripts
+run using Python 3 but are compatible with Python 2.
## Step 1: Download hash list
- $ ./linearize-hashes.py linearize.cfg > hashlist.txt
+ $ ./linearize-hashes.py linearize.cfg > hashlist.txt
Required configuration file settings for linearize-hashes:
-* RPC: rpcuser, rpcpassword
+* RPC: `rpcuser`, `rpcpassword`
Optional config file setting for linearize-hashes:
-* RPC: host, port
-* Block chain: min_height, max_height
+* RPC: `host` (Default: `127.0.0.1`)
+* RPC: `port` (Default: `8332`)
+* Blockchain: `min_height`, `max_height`
+* `rev_hash_bytes`: If true, the written block hash list will be
+byte-reversed. (In other words, the hash returned by getblockhash will have its
+bytes reversed.) False by default. Intended for generation of
+standalone hash lists but safe to use with linearize-data.py, which will output
+the same data no matter which byte format is chosen.
+
+The `linearize-hashes` script requires a connection, local or remote, to a
+JSON-RPC server. Running `bitcoind` or `bitcoin-qt -server` will be sufficient.
## Step 2: Copy local block data
- $ ./linearize-data.py linearize.cfg
+ $ ./linearize-data.py linearize.cfg
Required configuration file settings:
-* "input": dogecoind blocks/ directory containing blkNNNNN.dat
-* "hashlist": text file containing list of block hashes, linearized-hashes.py
-output.
-* "output_file": bootstrap.dat
+* `output_file`: The file that will contain the final blockchain.
or
-* "output": output directory for linearized blocks/blkNNNNN.dat output
+* `output`: Output directory for linearized `blocks/blkNNNNN.dat` output.
Optional config file setting for linearize-data:
-* "netmagic": network magic number
-* "max_out_sz": maximum output file size (default 1000*1000*1000)
-* "split_timestamp": Split files when a new month is first seen, in addition to
-reaching a maximum file size.
-* "file_timestamp": Set each file's last-modified time to that of the
-most recent block in that file.
+* `debug_output`: Some printouts may not always be desired. If true, such output
+will be printed.
+* `file_timestamp`: Set each file's last-accessed and last-modified times,
+respectively, to the current time and to the timestamp of the most recent block
+written to the script's blockchain.
+* `genesis`: The hash of the genesis block in the blockchain.
+* `input`: bitcoind blocks/ directory containing blkNNNNN.dat
+* `hashlist`: text file containing list of block hashes created by
+linearize-hashes.py.
+* `max_out_sz`: Maximum size for files created by the `output_file` option.
+(Default: `1000*1000*1000 bytes`)
+* `netmagic`: Network magic number.
+* `out_of_order_cache_sz`: If out-of-order blocks are being read, the block can
+be written to a cache so that the blockchain doesn't have to be seeked again.
+This option specifies the cache size. (Default: `100*1000*1000 bytes`)
+* `rev_hash_bytes`: If true, the block hash list written by linearize-hashes.py
+will be byte-reversed when read by linearize-data.py. See the linearize-hashes
+entry for more information.
+* `split_timestamp`: Split blockchain files when a new month is first seen, in
+addition to reaching a maximum file size (`max_out_sz`).
diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg
index d57d42c01..2cc910edf 100644
--- a/contrib/linearize/example-linearize.cfg
+++ b/contrib/linearize/example-linearize.cfg
@@ -1,29 +1,42 @@
-
-# dogecoind RPC settings (linearize-hashes)
+# bitcoind RPC settings (linearize-hashes)
rpcuser=someuser
rpcpassword=somepassword
host=127.0.0.1
-port=22555
-#port=44555
+port=8332
+#port=18332
# bootstrap.dat hashlist settings (linearize-hashes)
-max_height=845000
+max_height=313000
# bootstrap.dat input/output settings (linearize-data)
# mainnet
-netmagic=c0c0c0c0
-genesis=1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691
-input=/home/example/.dogecoin/blocks
+netmagic=f9beb4d9
+genesis=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
+input=/home/example/.bitcoin/blocks
# testnet
-#netmagic=fcc1b7dc
-#genesis=bb0a78264637406b6360aad926284d544d7049f45189db5664f3c4d07350559e
-#input=/home/example/.dogecoin/testnet3/blocks
+#netmagic=0b110907
+#genesis=000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
+#input=/home/example/.bitcoin/testnet3/blocks
+# "output" option causes blockchain files to be written to the given location,
+# with "output_file" ignored. If not used, "output_file" is used instead.
+# output=/home/example/blockchain_directory
output_file=/home/example/Downloads/bootstrap.dat
hashlist=hashlist.txt
-split_year=1
-# Maxmimum size in bytes of out-of-order blocks cache in memory
+# Maximum size in bytes of out-of-order blocks cache in memory
out_of_order_cache_sz = 100000000
+
+# Do we want the reverse the hash bytes coming from getblockhash?
+rev_hash_bytes = False
+
+# On a new month, do we want to set the access and modify times of the new
+# blockchain file?
+file_timestamp = 0
+# Do we want to split the blockchain files given a new month or specific height?
+split_timestamp = 0
+
+# Do we want debug printouts?
+debug_output = False
diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py
index 4b5090a9c..afcec2b60 100755
--- a/contrib/linearize/linearize-data.py
+++ b/contrib/linearize/linearize-data.py
@@ -1,29 +1,34 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
#
# linearize-data.py: Construct a linear, no-fork version of the chain.
#
-# Copyright (c) 2013-2014 The Bitcoin Core developers
+# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import print_function, division
-import json
import struct
import re
import os
-import base64
-import httplib
+import os.path
import sys
import hashlib
import datetime
import time
from collections import namedtuple
+from binascii import hexlify, unhexlify
settings = {}
+##### Switch endian-ness #####
+def hex_switchEndian(s):
+ """ Switches the endianness of a hex string (in pairs of hex chars) """
+ pairList = [s[i:i+2].encode() for i in range(0, len(s), 2)]
+ return b''.join(pairList[::-1]).decode()
+
def uint32(x):
- return x & 0xffffffffL
+ return x & 0xffffffff
def bytereverse(x):
return uint32(( ((x) << 24) | (((x) << 8) & 0x00ff0000) |
@@ -34,14 +39,14 @@ def bufreverse(in_buf):
for i in range(0, len(in_buf), 4):
word = struct.unpack('@I', in_buf[i:i+4])[0]
out_words.append(struct.pack('@I', bytereverse(word)))
- return ''.join(out_words)
+ return b''.join(out_words)
def wordreverse(in_buf):
out_words = []
for i in range(0, len(in_buf), 4):
out_words.append(in_buf[i:i+4])
out_words.reverse()
- return ''.join(out_words)
+ return b''.join(out_words)
def calc_hdr_hash(blk_hdr):
hash1 = hashlib.sha256()
@@ -58,7 +63,7 @@ def calc_hash_str(blk_hdr):
hash = calc_hdr_hash(blk_hdr)
hash = bufreverse(hash)
hash = wordreverse(hash)
- hash_str = hash.encode('hex')
+ hash_str = hexlify(hash).decode('utf-8')
return hash_str
def get_blk_dt(blk_hdr):
@@ -68,17 +73,21 @@ def get_blk_dt(blk_hdr):
dt_ym = datetime.datetime(dt.year, dt.month, 1)
return (dt_ym, nTime)
+# When getting the list of block hashes, undo any byte reversals.
def get_block_hashes(settings):
blkindex = []
f = open(settings['hashlist'], "r")
for line in f:
line = line.rstrip()
+ if settings['rev_hash_bytes'] == 'true':
+ line = hex_switchEndian(line)
blkindex.append(line)
print("Read " + str(len(blkindex)) + " hashes")
return blkindex
+# The block map shouldn't give or receive byte-reversed hashes.
def mkblockmap(blkindex):
blkmap = {}
for height,hash in enumerate(blkindex):
@@ -115,29 +124,30 @@ class BlockDataCopier:
self.setFileTime = True
if settings['split_timestamp'] != 0:
self.timestampSplit = True
- # Extents and cache for out-of-order blocks
+ # Extents and cache for out-of-order blocks
self.blockExtents = {}
self.outOfOrderData = {}
self.outOfOrderSize = 0 # running total size for items in outOfOrderData
def writeBlock(self, inhdr, blk_hdr, rawblock):
- if not self.fileOutput and ((self.outsz + self.inLen) > self.maxOutSz):
+ blockSizeOnDisk = len(inhdr) + len(blk_hdr) + len(rawblock)
+ if not self.fileOutput and ((self.outsz + blockSizeOnDisk) > self.maxOutSz):
self.outF.close()
if self.setFileTime:
- os.utime(outFname, (int(time.time()), highTS))
+ os.utime(self.outFname, (int(time.time()), self.highTS))
self.outF = None
self.outFname = None
- self.outFn = outFn + 1
+ self.outFn = self.outFn + 1
self.outsz = 0
(blkDate, blkTS) = get_blk_dt(blk_hdr)
if self.timestampSplit and (blkDate > self.lastDate):
- print("New month " + blkDate.strftime("%Y-%m") + " @ " + hash_str)
- lastDate = blkDate
- if outF:
- outF.close()
- if setFileTime:
- os.utime(outFname, (int(time.time()), highTS))
+ print("New month " + blkDate.strftime("%Y-%m") + " @ " + self.hash_str)
+ self.lastDate = blkDate
+ if self.outF:
+ self.outF.close()
+ if self.setFileTime:
+ os.utime(self.outFname, (int(time.time()), self.highTS))
self.outF = None
self.outFname = None
self.outFn = self.outFn + 1
@@ -145,11 +155,11 @@ class BlockDataCopier:
if not self.outF:
if self.fileOutput:
- outFname = self.settings['output_file']
+ self.outFname = self.settings['output_file']
else:
- outFname = "%s/blk%05d.dat" % (self.settings['output'], outFn)
- print("Output file " + outFname)
- self.outF = open(outFname, "wb")
+ self.outFname = os.path.join(self.settings['output'], "blk%05d.dat" % self.outFn)
+ print("Output file " + self.outFname)
+ self.outF = open(self.outFname, "wb")
self.outF.write(inhdr)
self.outF.write(blk_hdr)
@@ -165,7 +175,7 @@ class BlockDataCopier:
(self.blkCountIn, self.blkCountOut, len(self.blkindex), 100.0 * self.blkCountOut / len(self.blkindex)))
def inFileName(self, fn):
- return "%s/blk%05d.dat" % (self.settings['input'], fn)
+ return os.path.join(self.settings['input'], "blk%05d.dat" % fn)
def fetchBlock(self, extent):
'''Fetch block contents from disk given extents'''
@@ -205,7 +215,7 @@ class BlockDataCopier:
inMagic = inhdr[:4]
if (inMagic != self.settings['netmagic']):
- print("Invalid magic: " + inMagic.encode('hex'))
+ print("Invalid magic: " + hexlify(inMagic).decode('utf-8'))
return
inLenLE = inhdr[4:]
su = struct.unpack("<I", inLenLE)
@@ -213,13 +223,16 @@ class BlockDataCopier:
blk_hdr = self.inF.read(80)
inExtent = BlockExtent(self.inFn, self.inF.tell(), inhdr, blk_hdr, inLen)
- hash_str = calc_hash_str(blk_hdr)
- if not hash_str in blkmap:
- print("Skipping unknown block " + hash_str)
+ self.hash_str = calc_hash_str(blk_hdr)
+ if not self.hash_str in blkmap:
+ # Because blocks can be written to files out-of-order as of 0.10, the script
+ # may encounter blocks it doesn't know about. Treat as debug output.
+ if settings['debug_output'] == 'true':
+ print("Skipping unknown block " + self.hash_str)
self.inF.seek(inLen, os.SEEK_CUR)
continue
- blkHeight = self.blkmap[hash_str]
+ blkHeight = self.blkmap[self.hash_str]
self.blkCountIn += 1
if self.blkCountOut == blkHeight:
@@ -263,10 +276,16 @@ if __name__ == '__main__':
settings[m.group(1)] = m.group(2)
f.close()
+ # Force hash byte format setting to be lowercase to make comparisons easier.
+ # Also place upfront in case any settings need to know about it.
+ if 'rev_hash_bytes' not in settings:
+ settings['rev_hash_bytes'] = 'false'
+ settings['rev_hash_bytes'] = settings['rev_hash_bytes'].lower()
+
if 'netmagic' not in settings:
- settings['netmagic'] = 'c0c0c0c0'
+ settings['netmagic'] = 'f9beb4d9'
if 'genesis' not in settings:
- settings['genesis'] = '1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691'
+ settings['genesis'] = '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f'
if 'input' not in settings:
settings['input'] = 'input'
if 'hashlist' not in settings:
@@ -276,15 +295,18 @@ if __name__ == '__main__':
if 'split_timestamp' not in settings:
settings['split_timestamp'] = 0
if 'max_out_sz' not in settings:
- settings['max_out_sz'] = 1000L * 1000 * 1000
+ settings['max_out_sz'] = 1000 * 1000 * 1000
if 'out_of_order_cache_sz' not in settings:
settings['out_of_order_cache_sz'] = 100 * 1000 * 1000
+ if 'debug_output' not in settings:
+ settings['debug_output'] = 'false'
- settings['max_out_sz'] = long(settings['max_out_sz'])
+ settings['max_out_sz'] = int(settings['max_out_sz'])
settings['split_timestamp'] = int(settings['split_timestamp'])
settings['file_timestamp'] = int(settings['file_timestamp'])
- settings['netmagic'] = settings['netmagic'].decode('hex')
+ settings['netmagic'] = unhexlify(settings['netmagic'].encode('utf-8'))
settings['out_of_order_cache_sz'] = int(settings['out_of_order_cache_sz'])
+ settings['debug_output'] = settings['debug_output'].lower()
if 'output_file' not in settings and 'output' not in settings:
print("Missing output file / directory")
@@ -293,9 +315,8 @@ if __name__ == '__main__':
blkindex = get_block_hashes(settings)
blkmap = mkblockmap(blkindex)
+ # Block hash map won't be byte-reversed. Neither should the genesis hash.
if not settings['genesis'] in blkmap:
print("Genesis block not found in hashlist")
else:
BlockDataCopier(settings, blkindex, blkmap).run()
-
-
diff --git a/contrib/linearize/linearize-hashes.py b/contrib/linearize/linearize-hashes.py
index 1cf945500..00a54d082 100755
--- a/contrib/linearize/linearize-hashes.py
+++ b/contrib/linearize/linearize-hashes.py
@@ -1,39 +1,53 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
#
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
#
-# Copyright (c) 2013-2014 The Bitcoin Core developers
+# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import print_function
+try: # Python 3
+ import http.client as httplib
+except ImportError: # Python 2
+ import httplib
import json
-import struct
import re
import base64
-import httplib
import sys
settings = {}
+##### Switch endian-ness #####
+def hex_switchEndian(s):
+ """ Switches the endianness of a hex string (in pairs of hex chars) """
+ pairList = [s[i:i+2].encode() for i in range(0, len(s), 2)]
+ return b''.join(pairList[::-1]).decode()
+
class BitcoinRPC:
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)
+ authpair = authpair.encode('utf-8')
+ self.authhdr = b"Basic " + base64.b64encode(authpair)
+ self.conn = httplib.HTTPConnection(host, port=port, timeout=30)
def execute(self, obj):
- self.conn.request('POST', '/', json.dumps(obj),
- { 'Authorization' : self.authhdr,
- 'Content-type' : 'application/json' })
+ try:
+ self.conn.request('POST', '/', json.dumps(obj),
+ { 'Authorization' : self.authhdr,
+ 'Content-type' : 'application/json' })
+ except ConnectionRefusedError:
+ print('RPC connection refused. Check RPC settings and the server status.',
+ file=sys.stderr)
+ return None
resp = self.conn.getresponse()
if resp is None:
print("JSON-RPC: no response", file=sys.stderr)
return None
- body = resp.read()
+ body = resp.read().decode('utf-8')
resp_obj = json.loads(body)
return resp_obj
@@ -64,12 +78,17 @@ def get_block_hashes(settings, max_blocks_per_call=10000):
batch.append(rpc.build_request(x, 'getblockhash', [height + x]))
reply = rpc.execute(batch)
+ if reply is None:
+ print('Cannot continue. Program will halt.')
+ return None
for x,resp_obj in enumerate(reply):
if rpc.response_is_error(resp_obj):
print('JSON-RPC: error at height', height+x, ': ', resp_obj['error'], file=sys.stderr)
exit(1)
assert(resp_obj['id'] == x) # assume replies are in-sequence
+ if settings['rev_hash_bytes'] == 'true':
+ resp_obj['result'] = hex_switchEndian(resp_obj['result'])
print(resp_obj['result'])
height += num_blocks
@@ -96,11 +115,13 @@ if __name__ == '__main__':
if 'host' not in settings:
settings['host'] = '127.0.0.1'
if 'port' not in settings:
- settings['port'] = 22555
+ settings['port'] = 8332
if 'min_height' not in settings:
settings['min_height'] = 0
if 'max_height' not in settings:
- settings['max_height'] = 845000
+ settings['max_height'] = 313000
+ if 'rev_hash_bytes' not in settings:
+ settings['rev_hash_bytes'] = 'false'
if 'rpcuser' not in settings or 'rpcpassword' not in settings:
print("Missing username and/or password in cfg file", file=stderr)
sys.exit(1)
@@ -109,5 +130,7 @@ if __name__ == '__main__':
settings['min_height'] = int(settings['min_height'])
settings['max_height'] = int(settings['max_height'])
- get_block_hashes(settings)
+ # Force hash byte format setting to be lowercase to make comparisons easier.
+ settings['rev_hash_bytes'] = settings['rev_hash_bytes'].lower()
+ get_block_hashes(settings)
diff --git a/contrib/macdeploy/Base.lproj/InfoPlist.strings b/contrib/macdeploy/Base.lproj/InfoPlist.strings
deleted file mode 100644
index e6ef91a9d..000000000
--- a/contrib/macdeploy/Base.lproj/InfoPlist.strings
+++ /dev/null
@@ -1 +0,0 @@
-{ CFBundleDisplayName = "Dogecoin Core"; CFBundleName = "Dogecoin Core"; }
diff --git a/contrib/macdeploy/background.png b/contrib/macdeploy/background.png
deleted file mode 100644
index daf2a9b9a..000000000
--- a/contrib/macdeploy/background.png
+++ /dev/null
Binary files differ
diff --git a/contrib/macdeploy/background.psd b/contrib/macdeploy/background.psd
deleted file mode 100644
index b6782c185..000000000
--- a/contrib/macdeploy/background.psd
+++ /dev/null
Binary files differ
diff --git a/contrib/macdeploy/background.svg b/contrib/macdeploy/background.svg
new file mode 100644
index 000000000..9c330af45
--- /dev/null
+++ b/contrib/macdeploy/background.svg
@@ -0,0 +1,34 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="1000pt" height="640pt" viewBox="0 0 1000 640" preserveAspectRatio="xMidYMid meet">
+ <!-- kate: space-indent off;
+ Copyright (c) 2015 The Bitcoin Core developers
+ Distributed under the MIT software license, see the accompanying
+ file COPYING or http://www.opensource.org/licenses/mit-license.php.
+ -->
+ <style type="text/css"><![CDATA[
+ text {
+ font-family: "Tuffy";
+ font-size: 86px;
+ fill: gray;
+ text-anchor: middle;
+ }
+ ]]></style>
+ <defs>
+ <linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="100%">
+ <stop offset="0%" style="stop-color:rgb(239,239,239);stop-opacity:1" />
+ <stop offset="33%" style="stop-color:rgb(239,239,239);stop-opacity:1" />
+ <stop offset="80%" style="stop-color:rgb(205,205,205);stop-opacity:1" />
+ <stop offset="100%" style="stop-color:rgb(204,204,204);stop-opacity:1" />
+ </linearGradient>
+ </defs>
+ <rect width="1000" height="640" style="fill:url(#gradient);stroke-width:0" />
+ <g transform="translate(500,0) scale(0.9, 1)">
+ <text x="0" y="114">PACKAGE_NAME</text>
+ </g>
+ <g transform="translate(0.000000,640.000000) scale(0.100000,-0.100000)"
+ fill="#000000" stroke="none">
+ <path d="M4995 3705 c-24 -23 -25 -29 -25 -165 l0 -140 -306 0 -306 0 -29 -29 c-29 -29 -29 -31 -29 -141 0 -110 0 -112 29 -141 l29 -29 306 0 306 0 0 -140 c0 -136 1 -142 25 -165 16 -17 35 -25 57 -25 29 0 72 32 306 226 180 149 274 233 278 250 13 53 -2 70 -278 299 -235 194 -277 225 -306 225 -22 0 -41 -8 -57 -25z" fixlter="url(#glow)"/>
+ </g>
+</svg>
diff --git a/contrib/macdeploy/[email protected] b/contrib/macdeploy/[email protected]
deleted file mode 100644
index cd8ff51bd..000000000
--- a/contrib/macdeploy/[email protected]
+++ /dev/null
Binary files differ
diff --git a/contrib/macdeploy/custom_dsstore.py b/contrib/macdeploy/custom_dsstore.py
new file mode 100755
index 000000000..3c2a65f19
--- /dev/null
+++ b/contrib/macdeploy/custom_dsstore.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+# Copyright (c) 2013-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+from __future__ import division,print_function,unicode_literals
+import biplist
+from ds_store import DSStore
+from mac_alias import Alias
+import sys
+
+output_file = sys.argv[1]
+package_name_ns = sys.argv[2]
+
+ds = DSStore.open(output_file, 'w+')
+ds['.']['bwsp'] = {
+ 'ShowStatusBar': False,
+ 'WindowBounds': b'{{300, 280}, {500, 343}}',
+ 'ContainerShowSidebar': False,
+ 'SidebarWidth': 0,
+ 'ShowTabView': False,
+ 'PreviewPaneVisibility': False,
+ 'ShowToolbar': False,
+ 'ShowSidebar': False,
+ 'ShowPathbar': True
+}
+
+icvp = {
+ 'gridOffsetX': 0.0,
+ 'textSize': 12.0,
+ 'viewOptionsVersion': 1,
+ 'backgroundImageAlias': b'\x00\x00\x00\x00\x02\x1e\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd1\x94\\\xb0H+\x00\x05\x00\x00\x00\x98\x0fbackground.tiff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\xd19\xb0\xf8\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\r\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b.background\x00\x00\x10\x00\x08\x00\x00\xd1\x94\\\xb0\x00\x00\x00\x11\x00\x08\x00\x00\xd19\xb0\xf8\x00\x00\x00\x01\x00\x04\x00\x00\x00\x98\x00\x0e\x00 \x00\x0f\x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00.\x00t\x00i\x00f\x00f\x00\x0f\x00\x02\x00\x00\x00\x12\x00\x1c/.background/background.tiff\x00\x14\x01\x06\x00\x00\x00\x00\x01\x06\x00\x02\x00\x00\x0cMacintosh HD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\x97\xab\xc3H+\x00\x00\x01\x88[\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02u\xab\x8d\xd1\x94\\\xb0devrddsk\xff\xff\xff\xff\x00\x00\t \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07bitcoin\x00\x00\x10\x00\x08\x00\x00\xce\x97\xab\xc3\x00\x00\x00\x11\x00\x08\x00\x00\xd1\x94\\\xb0\x00\x00\x00\x01\x00\x14\x01\x88[\x88\x00\x16\xa9\t\x00\x08\xfaR\x00\x08\xfaQ\x00\x02d\x8e\x00\x0e\x00\x02\x00\x00\x00\x0f\x00\x1a\x00\x0c\x00M\x00a\x00c\x00i\x00n\x00t\x00o\x00s\x00h\x00 \x00H\x00D\x00\x13\x00\x01/\x00\x00\x15\x00\x02\x00\x14\xff\xff\x00\x00\xff\xff\x00\x00',
+ 'backgroundColorBlue': 1.0,
+ 'iconSize': 96.0,
+ 'backgroundColorGreen': 1.0,
+ 'arrangeBy': 'none',
+ 'showIconPreview': True,
+ 'gridSpacing': 100.0,
+ 'gridOffsetY': 0.0,
+ 'showItemInfo': False,
+ 'labelOnBottom': True,
+ 'backgroundType': 2,
+ 'backgroundColorRed': 1.0
+}
+alias = Alias.from_bytes(icvp['backgroundImageAlias'])
+alias.volume.name = package_name_ns
+alias.volume.posix_path = '/Volumes/' + package_name_ns
+alias.volume.disk_image_alias.target.filename = package_name_ns + '.temp.dmg'
+alias.volume.disk_image_alias.target.carbon_path = 'Macintosh HD:Users:\x00dogecoinuser:\x00Documents:\x00dogecoin:\x00dogecoin:\x00' + package_name_ns + '.temp.dmg'
+alias.volume.disk_image_alias.target.posix_path = 'Users/dogecoinuser/Documents/dogecoin/dogecoin/' + package_name_ns + '.temp.dmg'
+alias.target.carbon_path = package_name_ns + ':.background:\x00background.tiff'
+icvp['backgroundImageAlias'] = biplist.Data(alias.to_bytes())
+ds['.']['icvp'] = icvp
+
+ds['.']['vSrn'] = ('long', 1)
+
+ds['Applications']['Iloc'] = (370, 156)
+ds['Dogecoin-Qt.app']['Iloc'] = (128, 156)
+
+ds.flush()
+ds.close() \ No newline at end of file
diff --git a/contrib/macdeploy/detached-sig-apply.sh b/contrib/macdeploy/detached-sig-apply.sh
index 781fe315e..91674a92e 100755
--- a/contrib/macdeploy/detached-sig-apply.sh
+++ b/contrib/macdeploy/detached-sig-apply.sh
@@ -1,4 +1,8 @@
#!/bin/sh
+# Copyright (c) 2014-2015 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
set -e
UNSIGNED="$1"
diff --git a/contrib/macdeploy/detached-sig-create.sh b/contrib/macdeploy/detached-sig-create.sh
index 2955a7564..5022ea88b 100755
--- a/contrib/macdeploy/detached-sig-create.sh
+++ b/contrib/macdeploy/detached-sig-create.sh
@@ -1,8 +1,12 @@
#!/bin/sh
+# Copyright (c) 2014-2015 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
set -e
ROOTDIR=dist
-BUNDLE="${ROOTDIR}/Dogecoin-Qt.app"
+BUNDLE="${ROOTDIR}/Bitcoin-Qt.app"
CODESIGN=codesign
TEMPDIR=sign.temp
TEMPLIST=${TEMPDIR}/signatures.txt
diff --git a/contrib/macdeploy/extract-osx-sdk.sh b/contrib/macdeploy/extract-osx-sdk.sh
new file mode 100755
index 000000000..ff9fbd58d
--- /dev/null
+++ b/contrib/macdeploy/extract-osx-sdk.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+# Copyright (c) 2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+set -e
+
+INPUTFILE="Xcode_7.3.1.dmg"
+HFSFILENAME="5.hfs"
+SDKDIR="Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"
+
+7z x "${INPUTFILE}" "${HFSFILENAME}"
+SDKNAME="$(basename "${SDKDIR}")"
+SDKDIRINODE=$(ifind -n "${SDKDIR}" "${HFSFILENAME}")
+fls "${HFSFILENAME}" -rpF ${SDKDIRINODE} |
+ while read type inode filename; do
+ inode="${inode::-1}"
+ if [ "${filename:0:14}" = "usr/share/man/" ]; then
+ continue
+ fi
+ filename="${SDKNAME}/$filename"
+ echo "Extracting $filename ..."
+ mkdir -p "$(dirname "$filename")"
+ if [ "$type" = "l/l" ]; then
+ ln -s "$(icat "${HFSFILENAME}" $inode)" "$filename"
+ else
+ icat "${HFSFILENAME}" $inode >"$filename"
+ fi
+done
+echo "Building ${SDKNAME}.tar.gz ..."
+MTIME="$(istat "${HFSFILENAME}" "${SDKDIRINODE}" | perl -nle 'm/Content Modified:\s+(.*?)\s\(/ && print $1')"
+find "${SDKNAME}" | sort | tar --no-recursion --mtime="${MTIME}" --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > "${SDKNAME}.tar.gz"
+echo 'All done!'
diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index ab9438d29..550f490d9 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env python3
#
# Copyright (C) 2011 Patrick "p2k" Schneider <[email protected]>
#
@@ -201,16 +200,16 @@ class DeploymentInfo(object):
def getFrameworks(binaryPath, verbose):
if verbose >= 3:
- print "Inspecting with otool: " + binaryPath
+ print("Inspecting with otool: " + binaryPath)
otoolbin=os.getenv("OTOOL", "otool")
- otool = subprocess.Popen([otoolbin, "-L", binaryPath], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ otool = subprocess.Popen([otoolbin, "-L", binaryPath], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
o_stdout, o_stderr = otool.communicate()
if otool.returncode != 0:
if verbose >= 1:
sys.stderr.write(o_stderr)
sys.stderr.flush()
raise RuntimeError("otool failed with return code %d" % otool.returncode)
-
+
otoolLines = o_stdout.split("\n")
otoolLines.pop(0) # First line is the inspected binary
if ".framework" in binaryPath or binaryPath.endswith(".dylib"):
@@ -222,8 +221,8 @@ def getFrameworks(binaryPath, verbose):
info = FrameworkInfo.fromOtoolLibraryLine(line.strip())
if info is not None:
if verbose >= 3:
- print "Found framework:"
- print info
+ print("Found framework:")
+ print(info)
libraries.append(info)
return libraries
@@ -234,24 +233,24 @@ def runInstallNameTool(action, *args):
def changeInstallName(oldName, newName, binaryPath, verbose):
if verbose >= 3:
- print "Using install_name_tool:"
- print " in", binaryPath
- print " change reference", oldName
- print " to", newName
+ print("Using install_name_tool:")
+ print(" in", binaryPath)
+ print(" change reference", oldName)
+ print(" to", newName)
runInstallNameTool("change", oldName, newName, binaryPath)
def changeIdentification(id, binaryPath, verbose):
if verbose >= 3:
- print "Using install_name_tool:"
- print " change identification in", binaryPath
- print " to", id
+ print("Using install_name_tool:")
+ print(" change identification in", binaryPath)
+ print(" to", id)
runInstallNameTool("id", id, binaryPath)
def runStrip(binaryPath, verbose):
stripbin=os.getenv("STRIP", "strip")
if verbose >= 3:
- print "Using strip:"
- print " stripped", binaryPath
+ print("Using strip:")
+ print(" stripped", binaryPath)
subprocess.check_call([stripbin, "-x", binaryPath])
def copyFramework(framework, path, verbose):
@@ -274,8 +273,8 @@ def copyFramework(framework, path, verbose):
shutil.copy2(fromPath, toPath)
if verbose >= 3:
- print "Copied:", fromPath
- print " to:", toPath
+ print("Copied:", fromPath)
+ print(" to:", toPath)
permissions = os.stat(toPath)
if not permissions.st_mode & stat.S_IWRITE:
@@ -288,32 +287,31 @@ def copyFramework(framework, path, verbose):
if not os.path.exists(linkfrom):
os.symlink(linkto, linkfrom)
if verbose >= 2:
- print "Linked:", linkfrom, "->", linkto
+ print("Linked:", linkfrom, "->", linkto)
fromResourcesDir = framework.sourceResourcesDirectory
if os.path.exists(fromResourcesDir):
toResourcesDir = os.path.join(path, framework.destinationResourcesDirectory)
shutil.copytree(fromResourcesDir, toResourcesDir, symlinks=True)
if verbose >= 3:
- print "Copied resources:", fromResourcesDir
- print " to:", toResourcesDir
+ print("Copied resources:", fromResourcesDir)
+ print(" to:", toResourcesDir)
fromContentsDir = framework.sourceVersionContentsDirectory
if not os.path.exists(fromContentsDir):
fromContentsDir = framework.sourceContentsDirectory
if os.path.exists(fromContentsDir):
toContentsDir = os.path.join(path, framework.destinationVersionContentsDirectory)
shutil.copytree(fromContentsDir, toContentsDir, symlinks=True)
- contentslinkfrom = os.path.join(path, framework.destinationContentsDirectory)
if verbose >= 3:
- print "Copied Contents:", fromContentsDir
- print " to:", toContentsDir
+ print("Copied Contents:", fromContentsDir)
+ print(" to:", toContentsDir)
elif framework.frameworkName.startswith("libQtGui"): # Copy qt_menu.nib (applies to non-framework layout)
qtMenuNibSourcePath = os.path.join(framework.frameworkDirectory, "Resources", "qt_menu.nib")
qtMenuNibDestinationPath = os.path.join(path, "Contents", "Resources", "qt_menu.nib")
if os.path.exists(qtMenuNibSourcePath) and not os.path.exists(qtMenuNibDestinationPath):
shutil.copytree(qtMenuNibSourcePath, qtMenuNibDestinationPath, symlinks=True)
if verbose >= 3:
- print "Copied for libQtGui:", qtMenuNibSourcePath
- print " to:", qtMenuNibDestinationPath
+ print("Copied for libQtGui:", qtMenuNibSourcePath)
+ print(" to:", qtMenuNibDestinationPath)
return toPath
@@ -326,7 +324,7 @@ def deployFrameworks(frameworks, bundlePath, binaryPath, strip, verbose, deploym
deploymentInfo.deployedFrameworks.append(framework.frameworkName)
if verbose >= 2:
- print "Processing", framework.frameworkName, "..."
+ print("Processing", framework.frameworkName, "...")
# Get the Qt path from one of the Qt frameworks
if deploymentInfo.qtPath is None and framework.isQtFramework():
@@ -334,13 +332,13 @@ def deployFrameworks(frameworks, bundlePath, binaryPath, strip, verbose, deploym
if framework.installName.startswith("@executable_path") or framework.installName.startswith(bundlePath):
if verbose >= 2:
- print framework.frameworkName, "already deployed, skipping."
+ print(framework.frameworkName, "already deployed, skipping.")
continue
# install_name_tool the new id into the binary
changeInstallName(framework.installName, framework.deployedInstallName, binaryPath, verbose)
- # Copy farmework to app bundle.
+ # Copy framework to app bundle.
deployedBinaryPath = copyFramework(framework, bundlePath, verbose)
# Skip the rest if already was deployed.
if deployedBinaryPath is None:
@@ -366,7 +364,7 @@ def deployFrameworks(frameworks, bundlePath, binaryPath, strip, verbose, deploym
def deployFrameworksForAppBundle(applicationBundle, strip, verbose):
frameworks = getFrameworks(applicationBundle.binaryPath, verbose)
if len(frameworks) == 0 and verbose >= 1:
- print "Warning: Could not find any external frameworks to deploy in %s." % (applicationBundle.path)
+ print("Warning: Could not find any external frameworks to deploy in %s." % (applicationBundle.path))
return DeploymentInfo()
else:
return deployFrameworks(frameworks, applicationBundle.path, applicationBundle.binaryPath, strip, verbose)
@@ -444,7 +442,7 @@ def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose):
for pluginDirectory, pluginName in plugins:
if verbose >= 2:
- print "Processing plugin", os.path.join(pluginDirectory, pluginName), "..."
+ print("Processing plugin", os.path.join(pluginDirectory, pluginName), "...")
sourcePath = os.path.join(deploymentInfo.pluginPath, pluginDirectory, pluginName)
destinationDirectory = os.path.join(appBundleInfo.pluginPath, pluginDirectory)
@@ -454,8 +452,8 @@ def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose):
destinationPath = os.path.join(destinationDirectory, pluginName)
shutil.copy2(sourcePath, destinationPath)
if verbose >= 3:
- print "Copied:", sourcePath
- print " to:", destinationPath
+ print("Copied:", sourcePath)
+ print(" to:", destinationPath)
if strip:
runStrip(destinationPath, verbose)
@@ -492,9 +490,10 @@ ap.add_argument("-no-strip", dest="strip", action="store_false", default=True, h
ap.add_argument("-sign", dest="sign", action="store_true", default=False, help="sign .app bundle with codesign tool")
ap.add_argument("-dmg", nargs="?", const="", metavar="basename", help="create a .dmg disk image; if basename is not specified, a camel-cased version of the app name is used")
ap.add_argument("-fancy", nargs=1, metavar="plist", default=[], help="make a fancy looking disk image using the given plist file with instructions; requires -dmg to work")
-ap.add_argument("-add-qt-tr", nargs=1, metavar="languages", default=[], help="add Qt translation files to the bundle's ressources; the language list must be separated with commas, not with whitespace")
+ap.add_argument("-add-qt-tr", nargs=1, metavar="languages", default=[], help="add Qt translation files to the bundle's resources; the language list must be separated with commas, not with whitespace")
ap.add_argument("-translations-dir", nargs=1, metavar="path", default=None, help="Path to Qt's translation files")
ap.add_argument("-add-resources", nargs="+", metavar="path", default=[], help="list of additional files or folders to be copied into the bundle's resources; must be the last argument")
+ap.add_argument("-volname", nargs=1, metavar="volname", default=[], help="custom volume name for dmg")
config = ap.parse_args()
@@ -524,7 +523,7 @@ if config.translations_dir and config.translations_dir[0]:
for p in config.add_resources:
if verbose >= 3:
- print "Checking for \"%s\"..." % p
+ print("Checking for \"%s\"..." % p)
if not os.path.exists(p):
if verbose >= 1:
sys.stderr.write("Error: Could not find additional resource file \"%s\"\n" % (p))
@@ -534,7 +533,7 @@ for p in config.add_resources:
if len(config.fancy) == 1:
if verbose >= 3:
- print "Fancy: Importing plistlib..."
+ print("Fancy: Importing plistlib...")
try:
import plistlib
except ImportError:
@@ -544,7 +543,7 @@ if len(config.fancy) == 1:
p = config.fancy[0]
if verbose >= 3:
- print "Fancy: Loading \"%s\"..." % p
+ print("Fancy: Loading \"%s\"..." % p)
if not os.path.exists(p):
if verbose >= 1:
sys.stderr.write("Error: Could not find fancy disk image plist at \"%s\"\n" % (p))
@@ -558,23 +557,23 @@ if len(config.fancy) == 1:
sys.exit(1)
try:
- assert not fancy.has_key("window_bounds") or (isinstance(fancy["window_bounds"], list) and len(fancy["window_bounds"]) == 4)
- assert not fancy.has_key("background_picture") or isinstance(fancy["background_picture"], str)
- assert not fancy.has_key("icon_size") or isinstance(fancy["icon_size"], int)
- assert not fancy.has_key("applications_symlink") or isinstance(fancy["applications_symlink"], bool)
- if fancy.has_key("items_position"):
+ assert "window_bounds" not in fancy or (isinstance(fancy["window_bounds"], list) and len(fancy["window_bounds"]) == 4)
+ assert "background_picture" not in fancy or isinstance(fancy["background_picture"], str)
+ assert "icon_size" not in fancy or isinstance(fancy["icon_size"], int)
+ assert "applications_symlink" not in fancy or isinstance(fancy["applications_symlink"], bool)
+ if "items_position" in fancy:
assert isinstance(fancy["items_position"], dict)
- for key, value in fancy["items_position"].iteritems():
+ for key, value in fancy["items_position"].items():
assert isinstance(value, list) and len(value) == 2 and isinstance(value[0], int) and isinstance(value[1], int)
except:
if verbose >= 1:
sys.stderr.write("Error: Bad format of fancy disk image plist at \"%s\"\n" % (p))
sys.exit(1)
- if fancy.has_key("background_picture"):
+ if "background_picture" in fancy:
bp = fancy["background_picture"]
if verbose >= 3:
- print "Fancy: Resolving background picture \"%s\"..." % bp
+ print("Fancy: Resolving background picture \"%s\"..." % bp)
if not os.path.exists(bp):
bp = os.path.join(os.path.dirname(p), bp)
if not os.path.exists(bp):
@@ -590,18 +589,25 @@ else:
if os.path.exists("dist"):
if verbose >= 2:
- print "+ Removing old dist folder +"
+ print("+ Removing old dist folder +")
shutil.rmtree("dist")
# ------------------------------------------------
+if len(config.volname) == 1:
+ volname = config.volname[0]
+else:
+ volname = app_bundle_name
+
+# ------------------------------------------------
+
target = os.path.join("dist", "Dogecoin-Qt.app")
if verbose >= 2:
- print "+ Copying source bundle +"
+ print("+ Copying source bundle +")
if verbose >= 3:
- print app_bundle, "->", target
+ print(app_bundle, "->", target)
os.mkdir("dist")
shutil.copytree(app_bundle, target, symlinks=True)
@@ -611,7 +617,7 @@ applicationBundle = ApplicationBundleInfo(target)
# ------------------------------------------------
if verbose >= 2:
- print "+ Deploying frameworks +"
+ print("+ Deploying frameworks +")
try:
deploymentInfo = deployFrameworksForAppBundle(applicationBundle, config.strip, verbose)
@@ -630,7 +636,7 @@ except RuntimeError as e:
if config.plugins:
if verbose >= 2:
- print "+ Deploying plugins +"
+ print("+ Deploying plugins +")
try:
deployPlugins(applicationBundle, deploymentInfo, config.strip, verbose)
@@ -656,7 +662,7 @@ else:
for lng_file in add_qt_tr:
p = os.path.join(qt_tr_dir, lng_file)
if verbose >= 3:
- print "Checking for \"%s\"..." % p
+ print("Checking for \"%s\"..." % p)
if not os.path.exists(p):
if verbose >= 1:
sys.stderr.write("Error: Could not find Qt translation file \"%s\"\n" % (lng_file))
@@ -665,31 +671,30 @@ else:
# ------------------------------------------------
if verbose >= 2:
- print "+ Installing qt.conf +"
+ print("+ Installing qt.conf +")
-f = open(os.path.join(applicationBundle.resourcesPath, "qt.conf"), "wb")
-f.write(qt_conf)
-f.close()
+with open(os.path.join(applicationBundle.resourcesPath, "qt.conf"), "wb") as f:
+ f.write(qt_conf.encode())
# ------------------------------------------------
if len(add_qt_tr) > 0 and verbose >= 2:
- print "+ Adding Qt translations +"
+ print("+ Adding Qt translations +")
for lng_file in add_qt_tr:
if verbose >= 3:
- print os.path.join(qt_tr_dir, lng_file), "->", os.path.join(applicationBundle.resourcesPath, lng_file)
+ print(os.path.join(qt_tr_dir, lng_file), "->", os.path.join(applicationBundle.resourcesPath, lng_file))
shutil.copy2(os.path.join(qt_tr_dir, lng_file), os.path.join(applicationBundle.resourcesPath, lng_file))
# ------------------------------------------------
if len(config.add_resources) > 0 and verbose >= 2:
- print "+ Adding additional resources +"
+ print("+ Adding additional resources +")
for p in config.add_resources:
t = os.path.join(applicationBundle.resourcesPath, os.path.basename(p))
if verbose >= 3:
- print p, "->", t
+ print(p, "->", t)
if os.path.isdir(p):
shutil.copytree(p, t, symlinks=True)
else:
@@ -698,35 +703,19 @@ for p in config.add_resources:
# ------------------------------------------------
if config.sign and 'CODESIGNARGS' not in os.environ:
- print "You must set the CODESIGNARGS environment variable. Skipping signing."
+ print("You must set the CODESIGNARGS environment variable. Skipping signing.")
elif config.sign:
if verbose >= 1:
- print "Code-signing app bundle %s"%(target,)
+ print("Code-signing app bundle %s"%(target,))
subprocess.check_call("codesign --force %s %s"%(os.environ['CODESIGNARGS'], target), shell=True)
# ------------------------------------------------
if config.dmg is not None:
- #Patch in check_output for Python 2.6
- if "check_output" not in dir( subprocess ):
- def f(*popenargs, **kwargs):
- if 'stdout' in kwargs:
- raise ValueError('stdout argument not allowed, it will be overridden.')
- process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
- output, unused_err = process.communicate()
- retcode = process.poll()
- if retcode:
- cmd = kwargs.get("args")
- if cmd is None:
- cmd = popenargs[0]
- raise CalledProcessError(retcode, cmd)
- return output
- subprocess.check_output = f
-
def runHDIUtil(verb, image_basename, **kwargs):
hdiutil_args = ["hdiutil", verb, image_basename + ".dmg"]
- if kwargs.has_key("capture_stdout"):
+ if "capture_stdout" in kwargs:
del kwargs["capture_stdout"]
run = subprocess.check_output
else:
@@ -736,18 +725,18 @@ if config.dmg is not None:
hdiutil_args.append("-verbose")
run = subprocess.check_call
- for key, value in kwargs.iteritems():
+ for key, value in kwargs.items():
hdiutil_args.append("-" + key)
if not value is True:
hdiutil_args.append(str(value))
- return run(hdiutil_args)
+ return run(hdiutil_args, universal_newlines=True)
if verbose >= 2:
if fancy is None:
- print "+ Creating .dmg disk image +"
+ print("+ Creating .dmg disk image +")
else:
- print "+ Preparing .dmg disk image +"
+ print("+ Preparing .dmg disk image +")
if config.dmg != "":
dmg_name = config.dmg
@@ -757,12 +746,12 @@ if config.dmg is not None:
if fancy is None:
try:
- runHDIUtil("create", dmg_name, srcfolder="dist", format="UDBZ", volname="Dogecoin-Core", ov=True)
+ runHDIUtil("create", dmg_name, srcfolder="dist", format="UDBZ", volname=volname, ov=True)
except subprocess.CalledProcessError as e:
sys.exit(e.returncode)
else:
if verbose >= 3:
- print "Determining size of \"dist\"..."
+ print("Determining size of \"dist\"...")
size = 0
for path, dirs, files in os.walk("dist"):
for file in files:
@@ -770,14 +759,14 @@ if config.dmg is not None:
size += int(size * 0.15)
if verbose >= 3:
- print "Creating temp image for modification..."
+ print("Creating temp image for modification...")
try:
- runHDIUtil("create", dmg_name + ".temp", srcfolder="dist", format="UDRW", size=size, volname="Dogecoin-Core", ov=True)
+ runHDIUtil("create", dmg_name + ".temp", srcfolder="dist", format="UDRW", size=size, volname=volname, ov=True)
except subprocess.CalledProcessError as e:
sys.exit(e.returncode)
if verbose >= 3:
- print "Attaching temp image..."
+ print("Attaching temp image...")
try:
output = runHDIUtil("attach", dmg_name + ".temp", readwrite=True, noverify=True, noautoopen=True, capture_stdout=True)
except subprocess.CalledProcessError as e:
@@ -788,13 +777,13 @@ if config.dmg is not None:
disk_name = m.group(1)
if verbose >= 2:
- print "+ Applying fancy settings +"
+ print("+ Applying fancy settings +")
- if fancy.has_key("background_picture"):
+ if "background_picture" in fancy:
bg_path = os.path.join(disk_root, ".background", os.path.basename(fancy["background_picture"]))
os.mkdir(os.path.dirname(bg_path))
if verbose >= 3:
- print fancy["background_picture"], "->", bg_path
+ print(fancy["background_picture"], "->", bg_path)
shutil.copy2(fancy["background_picture"], bg_path)
else:
bg_path = None
@@ -831,21 +820,21 @@ if config.dmg is not None:
itemscript = Template('set position of item "${item}" of container window to {${position}}')
items_positions = []
- if fancy.has_key("items_position"):
- for name, position in fancy["items_position"].iteritems():
+ if "items_position" in fancy:
+ for name, position in fancy["items_position"].items():
params = { "item" : name, "position" : ",".join([str(p) for p in position]) }
items_positions.append(itemscript.substitute(params))
params = {
- "disk" : "Dogecoin-Core",
+ "disk" : volname,
"window_bounds" : "300,300,800,620",
"icon_size" : "96",
"background_commands" : "",
"items_positions" : "\n ".join(items_positions)
}
- if fancy.has_key("window_bounds"):
- params["window.bounds"] = ",".join([str(p) for p in fancy["window_bounds"]])
- if fancy.has_key("icon_size"):
+ if "window_bounds" in fancy:
+ params["window_bounds"] = ",".join([str(p) for p in fancy["window_bounds"]])
+ if "icon_size" in fancy:
params["icon_size"] = str(fancy["icon_size"])
if bg_path is not None:
# Set background file, then call SetFile to make it invisible.
@@ -860,12 +849,12 @@ if config.dmg is not None:
print(s)
p = subprocess.Popen(['osascript', '-'], stdin=subprocess.PIPE)
- p.communicate(input=s)
+ p.communicate(input=s.encode('utf-8'))
if p.returncode:
print("Error running osascript.")
if verbose >= 2:
- print "+ Finalizing .dmg disk image +"
+ print("+ Finalizing .dmg disk image +")
time.sleep(5)
try:
@@ -878,6 +867,7 @@ if config.dmg is not None:
# ------------------------------------------------
if verbose >= 2:
- print "+ Done +"
+ print("+ Done +")
sys.exit(0)
+
diff --git a/contrib/qos/README.md b/contrib/qos/README.md
index a95cccfd8..0ded87c58 100644
--- a/contrib/qos/README.md
+++ b/contrib/qos/README.md
@@ -1,5 +1,5 @@
-### Qos ###
+### QoS (Quality of service) ###
-This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Dogecoin network. It limits outbound TCP traffic with a source or destination port of 22556, but not if the destination IP is within a LAN (defined as 192.168.x.x).
+This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. It limits outbound TCP traffic with a source or destination port of 8333, but not if the destination IP is within a LAN.
-This means one can have an always-on dogecoind instance running, and another local dogecoind/dogecoin-qt instance which connects to this node and receives blocks from it.
+This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it.
diff --git a/contrib/qos/tc.sh b/contrib/qos/tc.sh
index 652457208..0d1dd65b4 100644
--- a/contrib/qos/tc.sh
+++ b/contrib/qos/tc.sh
@@ -1,11 +1,17 @@
+# Copyright (c) 2017 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
#network interface on which to limit traffic
IF="eth0"
#limit of the network interface in question
LINKCEIL="1gbit"
#limit outbound Bitcoin protocol traffic to this rate
LIMIT="160kbit"
-#defines the address space for which you wish to disable rate limiting
-LOCALNET="192.168.0.0/16"
+#defines the IPv4 address space for which you wish to disable rate limiting
+LOCALNET_V4="192.168.0.0/16"
+#defines the IPv6 address space for which you wish to disable rate limiting
+LOCALNET_V6="fe80::/10"
#delete existing rules
tc qdisc del dev ${IF} root
@@ -24,6 +30,12 @@ tc class add dev ${IF} parent 1:1 classid 1:11 htb rate ${LIMIT} ceil ${LIMIT} p
tc filter add dev ${IF} parent 1: protocol ip prio 1 handle 1 fw classid 1:10
tc filter add dev ${IF} parent 1: protocol ip prio 2 handle 2 fw classid 1:11
+if [ ! -z "${LOCALNET_V6}" ] ; then
+ # v6 cannot have the same priority value as v4
+ tc filter add dev ${IF} parent 1: protocol ipv6 prio 3 handle 1 fw classid 1:10
+ tc filter add dev ${IF} parent 1: protocol ipv6 prio 4 handle 2 fw classid 1:11
+fi
+
#delete any existing rules
#disable for now
#ret=0
@@ -33,9 +45,15 @@ tc filter add dev ${IF} parent 1: protocol ip prio 2 handle 2 fw classid 1:11
#done
#limit outgoing traffic to and from port 8333. but not when dealing with a host on the local network
-# (defined by $LOCALNET)
-# --set-mark marks packages matching these criteria with the number "2"
-# these packages are filtered by the tc filter with "handle 2"
+# (defined by $LOCALNET_V4 and $LOCALNET_V6)
+# --set-mark marks packages matching these criteria with the number "2" (v4)
+# --set-mark marks packages matching these criteria with the number "4" (v6)
+# these packets are filtered by the tc filter with "handle 2"
# this filter sends the packages into the 1:11 class, and this class is limited to ${LIMIT}
-iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 22556 ! -d ${LOCALNET} -j MARK --set-mark 0x2
-iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 22556 ! -d ${LOCALNET} -j MARK --set-mark 0x2
+iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 8333 ! -d ${LOCALNET_V4} -j MARK --set-mark 0x2
+iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 8333 ! -d ${LOCALNET_V4} -j MARK --set-mark 0x2
+
+if [ ! -z "${LOCALNET_V6}" ] ; then
+ ip6tables -t mangle -A OUTPUT -p tcp -m tcp --dport 8333 ! -d ${LOCALNET_V6} -j MARK --set-mark 0x4
+ ip6tables -t mangle -A OUTPUT -p tcp -m tcp --sport 8333 ! -d ${LOCALNET_V6} -j MARK --set-mark 0x4
+fi
diff --git a/contrib/qt_translations.py b/contrib/qt_translations.py
deleted file mode 100755
index fd8a8b712..000000000
--- a/contrib/qt_translations.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env python
-
-# Helpful little script that spits out a comma-separated list of
-# language codes for Qt icons that should be included
-# in binary bitcoin distributions
-
-import glob
-import os
-import re
-import sys
-
-if len(sys.argv) != 3:
- sys.exit("Usage: %s $QTDIR/translations $BITCOINDIR/src/qt/locale"%sys.argv[0])
-
-d1 = sys.argv[1]
-d2 = sys.argv[2]
-
-l1 = set([ re.search(r'qt_(.*).qm', f).group(1) for f in glob.glob(os.path.join(d1, 'qt_*.qm')) ])
-l2 = set([ re.search(r'bitcoin_(.*).qm', f).group(1) for f in glob.glob(os.path.join(d2, 'bitcoin_*.qm')) ])
-
-print ",".join(sorted(l1.intersection(l2)))
-
diff --git a/contrib/rpm/README.md b/contrib/rpm/README.md
new file mode 100644
index 000000000..e1fd0b317
--- /dev/null
+++ b/contrib/rpm/README.md
@@ -0,0 +1,185 @@
+RPM Spec File Notes
+-------------------
+
+The RPM spec file provided here is for Bitcoin-Core 0.12.0 and builds on CentOS
+7 with either the CentOS provided OpenSSL library or with LibreSSL as packaged
+at [LibreLAMP.com](https://librelamp.com/). It should hopefully not be too
+difficult to port the RPM spec file to most RPM based Linux distributions.
+
+When porting the spec file to build for a particular distribution, there are
+some important notes.
+
+## Sources
+
+It is considered good form for all sources to reference a URL where the source
+can be downloaded.
+
+Sources 0-9 should be reserved for source code tarballs. `Source0` should
+reference the release tarball available from https://bitcoin.org/bin/ and
+`Source1` should reference the BerkeleyDB source.
+
+Sources 10-99 are for source files that are maintained in the
+[Bitcoin git repository](https://github.com/bitcoin/bitcoin) but are not part of
+the release tarball. Most of these will reside in the `contrib` sub-directory.
+
+Sources 10-19 should be reserved for miscellaneous configuration files.
+Currently only `Source10` is used, for the example `bitcoin.conf` file.
+
+Sources 20-29 should be reserved for man pages. Currently only `Source20`
+through `Source23` are used.
+
+Sources 30-39 should be reserved for SELinux related files. Currently only
+`Source30` through `Source32` are used. Until those files are in a tagged
+release, the full URL specified in the RPM spec file will not work. You can get
+them from the git repository where you retrieved this file.
+
+Sources 100+ are for files that are not source tarballs and are not maintained
+in the bitcoin git repository. At present only an SVG version of the Bitcoin
+icon is used.
+
+## Patches
+
+In general, patches should be avoided. When a packager feels a patch is
+necessary, the packager should bring the problem to the attention of the bitcoin
+developers so that an official fix to the issue can make it into the next
+release.
+
+### Patch0 bitcoin-0.12.0-libressl.patch
+
+This patch is only needed if building against LibreSSL. LibreSSL is not the
+standard TLS library on most Linux distributions. The patch will likely not be
+needed when 0.12.1 is released, a proper fix is already in the Bitcoin git
+master branch.
+
+## BuildRequires
+
+The packages specified in the `BuildRequires` are specified according to the
+package naming convention currently used in CentOS 7 and EPEL for CentOS 7. You
+may need to change some of the package names for other distributions. This is
+most likely to be the case with the Qt packages.
+
+## BerkeleyDB
+
+The `build-unix.md` file recommends building against BerkeleyDB 4.8.30. Even if
+that is the version your Linux distribution ships with, it probably is a good
+idea to build Bitcoin Core against a static version of that library compiled
+according to the instructions in the `build-unix.md` file so that any changes
+the distribution may make in the future will not result in a problem for users.
+
+The problem that can exist, clients built against different versions of
+BerkeleyDB may not be able read each other's `wallet.dat` file which can make it
+difficult for a user to recover from backup in the event of a system failure.
+
+## Graphical User Interface and Qt Version
+
+The RPM spec file will by default build the GUI client linked against the Qt5
+libraries. If you wish instead to link against the Qt4 libraries you need to
+pass the switch `-D '_use_qt4 1'` at build time to the `rpmbuild` or `mock`
+command used to build the packages.
+
+If you would prefer not to build the GUI at all, you can pass the switch
+`-D '_no_gui 1'` to the `rpmbuild` or `mock` build command.
+
+## Desktop and KDE Files
+
+The desktop and KDE meta files are created in the spec file itself with the
+`cat` command. This is done to allow easy distribution specific changes without
+needing to use any patches. A specific time stamp is given to the files so that
+it does not they do not appear to have been updated every time the package is
+built. If you do make changes to them, you probably should update time stamp
+assigned to them in the `touch` command that specifies the time stamp.
+
+## SVG, PNG, and XPM Icons
+
+The `bitcoin.svg` file is from the source listed as `Source100`. It is used as
+the source for the PNG and XPM files. The generated PNG and XPM files are given
+the same time stamp as the source SVG file as a means of indicating they are
+derived from it.
+
+## Systemd
+
+This spec file assumes the target distribution uses systemd. That really only
+matters for the `bitcoin-server` package. At this point, most RPM based
+distributions that still receive vendor updates do in fact use systemd.
+
+The files to control the service are created in the RPM spec file itself using
+the `cat` command. This is done to make it easy to modify for other
+distributions that may implement things differently without needing to patch
+source. A specific time stamp is given to the files so that they do not appear
+to have been updated every time the package is built. If you do make changes to
+them, you probably should update the time stamp assigned to them in the `touch`
+command that specifies the time stamp.
+
+## SELinux
+
+The `bitcoin-server` package should have SELinux support. How to properly do
+that *may* vary by distribution and version of distribution.
+
+The SELinux stuff in this RPM spec file *should* be correct for CentOS, RHEL,
+and Fedora but it would be a good idea to review it before building the package
+on other distributions.
+
+## Tests
+
+The `%check` section takes a very long time to run. If your build system has a
+time limit for package build, you may need to make an exception for this
+package. On CentOS 7 the `%check` section completes successfully with both
+OpenSSL and LibreSSL, a failure really does mean something is wrong.
+
+## LibreSSL Build Notes
+
+To build against LibreSSL you will need to pass the switch
+`-D '_use_libressl 1'` to the `rpmbuild` or `mock` command or the spec file will
+want the OpenSSL development files.
+
+### LibreSSL and Boost
+
+LibreSSL (and some newer builds of OpenSSL) do not have support for SSLv3. This
+can cause issues with the Boost package if the Boost package has not been
+patched accordingly. On those distributions, you will either need to build
+Bitcoin-Core against OpenSSL or use a patched version of Boost in the build
+system.
+
+As SSLv3 is no longer safe, distributions that have not patched Boost to work
+with TLS libraries that do not support SSLv3 should have bug reports filed
+against the Boost package. This bug report has already been filed for RHEL 7 but
+it may need to be filed for other distributions.
+
+A patch for Boost: https://github.com/boostorg/asio/pull/23/files
+
+## ZeroMQ
+
+At this time, this RPM spec file does not support the ZeroMQ build options. A
+suitable version of ZeroMQ is not available for the platform this spec file was
+developed on (CentOS 7).
+
+## Legacy Credit
+
+This RPM spec file is largely based upon the work of Michael Hampton at
+[Ringing Liberty](https://www.ringingliberty.com/bitcoin/). He has been
+packaging Bitcoin for Fedora at least since 2012.
+
+Most of the differences between his packaging and this package are stylistic in
+nature. The major differences:
+
+1. He builds from a github tagged release rather than a release tarball. This
+should not result in different source code.
+
+2. He does not build BerkeleyDB but instead uses the BerkeleyDB provided by the
+Linux distribution. For the distributions he packages for, they currently all
+use the same version of BerkeleyDB so that difference is *probably* just
+academic.
+
+3. As of his 10.11.2 package he did not allow for building against LibreSSL,
+specifying a build without the Qt GUI, or specifying which version of the Qt
+libraries to use.
+
+4. I renamed the `bitcoin` package that contains the Qt GUI to `bitcoin-core` as
+that appears to be how the general population refers to it, in contrast to
+`bitcoin-xt` or `bitcoin-classic`. I wanted to make sure the general population
+knows what they are getting when installing the GUI package.
+
+As far as minor differences, I generally prefer to assign the file permissions
+in the `%files` portion of an RPM spec file rather than specifying the
+permissions of a file during `%install` and other minor things like that that
+are largely just cosmetic.
diff --git a/contrib/rpm/bitcoin-0.12.0-libressl.patch b/contrib/rpm/bitcoin-0.12.0-libressl.patch
new file mode 100644
index 000000000..555614a06
--- /dev/null
+++ b/contrib/rpm/bitcoin-0.12.0-libressl.patch
@@ -0,0 +1,24 @@
+diff -ur bitcoin-0.12.0.orig/src/init.cpp bitcoin-0.12.0/src/init.cpp
+--- bitcoin-0.12.0.orig/src/init.cpp 2015-12-31 16:00:00.000000000 -0800
++++ bitcoin-0.12.0/src/init.cpp 2016-02-23 06:03:47.133227757 -0800
+@@ -1075,7 +1075,7 @@
+ if (fPrintToDebugLog)
+ OpenDebugLog();
+
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ LogPrintf("Using OpenSSL version %s\n", SSLeay_version(SSLEAY_VERSION));
+ #else
+ LogPrintf("Using OpenSSL version %s\n", OpenSSL_version(OPENSSL_VERSION));
+diff -ur bitcoin-0.12.0.orig/src/qt/rpcconsole.cpp bitcoin-0.12.0/src/qt/rpcconsole.cpp
+--- bitcoin-0.12.0.orig/src/qt/rpcconsole.cpp 2015-12-31 16:00:00.000000000 -0800
++++ bitcoin-0.12.0/src/qt/rpcconsole.cpp 2016-02-23 15:09:42.881126841 -0800
+@@ -264,7 +264,7 @@
+
+ // set library version labels
+
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ ui->openSSLVersion->setText(SSLeay_version(SSLEAY_VERSION));
+ #else
+ ui->openSSLVersion->setText(OpenSSL_version(OPENSSL_VERSION));
diff --git a/contrib/rpm/bitcoin.fc b/contrib/rpm/bitcoin.fc
new file mode 100644
index 000000000..6f5eef637
--- /dev/null
+++ b/contrib/rpm/bitcoin.fc
@@ -0,0 +1,8 @@
+/usr/bin/bitcoin-cli -- gen_context(system_u:object_r:bitcoin_exec_t,s0)
+/usr/sbin/bitcoind -- gen_context(system_u:object_r:bitcoin_exec_t,s0)
+/usr/lib(64)?/bitcoin/bitcoind -- gen_context(system_u:object_r:bitcoin_exec_t,s0)
+
+/etc/bitcoin(/.*)? gen_context(system_u:object_r:bitcoin_conf_t,s0)
+/var/lib/bitcoin(/.*)? gen_context(system_u:object_r:bitcoin_var_lib_t,s0)
+
+(/var)?/run/bitcoind(/.*)? gen_context(system_u:object_r:bitcoin_var_run_t,s0)
diff --git a/contrib/rpm/bitcoin.if b/contrib/rpm/bitcoin.if
new file mode 100644
index 000000000..2b096c24d
--- /dev/null
+++ b/contrib/rpm/bitcoin.if
@@ -0,0 +1,157 @@
+
+## <summary>policy for bitcoin</summary>
+
+
+########################################
+## <summary>
+## Transition to bitcoin.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed to transition.
+## </summary>
+## </param>
+#
+interface(`bitcoin_domtrans',`
+ gen_require(`
+ type bitcoin_t, bitcoin_exec_t;
+ ')
+
+ corecmd_search_bin($1)
+ domtrans_pattern($1, bitcoin_exec_t, bitcoin_t)
+')
+
+
+########################################
+## <summary>
+## Execute bitcoin server in the bitcoin domain.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`bitcoin_initrc_domtrans',`
+ gen_require(`
+ type bitcoin_initrc_exec_t;
+ ')
+
+ init_labeled_script_domtrans($1, bitcoin_initrc_exec_t)
+')
+
+
+########################################
+## <summary>
+## Search bitcoin lib directories.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`bitcoin_search_lib',`
+ gen_require(`
+ type bitcoin_var_lib_t;
+ ')
+
+ allow $1 bitcoin_var_lib_t:dir search_dir_perms;
+ files_search_var_lib($1)
+')
+
+########################################
+## <summary>
+## Read bitcoin lib files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`bitcoin_read_lib_files',`
+ gen_require(`
+ type bitcoin_var_lib_t;
+ ')
+
+ files_search_var_lib($1)
+ read_files_pattern($1, bitcoin_var_lib_t, bitcoin_var_lib_t)
+')
+
+########################################
+## <summary>
+## Manage bitcoin lib files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`bitcoin_manage_lib_files',`
+ gen_require(`
+ type bitcoin_var_lib_t;
+ ')
+
+ files_search_var_lib($1)
+ manage_files_pattern($1, bitcoin_var_lib_t, bitcoin_var_lib_t)
+')
+
+########################################
+## <summary>
+## Manage bitcoin lib directories.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`bitcoin_manage_lib_dirs',`
+ gen_require(`
+ type bitcoin_var_lib_t;
+ ')
+
+ files_search_var_lib($1)
+ manage_dirs_pattern($1, bitcoin_var_lib_t, bitcoin_var_lib_t)
+')
+
+
+########################################
+## <summary>
+## All of the rules required to administrate
+## an bitcoin environment
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+## <param name="role">
+## <summary>
+## Role allowed access.
+## </summary>
+## </param>
+## <rolecap/>
+#
+interface(`bitcoin_admin',`
+ gen_require(`
+ type bitcoin_t;
+ type bitcoin_initrc_exec_t;
+ type bitcoin_var_lib_t;
+ ')
+
+ allow $1 bitcoin_t:process { ptrace signal_perms };
+ ps_process_pattern($1, bitcoin_t)
+
+ bitcoin_initrc_domtrans($1)
+ domain_system_change_exemption($1)
+ role_transition $2 bitcoin_initrc_exec_t system_r;
+ allow $2 system_r;
+
+ files_search_var_lib($1)
+ admin_pattern($1, bitcoin_var_lib_t)
+
+')
+
diff --git a/contrib/rpm/bitcoin.spec b/contrib/rpm/bitcoin.spec
new file mode 100644
index 000000000..516f42334
--- /dev/null
+++ b/contrib/rpm/bitcoin.spec
@@ -0,0 +1,440 @@
+%define bdbv 4.8.30
+%global selinux_variants mls strict targeted
+
+%if 0%{?_no_gui:1}
+%define _buildqt 0
+%define buildargs --with-gui=no
+%else
+%define _buildqt 1
+%if 0%{?_use_qt4}
+%define buildargs --with-qrencode --with-gui=qt4
+%else
+%define buildargs --with-qrencode --with-gui=qt5
+%endif
+%endif
+
+Name: bitcoin
+Version: 0.12.0
+Release: 2%{?dist}
+Summary: Peer to Peer Cryptographic Currency
+
+Group: Applications/System
+License: MIT
+URL: https://bitcoin.org/
+Source0: https://bitcoin.org/bin/bitcoin-core-%{version}/bitcoin-%{version}.tar.gz
+Source1: http://download.oracle.com/berkeley-db/db-%{bdbv}.NC.tar.gz
+
+Source10: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/debian/examples/bitcoin.conf
+
+#man pages
+Source20: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/doc/man/bitcoind.1
+Source21: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/doc/man/bitcoin-cli.1
+Source22: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/doc/man/bitcoin-qt.1
+
+#selinux
+Source30: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/rpm/bitcoin.te
+# Source31 - what about bitcoin-tx and bench_bitcoin ???
+Source31: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/rpm/bitcoin.fc
+Source32: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/rpm/bitcoin.if
+
+Source100: https://upload.wikimedia.org/wikipedia/commons/4/46/Bitcoin.svg
+
+%if 0%{?_use_libressl:1}
+BuildRequires: libressl-devel
+%else
+BuildRequires: openssl-devel
+%endif
+BuildRequires: boost-devel
+BuildRequires: miniupnpc-devel
+BuildRequires: autoconf automake libtool
+BuildRequires: libevent-devel
+
+
+Patch0: bitcoin-0.12.0-libressl.patch
+
+
+%description
+Bitcoin is a digital cryptographic currency that uses peer-to-peer technology to
+operate with no central authority or banks; managing transactions and the
+issuing of bitcoins is carried out collectively by the network.
+
+%if %{_buildqt}
+%package core
+Summary: Peer to Peer Cryptographic Currency
+Group: Applications/System
+Obsoletes: %{name} < %{version}-%{release}
+Provides: %{name} = %{version}-%{release}
+%if 0%{?_use_qt4}
+BuildRequires: qt-devel
+%else
+BuildRequires: qt5-qtbase-devel
+# for /usr/bin/lrelease-qt5
+BuildRequires: qt5-linguist
+%endif
+BuildRequires: protobuf-devel
+BuildRequires: qrencode-devel
+BuildRequires: %{_bindir}/desktop-file-validate
+# for icon generation from SVG
+BuildRequires: %{_bindir}/inkscape
+BuildRequires: %{_bindir}/convert
+
+%description core
+Bitcoin is a digital cryptographic currency that uses peer-to-peer technology to
+operate with no central authority or banks; managing transactions and the
+issuing of bitcoins is carried out collectively by the network.
+
+This package contains the Qt based graphical client and node. If you are looking
+to run a Bitcoin wallet, this is probably the package you want.
+%endif
+
+
+%package libs
+Summary: Bitcoin shared libraries
+Group: System Environment/Libraries
+
+%description libs
+This package provides the bitcoinconsensus shared libraries. These libraries
+may be used by third party software to provide consensus verification
+functionality.
+
+Unless you know need this package, you probably do not.
+
+%package devel
+Summary: Development files for bitcoin
+Group: Development/Libraries
+Requires: %{name}-libs = %{version}-%{release}
+
+%description devel
+This package contains the header files and static library for the
+bitcoinconsensus shared library. If you are developing or compiling software
+that wants to link against that library, then you need this package installed.
+
+Most people do not need this package installed.
+
+%package server
+Summary: The bitcoin daemon
+Group: System Environment/Daemons
+Requires: bitcoin-utils = %{version}-%{release}
+Requires: selinux-policy policycoreutils-python
+Requires(pre): shadow-utils
+Requires(post): %{_sbindir}/semodule %{_sbindir}/restorecon %{_sbindir}/fixfiles %{_sbindir}/sestatus
+Requires(postun): %{_sbindir}/semodule %{_sbindir}/restorecon %{_sbindir}/fixfiles %{_sbindir}/sestatus
+BuildRequires: systemd
+BuildRequires: checkpolicy
+BuildRequires: %{_datadir}/selinux/devel/Makefile
+
+%description server
+This package provides a stand-alone bitcoin-core daemon. For most users, this
+package is only needed if they need a full-node without the graphical client.
+
+Some third party wallet software will want this package to provide the actual
+bitcoin-core node they use to connect to the network.
+
+If you use the graphical bitcoin-core client then you almost certainly do not
+need this package.
+
+%package utils
+Summary: Bitcoin utilities
+Group: Applications/System
+
+%description utils
+This package provides several command line utilities for interacting with a
+bitcoin-core daemon.
+
+The bitcoin-cli utility allows you to communicate and control a bitcoin daemon
+over RPC, the bitcoin-tx utility allows you to create a custom transaction, and
+the bench_bitcoin utility can be used to perform some benchmarks.
+
+This package contains utilities needed by the bitcoin-server package.
+
+
+%prep
+%setup -q
+%patch0 -p1 -b .libressl
+cp -p %{SOURCE10} ./bitcoin.conf.example
+tar -zxf %{SOURCE1}
+cp -p db-%{bdbv}.NC/LICENSE ./db-%{bdbv}.NC-LICENSE
+mkdir db4 SELinux
+cp -p %{SOURCE30} %{SOURCE31} %{SOURCE32} SELinux/
+
+
+%build
+CWD=`pwd`
+cd db-%{bdbv}.NC/build_unix/
+../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${CWD}/db4
+make install
+cd ../..
+
+./autogen.sh
+%configure LDFLAGS="-L${CWD}/db4/lib/" CPPFLAGS="-I${CWD}/db4/include/" --with-miniupnpc --enable-glibc-back-compat %{buildargs}
+make %{?_smp_mflags}
+
+pushd SELinux
+for selinuxvariant in %{selinux_variants}; do
+ make NAME=${selinuxvariant} -f %{_datadir}/selinux/devel/Makefile
+ mv bitcoin.pp bitcoin.pp.${selinuxvariant}
+ make NAME=${selinuxvariant} -f %{_datadir}/selinux/devel/Makefile clean
+done
+popd
+
+
+%install
+make install DESTDIR=%{buildroot}
+
+mkdir -p -m755 %{buildroot}%{_sbindir}
+mv %{buildroot}%{_bindir}/bitcoind %{buildroot}%{_sbindir}/bitcoind
+
+# systemd stuff
+mkdir -p %{buildroot}%{_tmpfilesdir}
+cat <<EOF > %{buildroot}%{_tmpfilesdir}/bitcoin.conf
+d /run/bitcoind 0750 bitcoin bitcoin -
+EOF
+touch -a -m -t 201504280000 %{buildroot}%{_tmpfilesdir}/bitcoin.conf
+
+mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
+cat <<EOF > %{buildroot}%{_sysconfdir}/sysconfig/bitcoin
+# Provide options to the bitcoin daemon here, for example
+# OPTIONS="-testnet -disable-wallet"
+
+OPTIONS=""
+
+# System service defaults.
+# Don't change these unless you know what you're doing.
+CONFIG_FILE="%{_sysconfdir}/bitcoin/bitcoin.conf"
+DATA_DIR="%{_localstatedir}/lib/bitcoin"
+PID_FILE="/run/bitcoind/bitcoind.pid"
+EOF
+touch -a -m -t 201504280000 %{buildroot}%{_sysconfdir}/sysconfig/bitcoin
+
+mkdir -p %{buildroot}%{_unitdir}
+cat <<EOF > %{buildroot}%{_unitdir}/bitcoin.service
+[Unit]
+Description=Bitcoin daemon
+After=syslog.target network.target
+
+[Service]
+Type=forking
+ExecStart=%{_sbindir}/bitcoind -daemon -conf=\${CONFIG_FILE} -datadir=\${DATA_DIR} -pid=\${PID_FILE} \$OPTIONS
+EnvironmentFile=%{_sysconfdir}/sysconfig/bitcoin
+User=bitcoin
+Group=bitcoin
+
+Restart=on-failure
+PrivateTmp=true
+TimeoutStopSec=120
+TimeoutStartSec=60
+StartLimitInterval=240
+StartLimitBurst=5
+
+[Install]
+WantedBy=multi-user.target
+EOF
+touch -a -m -t 201504280000 %{buildroot}%{_unitdir}/bitcoin.service
+#end systemd stuff
+
+mkdir %{buildroot}%{_sysconfdir}/bitcoin
+mkdir -p %{buildroot}%{_localstatedir}/lib/bitcoin
+
+#SELinux
+for selinuxvariant in %{selinux_variants}; do
+ install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
+ install -p -m 644 SELinux/bitcoin.pp.${selinuxvariant} %{buildroot}%{_datadir}/selinux/${selinuxvariant}/bitcoin.pp
+done
+
+%if %{_buildqt}
+# qt icons
+install -D -p share/pixmaps/bitcoin.ico %{buildroot}%{_datadir}/pixmaps/bitcoin.ico
+install -p share/pixmaps/nsis-header.bmp %{buildroot}%{_datadir}/pixmaps/
+install -p share/pixmaps/nsis-wizard.bmp %{buildroot}%{_datadir}/pixmaps/
+install -p %{SOURCE100} %{buildroot}%{_datadir}/pixmaps/bitcoin.svg
+%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin16.png -w16 -h16
+%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin32.png -w32 -h32
+%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin64.png -w64 -h64
+%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin128.png -w128 -h128
+%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin256.png -w256 -h256
+%{_bindir}/convert -resize 16x16 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin16.xpm
+%{_bindir}/convert -resize 32x32 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin32.xpm
+%{_bindir}/convert -resize 64x64 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin64.xpm
+%{_bindir}/convert -resize 128x128 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin128.xpm
+%{_bindir}/convert %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin256.xpm
+touch %{buildroot}%{_datadir}/pixmaps/*.png -r %{SOURCE100}
+touch %{buildroot}%{_datadir}/pixmaps/*.xpm -r %{SOURCE100}
+
+# Desktop File - change the touch timestamp if modifying
+mkdir -p %{buildroot}%{_datadir}/applications
+cat <<EOF > %{buildroot}%{_datadir}/applications/bitcoin-core.desktop
+[Desktop Entry]
+Encoding=UTF-8
+Name=Bitcoin
+Comment=Bitcoin P2P Cryptocurrency
+Comment[fr]=Bitcoin, monnaie virtuelle cryptographique pair à pair
+Comment[tr]=Bitcoin, eÅŸten eÅŸe kriptografik sanal para birimi
+Exec=bitcoin-qt %u
+Terminal=false
+Type=Application
+Icon=bitcoin128
+MimeType=x-scheme-handler/bitcoin;
+Categories=Office;Finance;
+EOF
+# change touch date when modifying desktop
+touch -a -m -t 201511100546 %{buildroot}%{_datadir}/applications/bitcoin-core.desktop
+%{_bindir}/desktop-file-validate %{buildroot}%{_datadir}/applications/bitcoin-core.desktop
+
+# KDE protocol - change the touch timestamp if modifying
+mkdir -p %{buildroot}%{_datadir}/kde4/services
+cat <<EOF > %{buildroot}%{_datadir}/kde4/services/bitcoin-core.protocol
+[Protocol]
+exec=bitcoin-qt '%u'
+protocol=bitcoin
+input=none
+output=none
+helper=true
+listing=
+reading=false
+writing=false
+makedir=false
+deleting=false
+EOF
+# change touch date when modifying protocol
+touch -a -m -t 201511100546 %{buildroot}%{_datadir}/kde4/services/bitcoin-core.protocol
+%endif
+
+# man pages
+install -D -p %{SOURCE20} %{buildroot}%{_mandir}/man1/bitcoind.1
+install -p %{SOURCE21} %{buildroot}%{_mandir}/man1/bitcoin-cli.1
+%if %{_buildqt}
+install -p %{SOURCE22} %{buildroot}%{_mandir}/man1/bitcoin-qt.1
+%endif
+
+# nuke these, we do extensive testing of binaries in %%check before packaging
+rm -f %{buildroot}%{_bindir}/test_*
+
+%check
+make check
+pushd src
+srcdir=. test/bitcoin-util-test.py
+popd
+qa/pull-tester/rpc-tests.py -extended
+
+%post libs -p /sbin/ldconfig
+
+%postun libs -p /sbin/ldconfig
+
+%pre server
+getent group bitcoin >/dev/null || groupadd -r bitcoin
+getent passwd bitcoin >/dev/null ||
+ useradd -r -g bitcoin -d /var/lib/bitcoin -s /sbin/nologin \
+ -c "Bitcoin wallet server" bitcoin
+exit 0
+
+%post server
+%systemd_post bitcoin.service
+# SELinux
+if [ `%{_sbindir}/sestatus |grep -c "disabled"` -eq 0 ]; then
+for selinuxvariant in %{selinux_variants}; do
+ %{_sbindir}/semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/bitcoin.pp &> /dev/null || :
+done
+%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 8332
+%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 8333
+%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 18332
+%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 18333
+%{_sbindir}/fixfiles -R bitcoin-server restore &> /dev/null || :
+%{_sbindir}/restorecon -R %{_localstatedir}/lib/bitcoin || :
+fi
+
+%posttrans server
+%{_bindir}/systemd-tmpfiles --create
+
+%preun server
+%systemd_preun bitcoin.service
+
+%postun server
+%systemd_postun bitcoin.service
+# SELinux
+if [ $1 -eq 0 ]; then
+ if [ `%{_sbindir}/sestatus |grep -c "disabled"` -eq 0 ]; then
+ %{_sbindir}/semanage port -d -p tcp 8332
+ %{_sbindir}/semanage port -d -p tcp 8333
+ %{_sbindir}/semanage port -d -p tcp 18332
+ %{_sbindir}/semanage port -d -p tcp 18333
+ for selinuxvariant in %{selinux_variants}; do
+ %{_sbindir}/semodule -s ${selinuxvariant} -r bitcoin &> /dev/null || :
+ done
+ %{_sbindir}/fixfiles -R bitcoin-server restore &> /dev/null || :
+ [ -d %{_localstatedir}/lib/bitcoin ] && \
+ %{_sbindir}/restorecon -R %{_localstatedir}/lib/bitcoin &> /dev/null || :
+ fi
+fi
+
+%clean
+rm -rf %{buildroot}
+
+%if %{_buildqt}
+%files core
+%defattr(-,root,root,-)
+%license COPYING db-%{bdbv}.NC-LICENSE
+%doc COPYING bitcoin.conf.example doc/README.md doc/bips.md doc/files.md doc/multiwallet-qt.md doc/reduce-traffic.md doc/release-notes.md doc/tor.md
+%attr(0755,root,root) %{_bindir}/bitcoin-qt
+%attr(0644,root,root) %{_datadir}/applications/bitcoin-core.desktop
+%attr(0644,root,root) %{_datadir}/kde4/services/bitcoin-core.protocol
+%attr(0644,root,root) %{_datadir}/pixmaps/*.ico
+%attr(0644,root,root) %{_datadir}/pixmaps/*.bmp
+%attr(0644,root,root) %{_datadir}/pixmaps/*.svg
+%attr(0644,root,root) %{_datadir}/pixmaps/*.png
+%attr(0644,root,root) %{_datadir}/pixmaps/*.xpm
+%attr(0644,root,root) %{_mandir}/man1/bitcoin-qt.1*
+%endif
+
+%files libs
+%defattr(-,root,root,-)
+%license COPYING
+%doc COPYING doc/README.md doc/shared-libraries.md
+%{_libdir}/lib*.so.*
+
+%files devel
+%defattr(-,root,root,-)
+%license COPYING
+%doc COPYING doc/README.md doc/developer-notes.md doc/shared-libraries.md
+%attr(0644,root,root) %{_includedir}/*.h
+%{_libdir}/*.so
+%{_libdir}/*.a
+%{_libdir}/*.la
+%attr(0644,root,root) %{_libdir}/pkgconfig/*.pc
+
+%files server
+%defattr(-,root,root,-)
+%license COPYING db-%{bdbv}.NC-LICENSE
+%doc COPYING bitcoin.conf.example doc/README.md doc/REST-interface.md doc/bips.md doc/dnsseed-policy.md doc/files.md doc/reduce-traffic.md doc/release-notes.md doc/tor.md
+%attr(0755,root,root) %{_sbindir}/bitcoind
+%attr(0644,root,root) %{_tmpfilesdir}/bitcoin.conf
+%attr(0644,root,root) %{_unitdir}/bitcoin.service
+%dir %attr(0750,bitcoin,bitcoin) %{_sysconfdir}/bitcoin
+%dir %attr(0750,bitcoin,bitcoin) %{_localstatedir}/lib/bitcoin
+%config(noreplace) %attr(0600,root,root) %{_sysconfdir}/sysconfig/bitcoin
+%attr(0644,root,root) %{_datadir}/selinux/*/*.pp
+%attr(0644,root,root) %{_mandir}/man1/bitcoind.1*
+
+%files utils
+%defattr(-,root,root,-)
+%license COPYING
+%doc COPYING bitcoin.conf.example doc/README.md
+%attr(0755,root,root) %{_bindir}/bitcoin-cli
+%attr(0755,root,root) %{_bindir}/bitcoin-tx
+%attr(0755,root,root) %{_bindir}/bench_bitcoin
+%attr(0644,root,root) %{_mandir}/man1/bitcoin-cli.1*
+
+
+
+%changelog
+* Fri Feb 26 2016 Alice Wonder <[email protected]> - 0.12.0-2
+- Rename Qt package from bitcoin to bitcoin-core
+- Make building of the Qt package optional
+- When building the Qt package, default to Qt5 but allow building
+- against Qt4
+- Only run SELinux stuff in post scripts if it is not set to disabled
+
+* Wed Feb 24 2016 Alice Wonder <[email protected]> - 0.12.0-1
+- Initial spec file for 0.12.0 release
+
+# This spec file is written from scratch but a lot of the packaging decisions are directly
+# based upon the 0.11.2 package spec file from https://www.ringingliberty.com/bitcoin/
diff --git a/contrib/rpm/bitcoin.te b/contrib/rpm/bitcoin.te
new file mode 100644
index 000000000..d6231c591
--- /dev/null
+++ b/contrib/rpm/bitcoin.te
@@ -0,0 +1,81 @@
+policy_module(bitcoin, 1.100.1)
+
+########################################
+#
+# Declarations
+#
+
+type bitcoin_t;
+type bitcoin_exec_t;
+init_daemon_domain(bitcoin_t, bitcoin_exec_t)
+
+permissive bitcoin_t;
+
+type bitcoin_initrc_exec_t;
+init_script_file(bitcoin_initrc_exec_t)
+
+type bitcoin_conf_t;
+files_type(bitcoin_conf_t)
+
+type bitcoin_var_lib_t;
+files_type(bitcoin_var_lib_t)
+
+type bitcoin_var_run_t;
+files_type(bitcoin_var_run_t)
+
+type bitcoin_port_t;
+corenet_port(bitcoin_port_t)
+
+########################################
+#
+# bitcoin local policy
+#
+allow bitcoin_t self:process { fork };
+
+allow bitcoin_t self:fifo_file rw_fifo_file_perms;
+allow bitcoin_t self:unix_stream_socket create_stream_socket_perms;
+
+manage_dirs_pattern(bitcoin_t, bitcoin_conf_t, bitcoin_conf_t)
+manage_files_pattern(bitcoin_t, bitcoin_conf_t, bitcoin_conf_t)
+
+manage_dirs_pattern(bitcoin_t, bitcoin_var_lib_t, bitcoin_var_lib_t)
+manage_files_pattern(bitcoin_t, bitcoin_var_lib_t, bitcoin_var_lib_t)
+files_var_lib_filetrans(bitcoin_t, bitcoin_var_lib_t, { dir file })
+
+manage_dirs_pattern(bitcoin_t, bitcoin_var_run_t, bitcoin_var_run_t)
+manage_files_pattern(bitcoin_t, bitcoin_var_run_t, bitcoin_var_run_t)
+
+sysnet_dns_name_resolve(bitcoin_t)
+corenet_all_recvfrom_unlabeled(bitcoin_t)
+
+allow bitcoin_t self:tcp_socket create_stream_socket_perms;
+corenet_tcp_sendrecv_generic_if(bitcoin_t)
+corenet_tcp_sendrecv_generic_node(bitcoin_t)
+corenet_tcp_sendrecv_all_ports(bitcoin_t)
+corenet_tcp_bind_generic_node(bitcoin_t)
+
+gen_require(`
+ type bitcoin_port_t;
+')
+allow bitcoin_t bitcoin_port_t:tcp_socket name_bind;
+
+gen_require(`
+ type bitcoin_port_t;
+')
+allow bitcoin_t bitcoin_port_t:tcp_socket name_connect;
+
+domain_use_interactive_fds(bitcoin_t)
+
+files_read_etc_files(bitcoin_t)
+
+miscfiles_read_localization(bitcoin_t)
+
+sysnet_dns_name_resolve(bitcoin_t)
+
+allow bitcoin_t bitcoin_exec_t:file execute_no_trans;
+allow bitcoin_t self:process setsched;
+corecmd_exec_ls(bitcoin_t)
+corenet_tcp_connect_http_port(bitcoin_t)
+dev_read_urand(bitcoin_t)
+fs_getattr_xattr_fs(bitcoin_t)
+kernel_read_system_state(bitcoin_t)
diff --git a/contrib/seeds/README.md b/contrib/seeds/README.md
index bc88201f0..139c03181 100644
--- a/contrib/seeds/README.md
+++ b/contrib/seeds/README.md
@@ -1,8 +1,19 @@
-### Seeds ###
+# Seeds
Utility to generate the seeds.txt list that is compiled into the client
-(see [src/chainparamsseeds.h](/src/chainparamsseeds.h) and [share/seeds](/share/seeds)).
+(see [src/chainparamsseeds.h](/src/chainparamsseeds.h) and other utilities in [contrib/seeds](/contrib/seeds)).
-The 512 seeds compiled into the 0.10 release were created from sipa's DNS seed data, like this:
+Be sure to update `PATTERN_AGENT` in `makeseeds.py` to include the current version,
+and remove old versions as necessary.
- curl -s http://bitcoin.sipa.be/seeds.txt | makeseeds.py
+The seeds compiled into the release are created from sipa's DNS seed data, like this:
+
+ curl -s http://bitcoin.sipa.be/seeds.txt.gz | gzip -dc > seeds_main.txt
+ python3 makeseeds.py < seeds_main.txt > nodes_main.txt
+ python3 generate-seeds.py . > ../../src/chainparamsseeds.h
+
+## Dependencies
+
+Ubuntu:
+
+ sudo apt-get install python3-dnspython
diff --git a/contrib/seeds/generate-seeds.py b/contrib/seeds/generate-seeds.py
new file mode 100755
index 000000000..b0ac92ae0
--- /dev/null
+++ b/contrib/seeds/generate-seeds.py
@@ -0,0 +1,138 @@
+#!/usr/bin/env python3
+# Copyright (c) 2014-2017 Wladimir J. van der Laan
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+'''
+Script to generate list of seed nodes for chainparams.cpp.
+
+This script expects two text files in the directory that is passed as an
+argument:
+
+ nodes_main.txt
+ nodes_test.txt
+
+These files must consist of lines in the format
+
+ <ip>
+ <ip>:<port>
+ [<ipv6>]
+ [<ipv6>]:<port>
+ <onion>.onion
+ 0xDDBBCCAA (IPv4 little-endian old pnSeeds format)
+
+The output will be two data structures with the peers in binary format:
+
+ static SeedSpec6 pnSeed6_main[]={
+ ...
+ }
+ static SeedSpec6 pnSeed6_test[]={
+ ...
+ }
+
+These should be pasted into `src/chainparamsseeds.h`.
+'''
+
+from base64 import b32decode
+from binascii import a2b_hex
+import sys, os
+import re
+
+# ipv4 in ipv6 prefix
+pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff])
+# tor-specific ipv6 prefix
+pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43])
+
+def name_to_ipv6(addr):
+ if len(addr)>6 and addr.endswith('.onion'):
+ vchAddr = b32decode(addr[0:-6], True)
+ if len(vchAddr) != 16-len(pchOnionCat):
+ raise ValueError('Invalid onion %s' % s)
+ return pchOnionCat + vchAddr
+ elif '.' in addr: # IPv4
+ return pchIPv4 + bytearray((int(x) for x in addr.split('.')))
+ elif ':' in addr: # IPv6
+ sub = [[], []] # prefix, suffix
+ x = 0
+ addr = addr.split(':')
+ for i,comp in enumerate(addr):
+ if comp == '':
+ if i == 0 or i == (len(addr)-1): # skip empty component at beginning or end
+ continue
+ x += 1 # :: skips to suffix
+ assert(x < 2)
+ else: # two bytes per component
+ val = int(comp, 16)
+ sub[x].append(val >> 8)
+ sub[x].append(val & 0xff)
+ nullbytes = 16 - len(sub[0]) - len(sub[1])
+ assert((x == 0 and nullbytes == 0) or (x == 1 and nullbytes > 0))
+ return bytearray(sub[0] + ([0] * nullbytes) + sub[1])
+ elif addr.startswith('0x'): # IPv4-in-little-endian
+ return pchIPv4 + bytearray(reversed(a2b_hex(addr[2:])))
+ else:
+ raise ValueError('Could not parse address %s' % addr)
+
+def parse_spec(s, defaultport):
+ match = re.match('\[([0-9a-fA-F:]+)\](?::([0-9]+))?$', s)
+ if match: # ipv6
+ host = match.group(1)
+ port = match.group(2)
+ elif s.count(':') > 1: # ipv6, no port
+ host = s
+ port = ''
+ else:
+ (host,_,port) = s.partition(':')
+
+ if not port:
+ port = defaultport
+ else:
+ port = int(port)
+
+ host = name_to_ipv6(host)
+
+ return (host,port)
+
+def process_nodes(g, f, structname, defaultport):
+ g.write('static SeedSpec6 %s[] = {\n' % structname)
+ first = True
+ for line in f:
+ comment = line.find('#')
+ if comment != -1:
+ line = line[0:comment]
+ line = line.strip()
+ if not line:
+ continue
+ if not first:
+ g.write(',\n')
+ first = False
+
+ (host,port) = parse_spec(line, defaultport)
+ hoststr = ','.join(('0x%02x' % b) for b in host)
+ g.write(' {{%s}, %i}' % (hoststr, port))
+ g.write('\n};\n')
+
+def main():
+ if len(sys.argv)<2:
+ print(('Usage: %s <path_to_nodes_txt>' % sys.argv[0]), file=sys.stderr)
+ exit(1)
+ g = sys.stdout
+ indir = sys.argv[1]
+ g.write('#ifndef BITCOIN_CHAINPARAMSSEEDS_H\n')
+ g.write('#define BITCOIN_CHAINPARAMSSEEDS_H\n')
+ g.write('/**\n')
+ g.write(' * List of fixed seed nodes for the bitcoin network\n')
+ g.write(' * AUTOGENERATED by contrib/seeds/generate-seeds.py\n')
+ g.write(' *\n')
+ g.write(' * Each line contains a 16-byte IPv6 address and a port.\n')
+ g.write(' * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n')
+ g.write(' */\n')
+ with open(os.path.join(indir,'nodes_main.txt'),'r') as f:
+ process_nodes(g, f, 'pnSeed6_main', 8333)
+ g.write('\n')
+ with open(os.path.join(indir,'nodes_test.txt'),'r') as f:
+ process_nodes(g, f, 'pnSeed6_test', 18333)
+ g.write('#endif // BITCOIN_CHAINPARAMSSEEDS_H\n')
+
+if __name__ == '__main__':
+ main()
+
diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py
index b831395f2..34f0f5767 100755
--- a/contrib/seeds/makeseeds.py
+++ b/contrib/seeds/makeseeds.py
@@ -1,4 +1,7 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
+# Copyright (c) 2013-2017 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
@@ -11,37 +14,61 @@ MIN_BLOCKS = 337600
# These are hosts that have been observed to be behaving strangely (e.g.
# aggressively connecting to every node).
-SUSPICIOUS_HOSTS = set([
+SUSPICIOUS_HOSTS = {
"130.211.129.106", "178.63.107.226",
"83.81.130.26", "88.198.17.7", "148.251.238.178", "176.9.46.6",
"54.173.72.127", "54.174.10.182", "54.183.64.54", "54.194.231.211",
"54.66.214.167", "54.66.220.137", "54.67.33.14", "54.77.251.214",
"54.94.195.96", "54.94.200.247"
-])
+}
import re
import sys
import dns.resolver
+import collections
-PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):8333$")
-PATTERN_AGENT = re.compile(r"^(\/Satoshi:0.8.6\/|\/Satoshi:0.9.(2|3)\/|\/Satoshi:0.10.\d{1,2}\/)$")
+PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):(\d+)$")
+PATTERN_IPV6 = re.compile(r"^\[([0-9a-z:]+)\]:(\d+)$")
+PATTERN_ONION = re.compile(r"^([abcdefghijklmnopqrstuvwxyz234567]{16}\.onion):(\d+)$")
+PATTERN_AGENT = re.compile(r"^(/Satoshi:0.12.(0|1|99)/|/Satoshi:0.13.(0|1|2|99)/)$")
def parseline(line):
sline = line.split()
if len(sline) < 11:
return None
- # Match only IPv4
m = PATTERN_IPV4.match(sline[0])
+ sortkey = None
+ ip = None
if m is None:
- return None
- # Do IPv4 sanity check
- ip = 0
- for i in range(0,4):
- if int(m.group(i+2)) < 0 or int(m.group(i+2)) > 255:
+ m = PATTERN_IPV6.match(sline[0])
+ if m is None:
+ m = PATTERN_ONION.match(sline[0])
+ if m is None:
+ return None
+ else:
+ net = 'onion'
+ ipstr = sortkey = m.group(1)
+ port = int(m.group(2))
+ else:
+ net = 'ipv6'
+ if m.group(1) in ['::']: # Not interested in localhost
+ return None
+ ipstr = m.group(1)
+ sortkey = ipstr # XXX parse IPv6 into number, could use name_to_ipv6 from generate-seeds
+ port = int(m.group(2))
+ else:
+ # Do IPv4 sanity check
+ ip = 0
+ for i in range(0,4):
+ if int(m.group(i+2)) < 0 or int(m.group(i+2)) > 255:
+ return None
+ ip = ip + (int(m.group(i+2)) << (8*(3-i)))
+ if ip == 0:
return None
- ip = ip + (int(m.group(i+2)) << (8*(3-i)))
- if ip == 0:
- return None
+ net = 'ipv4'
+ sortkey = ip
+ ipstr = m.group(1)
+ port = int(m.group(6))
# Skip bad results.
if sline[1] == 0:
return None
@@ -59,7 +86,9 @@ def parseline(line):
blocks = int(sline[8])
# Construct result.
return {
- 'ip': m.group(1),
+ 'net': net,
+ 'ip': ipstr,
+ 'port': port,
'ipnum': ip,
'uptime': uptime30,
'lastsuccess': lastsuccess,
@@ -67,13 +96,27 @@ def parseline(line):
'agent': agent,
'service': service,
'blocks': blocks,
+ 'sortkey': sortkey,
}
+def filtermultiport(ips):
+ '''Filter out hosts with more nodes per IP'''
+ hist = collections.defaultdict(list)
+ for ip in ips:
+ hist[ip['sortkey']].append(ip)
+ return [value[0] for (key,value) in list(hist.items()) if len(value)==1]
+
# Based on Greg Maxwell's seed_filter.py
def filterbyasn(ips, max_per_asn, max_total):
+ # Sift out ips by type
+ ips_ipv4 = [ip for ip in ips if ip['net'] == 'ipv4']
+ ips_ipv6 = [ip for ip in ips if ip['net'] == 'ipv6']
+ ips_onion = [ip for ip in ips if ip['net'] == 'onion']
+
+ # Filter IPv4 by ASN
result = []
asn_count = {}
- for ip in ips:
+ for ip in ips_ipv4:
if len(result) == max_total:
break
try:
@@ -86,13 +129,19 @@ def filterbyasn(ips, max_per_asn, max_total):
result.append(ip)
except:
sys.stderr.write('ERR: Could not resolve ASN for "' + ip['ip'] + '"\n')
+
+ # TODO: filter IPv6 by ASN
+
+ # Add back non-IPv4
+ result.extend(ips_ipv6)
+ result.extend(ips_onion)
return result
def main():
lines = sys.stdin.readlines()
ips = [parseline(line) for line in lines]
- # Skip entries with valid IPv4 address.
+ # Skip entries with valid address.
ips = [ip for ip in ips if ip is not None]
# Skip entries from suspicious hosts.
ips = [ip for ip in ips if ip['ip'] not in SUSPICIOUS_HOSTS]
@@ -106,13 +155,18 @@ def main():
ips = [ip for ip in ips if PATTERN_AGENT.match(ip['agent'])]
# Sort by availability (and use last success as tie breaker)
ips.sort(key=lambda x: (x['uptime'], x['lastsuccess'], x['ip']), reverse=True)
+ # Filter out hosts with multiple bitcoin ports, these are likely abusive
+ ips = filtermultiport(ips)
# Look up ASNs and limit results, both per ASN and globally.
ips = filterbyasn(ips, MAX_SEEDS_PER_ASN, NSEEDS)
# Sort the results by IP address (for deterministic output).
- ips.sort(key=lambda x: (x['ipnum']))
+ ips.sort(key=lambda x: (x['net'], x['sortkey']))
for ip in ips:
- print ip['ip']
+ if ip['net'] == 'ipv6':
+ print('[%s]:%i' % (ip['ip'], ip['port']))
+ else:
+ print('%s:%i' % (ip['ip'], ip['port']))
if __name__ == '__main__':
main()
diff --git a/contrib/seeds/nodes_main.txt b/contrib/seeds/nodes_main.txt
new file mode 100644
index 000000000..0451771da
--- /dev/null
+++ b/contrib/seeds/nodes_main.txt
@@ -0,0 +1,1168 @@
+2.7.8.12:8333
+2.228.70.198:8333
+5.39.64.7:8333
+5.45.80.34:38333
+5.51.160.38:8333
+5.61.33.33:8333
+5.61.37.12:8333
+5.95.80.47:8333
+5.102.164.173:8333
+5.175.71.130:8333
+5.189.165.22:8333
+5.199.130.228:8333
+5.228.100.222:8333
+5.255.64.231:8333
+13.93.6.133:8333
+18.85.34.10:8333
+18.241.0.63:8333
+23.28.128.65:8333
+23.248.113.52:8333
+23.253.151.73:8333
+24.4.96.121:8333
+24.69.65.191:8333
+24.87.8.43:8333
+24.150.224.110:8333
+24.227.69.146:8333
+27.0.235.33:8333
+31.170.106.203:8333
+31.184.197.96:8333
+31.214.240.56:8333
+37.1.202.134:8333
+37.18.74.232:8333
+37.34.48.17:8333
+37.48.64.140:8333
+37.97.141.116:8333
+37.120.164.16:8333
+37.120.169.123:8333
+37.143.9.128:8333
+37.153.172.227:8333
+37.193.227.16:8333
+37.205.8.78:8333
+37.220.0.114:8333
+37.232.218.199:8333
+38.140.161.53:8333
+40.87.70.120:8333
+41.162.163.93:8333
+42.2.198.48:8333
+45.20.67.1:8333
+45.55.197.77:8333
+45.56.97.63:8333
+45.58.38.162:8333
+45.63.1.33:8333
+45.79.2.70:8333
+46.16.240.98:8333
+46.19.137.74:8333
+46.28.206.146:8333
+46.32.252.197:8333
+46.59.13.59:8333
+46.59.39.195:8333
+46.148.16.210:8333
+46.160.195.121:8333
+46.166.142.21:8333
+46.166.160.29:8330
+46.188.44.20:8333
+46.229.238.187:8333
+46.231.16.149:8333
+47.88.100.130:8333
+47.89.192.134:8333
+47.185.194.160:8333
+47.189.129.218:8333
+49.65.2.140:8333
+50.3.72.129:8333
+50.31.99.225:8333
+51.175.33.95:8333
+52.1.165.219:8333
+52.10.170.186:8333
+52.51.128.216:8333
+54.197.130.244:8333
+58.59.2.22:8333
+58.84.6.81:8333
+59.125.8.143:8333
+59.167.130.139:8333
+61.47.2.20:8333
+62.43.130.178:8333
+62.76.96.6:8333
+62.107.200.30:8333
+62.133.15.58:8333
+62.133.194.2:8333
+62.133.194.156:8333
+62.138.1.95:8333
+62.216.238.3:8333
+62.238.34.125:8333
+63.137.40.207:8333
+63.231.96.109:8333
+64.78.240.150:8333
+64.83.225.146:8333
+64.137.236.68:8833
+64.156.193.120:8333
+66.79.160.82:8333
+66.91.230.231:8333
+66.135.128.121:8333
+66.172.10.4:8333
+66.194.38.250:8333
+66.194.38.253:8333
+66.215.34.26:8333
+66.240.237.155:8333
+67.205.96.108:8333
+67.205.128.5:8333
+67.219.233.140:8333
+67.221.193.55:8333
+68.100.196.118:8333
+68.132.193.222:8333
+68.168.118.234:8333
+69.11.97.43:8333
+69.30.229.10:8333
+69.50.171.205:8333
+69.125.193.145:8333
+69.162.139.125:8333
+70.35.98.39:8333
+70.112.32.29:8333
+71.126.181.146:8333
+72.180.32.105:8333
+73.226.64.145:8333
+74.83.140.242:8333
+74.84.128.158:9333
+74.122.237.124:8333
+74.215.133.145:8333
+75.76.101.169:8333
+75.85.13.8:8333
+75.86.168.13:8333
+75.170.97.25:8333
+75.177.137.134:8333
+76.76.227.136:8333
+77.53.136.6:8333
+77.110.11.52:8333
+78.25.32.206:8333
+78.34.8.120:8333
+78.46.32.99:8333
+78.56.9.214:8333
+78.56.229.177:8333
+78.129.237.245:8333
+78.196.172.45:8333
+79.132.230.144:8333
+79.169.35.235:8333
+79.172.194.219:8333
+80.64.65.87:8333
+80.89.137.115:8333
+80.93.36.173:8333
+80.101.167.100:8333
+80.114.34.158:8333
+80.127.136.50:8333
+80.188.139.82:8333
+80.222.39.77:8333
+80.223.105.69:8333
+80.229.151.187:8333
+80.240.129.221:8333
+81.7.10.238:8333
+81.7.13.84:8333
+81.27.96.92:8333
+81.35.143.98:8333
+81.82.201.5:8333
+81.83.96.5:8333
+81.169.227.36:8333
+81.171.2.119:8333
+81.171.38.130:8333
+81.175.255.118:8333
+81.207.8.49:8333
+81.228.194.187:8333
+82.9.1.77:8333
+82.11.33.229:8333
+82.102.13.117:8333
+82.116.203.240:8333
+82.130.103.16:8333
+82.136.65.227:8333
+82.158.227.238:8333
+82.197.212.25:8333
+82.199.102.10:8333
+82.200.204.41:8333
+82.200.204.119:8333
+82.221.105.223:8333
+82.221.108.27:8333
+82.221.111.136:8333
+82.221.139.97:8333
+83.137.41.10:8333
+83.143.130.19:8333
+83.150.9.196:8333
+83.169.2.43:8333
+83.217.203.130:8333
+83.249.88.52:8333
+84.26.162.92:8333
+84.42.193.6:8333
+84.134.194.115:8333
+84.201.32.115:8333
+84.212.232.71:8333
+84.238.140.176:8333
+85.10.104.34:8333
+85.21.144.226:8333
+85.25.194.12:8333
+85.144.79.190:8333
+85.145.228.192:8333
+85.194.238.130:8333
+85.228.201.80:8333
+85.229.228.174:8333
+85.236.233.87:8333
+86.80.204.185:8333
+86.105.227.190:8333
+86.135.39.40:8333
+87.106.139.127:8333
+87.120.8.5:8333
+87.120.37.230:8333
+87.239.101.102:8333
+87.243.197.82:8333
+88.112.112.173:8333
+88.150.192.17:8333
+88.185.155.134:8333
+88.202.202.221:8333
+88.202.230.87:8333
+88.208.39.182:8333
+89.34.99.41:8333
+89.163.224.187:8333
+89.169.233.150:8333
+89.184.65.85:8333
+89.212.91.219:8333
+89.249.178.36:8333
+90.149.38.172:8333
+91.65.97.157:8333
+91.107.64.143:8333
+91.114.35.107:8333
+91.135.0.187:8333
+91.145.110.95:8333
+91.157.38.151:8333
+91.197.44.133:8333
+91.205.176.54:8333
+91.206.203.10:8333
+91.206.203.18:8333
+91.215.35.130:8333
+91.219.239.159:8333
+91.223.133.2:8333
+91.223.133.40:8333
+91.226.10.90:8333
+91.240.141.169:8333
+92.27.7.209:8333
+92.89.67.207:8333
+92.221.201.138:8333
+93.95.187.122:8333
+93.103.73.187:8333
+93.123.80.47:8333
+93.188.224.253:8333
+93.190.69.242:8333
+94.19.12.244:8333
+94.156.128.116:8333
+94.177.171.73:8333
+94.181.44.104:8333
+94.237.26.173:8333
+94.242.229.158:8333
+94.255.128.98:8333
+95.79.35.50:8333
+95.91.41.39:8333
+95.110.234.93:8333
+95.128.48.209:8333
+95.183.48.71:8333
+96.23.67.85:8333
+97.64.177.10:8333
+97.104.201.95:8333
+98.29.197.149:8333
+98.169.2.107:8333
+99.232.48.72:8333
+101.100.141.55:8333
+103.7.32.40:8333
+103.53.225.69:8333
+103.249.106.74:8333
+104.128.224.13:8333
+104.128.228.252:8333
+104.155.1.158:8333
+104.168.128.50:8333
+104.199.160.228:8333
+104.204.109.11:8333
+104.219.251.118:8333
+104.223.3.129:8333
+104.223.3.219:8333
+104.238.130.182:8333
+104.245.99.227:8333
+106.38.234.89:8333
+106.104.134.218:8333
+107.136.6.71:8333
+107.150.45.210:8333
+107.151.144.103:8333
+107.170.44.99:8333
+107.181.137.133:8333
+107.191.102.13:8333
+108.58.252.82:8333
+108.59.9.167:8333
+108.59.12.163:8333
+108.162.106.215:8333
+108.168.133.164:8333
+108.173.202.101:8333
+108.180.110.190:8333
+109.29.75.40:8333
+109.120.194.136:8333
+109.230.230.88:8333
+109.235.67.115:8333
+109.235.69.120:8333
+109.236.90.199:8333
+109.255.0.107:8333
+110.10.130.12:8333
+110.10.176.94:8333
+110.132.172.251:8333
+111.90.158.17:8333
+115.66.205.171:8333
+116.31.123.139:8333
+118.192.48.46:8333
+118.193.164.98:8333
+119.29.156.231:8333
+119.63.44.133:19980
+119.81.99.27:8333
+119.106.12.169:8333
+119.147.137.155:19980
+119.185.1.182:8333
+120.55.193.136:8333
+121.254.173.23:8333
+121.254.173.40:8333
+123.56.129.45:8333
+123.203.163.128:8333
+123.206.32.198:8333
+124.189.160.221:8333
+124.189.192.232:8333
+128.140.224.162:8333
+128.199.68.205:8333
+130.234.207.115:8333
+131.113.41.123:8333
+131.114.72.104:8333
+132.204.108.155:8333
+134.119.13.230:8333
+134.213.133.206:8333
+134.213.133.207:8333
+135.23.5.3:8333
+137.74.0.66:8333
+138.68.1.45:8333
+138.68.2.194:8333
+138.68.64.19:8333
+138.68.64.28:8333
+139.59.42.248:8333
+139.220.240.153:8333
+140.112.107.118:8333
+140.186.224.112:8333
+141.52.64.141:8333
+142.68.237.107:8333
+142.217.12.106:8333
+146.60.204.92:8333
+146.185.161.209:8333
+148.103.7.119:8333
+149.210.133.244:8333
+150.229.0.143:8333
+151.231.238.25:8333
+151.248.160.227:8333
+153.230.228.15:8333
+155.133.43.249:8333
+158.58.238.145:8333
+158.109.79.13:34821
+159.203.70.208:8333
+160.16.206.31:8333
+162.209.1.233:8333
+162.209.4.125:8333
+162.216.192.231:8333
+162.243.100.111:8333
+162.246.11.194:8333
+162.248.102.117:8333
+162.252.46.83:8333
+163.172.33.78:8333
+163.172.194.30:8333
+169.229.198.106:8333
+170.75.195.168:8333
+172.103.205.197:8333
+172.245.225.126:8333
+173.179.37.8:8333
+173.208.203.74:8333
+173.252.46.16:8333
+174.117.141.124:8333
+175.126.38.158:8333
+175.126.38.177:8333
+175.139.106.119:8333
+175.140.232.66:8333
+176.9.117.100:8333
+176.36.33.121:8333
+176.36.99.222:8333
+176.56.227.36:8333
+176.100.100.206:8333
+176.106.144.183:8333
+176.123.7.148:8333
+176.126.167.10:8333
+176.223.201.198:8333
+178.62.68.62:8333
+178.62.102.56:8333
+178.62.203.185:8333
+178.124.197.101:8333
+178.170.138.202:8333
+178.175.129.18:8333
+178.188.47.62:8333
+178.199.240.22:8333
+178.218.209.162:8333
+178.237.35.34:8333
+178.238.224.242:8333
+178.254.34.144:8333
+178.254.34.161:8333
+179.43.183.2:8333
+180.200.128.58:8333
+182.93.34.130:8333
+185.8.238.197:8333
+185.11.139.172:8333
+185.24.97.11:8333
+185.24.233.100:8333
+185.25.48.71:8333
+185.25.48.114:8333
+185.28.76.179:8333
+185.70.105.152:8339
+185.77.128.69:8333
+185.77.128.241:8333
+185.86.79.87:8333
+185.89.102.2:3333
+185.89.102.53:3333
+185.109.144.155:8333
+185.117.75.50:8333
+185.121.173.223:8333
+185.128.41.157:8333
+185.130.226.106:8333
+185.145.130.76:8333
+188.63.192.104:8333
+188.113.164.231:8333
+188.166.229.112:8333
+188.214.128.77:8333
+190.10.8.211:8333
+190.81.160.184:8333
+190.111.231.19:8333
+192.131.44.93:8333
+192.206.202.6:8333
+192.227.245.133:8333
+192.241.74.123:8333
+192.241.74.126:8333
+192.254.71.222:8333
+193.10.64.85:8333
+193.46.80.101:8333
+193.49.43.219:8333
+193.93.79.215:8333
+193.183.99.46:8333
+193.234.224.195:8333
+193.239.80.155:8333
+194.63.140.208:8333
+194.87.1.232:8333
+194.187.227.18:8333
+194.247.12.136:8333
+195.91.176.86:8333
+196.28.98.20:8333
+198.44.249.35:8333
+198.84.172.252:8333
+198.204.224.106:8333
+198.211.97.46:8333
+199.66.64.198:8333
+199.101.100.58:8333
+199.101.100.59:8333
+199.127.224.50:8333
+200.46.241.71:8333
+200.116.98.185:8333
+203.9.225.13:8333
+203.177.142.37:8333
+205.200.247.149:8333
+205.209.131.150:13838
+206.53.64.74:8333
+206.72.192.69:8333
+206.123.112.180:8333
+208.66.208.153:8333
+208.68.174.76:8333
+208.107.97.242:8333
+208.111.48.132:8333
+208.118.235.190:8333
+209.6.205.126:8333
+209.40.96.121:8333
+209.58.130.137:8333
+209.73.142.226:8333
+209.90.224.4:8333
+209.126.69.243:8333
+209.126.108.91:8333
+209.195.4.18:8333
+209.250.6.190:8333
+210.54.37.225:8333
+210.223.3.44:8333
+211.149.234.109:8333
+212.51.140.183:8333
+212.90.179.206:8333
+212.93.226.90:8333
+212.110.171.118:8333
+212.202.132.17:8333
+213.91.205.134:8333
+213.165.68.218:8333
+213.196.200.213:8333
+216.59.4.212:8333
+216.74.32.109:8333
+216.158.225.70:8333
+216.164.138.13:8333
+216.167.236.247:8333
+216.197.79.74:8333
+217.11.225.189:8333
+217.12.199.207:8333
+217.20.130.72:8333
+217.23.6.148:8333
+217.23.140.103:8333
+217.28.96.180:8333
+217.35.130.42:8333
+217.111.66.79:8333
+217.158.9.102:8333
+217.168.143.169:8333
+217.209.32.219:8333
+218.161.33.165:8333
+221.121.144.138:8333
+[2001:0:4137:9e76:2048:3a84:bb91:e846]:8333
+[2001:0:4137:9e76:2066:e9e:b489:f8b8]:8333
+[2001:0:4137:9e76:3854:1211:b5ac:a96b]:8333
+[2001:0:4137:9e76:4e3:1f66:cd4c:829f]:8333
+[2001:0:4137:9e76:ad:1f4:9ea9:fa2e]:8333
+[2001:0:4137:9e76:e5:baa:b66f:f418]:8333
+[2001:0:53aa:64c:20a2:59c4:ad22:93ea]:8333
+[2001:0:53aa:64c:59:617f:a10d:e0]:8333
+[2001:0:5ef5:79fb:200f:3ae5:3cbc:74c9]:8333
+[2001:0:5ef5:79fb:38f2:13b4:b208:5604]:8333
+[2001:0:5ef5:79fd:200b:22a7:cc50:f52d]:8333
+[2001:0:5ef5:79fd:24ef:1aef:a994:303d]:8333
+[2001:0:5ef5:79fd:24fc:b5d:ad4f:4db2]:8333
+[2001:0:5ef5:79fd:28bf:2d23:e02e:c3ef]:8333
+[2001:0:5ef5:79fd:3cd0:3c2e:da44:a759]:8333
+[2001:0:5ef5:79fd:87e:fd7:b1c2:1b4]:8333
+[2001:0:9d38:6ab8:18db:3bda:ab90:e81e]:8333
+[2001:0:9d38:6ab8:4e7:1660:862f:a6d7]:8333
+[2001:0:9d38:6ab8:6:2b:5074:9588]:8333
+[2001:0:9d38:6abd:10f8:a7d7:bb90:f524]:8333
+[2001:13d8:1c01:1000::11]:8333
+[2001:15c0:65ff:610::2]:8333
+[2001:1608:10:156:ae::4adb]:8333
+[2001:1620:b1b:8888:20d:b9ff:fe41:6710]:8333
+[2001:1620:b1b:face:20d:b9ff:fe41:6710]:8333
+[2001:1620:f00:282::2]:8333
+[2001:1620:f00:8282::1]:8333
+[2001:1680:101:1ae::1]:8333
+[2001:16d8:ff00:85de:20c:29ff:fe52:9594]:8333
+[2001:19f0:4400:434d:5400:ff:fe42:2678]:8333
+[2001:19f0:5000:8c8b:5400:ff:fe1f:c023]:8333
+[2001:19f0:5000:8ce6:5400:ff:fe1b:24a9]:8333
+[2001:19f0:5:314:5400:ff:fe2c:42e8]:8333
+[2001:19f0:5:51b:5400:ff:fe49:fe5b]:8333
+[2001:19f0:5:bc:5400:ff:fe3b:9339]:8333
+[2001:1af8:4020:a020:5::]:8333
+[2001:1bc8:1a0:590e:2e0:f4ff:fe16:3a39]:8333
+[2001:1c04:1401:8f00:f4fe:4fff:fe0c:df40]:8333
+[2001:4128:6135:10:20c:29ff:fe69:9e81]:8333
+[2001:4128:6135:2010:21e:bff:fee8:a3c0]:8333
+[2001:4128:6135:e001:5054:ff:fe37:e9eb]:8333
+[2001:41d0:1000:1024::]:8333
+[2001:41d0:1000:1433::]:8333
+[2001:41d0:1004:22ae::]:8333
+[2001:41d0:1004:2996::]:8333
+[2001:41d0:1008:11e0::1a5c:6d9d]:8333
+[2001:41d0:1008:11e0::b74:baf7]:8333
+[2001:41d0:1008:237a::]:8333
+[2001:41d0:1008:2752::]:8333
+[2001:41d0:1008:494::]:8333
+[2001:41d0:1:45d8::1]:8333
+[2001:41d0:1:5630::1]:8333
+[2001:41d0:1:6f57::1]:8333
+[2001:41d0:1:801e::1]:8333
+[2001:41d0:1:8852::1]:8333
+[2001:41d0:1:8b26::1]:8333
+[2001:41d0:1:a5b8::1]:8333
+[2001:41d0:1:b26b::1]:8333
+[2001:41d0:1:c139::1]:8333
+[2001:41d0:1:c8d7::1]:8333
+[2001:41d0:1:d227::]:8333
+[2001:41d0:1:dbc4::1]:8333
+[2001:41d0:1:dc5d::1]:8333
+[2001:41d0:1:e13b::1]:8333
+[2001:41d0:1:ef5b::1]:8333
+[2001:41d0:2:16be::1]:8333
+[2001:41d0:2:203c::1]:8333
+[2001:41d0:2:38c5::1]:8333
+[2001:41d0:2:519::]:8333
+[2001:41d0:2:9c94::1]:8333
+[2001:41d0:2:b792::]:8333
+[2001:41d0:2:bf2a::]:8333
+[2001:41d0:2:c793::]:8333
+[2001:41d0:2:c9bf::]:8333
+[2001:41d0:303:4f0::]:8333
+[2001:41d0:8:1a8a::1]:8333
+[2001:41d0:8:3fa9::1]:8333
+[2001:41d0:8:4670::1]:8333
+[2001:41d0:8:4f48::1]:8333
+[2001:41d0:8:6728::]:8333
+[2001:41d0:8:72c2:d:242:ac11:2]:8333
+[2001:41d0:8:8007::]:8333
+[2001:41d0:8:a71c::]:8333
+[2001:41d0:8:bccc::1]:8333
+[2001:41d0:8:bd45::1]:8333
+[2001:41d0:8:c67c::]:8333
+[2001:41d0:8:de3d::1]:8333
+[2001:41d0:8:e257::1]:8333
+[2001:41d0:8:e3e4::1]:8333
+[2001:41d0:a:14cc::1]:8333
+[2001:41d0:a:15b2::1]:8333
+[2001:41d0:a:1ac9::1]:8333
+[2001:41d0:a:2496::1]:8333
+[2001:41d0:a:308c::]:8333
+[2001:41d0:a:5879::]:8333
+[2001:41d0:a:6810::1]:8333
+[2001:41d0:a:682d::1]:8333
+[2001:41d0:a:6c29::1]:8333
+[2001:41d0:a:f52a::1]:8333
+[2001:41d0:d:111c::]:8333
+[2001:41d0:e:1388::1]:8333
+[2001:41d0:e:26b::1]:8333
+[2001:41d0:e:f73::1]:8333
+[2001:41d0:fc8c:a200:7a24:afff:fe9d:c69b]:8333
+[2001:41f0:61:0:72f3:95ff:fe09:7521]:8333
+[2001:41f0:61::7]:8333
+[2001:4428:200:8171:db6:2ff4:9c0e:a2da]:8333
+[2001:470:1f07:151c:baac:6fff:feb7:3ba9]:8333
+[2001:470:1f0b:ad6:a60:6eff:fec6:2323]:8333
+[2001:470:1f11:617::10f]:8333
+[2001:470:1f14:73e::2]:8333
+[2001:470:1f14:7d::2]:8333
+[2001:470:1f15:11f8::10]:8333
+[2001:470:1f15:1b95:2c3e:8a9a:24e1:7084]:8333
+[2001:470:1f15:e9b::3ef]:8333
+[2001:470:1f1d:3a9::10]:8333
+[2001:470:25:482::2]:8333
+[2001:470:27:19f::2]:8333
+[2001:470:27:665::2]:8333
+[2001:470:28:365::4]:8333
+[2001:470:41:6::2]:8333
+[2001:470:727b::11:14]:8333
+[2001:470:7:2f0::2]:8333
+[2001:470:7:65::2]:8333
+[2001:470:7f85::2]:8333
+[2001:470:8:2e1:5825:39df:3e4c:54a8]:8333
+[2001:470:8:2e1::43]:8333
+[2001:470:8:2e1:ae2a:e257:4470:6350]:8333
+[2001:470:a:c13::2]:8333
+[2001:4801:7819:74:b745:b9d5:ff10:a61a]:8333
+[2001:4801:7819:74:b745:b9d5:ff10:aaec]:8333
+[2001:4801:7828:104:be76:4eff:fe10:1325]:8333
+[2001:4802:7800:2:30d7:1775:ff20:1858]:8333
+[2001:4ba0:babe:832::]:8333
+[2001:4ba0:cafe:379::1]:8333
+[2001:4ba0:ffee:33::10]:8333
+[2001:4dd0:ff00:9a67::9]:8333
+[2001:610:1b19::3]:8333
+[2001:610:600:a41::2]:8333
+[2001:678:174:4021::2:8333]:8333
+[2001:67c:16dc:1201:5054:ff:fe17:4dac]:8333
+[2001:67c:2128:ffff:6062:36ff:fe30:6532]:8333
+[2001:67c:2564:331:3547:6e28:85a4:fb27]:8333
+[2001:6a0:200:368::2]:8333
+[2001:718:801:311:5054:ff:fe19:c483]:8333
+[2001:7b8:2ff:8f::2]:8333
+[2001:8d8:8a6:4400::3f:86c]:8333
+[2001:8d8:923:8400::87:ebd]:8333
+[2001:960:66d::2]:8333
+[2001:981:46:1:ba27:ebff:fe5b:edee]:8333
+[2001:ba8:1f1:f069::2]:8333
+[2001:bc8:225f:10e:505:6573:7573:d0a]:8333
+[2001:bc8:2706::1]:8333
+[2001:bc8:323c:100::53]:8333
+[2001:bc8:323c:100::80:4]:8333
+[2001:bc8:323c:100::cafe]:8333
+[2001:bc8:3680:4242::1]:8333
+[2001:bc8:399f:f000::1]:8333
+[2001:bc8:3cbf::5]:8333
+[2001:bc8:4700:2300::19:807]:8333
+[2001:e42:102:1805:160:16:206:31]:8333
+[2002:12f1:3f::12f1:3f]:8333
+[2002:1e2:5349::1e2:5349]:8333
+[2002:1e2:5588::1e2:5588]:8333
+[2002:2501:cf62::2501:cf62]:8333
+[2002:268c:a135::268c:a135]:8333
+[2002:2a33:99db::2a33:99db]:8332
+[2002:2ebc:2c14::7]:8333
+[2002:2f59:2c9c::2f59:2c9c]:11885
+[2002:2f5a:3619::2f5a:3619]:8333
+[2002:2f5a:36a4::2f5a:36a4]:8333
+[2002:2f5a:429::2f5a:429]:8333
+[2002:2f5a:562a::2f5a:562a]:8333
+[2002:3a3b:216::3a3b:216]:8333
+[2002:3dfa:5d23::3dfa:5d23]:8333
+[2002:424f:a052::424f:a052]:8333
+[2002:451e:e922::451e:e922]:8333
+[2002:4540:4b30::4540:4b30]:8333
+[2002:51ab:7cc::51ab:7cc]:8333
+[2002:527:de11::527:de11]:8333
+[2002:5395:7d01::5395:7d01]:8333
+[2002:5395:7d2a::5395:7d2a]:8333
+[2002:5669:e3be::5669:e3be]:8333
+[2002:566a:5d6d::566a:5d6d]:8333
+[2002:59b9:f820::59b9:f820]:8333
+[2002:59f8:ac69::59f8:ac69]:8333
+[2002:5bd4:b65a::5bd4:b65a]:8333
+[2002:5c3f:39db::5c3f:39db]:8333
+[2002:5d33:8d03::5d33:8d03]:8333
+[2002:5d67:49bb::5d67:49bb]:8333
+[2002:5dae:5d5f::5dae:5d5f]:8333
+[2002:5dbe:8cc6::5dbe:8cc6]:8333
+[2002:5dbe:9503::5dbe:9503]:8333
+[2002:5fd3:8944::5fd3:8944]:8333
+[2002:5fd3:9467::5fd3:9467]:8333
+[2002:67f9:6a48::67f9:6a48]:8333
+[2002:67f9:6a4a::67f9:6a4a]:8333
+[2002:67f9:6a95::67f9:6a95]:8333
+[2002:6a0e:3ea8::6a0e:3ea8]:10011
+[2002:6b96:375a::6b96:375a]:8333
+[2002:6ca8:cffb::6ca8:cffb]:8333
+[2002:6caf:234::6caf:234]:8333
+[2002:6dec:58f5::6dec:58f5]:8333
+[2002:6dec:5ac7::6dec:5ac7]:8333
+[2002:7237:4a02::7237:4a02]:20033
+[2002:7237:94fd::7237:94fd]:10011
+[2002:7237:e428::7237:e428]:8333
+[2002:7237:fcf6::7237:fcf6]:20188
+[2002:76c0:96e6::76c0:96e6]:8333
+[2002:7819:7e80::7819:7e80]:7743
+[2002:781a:ea86::781a:ea86]:8333
+[2002:781a:f3c2::781a:f3c2]:14475
+[2002:784c:c2c0::784c:c2c0]:8333
+[2002:784c:ec97::784c:ec97]:8333
+[2002:792b:261a::792b:261a]:8333
+[2002:88f3:8cca::88f3:8cca]:8333
+[2002:88f3:a83c::88f3:a83c]:8333
+[2002:8ac9:516f::8ac9:516f]:8333
+[2002:8b81:6d78::8b81:6d78]:50344
+[2002:8b81:6e5c::8b81:6e5c]:38176
+[2002:8bc4:90a6::8bc4:90a6]:8333
+[2002:ac52:b854::ac52:b854]:8333
+[2002:add0:c14a::add0:c14a]:8333
+[2002:b07e:a70a::b07e:a70a]:8333
+[2002:b27c:c565:1::250]:8333
+[2002:b27c:c565::1]:8333
+[2002:b94d:80f1::b94d:80f1]:8333
+[2002:b982:e26a::b982:e26a]:8333
+[2002:bcd5:3145::bcd5:3145]:8333
+[2002:c08a:d22b::c08a:d22b]:8333
+[2002:c0c7:f8e3::c0c7:f8e3]:32771
+[2002:c1a9:fc5a::c1a9:fc5a]:8333
+[2002:c23f:8fc5::c23f:8fc5]:8333
+[2002:d395:ea6d::d395:ea6d]:8333
+[2002:d917:ca5::d917:ca5]:8333
+[2002:d917:e91::d917:e91]:8333
+[2002:db71:f434::db71:f434]:8333
+[2400:2651:161:1000:6847:d40f:aaa3:4848]:8333
+[2400:8901::f03c:91ff:fec8:4280]:8333
+[2401:1800:7800:102:be76:4eff:fe1c:a7d]:8333
+[2401:2500:203:10:153:120:156:83]:8333
+[2401:a400:3200:5600:14ee:f361:4bdc:1f7c]:8333
+[2403:4200:403:2::ff]:8333
+[2405:aa00:2::40]:8333
+[240b:10:ca20:f0:224:e8ff:fe1f:60d9]:8333
+[240b:250:1e0:2400:b9ef:8fe3:a69a:7378]:8333
+[240d:1a:302:8600:8876:a36d:12ee:f285]:8333
+[2600:3c00::f03c:91ff:fe91:3e49]:8333
+[2600:3c00::f03c:91ff:febb:981e]:8333
+[2600:3c01::f03c:91ff:fe18:6adf]:8333
+[2600:3c01::f03c:91ff:fe69:89e9]:8333
+[2600:3c01::f03c:91ff:fe91:6a29]:8333
+[2600:3c01::f03c:91ff:fef1:1eaa]:8333
+[2600:3c03::f03c:91ff:fe18:da80]:8333
+[2600:3c03::f03c:91ff:fe28:1445]:8333
+[2600:3c03::f03c:91ff:fe67:d2e]:8333
+[2600:3c03::f03c:91ff:fe89:116f]:8333
+[2600:3c03::f03c:91ff:feb0:5fc4]:8333
+[2600:3c03::f03c:91ff:fee0:233e]:8333
+[2600:3c03::f03c:91ff:fee0:51]:8333
+[2600:8805:2400:14e:226:4aff:fe02:2ba4]:8333
+[2600:8807:5080:3301:1487:83b7:33d7:eb97]:8333
+[2601:186:c100:6bcd:16bd:cea1:235d:1c19]:8333
+[2601:18c:4200:28d0:e4d:e9ff:fec5:76d0]:8333
+[2601:247:8201:6251:30e6:7b95:69bf:9248]:8333
+[2601:602:9980:f78:211:11ff:fec5:1ae]:8333
+[2602:ae:1993:de00:2c50:9a44:8f11:77a5]:8333
+[2602:ff68:0:1:21e:bff:feca:db72]:8333
+[2602:ff68:0:1:2bd:27ff:feb0:adf8]:8333
+[2602:ff68:0:1::5]:8333
+[2602:ff68:0:5:2bd:27ff:feb0:adf8]:8333
+[2602:ffc5:1f::1f:2d61]:8333
+[2602:ffc5:1f::1f:9211]:8333
+[2602:ffc5::9e63:27a2]:8333
+[2602:ffc5::c30:1c75]:8333
+[2602:ffc5::ffc5:b844]:8333
+[2602:ffe8:100:2::457:936b]:8333
+[2604:180:2:eee::ca46]:8333
+[2604:880:d:85::be37]:8333
+[2604:9a00:2100:a009:2::]:8333
+[2604:a880:2:d0::301:8001]:8333
+[2604:a880:2:d0::4a9:1001]:8333
+[2604:a880:2:d0::53a:c001]:8333
+[2604:a880:400:d0::ad7:e001]:8333
+[2604:a880:400:d0::dcf:f001]:8333
+[2605:4d00::50]:8333
+[2605:6000:edc8:300::ddfe]:8333
+[2605:6000:ffc0:70:74d5:225c:f553:5bb8]:8333
+[2606:6000:c148:7003:5054:ff:fe78:66ff]:8333
+[2606:6000:e6d6:d701:d428:5e44:a2c9:3ff6]:8333
+[2606:c680:1:4a:2016:d1ff:fe93:52a7]:8333
+[2607:5300:203:118:3733::1414]:8333
+[2607:5300:60:13bb::1]:8333
+[2607:5300:60:1966::1]:8333
+[2607:5300:60:2218::]:8333
+[2607:5300:60:3775::]:8333
+[2607:5300:60:3ddf::]:8333
+[2607:5300:60:a654::]:8333
+[2607:5300:60:a7a3::]:8333
+[2607:5300:60:ac0::1]:8333
+[2607:5300:60:cf97::]:8333
+[2607:f0d0:1901:19::6]:8333
+[2607:f128:40:1202:69:162:139:125]:8333
+[2607:f128:40:1703::2]:8333
+[2607:f178:0:8::106]:8333
+[2607:f1c0:84d:8900::7e:cad]:8333
+[2607:f948:0:1::1:40]:8333
+[2607:fcd0:100:2302::6094:635a]:8333
+[2607:fcd0:100:6a00::3a96:1]:8333
+[2607:fcd0:100:6a02::7ff0:1]:8333
+[2607:fcd0:100:8203::8c58:dbc]:8333
+[2607:fea8:1360:9c2:221a:6ff:fe47:776d]:8333
+[2607:fea8:4da0:9ce:5114:a8ec:20f5:a50b]:8333
+[2607:fea8:5df:fda0:feaa:14ff:feda:c79a]:8333
+[2607:fea8:84c0:163:f42c:baff:fecc:6bbf]:8333
+[2607:ff10:c5:502:225:90ff:fe32:d446]:8333
+[2607:ff48:aa81:800::96cf:1]:8333
+[2620:11c:5001:1118:d267:e5ff:fee9:e673]:8333
+[2620:b8:4000:1000::93:1]:8333
+[2800:1a0::9]:8333
+[2a00:1178:2:43:19fd:d43e:b77:edeb]:8333
+[2a00:1178:2:43:b4e3:e562:f811:d761]:8333
+[2a00:14f0:e000:80d2:cd1a::1]:8333
+[2a00:1630:14::101]:8333
+[2a00:1630:2:1802:188:122:91:11]:8333
+[2a00:1630:2:500::4]:8333
+[2a00:1768:2001:24::148:218]:8333
+[2a00:1768:2001:27::142:21]:8333
+[2a00:1a48:7810:101:be76:4eff:fe08:c774]:8333
+[2a00:1ca8:37::a5fc:40d1]:8333
+[2a00:1ca8:37::ab6d:ce2c]:8333
+[2a00:1dc0:2255:10::2]:8333
+[2a00:7c80:0:71::8]:8333
+[2a00:7c80:0:97::7]:8333
+[2a00:bbe0:0:42:222:64ff:fe9a:e206]:8333
+[2a00:c98:2050:a020:3::110]:8333
+[2a00:dcc0:eda:98:183:193:1d24:b53a]:8333
+[2a00:dcc0:eda:98:183:193:c382:6bdb]:8333
+[2a00:dcc0:eda:98:183:193:f72e:d943]:8333
+[2a00:f90:ff0:c100:53c4:97a7:8b59:796a]:8333
+[2a01:238:435c:de00:b110:38cf:192d:b2c]:28333
+[2a01:348:6:7cf::2]:8333
+[2a01:368:e012:8888:216:3eff:fe24:1162]:8333
+[2a01:488:66:1000:53a9:22b:0:1]:8333
+[2a01:488:67:1000:523:ffa7:0:1]:8333
+[2a01:488:67:1000:b01c:3379:0:1]:8333
+[2a01:4f8:100:34ce::2]:8333
+[2a01:4f8:100:44e7::2]:8333
+[2a01:4f8:10a:2e4::2]:8333
+[2a01:4f8:10a:34e::2]:8333
+[2a01:4f8:10a:51d::2]:8333
+[2a01:4f8:10a:622::2]:8333
+[2a01:4f8:10a:85f::2]:8333
+[2a01:4f8:10a:864::2]:8333
+[2a01:4f8:10a:d04::2]:8333
+[2a01:4f8:110:334c::2]:8333
+[2a01:4f8:110:536e::2]:8333
+[2a01:4f8:120:43e4::2]:8333
+[2a01:4f8:120:702e::2]:8333
+[2a01:4f8:121:4346::2]:8333
+[2a01:4f8:130:3332::2]:8333
+[2a01:4f8:131:33ad::2]:8333
+[2a01:4f8:131:33ad:fea1::666]:8333
+[2a01:4f8:140:31b0::2]:8333
+[2a01:4f8:140:4088::2]:8333
+[2a01:4f8:140:931a::2]:8333
+[2a01:4f8:140:93b0::2]:8333
+[2a01:4f8:141:13ad::c451]:8333
+[2a01:4f8:141:186::2]:8333
+[2a01:4f8:141:22ae::2]:8333
+[2a01:4f8:141:322c::2]:8333
+[2a01:4f8:150:11d4::2]:8333
+[2a01:4f8:150:440f::2]:8333
+[2a01:4f8:150:61ee::2]:8333
+[2a01:4f8:150:726b::2]:8333
+[2a01:4f8:151:30c9::2]:15000
+[2a01:4f8:151:41a2::2]:8333
+[2a01:4f8:151:41cc::2]:8333
+[2a01:4f8:151:52c6::154]:8333
+[2a01:4f8:151:600b::1:1]:8333
+[2a01:4f8:151:7175::2]:8333
+[2a01:4f8:160:41f0::1:33]:8333
+[2a01:4f8:160:5328::27f0:187a]:8333
+[2a01:4f8:160:814f::2]:8333
+[2a01:4f8:161:21ad::333:30]:8333
+[2a01:4f8:161:7026::2]:8333
+[2a01:4f8:162:4110::2]:8333
+[2a01:4f8:162:4348::2]:8333
+[2a01:4f8:171:1c1b::2]:8333
+[2a01:4f8:171:1c3::2]:8333
+[2a01:4f8:171:2258::2]:8333
+[2a01:4f8:171:2a70::2]:8333
+[2a01:4f8:171:2e1b::2]:8333
+[2a01:4f8:171:2f28::2]:8333
+[2a01:4f8:171:3248::2]:8333
+[2a01:4f8:171:380c::2]:8333
+[2a01:4f8:171:b93::2]:8333
+[2a01:4f8:171:d0a::2]:8333
+[2a01:4f8:172:116c::2]:8333
+[2a01:4f8:172:1287::2]:8333
+[2a01:4f8:172:17a9::2]:8333
+[2a01:4f8:172:1ca7::2]:8333
+[2a01:4f8:172:2159::2]:8333
+[2a01:4f8:172:3a41::2]:8333
+[2a01:4f8:172:3b42::2]:8333
+[2a01:4f8:172:3ec1::2]:8333
+[2a01:4f8:172:3ec2::2]:8333
+[2a01:4f8:172:aeb::2]:8333
+[2a01:4f8:172:aec::2]:8333
+[2a01:4f8:173:10ab::2]:8333
+[2a01:4f8:173:1551::2]:8333
+[2a01:4f8:173:1bca::2]:8333
+[2a01:4f8:173:1e2e::2]:8333
+[2a01:4f8:173:2162::2]:8333
+[2a01:4f8:173:21e6::2]:8333
+[2a01:4f8:173:42::2]:8333
+[2a01:4f8:173:cc1::2]:8333
+[2a01:4f8:190:1253::2]:8333
+[2a01:4f8:190:24eb::2]:8333
+[2a01:4f8:190:34f0::2]:8333
+[2a01:4f8:190:528d::2]:8333
+[2a01:4f8:190:91ce::2]:8333
+[2a01:4f8:191:2194::83]:8333
+[2a01:4f8:191:40e8::2]:8333
+[2a01:4f8:191:8165::2]:22556
+[2a01:4f8:191:81b7::2]:8333
+[2a01:4f8:191:8328::3]:8333
+[2a01:4f8:192:11b2::2]:8343
+[2a01:4f8:192:216c::2]:8333
+[2a01:4f8:192:22af::2]:8333
+[2a01:4f8:192:2422::2]:8333
+[2a01:4f8:192:34d0::2]:8333
+[2a01:4f8:192:440b::2]:8333
+[2a01:4f8:192:5230::2]:8333
+[2a01:4f8:192:db::2]:8333
+[2a01:4f8:200:1012::2]:8333
+[2a01:4f8:200:414e::2]:8333
+[2a01:4f8:200:416a::2]:8333
+[2a01:4f8:201:21a7::2]:8333
+[2a01:4f8:201:4017::11]:8333
+[2a01:4f8:201:6011::4]:8333
+[2a01:4f8:201:60d5::2]:8333
+[2a01:4f8:202:12d6::2]:8333
+[2a01:4f8:202:31e3::2]:8333
+[2a01:4f8:202:32c6::2]:8333
+[2a01:4f8:202:53c3::2]:8333
+[2a01:4f8:211:14cf::2]:8333
+[2a01:4f8:211:1ec5::2]:8333
+[2a01:4f8:211:483::2]:8333
+[2a01:4f8:211:d99::8]:8333
+[2a01:4f8:212:1826::2]:8333
+[2a01:4f8:212:27a8::2]:8333
+[2a01:4f8:221:801::2]:8333
+[2a01:4f8:a0:12cc::2]:8333
+[2a01:4f8:a0:746a:101:1:1:2]:8333
+[2a01:4f8:a0:828a::2]:8333
+[2a01:4f8:c17:2eef::2]:8333
+[2a01:4f8:c17:2f3c::2]:3333
+[2a01:4f8:c17:3b02::2]:8333
+[2a01:4f8:c17:4245::2]:8333
+[2a01:4f8:c17:464f::2]:8333
+[2a01:4f8:c17:4a1c::2]:8333
+[2a01:4f8:c17:4c5d::2]:8333
+[2a01:4f8:c17:67f8::2]:8333
+[2a01:4f8:c17:6dd0::2]:8333
+[2a01:4f8:c17:710b::2]:8333
+[2a01:4f8:c17:714::2]:8333
+[2a01:4f8:c17:72c6::2]:8333
+[2a01:608:ffff:a009:8bf5:879d:e51a:f837]:8333
+[2a01:680:10:10::1]:8333
+[2a01:6f0:ffff:120::8dcb]:8333
+[2a01:79c:cebc:857c:98c1:88ff:fef5:90de]:8333
+[2a01:79d:7377:2629:7e57:7e57:1:1]:8333
+[2a01:7c8:aaac:43d:5054:ff:fe4e:3dd4]:8333
+[2a01:7c8:aab5:3e6:5054:ff:fed7:4e54]:8333
+[2a01:7c8:aabd:3d5:5054:ff:fe95:f586]:8333
+[2a01:7c8:aac1:453:d0d2:af96:fa88:5d0e]:8333
+[2a01:7c8:aac3:663:5054:ff:fe25:8c69]:8333
+[2a01:7c8:aac3:97:5054:ff:fea7:3780]:8333
+[2a01:7c8:aac4:567:5054:ff:fedc:518a]:8333
+[2a01:7e00::f03c:91ff:fe26:8c87]:8333
+[2a01:7e00::f03c:91ff:fe50:94b8]:8333
+[2a01:7e00::f03c:91ff:fe55:2c]:8333
+[2a01:7e00::f03c:91ff:fe89:1143]:8333
+[2a01:7e00::f03c:91ff:fe89:53fd]:8333
+[2a01:7e00::f03c:91ff:fedf:b70f]:8333
+[2a01:b000::4166:515b:ef9e:b3]:8333
+[2a01:b2e0:2::40]:8333
+[2a01:e34:ec29:24c0:f3:ddaf:9f59:586f]:8333
+[2a01:e34:eed7:6670:ec1b:bf7c:b012:6069]:8333
+[2a01:e35:2ee5:610:21f:d0ff:fe4e:7460]:8333
+[2a01:e35:8a3f:47c0:c617:feff:fe3c:9fbd]:8333
+[2a01:e35:8bff:70b0:1e1b:dff:fe0b:236d]:8333
+[2a02:1205:34c3:a4e0:d63d:7eff:fe98:10c8]:8333
+[2a02:1205:34da:aa00:5882:249d:ddbf:bc43]:8333
+[2a02:1205:5051:a640:d6ae:52ff:fea3:ac]:8333
+[2a02:1205:c689:d980:baae:edff:feea:9445]:8333
+[2a02:120b:2c2a:5ec0:10dd:31ff:fe42:5079]:8333
+[2a02:120b:2c35:69d0:219:99ff:fe6b:4ec3]:8333
+[2a02:120b:c3c2:ff60:21f:5bff:fec3:a7ad]:24312
+[2a02:13b8:4000:1000:216:e6ff:fe92:8619]:8333
+[2a02:13b8:4000:1000::27]:8333
+[2a02:17d0:2a:4400:40f:3dd4:b053:47ad]:8333
+[2a02:180:1:1::517:afb]:8333
+[2a02:180:6:1::18]:8333
+[2a02:1810:1d11:f900:6872:f28e:8126:f635]:8333
+[2a02:27a8:0:1:52e5:49ff:fee3:3b49]:8333
+[2a02:348:86:3011::1]:8333
+[2a02:390:9000:0:218:7dff:fe10:be33]:8333
+[2a02:582:78c1:7600:2d49:6212:29d3:abb]:8333
+[2a02:6080::1:190b:69e3]:8333
+[2a02:750:7:3305::575]:8333
+[2a02:752:100:3::53]:8333
+[2a02:7aa0:1201::7501:d950]:8333
+[2a02:7aa0:1201::deb3:81a2]:8333
+[2a02:7aa0:1619::a037:69a6]:8333
+[2a02:810d:14c0:8694:d250:99ff:fe81:23d9]:8333
+[2a02:a50::dacb:8aff:fe36:8d2d]:8333
+[2a02:c200:0:10:3:0:2591:1]:8333
+[2a02:c200:1:10:2:5:9982:1]:8333
+[2a02:c200:1:10:3:0:9290:1]:8333
+[2a02:c205:3000:7158::1]:8333
+[2a02:c205:3001:4522::1]:8333
+[2a02:c205:3001:6549::1]:8333
+[2a02:c207:2008:3772::1]:8333
+[2a02:c207:2008:6519::1]:8333
+[2a02:c207:2009:213::1]:8333
+[2a02:c207:2009:7858::1]:8333
+[2a02:c207:2010:302::1]:8333
+[2a02:c207:3001:5824::1]:8333
+[2a02:ce80:0:20::1]:8333
+[2a03:4000:2:496::8]:8333
+[2a03:4000:6:416c::53]:8333
+[2a03:4000:6:8009::1]:8333
+[2a03:4000:9:8e::1]:8333
+[2a03:7380:2140:17:51fe:3519:b571:4a13]:8333
+[2a03:b0c0:0:1010::7a3:1001]:8333
+[2a03:b0c0:0:1010::7aa:4001]:8333
+[2a03:b0c0:3:d0::1b99:c001]:8333
+[2a03:b0c0:3:d0::1b99:e001]:8333
+[2a03:b0c0:3:d0::1b9a:3001]:8333
+[2a03:b0c0:3:d0::2208:6001]:8333
+[2a03:b0c0:3:d0::23f7:1001]:8333
+[2a03:b0c0:3:d0::23f7:9001]:8333
+[2a03:b0c0:3:d0::23fb:2001]:8333
+[2a03:b0c0:3:d0::23fb:3001]:8333
+[2a03:b0c0:3:d0::23fb:5001]:8333
+[2a03:b0c0:3:d0::23fb:7001]:8333
+[2a03:b0c0:3:d0::2400:1]:8333
+[2a03:b0c0:3:d0::2400:3001]:8333
+[2a03:b0c0:3:d0::2400:e001]:8333
+[2a03:b0c0:3:d0::2401:e001]:8333
+[2a03:b0c0:3:d0::2402:2001]:8333
+[2a03:b0c0:3:d0::2402:8001]:8333
+[2a03:b0c0:3:d0::2402:9001]:8333
+[2a03:b0c0:3:d0::2402:b001]:8333
+[2a03:b0c0:3:d0::2402:d001]:8333
+[2a03:b0c0:3:d0::2403:1001]:8333
+[2a03:b0c0:3:d0::2403:2001]:8333
+[2a03:b0c0:3:d0::2403:4001]:8333
+[2a03:b0c0:3:d0::2403:6001]:8333
+[2a03:b0c0:3:d0::2403:a001]:8333
+[2a03:b0c0:3:d0::2403:b001]:8333
+[2a03:b0c0:3:d0::2403:f001]:8333
+[2a03:b0c0:3:d0::2404:6001]:8333
+[2a03:b0c0:3:d0::2404:b001]:8333
+[2a03:f80:ed15:149:154:155:235:1]:8333
+[2a04:1980:3100:1aac:e61d:2dff:fe29:f241]:8333
+[2a04:1980:3100:1aac:e61d:2dff:fe29:f251]:8333
+[2a04:2180:0:1::5a49:3c06]:8333
+[2a04:2180:1:7::3]:8333
+[2a04:2e00:5:2e:9a4b:e1ff:fe62:6dc0]:8333
+[2a04:3542:1000:910:8492:b8ff:fe91:711d]:8333
+[2a04:dbc3:fffe:0:e61f:13ff:fe95:8401]:8333
+[2a06:9fc0:2a06:9fc0:2a06:9fc1:67c:e706]:8333
+[2c0f:f738:2004:82::]:8333
+2hryb3uh3tzwgnya.onion:8333
+3nmbbakinewlgdln.onion:8333
+3qeri3tmhzmpegyv.onion:8333
+4wdknmecghcmclq5.onion:8333
+53tsjt6zq3iasv5q.onion:8333
+5cg7qeywvwo6vxpt.onion:8333
+5gbcrgqxcbxj253s.onion:8333
+6cn4ilbwkrkh7gwo.onion:8333
+6e4jrnn7igeqxmlf.onion:8333
+6ymgbvnn6d5nfmv4.onion:8333
+6zsh3bfduhpo7ldl.onion:8333
+72fq6phv4fg4rhvh.onion:8333
+7gdqp6npusk4lfwk.onion:8333
+a7emxol55e623lqc.onion:8333
+assbiydziq77zaki.onion:8333
+bafk5ioatlgt7dgl.onion:8333
+bk7yp6epnmcllq72.onion:8333
+brwqezn6le54w2bb.onion:8333
+bs4bq6s6qkvt5hpi.onion:8333
+bup5n5e3kurvjzf3.onion:8333
+c2tpqkaz4ihjzwgb.onion:8333
+cernrmrk5zomzozn.onion:8333
+cfyegj64ht3jpodr.onion:8333
+cg5vg54cazzpvoug.onion:8333
+cgk4u2lxrvml4jvb.onion:8333
+cjygd7pu5lqkky5j.onion:8333
+d6wubsdtr46dd5ki.onion:8333
+dfq6yjc3aelplwr4.onion:8333
+dqpxwlpnv3z3hznl.onion:8333
+eamfospuveabaimd.onion:8333
+ep2mjzox3kvb6ax4.onion:8333
+fpbxb4wjudiw2w5a.onion:8333
+fu5hfsbbf5jwsvhv.onion:8333
+g4freoibsczujle3.onion:8333
+gb5ypqt63du3wfhn.onion:8333
+ggdy2pb2avlbtjwq.onion:8333
+gh2aiddzxmvyrnue.onion:8333
+gnxgylbgzvaazkq7.onion:8333
+hnizdxnejel64ubk.onion:8333
+htvdcmlc3abji2ab.onion:8443
+hwuboois4gslupgx.onion:8333
+hxz6gowludlj6d5a.onion:8333
+j6umo4bnsztpsonc.onion:8333
+jdunmaocwbbnw565.onion:8333
+ktv3qlxl7xvmdlf4.onion:8333
+kvd44sw7skb5folw.onion:8333
+kwimnzm6vd4zakvl.onion:8333
+la5xhk3lprxzxmz2.onion:8333
+lc7cx67end26uutp.onion:8352
+mwu5og2agcspmgkx.onion:8333
+mzxkipiyekaoh7my.onion:8333
+n6rwlrtwpqc7qwo7.onion:8333
+nj36424yccqph62z.onion:8333
+o256w7t3vcgktmxk.onion:8333
+o4sl5na6jeqgi3l6.onion:8333
+okdzjarwekbshnof.onion:8333
+oyebydl2pacx6v26.onion:8333
+p5mx2imj75dpmime.onion:8333
+psco6bxjewljrczx.onion:8333
+pxtgswet6tlgrbwj.onion:8333
+rb4v3fhgx2zr4rre.onion:8333
+rjlnp3hwvrsmap6e.onion:8333
+rlafimkctvz63llg.onion:8333
+rxjvy5eyttep5tts.onion:8333
+seoskudzk6vn6mqz.onion:8333
+tpgdufxxsw3jkrdf.onion:8333
+tuiyvqgi3o675pjb.onion:8333
+tx4zd7d5exonnblh.onion:8333
+uokg6avfgbhofls3.onion:8333
+v3gjphgqy5hygcml.onion:8333
+vhdoxqq63xr53ol7.onion:8333
+visevrizz3quyagj.onion:8333
+vqpye2k5rcqvj5mq.onion:8333
+wfsx2gi7djhy22hk.onion:8333
+wg6vwmbrzyyzapun.onion:8333
+xub4w3w4wwk56xiq.onion:8333
+ycivnom44dmxx4ob.onion:8333
+ywskufc62bf2fum4.onion:8333
+z4fax2vxg23t2ddf.onion:8333
+zo5dklwelmdrpo5n.onion:8333
diff --git a/contrib/seeds/nodes_test.txt b/contrib/seeds/nodes_test.txt
new file mode 100644
index 000000000..98365ee50
--- /dev/null
+++ b/contrib/seeds/nodes_test.txt
@@ -0,0 +1,11 @@
+# List of fixed seed nodes for testnet
+
+# Onion nodes
+thfsmmn2jbitcoin.onion
+it2pj4f7657g3rhi.onion
+nkf5e6b7pl4jfd4a.onion
+4zhkir2ofl7orfom.onion
+t6xj6wilh4ytvcs7.onion
+i6y6ivorwakd7nw3.onion
+ubqj4rsu3nqtxmtp.onion
+
diff --git a/contrib/spendfrom/README.md b/contrib/spendfrom/README.md
deleted file mode 100644
index c0a9c9ccf..000000000
--- a/contrib/spendfrom/README.md
+++ /dev/null
@@ -1,35 +0,0 @@
-### SpendFrom ###
-
-Use the raw transactions API to send coins received on a particular
-address (or addresses).
-
-### Usage: ###
-Depends on [jsonrpc](http://json-rpc.org/).
-
- spendfrom.py --from=FROMADDRESS1[,FROMADDRESS2] --to=TOADDRESS --amount=amount \
- --fee=fee --datadir=/path/to/.bitcoin --testnet --dry_run
-
-With no arguments, outputs a list of amounts associated with addresses.
-
-With arguments, sends coins received by the `FROMADDRESS` addresses to the `TOADDRESS`.
-
-### Notes ###
-
-- You may explicitly specify how much fee to pay (a fee more than 1% of the amount
-will fail, though, to prevent bitcoin-losing accidents). Spendfrom may fail if
-it thinks the transaction would never be confirmed (if the amount being sent is
-too small, or if the transaction is too many bytes for the fee).
-
-- If a change output needs to be created, the change will be sent to the last
-`FROMADDRESS` (if you specify just one `FROMADDRESS`, change will go back to it).
-
-- If `--datadir` is not specified, the default datadir is used.
-
-- The `--dry_run` option will just create and sign the transaction and print
-the transaction data (as hexadecimal), instead of broadcasting it.
-
-- If the transaction is created and broadcast successfully, a transaction id
-is printed.
-
-- If this was a tool for end-users and not programmers, it would have much friendlier
-error-handling.
diff --git a/contrib/spendfrom/setup.py b/contrib/spendfrom/setup.py
deleted file mode 100644
index 01b9768a5..000000000
--- a/contrib/spendfrom/setup.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from distutils.core import setup
-setup(name='btcspendfrom',
- version='1.0',
- description='Command-line utility for bitcoin "coin control"',
- author='Gavin Andresen',
- author_email='[email protected]',
- requires=['jsonrpc'],
- scripts=['spendfrom.py'],
- )
diff --git a/contrib/spendfrom/spendfrom.py b/contrib/spendfrom/spendfrom.py
deleted file mode 100755
index 72ee0425e..000000000
--- a/contrib/spendfrom/spendfrom.py
+++ /dev/null
@@ -1,267 +0,0 @@
-#!/usr/bin/env python
-#
-# Use the raw transactions API to spend bitcoins received on particular addresses,
-# and send any change back to that same address.
-#
-# Example usage:
-# spendfrom.py # Lists available funds
-# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
-#
-# Assumes it will talk to a bitcoind or Bitcoin-Qt running
-# on localhost.
-#
-# Depends on jsonrpc
-#
-
-from decimal import *
-import getpass
-import math
-import os
-import os.path
-import platform
-import sys
-import time
-from jsonrpc import ServiceProxy, json
-
-BASE_FEE=Decimal("0.001")
-
-def check_json_precision():
- """Make sure json library being used does not lose precision converting BTC values"""
- n = Decimal("20000000.00000003")
- satoshis = int(json.loads(json.dumps(float(n)))*1.0e8)
- if satoshis != 2000000000000003:
- raise RuntimeError("JSON encode/decode loses precision")
-
-def determine_db_dir():
- """Return the default location of the bitcoin data directory"""
- if platform.system() == "Darwin":
- return os.path.expanduser("~/Library/Application Support/Bitcoin/")
- elif platform.system() == "Windows":
- return os.path.join(os.environ['APPDATA'], "Bitcoin")
- return os.path.expanduser("~/.bitcoin")
-
-def read_bitcoin_config(dbdir):
- """Read the bitcoin.conf file from dbdir, returns dictionary of settings"""
- from ConfigParser import SafeConfigParser
-
- class FakeSecHead(object):
- def __init__(self, fp):
- self.fp = fp
- self.sechead = '[all]\n'
- def readline(self):
- if self.sechead:
- try: return self.sechead
- finally: self.sechead = None
- else:
- s = self.fp.readline()
- if s.find('#') != -1:
- s = s[0:s.find('#')].strip() +"\n"
- return s
-
- config_parser = SafeConfigParser()
- config_parser.readfp(FakeSecHead(open(os.path.join(dbdir, "bitcoin.conf"))))
- return dict(config_parser.items("all"))
-
-def connect_JSON(config):
- """Connect to a bitcoin JSON-RPC server"""
- testnet = config.get('testnet', '0')
- testnet = (int(testnet) > 0) # 0/1 in config file, convert to True/False
- if not 'rpcport' in config:
- config['rpcport'] = 18332 if testnet else 8332
- connect = "http://%s:%[email protected]:%s"%(config['rpcuser'], config['rpcpassword'], config['rpcport'])
- try:
- result = ServiceProxy(connect)
- # ServiceProxy is lazy-connect, so send an RPC command mostly to catch connection errors,
- # but also make sure the bitcoind we're talking to is/isn't testnet:
- if result.getmininginfo()['testnet'] != testnet:
- sys.stderr.write("RPC server at "+connect+" testnet setting mismatch\n")
- sys.exit(1)
- return result
- except:
- sys.stderr.write("Error connecting to RPC server at "+connect+"\n")
- sys.exit(1)
-
-def unlock_wallet(bitcoind):
- info = bitcoind.getinfo()
- if 'unlocked_until' not in info:
- return True # wallet is not encrypted
- t = int(info['unlocked_until'])
- if t <= time.time():
- try:
- passphrase = getpass.getpass("Wallet is locked; enter passphrase: ")
- bitcoind.walletpassphrase(passphrase, 5)
- except:
- sys.stderr.write("Wrong passphrase\n")
-
- info = bitcoind.getinfo()
- return int(info['unlocked_until']) > time.time()
-
-def list_available(bitcoind):
- address_summary = dict()
-
- address_to_account = dict()
- for info in bitcoind.listreceivedbyaddress(0):
- address_to_account[info["address"]] = info["account"]
-
- unspent = bitcoind.listunspent(0)
- for output in unspent:
- # listunspent doesn't give addresses, so:
- rawtx = bitcoind.getrawtransaction(output['txid'], 1)
- vout = rawtx["vout"][output['vout']]
- pk = vout["scriptPubKey"]
-
- # This code only deals with ordinary pay-to-bitcoin-address
- # or pay-to-script-hash outputs right now; anything exotic is ignored.
- if pk["type"] != "pubkeyhash" and pk["type"] != "scripthash":
- continue
-
- address = pk["addresses"][0]
- if address in address_summary:
- address_summary[address]["total"] += vout["value"]
- address_summary[address]["outputs"].append(output)
- else:
- address_summary[address] = {
- "total" : vout["value"],
- "outputs" : [output],
- "account" : address_to_account.get(address, "")
- }
-
- return address_summary
-
-def select_coins(needed, inputs):
- # Feel free to improve this, this is good enough for my simple needs:
- outputs = []
- have = Decimal("0.0")
- n = 0
- while have < needed and n < len(inputs):
- outputs.append({ "txid":inputs[n]["txid"], "vout":inputs[n]["vout"]})
- have += inputs[n]["amount"]
- n += 1
- return (outputs, have-needed)
-
-def create_tx(bitcoind, fromaddresses, toaddress, amount, fee):
- all_coins = list_available(bitcoind)
-
- total_available = Decimal("0.0")
- needed = amount+fee
- potential_inputs = []
- for addr in fromaddresses:
- if addr not in all_coins:
- continue
- potential_inputs.extend(all_coins[addr]["outputs"])
- total_available += all_coins[addr]["total"]
-
- if total_available < needed:
- sys.stderr.write("Error, only %f BTC available, need %f\n"%(total_available, needed));
- sys.exit(1)
-
- #
- # Note:
- # Python's json/jsonrpc modules have inconsistent support for Decimal numbers.
- # Instead of wrestling with getting json.dumps() (used by jsonrpc) to encode
- # Decimals, I'm casting amounts to float before sending them to bitcoind.
- #
- outputs = { toaddress : float(amount) }
- (inputs, change_amount) = select_coins(needed, potential_inputs)
- if change_amount > BASE_FEE: # don't bother with zero or tiny change
- change_address = fromaddresses[-1]
- if change_address in outputs:
- outputs[change_address] += float(change_amount)
- else:
- outputs[change_address] = float(change_amount)
-
- rawtx = bitcoind.createrawtransaction(inputs, outputs)
- signed_rawtx = bitcoind.signrawtransaction(rawtx)
- if not signed_rawtx["complete"]:
- sys.stderr.write("signrawtransaction failed\n")
- sys.exit(1)
- txdata = signed_rawtx["hex"]
-
- return txdata
-
-def compute_amount_in(bitcoind, txinfo):
- result = Decimal("0.0")
- for vin in txinfo['vin']:
- in_info = bitcoind.getrawtransaction(vin['txid'], 1)
- vout = in_info['vout'][vin['vout']]
- result = result + vout['value']
- return result
-
-def compute_amount_out(txinfo):
- result = Decimal("0.0")
- for vout in txinfo['vout']:
- result = result + vout['value']
- return result
-
-def sanity_test_fee(bitcoind, txdata_hex, max_fee):
- class FeeError(RuntimeError):
- pass
- try:
- txinfo = bitcoind.decoderawtransaction(txdata_hex)
- total_in = compute_amount_in(bitcoind, txinfo)
- total_out = compute_amount_out(txinfo)
- if total_in-total_out > max_fee:
- raise FeeError("Rejecting transaction, unreasonable fee of "+str(total_in-total_out))
-
- tx_size = len(txdata_hex)/2
- kb = tx_size/1000 # integer division rounds down
- if kb > 1 and fee < BASE_FEE:
- raise FeeError("Rejecting no-fee transaction, larger than 1000 bytes")
- if total_in < 0.01 and fee < BASE_FEE:
- raise FeeError("Rejecting no-fee, tiny-amount transaction")
- # Exercise for the reader: compute transaction priority, and
- # warn if this is a very-low-priority transaction
-
- except FeeError as err:
- sys.stderr.write((str(err)+"\n"))
- sys.exit(1)
-
-def main():
- import optparse
-
- parser = optparse.OptionParser(usage="%prog [options]")
- parser.add_option("--from", dest="fromaddresses", default=None,
- help="addresses to get bitcoins from")
- parser.add_option("--to", dest="to", default=None,
- help="address to get send bitcoins to")
- parser.add_option("--amount", dest="amount", default=None,
- help="amount to send")
- parser.add_option("--fee", dest="fee", default="0.0",
- help="fee to include")
- parser.add_option("--datadir", dest="datadir", default=determine_db_dir(),
- help="location of bitcoin.conf file with RPC username/password (default: %default)")
- parser.add_option("--testnet", dest="testnet", default=False, action="store_true",
- help="Use the test network")
- parser.add_option("--dry_run", dest="dry_run", default=False, action="store_true",
- help="Don't broadcast the transaction, just create and print the transaction data")
-
- (options, args) = parser.parse_args()
-
- check_json_precision()
- config = read_bitcoin_config(options.datadir)
- if options.testnet: config['testnet'] = True
- bitcoind = connect_JSON(config)
-
- if options.amount is None:
- address_summary = list_available(bitcoind)
- for address,info in address_summary.iteritems():
- n_transactions = len(info['outputs'])
- if n_transactions > 1:
- print("%s %.8f %s (%d transactions)"%(address, info['total'], info['account'], n_transactions))
- else:
- print("%s %.8f %s"%(address, info['total'], info['account']))
- else:
- fee = Decimal(options.fee)
- amount = Decimal(options.amount)
- while unlock_wallet(bitcoind) == False:
- pass # Keep asking for passphrase until they get it right
- txdata = create_tx(bitcoind, options.fromaddresses.split(","), options.to, amount, fee)
- sanity_test_fee(bitcoind, txdata, amount*Decimal("0.01"))
- if options.dry_run:
- print(txdata)
- else:
- txid = bitcoind.sendrawtransaction(txdata)
- print(txid)
-
-if __name__ == '__main__':
- main()
diff --git a/contrib/test-patches/README.md b/contrib/test-patches/README.md
deleted file mode 100644
index def40b0d6..000000000
--- a/contrib/test-patches/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-### Test Patches ###
-
-These patches are applied when the automated pull-tester
-tests each pull and when master is tested using jenkins.
-You can find more information about the tests run at
-[http://jenkins.bluematt.me/pull-tester/files/
-](http://jenkins.bluematt.me/pull-tester/files/) \ No newline at end of file
diff --git a/contrib/test-patches/temp-revert-2.patch b/contrib/test-patches/temp-revert-2.patch
deleted file mode 100644
index 1cd043d0d..000000000
--- a/contrib/test-patches/temp-revert-2.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-commit cfae26916dba311f6f75d444301c1f9362267c3e
-Author: Matt Corallo <[email protected]>
-Date: Sun Mar 24 20:45:50 2013 -0400
-
- Revert "Checkpoint at first block in 11 March chain fork"
-
- This reverts commit f817c496a1482d05b22c8e539de67f07db1c09d9.
-
-diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
-index 62234b9..9b11f0b 100644
---- a/src/checkpoints.cpp
-+++ b/src/checkpoints.cpp
-@@ -44,7 +44,6 @@ namespace Checkpoints
- (193000, uint256("0x000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317"))
- (210000, uint256("0x000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e"))
- (216116, uint256("0x00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e"))
-- (225430, uint256("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932"))
- ;
- static const CCheckpointData data = {
- &mapCheckpoints,
diff --git a/contrib/testgen/base58.py b/contrib/testgen/base58.py
index b71649514..0d09692b3 100644
--- a/contrib/testgen/base58.py
+++ b/contrib/testgen/base58.py
@@ -1,3 +1,6 @@
+# Copyright (c) 2012-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Bitcoin base58 encoding and decoding.
@@ -81,7 +84,6 @@ def b58decode_chk(v):
result = b58decode(v)
if result is None:
return None
- h3 = checksum(result[:-4])
if result[-4:] == checksum(result[:-4]):
return result[:-4]
else:
diff --git a/contrib/testgen/gen_base58_test_vectors.py b/contrib/testgen/gen_base58_test_vectors.py
index 181343695..15f4c4553 100755
--- a/contrib/testgen/gen_base58_test_vectors.py
+++ b/contrib/testgen/gen_base58_test_vectors.py
@@ -1,4 +1,7 @@
#!/usr/bin/env python
+# Copyright (c) 2012-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Generate valid and invalid base58 address and private key test vectors.
@@ -15,11 +18,11 @@ import random
from binascii import b2a_hex
# key types
-PUBKEY_ADDRESS = 0
+PUBKEY_ADDRESS = 30
SCRIPT_ADDRESS = 5
PUBKEY_ADDRESS_TEST = 111
SCRIPT_ADDRESS_TEST = 196
-PRIVKEY = 128
+PRIVKEY = 158
PRIVKEY_TEST = 239
metadata_keys = ['isPrivkey', 'isTestnet', 'addrType', 'isCompressed']
@@ -42,7 +45,6 @@ def is_valid(v):
result = b58decode_chk(v)
if result is None:
return False
- valid = False
for template in templates:
prefix = str(bytearray(template[0]))
suffix = str(bytearray(template[2]))
diff --git a/contrib/tidy_datadir.sh b/contrib/tidy_datadir.sh
index 5d6d82644..8960f8811 100755
--- a/contrib/tidy_datadir.sh
+++ b/contrib/tidy_datadir.sh
@@ -1,4 +1,7 @@
#!/bin/bash
+# Copyright (c) 2013 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
if [ -d "$1" ]; then
cd "$1"
diff --git a/contrib/verify-commits/README.md b/contrib/verify-commits/README.md
new file mode 100644
index 000000000..e9e3f65da
--- /dev/null
+++ b/contrib/verify-commits/README.md
@@ -0,0 +1,26 @@
+Tooling for verification of PGP signed commits
+----------------------------------------------
+
+This is an incomplete work in progress, but currently includes a pre-push hook
+script (`pre-push-hook.sh`) for maintainers to ensure that their own commits
+are PGP signed (nearly always merge commits), as well as a script to verify
+commits against a trusted keys list.
+
+
+Using verify-commits.sh safely
+------------------------------
+
+Remember that you can't use an untrusted script to verify itself. This means
+that checking out code, then running `verify-commits.sh` against `HEAD` is
+_not_ safe, because the version of `verify-commits.sh` that you just ran could
+be backdoored. Instead, you need to use a trusted version of verify-commits
+prior to checkout to make sure you're checking out only code signed by trusted
+keys:
+
+ git fetch origin && \
+ ./contrib/verify-commits/verify-commits.sh origin/master && \
+ git checkout origin/master
+
+Note that the above isn't a good UI/UX yet, and needs significant improvements
+to make it more convenient and reduce the chance of errors; pull-reqs
+improving this process would be much appreciated.
diff --git a/contrib/verify-commits/allow-revsig-commits b/contrib/verify-commits/allow-revsig-commits
new file mode 100644
index 000000000..f0088cdca
--- /dev/null
+++ b/contrib/verify-commits/allow-revsig-commits
@@ -0,0 +1,104 @@
+a06ede9a138d0fb86b0de17c42b936d9fe6e2158
+923dc447eaa8e017985b2afbbb12dd1283fbea0e
+71148b8947fe8b4d756822420a7f31c380159425
+6696b4635ceb9b47aaa63244bff9032fa7b08354
+812714fd80e96e28cd288c553c83838cecbfc2d9
+8a445c5651edb9a1f51497055b7ddf4402be9188
+e126d0c12ca66278d9e7b12187c5ff4fc02a7e6c
+3908fc4728059719bed0e1c7b1c8b388c2d4a8da
+8b66bf74e2a349e71eaa183af81fa63eaee76ad2
+05950427d310654774031764a7141a1a4fd9c6e4
+07fd147b9f12e9205afd66a624edce357977d615
+12e31127948fa4bb01c3bddc1b8c85b432f7465b
+8c87f175d335e9d9e93f987d871ae9f05f6a10a7
+46b249e578e8a3dfbe85bc7253a12e82ef4b658b
+a55716abe5662ec74c2f8af93023f1e7cca901fc
+f646275b90b1de93bc62b4c4d045d75ac0b96eee
+c252685aa5867631e9a5ef07ccae7c7c25cae8ff
+a7d55c93385359952d85decd5037843ac70ba3d4
+7dac1e5e9e887f5f6ff146e812a05bd3bf281eae
+2a524b8e8fe69ef487fd8ea1b4f7a03f473ed201
+ce5c1f4acae43477989cdf9a82ed33703919cda2
+2db4cbcc437f51f5dac82cc4de46f383b92e6f11
+7aa700424cbda387536373d8dfec88aee43f950e
+b99a093afed880f23fb279c443cc6ae5e379cc43
+b83264d9c7a8ddb79f64bd9540caddc8632ef31f
+57e337d40e94ba33d8cd265c134d6ef857b32b59
+a1dcf2e1087beaf3981739fd2bb74f35ecad630a
+d38b0d7a6b6056cba26999b702815775e2437d87
+815640ec6af9a38d6a2da4a4400056e2f4105080
+09c4fd157c5b88df2d97fad4826c79b094db90c9
+2efcfa5acfacb958973d9e8125e1d81f102e2dfd
+dc6dee41f7cf2ba93fcd0fea7c157e4b2775d439
+ad826b3df9f763b49f1e3e3d50c4efdd438c7547
+c1a52276848d8caa9a9789dff176408c1aa6b1ed
+3bf06e9bac57b5b5a746677b75e297a7b154bdbd
+72ae6f8cf0224370e8121d6769b21e612ca15d6f
+a143b88dbd4971ecfdd1d39a494489c8f2db0344
+76fec09d878d6dbf214bdb6228d480bd9195db4c
+93566e0c37c5ae104095474fea89f00dcb40f551
+407d9232ef5cb1ebf6cff21f3d13e07ea4158eeb
+9346f8429957e356d21c665bab59fe45bcf1f74e
+6eeac6e30d65f9a972067c1ea8c49978c8e631ac
+dc6b9406bdfab2af8c86cb080cb3e6cf8f2385d8
+9f554e03ebe5701c1b75ff03b3d6152095c0cad3
+05009935f9ac070197113954d680bc2c9150b9b3
+508404de98a8a5435f52916cef8f328e82651961
+ed0cc50afed146c27f6d8129c683c225fb940093
+6429cfa8a70308241c576aeb92ffe3db5203b2ef
+6898213409811b140843c3d89af43328c3b22fad
+5b2ea29cf4fd298346437bb16a54407f8c1f9dca
+e2a1a1ee895149c544d4ae295466611f0cec3094
+e82fb872ff5cc8fd22d43327c1ee3e755f61c562
+19b0f33de0efd9da788e8e4f3fdc2a9e159abdb1
+89de1538ce1f8c00f80e8d11f43e1b77e24d7dea
+de07fdcf77e97b8613091285e4d0a734f5de7492
+01680195f8aa586c55c44767397380def3a23b54
+05e1c85fb687c82ae477c72d4a7e2d6b0c692167
+c072b8fd95cd4fa84f08189a0cd8b173ea2dbb8e
+9a0ed08b40b15ae2b791aa8549b53e69934b4ea7
+53f8f226bd1d627c4a6dec5862a1d4ea5a933e45
+9d0f43b7ca7241d8a018fd35dd3bc01555235ec6
+f12d2b5a8ac397e4bcaefcc19898f8ff5705dea5
+8250de13587ed05ca45df3e12c5dc9bcb1500e2c
+d727f77e390426e9e463336bda08d50c451c7086
+484312bda2d43e3ea60047be076332299463adf8
+c7e05b35ab0a791c7a8e2d863e716fdec6f3f671
+b9c1cd81848da9de1baf9c2f29c19c50e549de13
+8ea7d31e384975019733b5778feabbd9955c79d8
+f798b891bcecea9548eedacae70eeb9906c1ddbf
+ebefe7a00b46579cdd1e033a8c7fd8ce9aa578e4
+ad087638ee4864d6244ec9381ff764bfa6ee5086
+66db2d62d59817320c9182fc18e75a93b76828ea
+7ce9ac5c83b1844a518ef2e12e87aae3cacdfe58
+4286f43025149cf44207c3ad98e4a1f068520ada
+cd0c5135ab2291aaa5410ac919bad3fc87249a4a
+66ed450d771a8fc01c159a8402648ebd1c35eb4c
+a82f03393a32842d49236e8666ee57805ca701f8
+f972b04d63eb8af79ff3cec1dc561ed13dfa6053
+ec45cc5e27668171b55271b0c735194c70e7da41
+715e9fd7454f7a48d7adba7d42f662c20a3e3367
+2e0a99037dcc35bc63ba0d54371bc678af737c8e
+7fa8d758598407f3bf0beb0118dc122ea5340736
+6a22373771edbc3c7513cacb9355f880c73c2cbf
+b89ef131147f71a96152a7b5c4374266cdf539b2
+01d8359983e2f77b5118fede3ffa947072c666c8
+58f0c929a3d70a4bff79cc200f1c186f71ef1675
+950be19727a581970591d8f8138dfe4725750382
+425278d17bd0edf8a3a7cc81e55016f7fd8e7726
+c028c7b7557da2baff7af8840108e8be4db8e0c6
+47a7cfb0aa2498f6801026d258a59f9de48f60b0
+f6b7df3155ddb4cedfbcf5d3eb3383d4614b3a85
+d72098038f3b55a714ed8adb34fab547b15eb0d5
+c49c825bd9f4764536b45df5a684d97173673fc7
+33799afe83eec4200ff140e9bf5eae83701a4d7f
+5c3f8ddcaa1164079105c452429fccf8127b01b6
+1f01443567b03ac75a91c810f1733f5c21b5699d
+b3e42b6d02e8d19658a9135e427ebceab5367779
+69b3a6dd9d9a0adf5506c8b9fde42187356bd4a8
+bafd075c5e6a1088ef0f1aa0b0b224e026a3d3e0
+7daa3adb242d9c8728fdb15c6af6596aaad5502f
+514993554c370f4cf30a109ac28d5d64893dbf0a
+c8d2473e6cb042e7275a10c49d3f6a4a91bf0166
+386f4385ab04b0b2c3d47bddc0dc0f2de7354964
+9f33dba05c01ecc5c56eb1284ab7d64d42f55171
diff --git a/contrib/verify-commits/gpg.sh b/contrib/verify-commits/gpg.sh
index 6b5137e7b..4b2649eaa 100755
--- a/contrib/verify-commits/gpg.sh
+++ b/contrib/verify-commits/gpg.sh
@@ -1,15 +1,33 @@
#!/bin/sh
-INPUT=$(</dev/stdin)
+# Copyright (c) 2014-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+INPUT=$(cat /dev/stdin)
VALID=false
-IFS=$'\n'
+REVSIG=false
+IFS='
+'
for LINE in $(echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null); do
- case "$LINE" in "[GNUPG:] VALIDSIG"*)
+ case "$LINE" in
+ "[GNUPG:] VALIDSIG "*)
while read KEY; do
- case "$LINE" in "[GNUPG:] VALIDSIG $KEY "*) VALID=true;; esac
+ [ "${LINE#?GNUPG:? VALIDSIG * * * * * * * * * }" = "$KEY" ] && VALID=true
done < ./contrib/verify-commits/trusted-keys
+ ;;
+ "[GNUPG:] REVKEYSIG "*)
+ [ "$BITCOIN_VERIFY_COMMITS_ALLOW_REVSIG" != 1 ] && exit 1
+ REVSIG=true
+ GOODREVSIG="[GNUPG:] GOODSIG ${LINE#* * *}"
+ ;;
esac
done
if ! $VALID; then
exit 1
fi
-echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null
+if $VALID && $REVSIG; then
+ echo "$INPUT" | gpg --trust-model always "$@" | grep "\[GNUPG:\] \(NEWSIG\|SIG_ID\|VALIDSIG\)" 2>/dev/null
+ echo "$GOODREVSIG"
+else
+ echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null
+fi
diff --git a/contrib/verify-commits/pre-push-hook.sh b/contrib/verify-commits/pre-push-hook.sh
index fe1bd54e0..4e36af4e3 100755
--- a/contrib/verify-commits/pre-push-hook.sh
+++ b/contrib/verify-commits/pre-push-hook.sh
@@ -1,5 +1,9 @@
#!/bin/bash
-if ! [[ "$2" =~ [git@]?[www.]?github.com[:|/]dogecoin/dogecoin[.git]? ]]; then
+# Copyright (c) 2014-2015 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+if ! [[ "$2" =~ ^(git@)?(www.)?github.com(:|/)dogecoin/dogecoin(.git)?$ ]]; then
exit 0
fi
diff --git a/contrib/verify-commits/trusted-git-root b/contrib/verify-commits/trusted-git-root
index baa82f2af..2c1b4a2a4 100644
--- a/contrib/verify-commits/trusted-git-root
+++ b/contrib/verify-commits/trusted-git-root
@@ -1 +1 @@
-0000000000000000
+0000000000000000000000000000000000000000
diff --git a/contrib/verify-commits/verify-commits.sh b/contrib/verify-commits/verify-commits.sh
index 5841fa207..b2cebdf1a 100755
--- a/contrib/verify-commits/verify-commits.sh
+++ b/contrib/verify-commits/verify-commits.sh
@@ -1,25 +1,37 @@
#!/bin/sh
+# Copyright (c) 2014-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-DIR=$(dirname "$0")
+# Not technically POSIX-compliant due to use of "local", but almost every
+# shell anyone uses today supports it, so its probably fine
-echo "Please verify all commits in the following list are not evil:"
-git log "$DIR"
+DIR=$(dirname "$0")
+[ "/${DIR#/}" != "$DIR" ] && DIR=$(dirname "$(pwd)/$0")
VERIFIED_ROOT=$(cat "${DIR}/trusted-git-root")
+REVSIG_ALLOWED=$(cat "${DIR}/allow-revsig-commits")
HAVE_FAILED=false
IS_SIGNED () {
if [ $1 = $VERIFIED_ROOT ]; then
return 0;
fi
+ if [ "${REVSIG_ALLOWED#*$1}" != "$REVSIG_ALLOWED" ]; then
+ export BITCOIN_VERIFY_COMMITS_ALLOW_REVSIG=1
+ else
+ export BITCOIN_VERIFY_COMMITS_ALLOW_REVSIG=0
+ fi
if ! git -c "gpg.program=${DIR}/gpg.sh" verify-commit $1 > /dev/null 2>&1; then
return 1;
fi
- local PARENTS=$(git show -s --format=format:%P $1)
+ local PARENTS
+ PARENTS=$(git show -s --format=format:%P $1)
for PARENT in $PARENTS; do
- if IS_SIGNED $PARENT > /dev/null; then
+ if IS_SIGNED $PARENT; then
return 0;
fi
+ break
done
if ! "$HAVE_FAILED"; then
echo "No parent of $1 was signed with a trusted key!" > /dev/stderr
diff --git a/contrib/verifybinaries/README.md b/contrib/verifybinaries/README.md
new file mode 100644
index 000000000..ed3e14fb6
--- /dev/null
+++ b/contrib/verifybinaries/README.md
@@ -0,0 +1,33 @@
+### Verify Binaries
+
+#### Preparation:
+
+Make sure you obtain the proper release signing key and verify the fingerprint with several independent sources.
+
+```sh
+$ gpg --fingerprint "Bitcoin Core binary release signing key"
+pub 4096R/36C2E964 2015-06-24 [expires: 2017-02-13]
+ Key fingerprint = 01EA 5486 DE18 A882 D4C2 6845 90C8 019E 36C2 E964
+uid Wladimir J. van der Laan (Bitcoin Core binary release signing key) <[email protected]>
+```
+
+#### Usage:
+
+This script attempts to download the signature file `SHA256SUMS.asc` from https://bitcoin.org.
+
+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.
+
+
+```sh
+./verify.sh bitcoin-core-0.11.2
+./verify.sh bitcoin-core-0.12.0
+./verify.sh bitcoin-core-0.13.0-rc3
+```
+
+If you do not want to keep the downloaded binaries, specify anything as the second parameter.
+
+```sh
+./verify.sh bitcoin-core-0.13.0 delete
+```
diff --git a/contrib/verifybinaries/verify.sh b/contrib/verifybinaries/verify.sh
new file mode 100755
index 000000000..e20770c96
--- /dev/null
+++ b/contrib/verifybinaries/verify.sh
@@ -0,0 +1,127 @@
+#!/bin/bash
+# Copyright (c) 2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+### This script attempts to download the signature file SHA256SUMS.asc from bitcoin.org
+### 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
+
+function clean_up {
+ for file in $*
+ do
+ rm "$file" 2> /dev/null
+ done
+}
+
+WORKINGDIR="/tmp/bitcoin_verify_binaries"
+TMPFILE="hashes.tmp"
+
+SIGNATUREFILENAME="SHA256SUMS.asc"
+RCSUBDIR="test"
+BASEDIR="https://bitcoin.org/bin/"
+VERSIONPREFIX="bitcoin-core-"
+RCVERSIONSTRING="rc"
+
+if [ ! -d "$WORKINGDIR" ]; then
+ mkdir "$WORKINGDIR"
+fi
+
+cd "$WORKINGDIR"
+
+#test if a version number has been passed as an argument
+if [ -n "$1" ]; then
+ #let's also check if the version number includes the prefix 'bitcoin-',
+ # and add this prefix if it doesn't
+ if [[ $1 == "$VERSIONPREFIX"* ]]; then
+ VERSION="$1"
+ else
+ VERSION="$VERSIONPREFIX$1"
+ fi
+
+ #now let's see if the version string contains "rc", and strip it off if it does
+ # and simultaneously add RCSUBDIR to BASEDIR, where we will look for SIGNATUREFILENAME
+ if [[ $VERSION == *"$RCVERSIONSTRING"* ]]; then
+ BASEDIR="$BASEDIR${VERSION/%-$RCVERSIONSTRING*}/"
+ BASEDIR="$BASEDIR$RCSUBDIR.$RCVERSIONSTRING${VERSION: -1}/"
+ else
+ BASEDIR="$BASEDIR$VERSION/"
+ fi
+
+ SIGNATUREFILE="$BASEDIR$SIGNATUREFILENAME"
+else
+ echo "Error: need to specify a version on the command line"
+ exit 2
+fi
+
+#first we fetch the file containing the signature
+WGETOUT=$(wget -N "$BASEDIR$SIGNATUREFILENAME" 2>&1)
+
+#and then see if wget completed successfully
+if [ $? -ne 0 ]; then
+ echo "Error: couldn't fetch signature file. Have you specified the version number in the following format?"
+ echo "[$VERSIONPREFIX]<version>-[$RCVERSIONSTRING[0-9]] (example: "$VERSIONPREFIX"0.10.4-"$RCVERSIONSTRING"1)"
+ echo "wget output:"
+ echo "$WGETOUT"|sed 's/^/\t/g'
+ exit 2
+fi
+
+#then we check it
+GPGOUT=$(gpg --yes --decrypt --output "$TMPFILE" "$SIGNATUREFILENAME" 2>&1)
+
+#return value 0: good signature
+#return value 1: bad signature
+#return value 2: gpg error
+
+RET="$?"
+if [ $RET -ne 0 ]; then
+ if [ $RET -eq 1 ]; then
+ #and notify the user if it's bad
+ echo "Bad signature."
+ elif [ $RET -eq 2 ]; then
+ #or if a gpg error has occurred
+ echo "gpg error. Do you have the Bitcoin Core binary release signing key installed?"
+ fi
+
+ echo "gpg output:"
+ echo "$GPGOUT"|sed 's/^/\t/g'
+ clean_up $SIGNATUREFILENAME $TMPFILE
+ exit "$RET"
+fi
+
+#here we extract the filenames from the signature file
+FILES=$(awk '{print $2}' "$TMPFILE")
+
+#and download these one by one
+for file in $FILES
+do
+ wget --quiet -N "$BASEDIR$file"
+done
+
+#check hashes
+DIFF=$(diff <(sha256sum $FILES) "$TMPFILE")
+
+if [ $? -eq 1 ]; then
+ echo "Hashes don't match."
+ echo "Offending files:"
+ echo "$DIFF"|grep "^<"|awk '{print "\t"$3}'
+ exit 1
+elif [ $? -gt 1 ]; then
+ echo "Error executing 'diff'"
+ exit 2
+fi
+
+if [ -n "$2" ]; then
+ echo "Clean up the binaries"
+ clean_up $FILES $SIGNATUREFILENAME $TMPFILE
+else
+ echo "Keep the binaries in $WORKINGDIR"
+ clean_up $TMPFILE
+fi
+
+echo -e "Verified hashes of \n$FILES"
+
+exit 0
diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py
new file mode 100755
index 000000000..5707188f2
--- /dev/null
+++ b/contrib/zmq/zmq_sub.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python2
+# Copyright (c) 2014-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+import binascii
+import zmq
+import struct
+
+port = 28332
+
+zmqContext = zmq.Context()
+zmqSubSocket = zmqContext.socket(zmq.SUB)
+zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "hashblock")
+zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "hashtx")
+zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "rawblock")
+zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "rawtx")
+zmqSubSocket.connect("tcp://127.0.0.1:%i" % port)
+
+try:
+ while True:
+ msg = zmqSubSocket.recv_multipart()
+ topic = str(msg[0])
+ body = msg[1]
+ sequence = "Unknown"
+ if len(msg[-1]) == 4:
+ msgSequence = struct.unpack('<I', msg[-1])[-1]
+ sequence = str(msgSequence)
+ if topic == "hashblock":
+ print '- HASH BLOCK ('+sequence+') -'
+ print binascii.hexlify(body)
+ elif topic == "hashtx":
+ print '- HASH TX ('+sequence+') -'
+ print binascii.hexlify(body)
+ elif topic == "rawblock":
+ print '- RAW BLOCK HEADER ('+sequence+') -'
+ print binascii.hexlify(body[:80])
+ elif topic == "rawtx":
+ print '- RAW TX ('+sequence+') -'
+ print binascii.hexlify(body)
+
+except KeyboardInterrupt:
+ zmqContext.destroy()