Browse Source

Merge pull request #5731

ee93202 Changed pronouns for correctness and inclusivity (bikinibabe)
1fa89a5 fix _code_ snippet in gitian-building.md (UdjinM6)
34c6181 Fix README link from util.sh -> util.py. (Matt Bogosian)
faf0af4 Suggest --disable-wallet when libdb_cxx headers are missing (Luke Dashjr)
5a809ef depends: fix typos (Michael Ford)
bd2b73b TRIVIAL: fix misleading comment (Vitalii Demianets)
5262fde Remove whitespaces before double colon in errors and logs (Pavel Janík)
3800135 Fix typo (Pavel Janík)
91a9fe0 Fix typo - sentence starts with capital letter (Pavel Janík)
bfc29dc Improve gitian build guide (Michael Ford)
d6bed15 remove sig_canonical.json and sig_noncanonical.json (Manuel Araoz)
8673160 Remove bootstrap.md (Michael Ford)
0.13
Wladimir J. van der Laan 10 years ago
parent
commit
a62649731f
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 2
      build-aux/m4/bitcoin_find_bdb48.m4
  2. 2
      depends/README
  3. 2
      depends/funcs.mk
  4. 2
      doc/README.md
  5. 56
      doc/bootstrap.md
  6. 4
      doc/build-unix.md
  7. 34
      doc/gitian-building.md
  8. 2
      qa/rpc-tests/README.md
  9. 2
      qa/rpc-tests/wallet.py
  10. 2
      src/Makefile.test.include
  11. 2
      src/checkqueue.h
  12. 2
      src/main.cpp
  13. 2
      src/rpcwallet.cpp
  14. 7
      src/test/data/sig_canonical.json
  15. 22
      src/test/data/sig_noncanonical.json

2
build-aux/m4/bitcoin_find_bdb48.m4

@ -38,7 +38,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
done done
if test "x$bdbpath" = "xX"; then if test "x$bdbpath" = "xX"; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
AC_MSG_ERROR(libdb_cxx headers missing) AC_MSG_ERROR([libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)])
elif test "x$bdb48path" = "xX"; then elif test "x$bdb48path" = "xX"; then
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx) BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx)
AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[ AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[

2
depends/README

@ -7,7 +7,7 @@ There are several features that make it different from most similar systems:
In theory, binaries for any target OS/architecture can be created, from a In theory, binaries for any target OS/architecture can be created, from a
builder running any OS/architecture. In practice, build-side tools must be builder running any OS/architecture. In practice, build-side tools must be
specified when the defaults don't fit, and packages must be ammended to work specified when the defaults don't fit, and packages must be amended to work
on new hosts. For now, a build architecture of x86_64 is assumed, either on on new hosts. For now, a build architecture of x86_64 is assumed, either on
Linux or OSX. Linux or OSX.

2
depends/funcs.mk

@ -205,7 +205,7 @@ endef
# These functions create the build targets for each package. They must be # These functions create the build targets for each package. They must be
# broken down into small steps so that each part is done for all packages # broken down into small steps so that each part is done for all packages
# before moving on to the next step. Otherwise, a package's info # before moving on to the next step. Otherwise, a package's info
# (build-id for example) would only be avilable to another package if it # (build-id for example) would only be available to another package if it
# happened to be computed already. # happened to be computed already.
#set the type for host/build packages. #set the type for host/build packages.

2
doc/README.md

@ -3,7 +3,7 @@ Bitcoin Core 0.10.99
Setup Setup
--------------------- ---------------------
[Bitcoin Core](http://bitcoin.org/en/download) is the original Bitcoin client and it builds the backbone of the network. However, it downloads and stores the entire history of Bitcoin transactions (which is currently several GBs); depending on the speed of your computer and network connection, the synchronization process can take anywhere from a few hours to a day or more. Thankfully you only have to do this once. If you would like the process to go faster you can [download the blockchain directly](bootstrap.md). [Bitcoin Core](http://bitcoin.org/en/download) is the original Bitcoin client and it builds the backbone of the network. However, it downloads and stores the entire history of Bitcoin transactions (which is currently several GBs); depending on the speed of your computer and network connection, the synchronization process can take anywhere from a few hours to a day or more.
Running Running
--------------------- ---------------------

56
doc/bootstrap.md

@ -1,56 +0,0 @@
### Bootstrap the Blockchain Synchronization
Normally the Bitcoin client will download the transaction and network information, called the blockchain, from the network by syncing with the other clients. This process can take quite some time as the [Bitcoin blockchain](https://blockchain.info/charts/blocks-size) is growing bigger and bigger for each day. Luckily there is a safe and fast way to speed up this process. We'll show you how to bootstrap your blockchain to bring your client up to speed in just a few simple steps.
### Requirements
- A fresh install of the Bitcoin client software.
### Download the blockchain via BitTorrent
Jeff Garzik, Bitcoin Core developer, offers an [torrent file](https://bitcointalk.org/index.php?topic=145386.0) for bootstrapping purposes that is updated often. BitTorrent is a protocol that speeds up the downloading of large files by using the other clients in the network. Examples of free and safe open source clients are [Deluge](http://deluge-torrent.org/) or [qBittorrent](http://www.qbittorrent.org/). A guide to installing and configuring the torrent clients can be found [here](http://dev.deluge-torrent.org/wiki/UserGuide) for Deluge and [here](http://qbforums.shiki.hu/) for qBittorrent. A further in-depth tutorial on BitTorrent can be found [here](http://www.howtogeek.com/howto/31846/bittorrent-for-beginners-how-get-started-downloading-torrents/).
With the client installed we'll proceed to download the blockchain torrent file. Use the following magnet link:
magnet:?xt=urn:btih:2d4e6c1f96c5d5fb260dff92aea4e600227f1aea&dn=bootstrap.dat&tr=udp://tracker.openbittorrent.com:80&tr=udp://tracker.publicbt.com:80&tr=udp://tracker.ccc.de:80&tr=udp://tracker.istole.it:80
or go to [Jeff Garzik's topic](https://bitcointalk.org/index.php?topic=145386.0) for a signed magnet link. Alternatively you can use the [.torrent file](http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain/bootstrap.dat.torrent/download) found on SourceForge.
![Fig1](img/bootstrap1.png)
The download page should look like this, with a countdown to the download. If it does not work click the direct download link.
The torrent client installed will recognize the download of the torrent file. Save the bootstrap.dat file to the folder you use for downloads. The image below shows the torrent download in qBittorrent, with current speed and ETA highlighted.
![Fig2](img/bootstrap2.png)
### Importing the blockchain
Exit the Bitcoin client software if you have it running. Be sure not to have an actively used wallet in use. We are going to copy the download of the blockchain to the Bitcoin client data directory. You should run the client software at least once so it can generate the data directory. Copy the downloaded bootstrap.dat file into the Bitcoin data folder.
**For Windows users:**
Open explorer, and type into the address bar:
%APPDATA%\Bitcoin
This will open up the data folder. It should look like the image below. Copy over the bootstrap.dat from your download folder to this directory.
![Fig4](img/bootstrap4.png)
**For OSX users:**
Open Finder by pressing Press [shift] + [cmd] + [g] and enter:
~/Library/Application Support/Bitcoin/
**For Linux users:**
The directory is hidden in your User folder. Go to:
~/.bitcoin/
### Importing the blockchain
Now start the Bitcoin client software. It should show "Importing blocks from disk" like the image below.
![Fig5](img/bootstrap5.png)
Wait until the import finishes. The client will download the last days not covered by the import. Congratulations you have successfully imported the blockchain!
### Is this safe?
Yes, the above method is safe. The download contains only raw blockchain data and the client verifies this on import. Do not download the blockchain from unofficial sources, especially if they provide `*.rev` and `*.sst` files. These files are not verified and can contain malicious edits.

4
doc/build-unix.md

@ -159,7 +159,7 @@ tar -xzvf db-4.8.30.NC.tar.gz
# Build the library and install to our prefix # Build the library and install to our prefix
cd db-4.8.30.NC/build_unix/ cd db-4.8.30.NC/build_unix/
# Note: Do a static build so that it can be embedded into the exectuable, instead of having to find a .so at runtime # Note: Do a static build so that it can be embedded into the executable, instead of having to find a .so at runtime
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
make install make install
@ -196,7 +196,7 @@ Hardening enables the following features:
* Position Independent Executable * Position Independent Executable
Build position independent code to take advantage of Address Space Layout Randomization Build position independent code to take advantage of Address Space Layout Randomization
offered by some kernels. An attacker who is able to cause execution of code at an arbitrary offered by some kernels. An attacker who is able to cause execution of code at an arbitrary
memory location is thwarted if he doesn't know where anything useful is located. memory location is thwarted if he or she doesn't know where anything useful is located.
The stack and heap are randomly located by default but this allows the code section to be The stack and heap are randomly located by default but this allows the code section to be
randomly located as well. randomly located as well.

34
doc/gitian-building.md

@ -24,7 +24,7 @@ Table of Contents
- [Connecting to the VM](#connecting-to-the-vm) - [Connecting to the VM](#connecting-to-the-vm)
- [Setting up Debian for gitian building](#setting-up-debian-for-gitian-building) - [Setting up Debian for gitian building](#setting-up-debian-for-gitian-building)
- [Installing gitian](#installing-gitian) - [Installing gitian](#installing-gitian)
- [Setting up gitian images](#setting-up-gitian-images) - [Setting up the gitian image](#setting-up-the-gitian-image)
- [Getting and building the inputs](#getting-and-building-the-inputs) - [Getting and building the inputs](#getting-and-building-the-inputs)
- [Building Bitcoin](#building-bitcoin) - [Building Bitcoin](#building-bitcoin)
- [Building an alternative repository](#building-an-alternative-repository) - [Building an alternative repository](#building-an-alternative-repository)
@ -74,11 +74,11 @@ In the VirtualBox GUI click "Create" and choose the following parameters in the
- Disk size: at least 40GB; as low as 20GB *may* be possible, but better to err on the safe side - Disk size: at least 40GB; as low as 20GB *may* be possible, but better to err on the safe side
- Push the `Create` button - Push the `Create` button
Get the [Debian 7.4 net installer](http://ftp.at.debian.org/debian-jigdo/current/amd64/iso-cd/debian-7.4.0-amd64-netinst.iso) (a more recent minor version should also work, see also [Debian Network installation](https://www.debian.org/CD/netinst/)). Get the [Debian 7.7 net installer](http://cdimage.debian.org/debian-cd/7.7.0/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso) (a more recent minor version should also work, see also [Debian Network installation](https://www.debian.org/CD/netinst/)).
This DVD image can be validated using a SHA256 hashing tool, for example on This DVD image can be validated using a SHA256 hashing tool, for example on
Unixy OSes by entering the following in a terminal: Unixy OSes by entering the following in a terminal:
echo "b712a141bc60269db217d3b3e456179bd6b181645f90e4aac9c42ed63de492e9 debian-7.4.0-amd64-netinst.iso" | sha256sum -c echo "d440e85b4121f94608748139f25dbce1ad36771348b002fe07d4d44b9d9e623f debian-7.7.0-amd64-netinst.iso" | sha256sum -c
# (must return OK) # (must return OK)
After creating the VM, we need to configure it. After creating the VM, we need to configure it.
@ -109,7 +109,7 @@ Then start the VM. On the first launch you will be asked for a CD or DVD image.
Installing Debian Installing Debian
------------------ ------------------
In this section it will be explained how to install Debian on the newly created VM. This section will explain how to install Debian on the newly created VM.
- Choose the non-graphical installer. We do not need the graphical environment, it will only increase installation time and disk usage. - Choose the non-graphical installer. We do not need the graphical environment, it will only increase installation time and disk usage.
@ -277,24 +277,21 @@ cd ..
**Note**: When sudo asks for a password, enter the password for the user *debian* not for *root*. **Note**: When sudo asks for a password, enter the password for the user *debian* not for *root*.
Clone the git repositories for bitcoin and gitian and then checkout the bitcoin version that you want to build. Clone the git repositories for bitcoin and gitian.
```bash ```bash
git clone https://github.com/devrandom/gitian-builder.git git clone https://github.com/devrandom/gitian-builder.git
git clone https://github.com/bitcoin/bitcoin git clone https://github.com/bitcoin/bitcoin
cd bitcoin
git checkout v${VERSION}
cd ..
``` ```
Setting up gitian images Setting up the gitian image
------------------------- -------------------------
Gitian needs virtual images of the operating system to build in. Gitian needs a virtual image of the operating system to build in.
Currently this is Ubuntu Precise for x86_64. Currently this is Ubuntu Precise x86_64.
These images will be copied and used every time that a build is started to This image will be copied and used every time that a build is started to
make sure that the build is deterministic. make sure that the build is deterministic.
Creating the images will take a while, but only has to be done once. Creating the image will take a while, but only has to be done once.
Execute the following as user `debian`: Execute the following as user `debian`:
@ -303,7 +300,7 @@ cd gitian-builder
bin/make-base-vm --lxc --arch amd64 --suite precise bin/make-base-vm --lxc --arch amd64 --suite precise
``` ```
There will be a lot of warnings printed during build of the images. These can be ignored. There will be a lot of warnings printed during build of the image. These can be ignored.
**Note**: When sudo asks for a password, enter the password for the user *debian* not for *root*. **Note**: When sudo asks for a password, enter the password for the user *debian* not for *root*.
@ -322,13 +319,14 @@ To build Bitcoin (for Linux, OSX and Windows) just follow the steps under 'perfo
gitian builds' in [doc/release-process.md](release-process.md) in the bitcoin repository. gitian builds' in [doc/release-process.md](release-process.md) in the bitcoin repository.
This may take a long time as it also builds the dependencies needed for each descriptor. This may take a long time as it also builds the dependencies needed for each descriptor.
These dependencies will be cached after a successful build to avoid rebuilding them when possible. These dependencies will be cached after a successful build to avoid rebuilding them where possible.
At any time you can check the package installation and build progress with At any time you can check the package installation and build progress with
```bash ```bash
tail -f var/install.log tail -f var/install.log
tail -f var/build.log tail -f var/build.log
```
Output from `gbuild` will look something like Output from `gbuild` will look something like
@ -382,9 +380,9 @@ When you execute `gsign` you will get an error from GPG, which can be ignored. C
in `gitian.sigs` to your signing machine and do in `gitian.sigs` to your signing machine and do
```bash ```bash
gpg --detach-sign ${VERSION}-linux/${SIGNER}/bitcoin-build.assert gpg --detach-sign ${VERSION}-linux/${SIGNER}/bitcoin-linux-build.assert
gpg --detach-sign ${VERSION}-win/${SIGNER}/bitcoin-build.assert gpg --detach-sign ${VERSION}-win/${SIGNER}/bitcoin-win-build.assert
gpg --detach-sign ${VERSION}-osx/${SIGNER}/bitcoin-build.assert gpg --detach-sign ${VERSION}-osx-unsigned/${SIGNER}/bitcoin-osx-build.assert
``` ```
This will create the `.sig` files that can be committed together with the `.assert` files to assert your This will create the `.sig` files that can be committed together with the `.assert` files to assert your

2
qa/rpc-tests/README.md

@ -12,7 +12,7 @@ Base class for new regression tests.
### [listtransactions.py](listtransactions.py) ### [listtransactions.py](listtransactions.py)
Tests for the listtransactions RPC call. Tests for the listtransactions RPC call.
### [util.py](util.sh) ### [util.py](util.py)
Generally useful functions. Generally useful functions.
Bash-based tests, to be ported to Python: Bash-based tests, to be ported to Python:

2
qa/rpc-tests/wallet.py

@ -61,7 +61,7 @@ class WalletTest (BitcoinTestFramework):
walletinfo = self.nodes[0].getwalletinfo() walletinfo = self.nodes[0].getwalletinfo()
assert_equal(walletinfo['immature_balance'], 0) assert_equal(walletinfo['immature_balance'], 0)
# Have node0 mine a block, thus he will collect his own fee. # Have node0 mine a block, thus they will collect their own fee.
self.nodes[0].setgenerate(True, 1) self.nodes[0].setgenerate(True, 1)
self.sync_all() self.sync_all()

2
src/Makefile.test.include

@ -20,8 +20,6 @@ EXTRA_DIST += \
JSON_TEST_FILES = \ JSON_TEST_FILES = \
test/data/script_valid.json \ test/data/script_valid.json \
test/data/base58_keys_valid.json \ test/data/base58_keys_valid.json \
test/data/sig_canonical.json \
test/data/sig_noncanonical.json \
test/data/base58_encode_decode.json \ test/data/base58_encode_decode.json \
test/data/base58_keys_invalid.json \ test/data/base58_keys_invalid.json \
test/data/script_invalid.json \ test/data/script_invalid.json \

2
src/checkqueue.h

@ -81,7 +81,7 @@ private:
fAllOk &= fOk; fAllOk &= fOk;
nTodo -= nNow; nTodo -= nNow;
if (nTodo == 0 && !fMaster) if (nTodo == 0 && !fMaster)
// We processed the last element; inform the master he can exit and return the result // We processed the last element; inform the master he or she can exit and return the result
condMaster.notify_one(); condMaster.notify_one();
} else { } else {
// first iteration // first iteration

2
src/main.cpp

@ -744,7 +744,7 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
// non-standard. Note that this EvalScript() call will // non-standard. Note that this EvalScript() call will
// be quick, because if there are any operations // be quick, because if there are any operations
// beside "push data" in the scriptSig // beside "push data" in the scriptSig
// IsStandard() will have already returned false // IsStandardTx() will have already returned false
// and this method isn't called. // and this method isn't called.
vector<vector<unsigned char> > stack; vector<vector<unsigned char> > stack;
if (!EvalScript(stack, tx.vin[i].scriptSig, SCRIPT_VERIFY_NONE, BaseSignatureChecker())) if (!EvalScript(stack, tx.vin[i].scriptSig, SCRIPT_VERIFY_NONE, BaseSignatureChecker()))

2
src/rpcwallet.cpp

@ -82,7 +82,7 @@ Value getnewaddress(const Array& params, bool fHelp)
"If 'account' is specified (DEPRECATED), it is added to the address book \n" "If 'account' is specified (DEPRECATED), it is added to the address book \n"
"so payments received with the address will be credited to 'account'.\n" "so payments received with the address will be credited to 'account'.\n"
"\nArguments:\n" "\nArguments:\n"
"1. \"account\" (string, optional) DEPRECATED. The account name for the address to be linked to. if not provided, the default account \"\" is used. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.\n" "1. \"account\" (string, optional) DEPRECATED. The account name for the address to be linked to. If not provided, the default account \"\" is used. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.\n"
"\nResult:\n" "\nResult:\n"
"\"bitcoinaddress\" (string) The new bitcoin address\n" "\"bitcoinaddress\" (string) The new bitcoin address\n"
"\nExamples:\n" "\nExamples:\n"

7
src/test/data/sig_canonical.json

@ -1,7 +0,0 @@
[
"300602010002010001",
"3008020200ff020200ff01",
"304402203932c892e2e550f3af8ee4ce9c215a87f9bb831dcac87b2838e2c2eaa891df0c022030b61dd36543125d56b9f9f3a1f9353189e5af33cdda8d77a5209aec03978fa001",
"30450220076045be6f9eca28ff1ec606b833d0b87e70b2a630f5e3a496b110967a40f90a0221008fffd599910eefe00bc803c688c2eca1d2ba7f6b180620eaa03488e6585db6ba01",
"3046022100876045be6f9eca28ff1ec606b833d0b87e70b2a630f5e3a496b110967a40f90a0221008fffd599910eefe00bc803c688c2eca1d2ba7f6b180620eaa03488e6585db6ba01"
]

22
src/test/data/sig_noncanonical.json

@ -1,22 +0,0 @@
[
"non-hex strings are ignored",
"too short:", "30050201FF020001",
"too long:", "30470221005990e0584b2b238e1dfaad8d6ed69ecc1a4a13ac85fc0b31d0df395eb1ba6105022200002d5876262c288beb511d061691bf26777344b702b00f8fe28621fe4e566695ed01",
"hashtype:", "304402205990e0584b2b238e1dfaad8d6ed69ecc1a4a13ac85fc0b31d0df395eb1ba610502202d5876262c288beb511d061691bf26777344b702b00f8fe28621fe4e566695ed11",
"type:", "314402205990e0584b2b238e1dfaad8d6ed69ecc1a4a13ac85fc0b31d0df395eb1ba610502202d5876262c288beb511d061691bf26777344b702b00f8fe28621fe4e566695ed01",
"total length:", "304502205990e0584b2b238e1dfaad8d6ed69ecc1a4a13ac85fc0b31d0df395eb1ba610502202d5876262c288beb511d061691bf26777344b702b00f8fe28621fe4e566695ed01",
"S len oob:", "301F01205990e0584b2b238e1dfaad8d6ed69ecc1a4a13ac85fc0b31d0df395eb101",
"R+S:", "304502205990e0584b2b238e1dfaad8d6ed69ecc1a4a13ac85fc0b31d0df395eb1ba610502202d5876262c288beb511d061691bf26777344b702b00f8fe28621fe4e566695ed0001",
"R type:", "304401205990e0584b2b238e1dfaad8d6ed69ecc1a4a13ac85fc0b31d0df395eb1ba610502202d5876262c288beb511d061691bf26777344b702b00f8fe28621fe4e566695ed01",
"R len = 0:", "3024020002202d5876262c288beb511d061691bf26777344b702b00f8fe28621fe4e566695ed01",
"R<0:", "304402208990e0584b2b238e1dfaad8d6ed69ecc1a4a13ac85fc0b31d0df395eb1ba610502202d5876262c288beb511d061691bf26777344b702b00f8fe28621fe4e566695ed01",
"R padded:", "30450221005990e0584b2b238e1dfaad8d6ed69ecc1a4a13ac85fc0b31d0df395eb1ba610502202d5876262c288beb511d061691bf26777344b702b00f8fe28621fe4e566695ed01",
"S type:", "304402205990e0584b2b238e1dfaad8d6ed69ecc1a4a13ac85fc0b31d0df395eb1ba610501202d5876262c288beb511d061691bf26777344b702b00f8fe28621fe4e566695ed01",
"S len = 0:", "302402205990e0584b2b238e1dfaad8d6ed69ecc1a4a13ac85fc0b31d0df395eb1ba6105020001",
"S<0:", "304402205990e0584b2b238e1dfaad8d6ed69ecc1a4a13ac85fc0b31d0df395eb1ba61050220fd5876262c288beb511d061691bf26777344b702b00f8fe28621fe4e566695ed01",
"S padded:", "304502205990e0584b2b238e1dfaad8d6ed69ecc1a4a13ac85fc0b31d0df395eb1ba61050221002d5876262c288beb511d061691bf26777344b702b00f8fe28621fe4e566695ed01"
]
Loading…
Cancel
Save