diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5cdd65b44..4a14c2a18 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,208 +1,208 @@ Contributing to Bitcoin ABC =========================== The Bitcoin ABC project welcomes contributors! This guide is intended to help developers contribute effectively to Bitcoin ABC. Communicating with Developers ----------------------------- To get in contact with ABC developers, we monitor a telegram supergroup. The intent of this group is specifically to facilitate development of Bitcoin-ABC, and to welcome people who wish to participate. https://t.me/joinchat/HCYr50mxRWjA2uLqii-psw Acceptable use of this supergroup includes the following: * Introducing yourself to other ABC developers. * Getting help with your development environment. * Discussing how to complete a patch. It is not for: * Market discussion * Non-constructive criticism Bitcoin ABC Development Philosophy ---------------------------------- Bitcoin ABC aims for fast iteration and continuous integration. This means that there should be quick turnaround for patches to be proposed, reviewed, and committed. Changes should not sit in a queue for long. Here are some tips to help keep the development working as intended. These are guidelines for the normal and expected development process. Developers can use their judgement to deviate from these guidelines when they have a good reason to do so. - Keep each change small and self-contained. - Reach out for a 1-on-1 review so things move quickly. - Land the Diff quickly after it is accepted. - Don't amend changes after the Diff accepted, new Diff for another fix. - Review Diffs from other developers as quickly as possible. - Large changes should be broken into logical chunks that are easy to review, and keep the code in a functional state. - Do not mix moving stuff around with changing stuff. Do changes with renames on their own. - Sometimes you want to replace one subsystem by another implementation, in which case it is not possible to do things incrementally. In such cases, you keep both implementations in the codebase for a while, as described [here](https://www.gamasutra.com/view/news/128325/Opinion_Parallel_Implementations.php) - There are no "development" branches, all Diffs apply to the master branch, and should always improve it (no regressions). - Don't break the build, it is important to keep master green as much as possible. If a Diff is landed, and breaks the build, fix it quickly. If it cannot be fixed quickly, it should be reverted, and re-applied later when it no longer breaks the build. - As soon as you see a bug, you fix it. Do not continue on. Fixing the bug becomes the top priority, more important than completing other tasks. - Automate as much as possible, and spend time on things only humans can do. Here are some handy links for development practices aligned with Bitcoin ABC: - [Developer Notes](doc/developer-notes.md) - [Statement of Bitcoin ABC Values and Visions](https://www.yours.org/content/bitcoin-abc---our-values-and-vision-a282afaade7c) - [How to Do Code Reviews Like a Human - Part 1](https://mtlynch.io/human-code-reviews-1/) - [How to Do Code Reviews Like a Human - Part 2](https://mtlynch.io/human-code-reviews-2/) - [Large Diffs Are Hurting Your Ability To Ship](https://medium.com/@kurtisnusbaum/large-diffs-are-hurting-your-ability-to-ship-e0b2b41e8acf) - [Stacked Diffs: Keeping Phabricator Diffs Small](https://medium.com/@kurtisnusbaum/stacked-diffs-keeping-phabricator-diffs-small-d9964f4dcfa6) - [Parallel Implementations](https://www.gamasutra.com/view/news/128325/Opinion_Parallel_Implementations.php) - [The Pragmatic Programmer: From Journeyman to Master](https://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X) - [Advantages of monolithic version control](https://danluu.com/monorepo/) - [The importance of fixing bugs immediately](https://youtu.be/E2MIpi8pIvY?t=16m0s) - [Slow Deployment Causes Meetings](https://www.facebook.com/notes/kent-beck/slow-deployment-causes-meetings/1055427371156793/) - [Good Work, Great Work, and Right Work](https://forum.dlang.org/post/q7u6g1$94p$1@digitalmars.com) Getting set up with the Bitcoin ABC Repository ---------------------------------------------- 1. Create an account at https://reviews.bitcoinabc.org/ 2. Install Git and Arcanist on your machine Git documentation can be found at: https://git-scm.com/ Arcanist documentation can be found at: https://secure.phabricator.com/book/phabricator/article/arcanist_quick_start/ And: https://secure.phabricator.com/book/phabricator/article/arcanist/ To install these packages on Debian or Ubuntu, type: `sudo apt-get install git arcanist` 3. If you do not already have an SSH key set up, follow these steps: Type: `ssh-keygen -t rsa -b 4096 -C "your_email@example.com"` Enter a file in which to save the key (/home/*username*/.ssh/id_rsa): [Press enter] 4. Upload your SSH public key to reviews.bitcoinabc.org - go to: `https://reviews.bitcoinabc.org/settings/user/*username*/page/ssh/` - Under "SSH Key Actions", Select "Upload Public Key" Paste contents from: `/home/*username*/.ssh/id_rsa.pub` 5. Clone the repository and install Arcanist certificate: ``` git clone ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc.git cd bitcoin-abc arc install-certificate ``` Note: Arcanist tooling will tend to fail if your remote origin is set to something other than the above. A common mistake is to clone from Github and then forget to update your remotes. Follow instructions provided by `arc install-certificate` to provide your API token. 6. Code formatting tools If code formatting tools do not install automatically on your system, you may have to install clang-format-7, autopep8 and flake8. clang-format-7 can be installed from https://releases.llvm.org/download.html or https://apt.llvm.org To install autopep8 and flake8 on Ubuntu: ``` sudo apt-get install python-autopep8 flake8 ``` Working with The Bitcoin ABC Repository --------------------------------------- A typical workflow would be: - Create a topic branch in Git for your changes git checkout -b 'my-topic-branch' - Make your changes, and commit them git commit -a -m 'my-commit' - Create a differential with Arcanist arc diff You should add suggested reviewers and a test plan to the commit message. Note that Arcanist is set up to look only at the most-recent commit message, So all you changes for this Diff should be in one Git commit. - For large changes, break them into several Diffs, as described in this [guide](https://medium.com/@kurtisnusbaum/stacked-diffs-keeping-phabricator-diffs-small-d9964f4dcfa6). You can also include "Depends on Dxxx" in the Arcanist message to indicate dependence on other Diffs. - Log into Phabricator to see review and feedback. - Make changes as suggested by the reviewers. You can simply edit the files with my-topic-branch checked out, and then type `arc diff`. Arcanist will give you the option to add uncommited changes. Or, alternatively, you can commit the changes using `git commit -a --am` to add them to the last commit, or squash multiple commits by typing `git rebase -i master`. If you squash, make sure the commit message has the information needed for arcanist (such as the Diff number, reviewers, etc.). - Update your Diff by typing `arc diff` again. - When reviewers approve your Diff, it should be listed as "ready to Land" in Phabricator. When you want to commit your diff to the repository, check out -type my-topic-branch in git, then type `arc land`. You have now succesfully +type my-topic-branch in git, then type `arc land`. You have now successfully committed a change to the Bitcoin ABC repository. - When reviewing a Diff, apply the changeset on your local by using `arc patch D{NNNN}` - You will likely be re-writing git histories multiple times, which causes timestamp changes that require re-building a significant number of files. It's highly recommended to install `ccache` (re-run ./configure if you install it later), as this will help cut your re-build times from several minutes to under a minute, in many cases. What to work on --------------- If you are looking for a useful task to contribute to the project, a good place to start is the list of tasks at https://reviews.bitcoinabc.org/maniphest/ You could also try [backporting](doc/backporting.md) some code from Bitcoin Core. Copyright --------- By contributing to this repository, you agree to license your work under the MIT license unless specified otherwise in `contrib/debian/copyright` or at the top of the file itself. Any work contributed where you are not the original author must contain its license header with the original author(s) and source. Disclosure Policy ----------------- See [DISCLOSURE_POLICY](DISCLOSURE_POLICY). diff --git a/arcanist/linter/CheckDocLinter.php b/arcanist/linter/CheckDocLinter.php index b70d8b870..9e098a619 100644 --- a/arcanist/linter/CheckDocLinter.php +++ b/arcanist/linter/CheckDocLinter.php @@ -1,98 +1,98 @@ getProjectRoot()); } public function shouldUseInterpreter() { return true; } public function getDefaultInterpreter() { return "python3"; } public function getInstallInstructions() { return pht('The test/lint/check-doc.py script is part of the bitcoin-abc '. 'project'); } public function shouldExpectCommandErrors() { return false; } protected function getMandatoryFlags() { return array(); } protected function parseLinterOutput($path, $err, $stdout, $stderr) { /* Split stdout: - * 0 => Empty (before first 'Args' occurence) + * 0 => Empty (before first 'Args' occurrence) * 1 => Args used: count * 2 => Args documented: count * 3 => Args undocumented: count and list * 4 => Args unknown: count and list */ $stdoutExploded = preg_split('/Args/', $stdout); $undocumented = $stdoutExploded[3]; $unknown = $stdoutExploded[4]; $messages = array(); // Undocumented arguments $match = preg_match_all('/-[\w|-]+/', $undocumented, $args); foreach ($args[0] as $arg) { $messages[] = id(new ArcanistLintMessage()) ->setGranularity(ArcanistLinter::GRANULARITY_GLOBAL) ->setCode('ARGDOC') ->setSeverity(ArcanistLintSeverity::SEVERITY_ERROR) ->setName('Undocumented argument') ->setDescription("'$arg' is undocumented."); } // Unknown arguments $match = preg_match_all('/-[\w|-]+/', $unknown, $args); foreach ($args[0] as $arg) { $messages[] = id(new ArcanistLintMessage()) ->setGranularity(ArcanistLinter::GRANULARITY_GLOBAL) ->setCode('ARGDOC') ->setSeverity(ArcanistLintSeverity::SEVERITY_ERROR) ->setName('Unknown argument') ->setDescription("'$arg' is documented but not used."); } return $messages; } } diff --git a/cmake/modules/FindBerkeleyDB.cmake b/cmake/modules/FindBerkeleyDB.cmake index c71865f5a..10a10910d 100644 --- a/cmake/modules/FindBerkeleyDB.cmake +++ b/cmake/modules/FindBerkeleyDB.cmake @@ -1,37 +1,37 @@ -# Try to find the BerkeleyDB librairies +# Try to find the BerkeleyDB libraries # BDB_FOUND - system has Berkeley DB lib # BDB_INCLUDE_DIR - the Berkeley DB include directory # BDB_LIBRARY - Library needed to use Berkeley DB # BDBXX_INCLUDE_DIR - the Berkeley DB include directory for C++ # BDBXX_LIBRARY - Library needed to use Berkeley DB C++ API include(BrewHelper) find_brew_prefix(BREW_HINT berkeley-db) find_path(BDB_INCLUDE_DIR NAMES db.h HINTS ${BREW_HINT} ) find_library(BDB_LIBRARY NAMES db libdb HINTS ${BREW_HINT} ) find_path(BDBXX_INCLUDE_DIR NAMES db_cxx.h HINTS ${BREW_HINT} ) find_library(BDBXX_LIBRARY NAMES db_cxx libdb_cxx HINTS ${BREW_HINT} ) MESSAGE(STATUS "BerkeleyDB libs: " ${BDB_LIBRARY} " " ${BDBXX_LIBRARY}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(BerkeleyDB DEFAULT_MSG BDB_INCLUDE_DIR BDB_LIBRARY BDBXX_INCLUDE_DIR BDBXX_LIBRARY) mark_as_advanced(BDB_INCLUDE_DIR BDB_LIBRARY BDBXX_INCLUDE_DIR BDBXX_LIBRARY) set(BerkeleyDB_LIBRARIES ${BDB_LIBRARY} ${BDBXX_LIBRARY}) set(BerkeleyDB_INCLUDE_DIRS ${BDB_INCLUDE_DIR} ${BDBXX_INCLUDE_DIR}) diff --git a/cmake/modules/FindGMP.cmake b/cmake/modules/FindGMP.cmake index c31c9e1f0..d8db762bb 100644 --- a/cmake/modules/FindGMP.cmake +++ b/cmake/modules/FindGMP.cmake @@ -1,24 +1,24 @@ -# Try to find the GMP librairies +# Try to find the GMP libraries # GMP_FOUND - system has GMP lib # GMP_INCLUDE_DIR - the GMP include directory # GMP_LIBRARY - Library needed to use GMP # GMPXX_LIBRARY - Library needed to use GMP C++ API if(GMP_INCLUDE_DIR AND GMP_LIBRARY) # Already in cache, be silent set(GMP_FIND_QUIETLY TRUE) endif() find_path(GMP_INCLUDE_DIR NAMES gmp.h) find_library(GMP_LIBRARY NAMES gmp libgmp) find_library(GMPXX_LIBRARY NAMES gmpxx libgmpxx) message(STATUS "GMP libs: " ${GMP_LIBRARY} " " ${GMPXX_LIBRARY}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(GMP DEFAULT_MSG GMP_INCLUDE_DIR GMP_LIBRARY) mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARY GMPXX_LIBRARY) set(GMP_LIBRARIES ${GMP_LIBRARY} ${GMPXX_LIBRARY}) set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR}) diff --git a/cmake/modules/FindZeroMQ.cmake b/cmake/modules/FindZeroMQ.cmake index 84637873a..67dbdf331 100644 --- a/cmake/modules/FindZeroMQ.cmake +++ b/cmake/modules/FindZeroMQ.cmake @@ -1,21 +1,21 @@ -# Try to find the ZeroMQ librairies +# Try to find the ZeroMQ libraries # ZMQ_FOUND - system has ZeroMQ lib # ZMQ_INCLUDE_DIR - the ZeroMQ include directory # ZMQ_LIBRARY - Libraries needed to use ZeroMQ if(ZMQ_INCLUDE_DIR AND ZMQ_LIBRARY) # Already in cache, be silent set(ZMQ_FIND_QUIETLY TRUE) endif() find_path(ZMQ_INCLUDE_DIR NAMES zmq.h) find_library(ZMQ_LIBRARY NAMES zmq libzmq) message(STATUS "ZeroMQ lib: " ${ZMQ_LIBRARY}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(ZeroMQ DEFAULT_MSG ZMQ_INCLUDE_DIR ZMQ_LIBRARY) mark_as_advanced(ZMQ_INCLUDE_DIR ZMQ_LIBRARY) set(ZeroMQ_LIBRARIES ${ZMQ_LIBRARY}) set(ZeroMQ_INCLUDE_DIRS ${ZMQ_INCLUDE_DIR}) diff --git a/cmake/platforms/OSX.cmake b/cmake/platforms/OSX.cmake index 62cd4f1a1..20c292788 100644 --- a/cmake/platforms/OSX.cmake +++ b/cmake/platforms/OSX.cmake @@ -1,41 +1,41 @@ # Copyright (c) 2017 The Bitcoin developers set(CMAKE_SYSTEM_NAME Darwin) set(TOOLCHAIN_PREFIX x86_64-apple-darwin11) # On OSX, we use clang by default. set(CMAKE_C_COMPILER clang) set(CMAKE_CXX_COMPILER clang++) # On OSX we use various stuff from Apple's SDK. set(OSX_SDK_PATH "${CMAKE_CURRENT_SOURCE_DIR}/depends/SDKs/MacOSX10.11.sdk") set(CMAKE_OSX_SYSROOT ${OSX_SDK_PATH}) set(CMAKE_OSX_DEPLOYMENT_TARGET 10.8) # target environment on the build host system # set 1st to dir with the cross compiler's C/C++ headers/libs set(CMAKE_FIND_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/depends/${TOOLCHAIN_PREFIX};${OSX_SDK_PATH}") -# We also may have built dependancies for the native plateform. +# We also may have built dependencies for the native plateform. set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/depends/${TOOLCHAIN_PREFIX}/native") # modify default behavior of FIND_XXX() commands to # search for headers/libs in the target environment and # search for programs in the build host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Sysroot clang set(OSX_EXTRA_FLAGS " -target ${TOOLCHAIN_PREFIX}" " -mlinker-version=253.9" ) string(APPEND CMAKE_C_FLAGS_INIT ${OSX_EXTRA_FLAGS}) string(APPEND CMAKE_CXX_FLAGS_INIT ${OSX_EXTRA_FLAGS} " -stdlib=libc++") # Ensure we use an OSX specific version of ar, ranlib and nm. find_program(CMAKE_AR ${TOOLCHAIN_PREFIX}-ar) find_program(CMAKE_RANLIB ${TOOLCHAIN_PREFIX}-ranlib) find_program(CMAKE_NM ${TOOLCHAIN_PREFIX}-nm) diff --git a/cmake/platforms/Win32.cmake b/cmake/platforms/Win32.cmake index 70db97142..e3ccfa26c 100644 --- a/cmake/platforms/Win32.cmake +++ b/cmake/platforms/Win32.cmake @@ -1,23 +1,23 @@ # Copyright (c) 2017 The Bitcoin developers set(CMAKE_SYSTEM_NAME Windows) set(TOOLCHAIN_PREFIX i686-w64-mingw32) # cross compilers to use for C and C++ set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc) set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++) set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres) # target environment on the build host system # set 1st to dir with the cross compiler's C/C++ headers/libs set(CMAKE_FIND_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/depends/${TOOLCHAIN_PREFIX};/usr/${TOOLCHAIN_PREFIX}") -# We also may have built dependancies for the native plateform. +# We also may have built dependencies for the native plateform. set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/depends/${TOOLCHAIN_PREFIX}/native") # modify default behavior of FIND_XXX() commands to # search for headers/libs in the target environment and # search for programs in the build host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/cmake/platforms/Win64.cmake b/cmake/platforms/Win64.cmake index 21e45e7e7..3349c064c 100644 --- a/cmake/platforms/Win64.cmake +++ b/cmake/platforms/Win64.cmake @@ -1,23 +1,23 @@ # Copyright (c) 2017 The Bitcoin developers set(CMAKE_SYSTEM_NAME Windows) set(TOOLCHAIN_PREFIX x86_64-w64-mingw32) # cross compilers to use for C and C++ set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc) set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++) set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres) # target environment on the build host system # set 1st to dir with the cross compiler's C/C++ headers/libs set(CMAKE_FIND_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/depends/${TOOLCHAIN_PREFIX};/usr/${TOOLCHAIN_PREFIX}") -# We also may have built dependancies for the native plateform. +# We also may have built dependencies for the native plateform. set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/depends/${TOOLCHAIN_PREFIX}/native") # modify default behavior of FIND_XXX() commands to # search for headers/libs in the target environment and # search for programs in the build host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/contrib/debian/changelog b/contrib/debian/changelog index 110bfe03e..ab26c50f0 100644 --- a/contrib/debian/changelog +++ b/contrib/debian/changelog @@ -1,459 +1,459 @@ bitcoin (0.11.0-precise1) precise; urgency=medium * New upstream release. -- Matt Corallo (BlueMatt) Tue, 14 Jul 2015 14:39:00 -1000 bitcoin (0.10.2-precise1) precise; urgency=medium * New upstream release. -- Matt Corallo (BlueMatt) Mon, 29 Jun 2015 17:33:00 -1000 bitcoin (0.10.1-precise3) precise; urgency=medium * Fix build dep (include python). -- Matt Corallo (BlueMatt) Tue, 5 May 2015 09:28:00 -1000 bitcoin (0.10.1-precise2) precise; urgency=medium * Fix miniupnpc dep. -- Matt Corallo (BlueMatt) Tue, 5 May 2015 00:33:00 -1000 bitcoin (0.10.1-precise1) precise; urgency=medium * New upstream release. -- Matt Corallo (BlueMatt) Tue, 5 May 2015 00:07:00 -1000 bitcoin (0.10.0-precise1) precise; urgency=medium * New upstream releases. -- Matt Corallo (BlueMatt) Wed, 18 Feb 2015 13:22:00 -1000 bitcoin (0.9.4-precise1) precise; urgency=high * New upstream releases. -- Matt Corallo (laptop - only while traveling) Mon, 12 Jan 2015 23:30:00 -1000 bitcoin (0.9.3-precise1) precise; urgency=medium * New upstream releases. -- Matt Corallo (BlueMatt) Fri, 26 Sep 2014 12:01:00 -0700 bitcoin (0.9.1-precise1) precise; urgency=medium * New upstream release. * Backport pull #4019 -- Matt Corallo Sat, 19 Apr 2014 17:29:00 -0400 bitcoin (0.9.0-precise1) precise; urgency=medium * New upstream release. -- Matt Corallo Thu, 20 Mar 2014 13:10:00 -0400 bitcoin (0.8.6-precise1) precise; urgency=medium * New upstream release. * Make .desktop paths non-fixed (suggested by prusnak@github) -- Matt Corallo Fri, 13 Dec 2013 13:31:00 -0400 bitcoin (0.8.5-precise1) precise; urgency=medium * New upstream release. -- Matt Corallo Sun, 15 Sep 2013 14:02:00 -0400 bitcoin (0.8.4-precise1) precise; urgency=medium * New upstream release. -- Matt Corallo Wed, 4 Sep 2013 10:25:00 -0400 bitcoin (0.8.3-natty1) natty; urgency=low * New upstream release. -- Matt Corallo Wed, 26 Jun 2013 00:18:00 +0100 bitcoin (0.8.2-natty1) natty; urgency=low * New upstream release. -- Matt Corallo Wed, 29 Mar 2013 23:23:00 +0100 bitcoin (0.8.1-natty3) natty; urgency=low * New pixmaps -- Jonas Schnelli Mon, 13 May 2013 16:14:00 +0100 bitcoin (0.8.1-natty2) natty; urgency=low * Remove dumb broken launcher script -- Matt Corallo Sun, 24 Mar 2013 20:01:00 -0400 bitcoin (0.8.1-natty1) natty; urgency=low * New upstream release. -- Matt Corallo Tue, 19 Mar 2013 13:03:00 -0400 bitcoin (0.8.0-natty1) natty; urgency=low * New upstream release. -- Matt Corallo Sat, 23 Feb 2013 16:01:00 -0500 bitcoin (0.7.2-natty1) natty; urgency=low * New upstream release. -- Matt Corallo Sat, 15 Dec 2012 10:59:00 -0400 bitcoin (0.7.1-natty1) natty; urgency=low * New upstream release. -- Matt Corallo Wed, 24 Oct 2012 15:06:00 -0400 bitcoin (0.7.0-natty1) natty; urgency=low * New upstream release. -- Matt Corallo Mon, 17 Sep 2012 13:45:00 +0200 bitcoin (0.6.3-natty1) natty; urgency=low * New upstream release. -- Matt Corallo Mon, 25 Jun 2012 23:47:00 +0200 bitcoin (0.6.2-natty1) natty; urgency=low * Update package description and launch scripts. -- Matt Corallo Sat, 2 Jun 2012 16:41:00 +0200 bitcoin (0.6.2-natty0) natty; urgency=low * New upstream release. -- Matt Corallo Tue, 8 May 2012 16:27:00 -0500 bitcoin (0.6.1-natty0) natty; urgency=low * New upstream release. -- Matt Corallo Sun, 6 May 2012 20:09:00 -0500 bitcoin (0.6.0-natty0) natty; urgency=low * New upstream release. * Add GNOME/KDE support for bitcoin-qt's bitcoin: URI support. Thanks to luke-jr for the KDE .protocol file. -- Matt Corallo Sat, 31 Mar 2012 15:35:00 -0500 bitcoin (0.5.3-natty1) natty; urgency=low * Mark for upload to PPA. -- Matt Corallo Wed, 14 Mar 2012 23:06:00 -0400 bitcoin (0.5.3-natty0) natty; urgency=low * New upstream release. -- Luke Dashjr Tue, 10 Jan 2012 15:57:00 -0500 bitcoin (0.5.2-natty1) natty; urgency=low * Remove mentions on anonymity in package descriptions and manpage. These should never have been there, bitcoin isn't anonymous without a ton of work that virtually no users will ever be willing and capable of doing -- Matt Corallo Sat, 7 Jan 2012 13:37:00 -0500 bitcoin (0.5.2-natty0) natty; urgency=low * New upstream release. -- Luke Dashjr Fri, 16 Dec 2011 17:57:00 -0500 bitcoin (0.5.1-natty0) natty; urgency=low * New upstream release. -- Matt Corallo Fri, 16 Dec 2011 13:27:00 -0500 bitcoin (0.5.0-natty0) natty; urgency=low * New upstream release. -- Matt Corallo Mon, 21 Nov 2011 11:32:00 -0500 bitcoin (0.5.0~rc7-natty0) natty; urgency=low * New upstream release candidate. -- Matt Corallo Sun, 20 Nov 2011 17:08:00 -0500 bitcoin (0.5.0~rc3-natty0) natty; urgency=low * New upstream release candidate. * Don't set rpcpassword for bitcoin-qt. -- Matt Corallo Tue, 8 Nov 2011 11:56:00 -0400 bitcoin (0.5.0~rc1-natty1) natty; urgency=low * Add test_bitcoin to build test * Fix clean - * Remove unnecessary build-dependancies + * Remove unnecessary build-dependencies -- Matt Corallo Wed, 26 Oct 2011 14:37:18 -0400 bitcoin (0.5.0~rc1-natty0) natty; urgency=low * Mark for natty * Fix broken build * Fix copyright listing * Remove bitcoin: URL handler until bitcoin actually has support for it (Oops) -- Matt Corallo Wed, 26 Oct 2011 14:37:18 -0400 bitcoin (0.5.0~rc1-2) experimental; urgency=low * Add bitcoin-qt -- Matt Corallo Tue, 25 Oct 2011 15:24:18 -0400 bitcoin (0.5.0~rc1-1) experimental; urgency=low * New upstream prerelease. * Add Github as alternate upstream source in watch file. * Stop build-depending on libcrypto++-dev, and drop patch 1000: Upstream no longer use crypto++. * Drop patch 1003: Upstream builds dynamic by default now. * Update copyright file: Drop notes on longer included sources. -- Jonas Smedegaard Fri, 14 Oct 2011 00:16:18 +0200 bitcoin (0.4.0-1) unstable; urgency=low * New upstream release. * Stop repackaging source tarballs: No DFSG-violating stripping left. * Update copyright file: + Add Github URL to Source. * Drop dpkg-source local-options hint: Declared options are default since dpkg-source 1.16.1. + Add irc URL to Upstream-Contact. + Add comment on Bitcoin Developers to catch-all Files section. + Add Files sections for newly readded src/cryptopp/* (new custom BSD-like license), and newly added doc/build-osx.txt and src/makefile.osx (Expat). * Bump debhelper compatibility level to 7. * Suppress binary icns and gpg files. * Enable regression tests: + Build-depend on libboost-test-dev. + Extend patch 1003 to also dynamically link test binary. + Build and invoke test binary unless tests are disabled. * Tighten build-dependency on cdbs: Recent version needed to support debhelper 7. * Relax build-depend unversioned on debhelper: needed version satisfied even in oldstable. * Stop suppress optional build-dependencies: Satisfied in stable. Build-depend on devscripts (enabling copyright-check). -- Jonas Smedegaard Wed, 05 Oct 2011 01:48:53 +0200 bitcoin (0.3.24~dfsg-1) unstable; urgency=low * New upstream release. [ Jonas Smedegaard ] * Improve various usage hints: + Explicitly mention in long description that bitcoind contains daemon and command-line interface. + Extend README.Debian with section on lack of GUI, and add primary headline. + Avoid installing upstream README: contains no parts relevant for Debian usage. Thanks to richard for suggestions (see bug#629443). * Favor final releases over prereleases in rules and watch file. Thanks to Jan Dittberner. * Track -src (not -linux) tarballs in rules and watch file. Thanks to Jan Dittberner. * Drop patches 1004 and 1005 (integrated upstream) and simplify CXXFLAGS in rules file. * Stop stripping no longer included source-less binaries from upstream tarballs. [ Jan Dittberner ] * refresh debian/patches/1000_use_system_crypto++.patch -- Jonas Smedegaard Tue, 19 Jul 2011 15:08:54 +0200 bitcoin (0.3.21~dfsg-2) unstable; urgency=low * Enable UPNP support: + Drop patch 1006. + Build-depend on libminiupnpc-dev. Thanks to Matt Corallo. -- Jonas Smedegaard Sat, 28 May 2011 15:52:44 +0200 bitcoin (0.3.21~dfsg-1) unstable; urgency=low * New upstream release. * Refresh patches. * Drop patch 1002: no longer needed, as upstream use pkgconfig now. * Add patch 1006 to really unset USE_UPNP as aparently intended. * Adjust cleanup rule to preserve .gitignore files. * Update copyright file: + Bump format to draft 174 of DEP-5. + Shorten comments. * Bump policy compliance to standards-version 3.9.2. * Shorten Vcs-Browser paragraph in control file. * Fix mention daemon (not CLI tools) in short description. * Stop conflicting with or replace bitcoin-cli: Only transitional, no longer needed. * Link against unversioned berkeleydb. Update NEWS and README.Debian accordingly (and improve wording while at it). Closes: Bug#621425. Thanks to Ondřej Surý. * This release also implicitly updates linkage against libcrypto++, which closes: bug#626953, #627024. * Disable linkage against not yet Debian packaged MiniUPnP. * Silence seemingly harmless noise about unused variables. -- Jonas Smedegaard Tue, 17 May 2011 15:31:24 +0200 bitcoin (0.3.20.2~dfsg-2) unstable; urgency=medium * Fix have wrapper script execute real binary (not loop executing itself). Closes: bug#617290. Thanks to Philippe Gauthier and Etienne Laurin. * Set urgency=medium as the only (user-exposed) binary is useless without this fix and has been for some time. -- Jonas Smedegaard Wed, 16 Mar 2011 09:11:06 +0100 bitcoin (0.3.20.2~dfsg-1) unstable; urgency=low * New upstream release. * Fix provide and replace former package name bitcoin-cli. Closes: bug#618439. Thanks to Shane Wegner. -- Jonas Smedegaard Tue, 15 Mar 2011 11:41:43 +0100 bitcoin (0.3.20.01~dfsg-1) unstable; urgency=low * New upstream release. [ Micah Anderson ] * Add myself as uploader. [ Jonas Smedegaard ] * Add wrapper for bitcoind to ease initial startup. * Update patches: + Drop patch 2002: Applied upstream. + Add patch 1005 to add phtread linker option. Closes: bug#615619. Thanks to Shane Wegner. + Refresh patches. * Extend copyright years in rules file header. * Rewrite copyright file using draft svn166 of DEP5 format. * Rename binary package to bitcoind (from bincoin-cli). Closes: bug#614025. Thanks to Luke-Jr. -- Jonas Smedegaard Tue, 01 Mar 2011 15:55:04 +0100 bitcoin (0.3.19~dfsg-6) unstable; urgency=low * Fix override aggressive optimizations. * Fix tighten build-dependencies to really fit backporting to Lenny: + Add fallback build-dependency on libdb4.6++-dev. + Tighten unversioned Boost build-dependencies to recent versions, To force use of versioned Boost when backporting to Lenny. ...needs more love, though: actual build fails. -- Jonas Smedegaard Mon, 17 Jan 2011 19:48:35 +0100 bitcoin (0.3.19~dfsg-5) unstable; urgency=low * Fix lower Boost fallback-build-dependencies to 1.35, really available in Lenny. * Correct comment in rules file regarding reason for versioned Boost fallback-build-dependency. * Add patch 2002 adding -mt decoration to Boost flags, to ease backporting to Lenny. * Respect DEB_BUILD_OPTIONS, and suppress arch-specific optimizations: + Add patch 1004 to allow overriding optimization flags. + Set optimization flags conditionally at build time. + Drop patch 2002 unconditionally suppressing arch-optimizations. -- Jonas Smedegaard Mon, 17 Jan 2011 16:04:48 +0100 bitcoin (0.3.19~dfsg-4) unstable; urgency=low [ Micah Anderson ] * Provide example bitcoin.conf. * Add bitcoind(1) and bitcoin.conf(5) man pages. [ Jonas Smedegaard ] * Ease backporting: + Suppress optional build-dependencies. + Add fallback build-dependencies on the most recent Boost libs available in Lenny (where unversioned Boost libs are missing). * Add Micah as copyright holder for manpages, licensed as GPL-3+. * Bump copyright format to Subversion candidate draft 162 of DEP5. -- Jonas Smedegaard Mon, 17 Jan 2011 14:00:48 +0100 bitcoin (0.3.19~dfsg-3) unstable; urgency=low * Document in copyright file files excluded from repackaged source. * Update copyright file: + Bump DEP5 format hint to Subversion draft rev. 153. + Consistently wrap at 72 chars. + Refer to GPL-2 file (not GPL symlink). * Link against Berkeley DB 4.8 (not 4.7): + Build-depend on libdb4.8++-dev (and on on libdb4.7++-dev). + Suggest libdb4.8-util and db4.7-util. + Add README.Debian note on (untested) upgrade routine. + Add NEWS entry on changed db version, referring to README.Debian. -- Jonas Smedegaard Fri, 07 Jan 2011 22:50:57 +0100 bitcoin (0.3.19~dfsg-2) unstable; urgency=low * Adjust build options to use optimized miner only for amd64. Fixes FTBFS on i386 (and other archs, if compiling anywhere else at all). * Avoid static linking. * Adjust patch 2001 to avoid only arch-specific optimizations (keep -O3). * Extend long description to mention disk consumption and initial use of IRC. All of above changes thanks to Helmuth Grohne. * Add lintian override regarding OpenSSL and GPL: Linked code is Expat - only Debian packaging is GPL-2+. -- Jonas Smedegaard Wed, 29 Dec 2010 00:27:54 +0100 bitcoin (0.3.19~dfsg-1) unstable; urgency=low [ Jonas Smedegaard ] * Initial release. Closes: bug#578157. -- Jonas Smedegaard Tue, 28 Dec 2010 15:49:22 +0100 diff --git a/contrib/debian/examples/bitcoin.conf b/contrib/debian/examples/bitcoin.conf index 45a2c7901..5c71baa85 100644 --- a/contrib/debian/examples/bitcoin.conf +++ b/contrib/debian/examples/bitcoin.conf @@ -1,141 +1,141 @@ ## ## bitcoin.conf configuration file. Lines beginning with # are comments. ## # Network-related settings: # Run on the test network instead of the real bitcoin network. #testnet=0 # Run a regression test network #regtest=0 # Connect via a SOCKS5 proxy #proxy=127.0.0.1:9050 # Bind to given address and always listen on it. Use [host]:port notation for IPv6 #bind= # Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6 #whitebind= ############################################################## ## Quick Primer on addnode vs connect ## ## Let's say for instance you use addnode=4.2.2.4 ## ## addnode will connect you to and tell you about the ## ## nodes connected to 4.2.2.4. In addition it will tell ## ## the other nodes connected to it that you exist so ## ## they can connect to you. ## ## connect will not do the above when you 'connect' to it. ## ## It will *only* connect you to 4.2.2.4 and no one else.## ## ## ## So if you're behind a firewall, or have other problems ## ## finding nodes, add some using 'addnode'. ## ## ## ## If you want to stay private, use 'connect' to only ## ## connect to "trusted" nodes. ## ## ## ## If you run multiple nodes on a LAN, there's no need for ## ## all of them to open lots of connections. Instead ## ## 'connect' them all to one node that is port forwarded ## ## and has lots of connections. ## ## Thanks goes to [Noodle] on Freenode. ## ############################################################## # Use as many addnode= settings as you like to connect to specific peers #addnode=69.164.218.197 #addnode=10.0.0.2:8333 # Alternatively use as many connect= settings as you like to connect ONLY to specific peers #connect=69.164.218.197 #connect=10.0.0.1:8333 # Listening mode, enabled by default except when 'connect' is being used #listen=1 # Maximum number of inbound+outbound connections. #maxconnections= # # JSON-RPC options (for controlling a running Bitcoin/bitcoind process) # # server=1 tells Bitcoin-Qt and bitcoind 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= # If no rpcpassword is set, rpc cookie auth is sought. The default `-rpccookiefile` name # is .cookie and found in the `-datadir` being used for bitcoind. 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 +# The second method `rpcauth` can be added to server startup argument. It is set at initialization 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 bitcoin.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 bitcoin will wait for a complete RPC HTTP request. # after the HTTP connection is established. #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, # either as a single IPv4/IPv6 or with a subnet specification. # 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 Bitcoin-Qt to accept JSON-RPC commands. # it is also read by bitcoind 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 # Listen for RPC connections on this TCP port: #rpcport=8332 # You can use Bitcoin or bitcoind to send commands to Bitcoin/bitcoind # running on another host using this option: #rpcconnect=127.0.0.1 # Transaction Fee Changes in 0.10.0 # Send transactions as zero-fee transactions if possible (default: 0) #sendfreetransactions=0 # Miscellaneous options # Pre-generate this many public/private key pairs, so wallet backups will be valid for # both prior transactions and several dozen future transactions. #keypool=100 # Pay an optional transaction fee every time you send bitcoins. Transactions with fees # are more likely than free transactions to be included in generated blocks, so may # be validated sooner. #paytxfee=0.00 # User interface options # Start Bitcoin minimized #min=1 # Minimize to the system tray #minimizetotray=1 diff --git a/doc/abc/uahf-technical-spec.md b/doc/abc/uahf-technical-spec.md index 8001bf4bb..79db307ca 100644 --- a/doc/abc/uahf-technical-spec.md +++ b/doc/abc/uahf-technical-spec.md @@ -1,281 +1,281 @@ # UAHF Technical Specification Version 1.6, 2017-07-24 ## Introduction This document describes proposed requirements for a block size Hard Fork (HF). BUIP 55 specified a block height fork. This UAHF specification is inspired by the idea of a flag day, but changed to a time-based fork due to miner requests. It should be possible to change easily to a height-based fork - the sense of the requirements would largely stay the same. ## Definitions MTP: the "median time past" value of a block, calculated from the nTime values of its past up to 11 ancestors, as obtained by the GetMedianTimePast(block.parent) call. "activation time": once the MTP of the chain tip is equal to or greater than this time, the next block must be a valid fork block. The fork block and subsequent blocks built on it must satisfy the new consensus rules. "fork block": the first block built on top of a chain tip whose MTP is greater than or equal to the activation time. "fork EB": the user-specified value that EB shall be set to at activation time. EB can be adjusted post-activation by the user. "fork MG": the user-specified value that MG shall be set to at activation time. It must be > 1MB. The user can adjust MG to any value once the fork has occurred (not limited to > 1MB after the fork). "Large block" means a block satisfying 1,000,000 bytes < block size <= EB, where EB is as adjusted by REQ-4-1 and a regular block is a block up to 1,000,000 bytes in size. "Core rules" means all blocks <= 1,000,000 bytes (Base block size). "Extended BU tx/sigops rules" means the existing additional consensus rules (1) and (2) below, as formalized by BUIP040 [1] and used by the Bitcoin Unlimited client's excessive checks for blocks larger than 1MB, extended with rule (3) below: 1. maximum sigops per block is calculated based on the actual size of a block using max_block_sigops = 20000 * ceil((max(blocksize, 1000000) / 1000000)) 2. maximum allowed size of a single transaction is 1,000,000 bytes (1MB) 3. maximum allowed number of sigops for a single transaction is 20k . NOTE 1: In plain English, the maximum allowed sigops per block is 20K sigops per the size of the block, rounded up to nearest integer in MB. i.e. 20K if <= 1MB, 40K for the blocks > 1MB and up to 2MB, etc. ## Requirements ### REQ-1 (fork by default) The client (with UAHF implementation) shall default to activating a hard fork with new consensus rules as specified by the remaining requirements. RATIONALE: It is better to make the HF active by default in a special HF release version. Users have to download a version capable of HF anyway, it is more convenient for them if the default does not require them to make additional configuration. NOTE 1: It will be possible to disable the fork behavior (see REQ-DISABLE) ### REQ-2 (configurable activation time) The client shall allow a "activation time" to be configured by the user, with a default value of 1501590000 (epoch time corresponding to Tue 1 Aug 2017 12:20:00 UTC) RATIONALE: Make it configurable to adapt easily to UASF activation time changes. NOTE 1: Configuring a "activation time" value of zero (0) shall disable any UAHF hard fork special rules (see REQ-DISABLE) ### REQ-3 (fork block must be > 1MB) The client shall enforce a block size larger than 1,000,000 bytes for the fork block. RATIONALE: This enforces the hard fork from the original 1MB chain and prevents a re-organization of the forked chain to the original chain. ### REQ-4-1 (require "fork EB" configured to at least 8MB at startup) If UAHF is not disabled (see REQ-DISABLE), the client shall enforce that the "fork EB" is configured to at least 8,000,000 (bytes) by raising an error during startup requesting the user to ensure adequate configuration. RATIONALE: Users need to be able to run with their usual EB prior to the fork (e.g. some are running EB1 currently). The fork code needs to adjust this EB automatically to a > 1MB value. 8MB is chosen as a minimum since miners have indicated in the past that they would be willing to support such a size, and the current network is capable of handling it. ### REQ-4-2 (require user to specify suitable *new* MG at startup) If UAHF is not disabled (see REQ-DISABLE), the client shall require the user to specify a "fork MG" (mining generation size) greater than 1,000,000 bytes. RATIONALE: This ensures a suitable MG is set at the activation time so that a mining node would produce a fork block compatible with REQ-3. It also forces the user (miner) to decide on what size blocks they want to produce immediately after the fork. NOTE 1: The DEFAULT_MAX_GENERATED_BLOCK_SIZE in the released client needs to remain 1,000,000 bytes so that the client will not generate invalid blocks before the fork activates. At activation time, however, the "fork MG" specified by the user (default: 2MB) will take effect. ### REQ-5 (max tx / max block sigops rules for blocks > 1 MB) Blocks larger than 1,000,000 shall be subject to "Extended BU tx/sigops rules" as follows: 1. maximum sigops per block shall be calculated based on the actual size of a block using `max_block_sigops = 20000 * ceil((max(blocksize_bytes, 1000000) / 1000000))` 2. maximum allowed size of a single transaction shall be 1,000,000 bytes NOTE 1: Blocks up to and including 1,000,000 bytes in size shall be subject to existing pre-fork Bitcoin consensus rules. NOTE 2: Transactions exceeding 100,000 bytes (100KB) shall remain non-standard after the activation time, meaning they will not be relayed. NOTE 3: BU treats both rules (1) and (2) as falling under the Emergent Consensus rules (AD). Other clients may choose to implement them as firm rules at their own risk. ### REQ-6-1 (disallow special OP_RETURN-marked transactions with sunset clause) Once the fork has activated, transactions consisting exclusively of a single OP_RETURN output, followed by a single minimally-coded data push with the specific magic data value of Bitcoin: A Peer-to-Peer Electronic Cash System (46 characters, including the single spaces separating the words, and without any terminating null character) shall be considered invalid until block 530,000 inclusive. RATIONALE: (DEPRECATED - see NOTE 2) To give users on the legacy chain (or other fork chains) an opt-in way to exclude their transactions from processing on the UAHF fork chain. The sunset clause block height is calculated as approximately 1 year after currently planned UASF activation time (Aug 1 2017 00:00:00 GMT), rounded down to a human friendly number. NOTE 1: Transactions with such OP_RETURNs shall be considered valid again for block 530,001 and onwards. NOTE 2: With the changes in v1.6 of this specification, mandatory use of SIGHASH_FORKID replay protection on UAHF chain makes the use of this opt-out protection unnecessary. Clients should nevertheless implement this requirement, as removing it would constitute a hard fork vis-a-vis the existing network. The sunset clause in this requirement will take care of its expiry by itself. ### REQ-6-2 (mandatory signature shift via hash type) Once the fork has activated, a transaction shall be deemed valid only if the following are true in combination: - its nHashType has bit 6 set (SIGHASH_FORKID, mask 0x40) - a magic 'fork id' value is added to the nHashType before the hash is calculated (see note 4) - it is digested using the new algorithm described in REQ-6-3 RATIONALE: To provide strong protection against replay of existing transactions on the UAHF chain, only transactions signed with the new hash algorithm and having SIGHASH_FORKID set will be accepted, by consensus. NOTE 1: It is possible for other hard forks to allow SIGHASH_FORKID-protected transactions on their chain by implementing a compatible signature. However, this does require a counter hard fork by legacy chains. NOTE 2: (DEPRECATED) ~~The client shall still accept transactions whose signatures~~ ~~verify according to pre-fork rules, subject to the additional OP_RETURN~~ ~~constraint introduced by REQ-6-1.~~ NOTE 3: (DEPRECATED) ~~If bit 6 is not set, only the unmodified nHashType will be used~~ ~~to compute the hash and verify the signature.~~ NOTE 4: The magic 'fork id' value used by UAHF-compatible clients is zero. This means that the change in hash when bit 6 is set is effected only by the adapted signing algorithm (see REQ-6-3). NOTE 5: See also REQ-6-4 which introduces a requirement for use of SCRIPT_VERIFY_STRICTENC. ### REQ-6-3 (use adapted BIP143 hash algorithm for protected transactions) Once the fork has activated, any transaction that has bit 6 set in its hash type shall have its signature hash computed using a minimally revised form of the transaction digest algorithm specified in BIP143. RATIONALE: see Motivation section of BIP143 [2]. -NOTE 1: refer to [3] for the specificaton of the revised transaction +NOTE 1: refer to [3] for the specification of the revised transaction digest based on BIP143. Revisions were made to account for non-Segwit deployment. ### REQ-6-4 (mandatory use of SCRIPT_VERIFY_STRICTENC) Once the fork has activated, transactions shall be validated with SCRIPT_VERIFY_STRICTENC flag set. RATIONALE: Use of SCRIPT_VERIFY_STRICTENC also ensures that the nHashType is validated properly. NOTE: As SCRIPT_VERIFY_STRICTENC is not clearly defined by BIP, implementations seeking to be compliant should consult the Bitcoin C++ source code to emulate the checks enforced by this flag. ### REQ-7 Difficulty adjustement in case of hashrate drop In case the MTP of the tip of the chain is 12h or more after the MTP 6 block before the tip, the proof of work target is increased by a quarter, or 25%, which corresponds to a difficulty reduction of 20% . RATIONALE: The hashrate supporting the chain is dependent on market price and hard to predict. In order to make sure the chain remains viable no matter what difficulty needs to adjust down in case of abrupt hashrate drop. ### REQ-DISABLE (disable fork by setting fork time to 0) If the activation time is configured to 0, the client shall not enforce the new consensus rules of UAHF, including the activation of the fork, the size constraint at a certain time, and the enforcing of EB/AD constraints at startup. RATIONALE: To make it possible to use such a release as a compatible client with legacy chain / i.e. to decide to not follow the HF on one's node / make a decision at late stage without needing to change client. ### OPT-SERVICEBIT (NODE_BITCOIN_CASH service bit) A UAHF-compatible client should set service bit 5 (value 0x20). RATIONALE: This service bit allows signaling that the node is a UAHF supporting node, which helps DNS seeders distinguish UAHF implementations. NOTE 1: This is an optional feature which clients do not strictly have to implement. NOTE 2: This bit is currently referred to as NODE_BITCOIN_CASH and displayed as "CASH" in user interfaces of some Bitcoin clients (BU, ABC). ## References [1] https://bitco.in/forum/threads/buip040-passed-emergent-consensus-parameters-and-defaults-for-large-1mb-blocks.1643/ [2] https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki#Motivation -[3] [Digest for replay protected signature verification accross hard forks](replay-protected-sighash.md) +[3] [Digest for replay protected signature verification across hard forks](replay-protected-sighash.md) [4] https://github.com/Bitcoin-UAHF/spec/blob/master/uahf-test-plan.md END diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 43e632f0f..e25209205 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,459 +1,459 @@ # Copyright (c) 2017 The Bitcoin developers cmake_minimum_required(VERSION 3.5) project(BitcoinABC) set(CMAKE_CXX_STANDARD 14) # Default visibility is hidden on all targets. set(CMAKE_C_VISIBILITY_PRESET hidden) set(CMAKE_CXX_VISIBILITY_PRESET hidden) option(BUILD_BITCOIN_WALLET "Activate the wallet functionality" ON) option(BUILD_BITCOIN_ZMQ "Activate the ZeroMQ functionalities" ON) option(BUILD_BITCOIN_SEEDER "Build bitcoin-seeder" ON) option(BUILD_BITCOIN_CLI "Build bitcoin-cli" ON) option(BUILD_BITCOIN_TX "Build bitcoin-tx" ON) option(BUILD_BITCOIN_QT "Build bitcoin-qt" ON) option(ENABLE_HARDENING "Harden the executables" ON) option(ENABLE_REDUCE_EXPORTS "Reduce the amount of exported symbols" OFF) option(ENABLE_STATIC_LIBSTDCXX "Statically link libstdc++" OFF) option(ENABLE_GLIBC_BACK_COMPAT "Enable Glibc compatibility features" OFF) option(ENABLE_QRCODE "Enable QR code display" ON) option(ENABLE_UPNP "Enable UPnP support" ON) option(START_WITH_UPNP "Make UPnP the default to map ports" OFF) # Allow usage of sanitizers by setting ECM_ENABLE_SANITIZERS if(ENABLE_SANITIZERS) set(ECM_ENABLE_SANITIZERS ${ENABLE_SANITIZERS}) find_package(ECM NO_MODULE) if(ECM_MODULE_PATH) list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) include(ECMEnableSanitizers) else() message(FATAL_ERROR "ECM is required to enable the sanitizers (https://api.kde.org/ecm/index.html)" ) endif() endif() # Cmake uses the CMAKE_BUILD_TYPE variable to select the build configuration. # By default it supports more configurations that needed for Bitcoin ABC, and # all the releases types set NDEBUG which is unwanted as it disables the assert # completely. # Remove the -DNDEBUG flag from the CFLAGS/CXXFLAGS in all the configurations include(AddCompilerFlags) remove_compiler_flags(-DNDEBUG) # Overrides the flags for the Debug build type # This mimics the autotools behavior by setting the CFLAGS to '-g -O2`, which # are not well suited for debugging. # FIXME: update CFLAGS with better debug oriented optimization flags set(CMAKE_C_FLAGS_DEBUG "-g -O2") # Prefer -g3, defaults to -g if unavailable add_cxx_compiler_flag_with_fallback(CMAKE_CXX_FLAGS_DEBUG -g3 -g) # Prefer -Og, defaults to -O0 if unavailable add_cxx_compiler_flag_with_fallback(CMAKE_CXX_FLAGS_DEBUG -Og -O0) # Define the debugging symbols DEBUG and DEBUG_LOCKORDER when the Debug build # type is selected. string(APPEND CMAKE_CXX_FLAGS_DEBUG " -DDEBUG -DDEBUG_LOCKORDER") # Ensure that WINDRES_PREPROC is enabled when using windres. if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") # Ensure that WINDRES_PREPROC is enabled when using windres. list(APPEND CMAKE_RC_FLAGS "-DWINDRES_PREPROC") # Build all static so there is no dll file to distribute. add_compiler_flag(-static) endif() if(ENABLE_REDUCE_EXPORTS) # Default visibility is set by CMAKE__VISIBILITY_PRESET, but this # doesn't tell if the visibility set is effective. # Check if the flag -fvisibility=hidden is supported, as using the hidden # visibility is a requirement to reduce exports. check_compiler_flag(HAS_CXX_FVISIBILITY CXX -fvisibility=hidden) if(NOT HAS_CXX_FVISIBILITY) message(FATAL_ERROR "Cannot set default symbol visibility. Use -DENABLE_REDUCE_EXPORTS=OFF.") endif() # Also hide symbols from static libraries add_linker_flag(-Wl,--exclude-libs,ALL) endif() # Enable statically linking libstdc++ if(ENABLE_STATIC_LIBSTDCXX) add_linker_flag(-static-libstdc++) endif() # All windows code is PIC, forcing it on just adds useless compile warnings if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") add_compiler_flag(-fPIC) endif() if(ENABLE_HARDENING) # Enable stack protection add_cxx_compiler_flag(-fstack-protector-all -Wstack-protector) # Enable some buffer overflow checking add_compiler_flag(-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2) # Enable ASLR (these flags are primarily targeting MinGw) add_linker_flag(-Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va) # Make the relocated sections read-only add_linker_flag(-Wl,-z,relro -Wl,-z,now) # CMake provides the POSITION_INDEPENDENT_CODE property to set PIC/PIE. # Unfortunately setting the -pie linker flag this way require CMake >= 3.14, # which is not widely distributed at the time of writing. # FIXME: use the POSITION_INDEPENDENT_CODE property instead if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") add_compiler_flag(-fPIE) add_linker_flag(-pie) else() # MinGw provides its own libssp for stack smashing protection link_libraries(ssp) endif() endif() # Enable warning add_c_compiler_flag(-Wnested-externs -Wstrict-prototypes) add_compiler_flag( -Wall -Wextra -Wformat -Wvla -Wformat-security -Wcast-align -Wunused-parameter -Wmissing-braces # FIXME: Activating this flag cause cmake to fail on leveldb. # -Wthread-safety-analysis -Wshadow ) option(EXTRA_WARNINGS "Enable extra warnings" OFF) if(EXTRA_WARNINGS) add_cxx_compiler_flag(-Wsuggest-override) else() add_compiler_flag(-Wno-unused-parameter) add_compiler_flag(-Wno-implicit-fallthrough) endif() # Create a target for OpenSSL include(BrewHelper) find_brew_prefix(OPENSSL_ROOT_DIR openssl) find_package(OpenSSL REQUIRED) # libtool style configure add_subdirectory(config) # libraries add_subdirectory(crypto) add_subdirectory(leveldb) add_subdirectory(secp256k1) add_subdirectory(univalue) # Because the Bitcoin ABc source code is disorganised, we -# end up with a bunch of libraries without any aparent +# end up with a bunch of libraries without any apparent # cohesive structure. This is inherited from Bitcoin Core # and reflecting this. # TODO: Improve the structure once cmake is rocking. # Various completely unrelated features shared by all executables. add_library(util chainparamsbase.cpp clientversion.cpp compat/glibc_sanity.cpp compat/glibcxx_sanity.cpp compat/strnlen.cpp fs.cpp logging.cpp random.cpp rcu.cpp rpc/protocol.cpp rpc/util.cpp support/cleanse.cpp support/lockedpool.cpp sync.cpp threadinterrupt.cpp uint256.cpp util.cpp utilmoneystr.cpp utilstrencodings.cpp utiltime.cpp util/bytevectorhash.cpp ) target_compile_definitions(util PUBLIC HAVE_CONFIG_H) target_include_directories(util PUBLIC . # To access the config. ${CMAKE_CURRENT_BINARY_DIR} ) if(ENABLE_GLIBC_BACK_COMPAT) # glibc absorbed clock_gettime in 2.17. librt (its previous location) is # safe to link in anyway for back-compat. find_library(RT_LIBRARY rt) target_link_libraries(util ${RT_LIBRARY}) #__fdelt_chk's params and return type have changed from long unsigned int to # long int. See which one is present here. include(CheckPrototypeDefinition) set(CMAKE_REQUIRED_DEFINITIONS -D_FORTIFY_SOURCE=2) # Without some optimization the compiler won't detect the prototype conflict # and always succeed to build. set(CMAKE_REQUIRED_FLAGS -O2) check_prototype_definition( __fdelt_warn "extern long unsigned int __fdelt_warn(long unsigned int a)" "0" "sys/select.h" FDELT_PROTOTYPE_LONG_UNSIGNED_INT ) if(FDELT_PROTOTYPE_LONG_UNSIGNED_INT) set(FDELT_TYPE "long unsigned int") else() set(FDELT_TYPE "long int") endif() target_compile_definitions(util PRIVATE "-DFDELT_TYPE=${FDELT_TYPE}") # Wrap some glibc functions with ours add_linker_flag(-Wl,--wrap=__divmoddi4) add_linker_flag(-Wl,--wrap=log2f) target_sources(util PRIVATE compat/glibc_compat.cpp) endif() # Target specific configs if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(Boost_USE_STATIC_LIBS ON) set(Boost_THREADAPI win32) find_package(SHLWAPI REQUIRED) target_link_libraries(util ${SHLWAPI_LIBRARY}) target_include_directories(util PUBLIC ${SHLWAPI_INCLUDE_DIR}) find_library(WS2_32_LIBRARY NAMES ws2_32) target_link_libraries(util ${WS2_32_LIBRARY}) target_compile_definitions(util PUBLIC BOOST_THREAD_USE_LIB) endif() # Boost packages set(BOOST_PACKAGES_REQUIRED chrono filesystem program_options thread) function(prepend var prefix) set(listVar "") foreach(f ${ARGN}) list(APPEND listVar "${prefix}${f}") endforeach(f) set(${var} "${listVar}" PARENT_SCOPE) endfunction(prepend) prepend(BOOST_LIBRARIES "Boost::" ${BOOST_PACKAGES_REQUIRED}) find_package(Boost 1.58 REQUIRED ${BOOST_PACKAGES_REQUIRED}) target_link_libraries(util univalue crypto ${BOOST_LIBRARIES}) # Make sure boost uses std::atomic (it doesn't before 1.63) target_compile_definitions(util PUBLIC BOOST_SP_USE_STD_ATOMIC BOOST_AC_USE_STD_ATOMIC) # More completely unrelated features shared by all executables. # Because nothing says this is different from util than "common" add_library(common amount.cpp base58.cpp cashaddr.cpp cashaddrenc.cpp chainparams.cpp config.cpp consensus/merkle.cpp coins.cpp compressor.cpp dstencode.cpp feerate.cpp globals.cpp core_read.cpp core_write.cpp key.cpp keystore.cpp netaddress.cpp netbase.cpp primitives/block.cpp protocol.cpp scheduler.cpp script/ismine.cpp script/sign.cpp script/standard.cpp warnings.cpp ) target_link_libraries(common util secp256k1) # libbitcoinconsensus add_library(bitcoinconsensus arith_uint256.cpp hash.cpp primitives/transaction.cpp pubkey.cpp script/bitcoinconsensus.cpp script/interpreter.cpp script/script.cpp script/script_error.cpp script/sigencoding.cpp uint256.cpp utilstrencodings.cpp ) target_link_libraries(bitcoinconsensus common) # Bitcoin server facilities add_library(server addrman.cpp addrdb.cpp avalanche.cpp bloom.cpp blockencodings.cpp blockfilter.cpp chain.cpp checkpoints.cpp config.cpp consensus/activation.cpp consensus/tx_verify.cpp globals.cpp httprpc.cpp httpserver.cpp index/base.cpp index/txindex.cpp init.cpp interfaces/handler.cpp interfaces/node.cpp dbwrapper.cpp merkleblock.cpp miner.cpp net.cpp net_processing.cpp noui.cpp policy/fees.cpp policy/policy.cpp pow.cpp rest.cpp rpc/abc.cpp rpc/blockchain.cpp rpc/command.cpp rpc/jsonrpcrequest.cpp rpc/mining.cpp rpc/misc.cpp rpc/net.cpp rpc/rawtransaction.cpp rpc/server.cpp script/scriptcache.cpp script/sigcache.cpp timedata.cpp torcontrol.cpp txdb.cpp txmempool.cpp ui_interface.cpp validation.cpp validationinterface.cpp ) # This require libevent find_package(Event REQUIRED) target_include_directories(server PRIVATE leveldb/helpers/memenv) target_link_libraries(server Event bitcoinconsensus leveldb memenv ) if(ENABLE_UPNP) target_include_directories(server PUBLIC ${MINIUPNPC_INCLUDE_DIR}) target_link_libraries(server ${MINIUPNPC_LIBRARY}) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") find_library(IPHLPAPI_LIBRARY NAMES iphlpapi) if(NOT IPHLPAPI_LIBRARY) message(FATAL_ERROR "Lib iphlpapi is missing") endif() target_link_libraries(server ${IPHLPAPI_LIBRARY}) target_compile_definitions(server PUBLIC -DSTATICLIB PUBLIC -DMINIUPNP_STATICLIB ) endif() endif() # Test suite. add_subdirectory(test) # Benchmark suite. add_subdirectory(bench) # Wallet if(BUILD_BITCOIN_WALLET) add_subdirectory(wallet) target_link_libraries(server wallet) endif() # ZeroMQ if(BUILD_BITCOIN_ZMQ) add_subdirectory(zmq) target_link_libraries(server zmq) endif() # RPC client support add_library(rpcclient rpc/client.cpp) target_link_libraries(rpcclient univalue util) # bitcoin-seeder if(BUILD_BITCOIN_SEEDER) add_subdirectory(seeder) endif() # bitcoin-cli if(BUILD_BITCOIN_CLI) add_executable(bitcoin-cli bitcoin-cli.cpp) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") target_sources(bitcoin-cli PRIVATE bitcoin-cli-res.rc) endif() target_link_libraries(bitcoin-cli common rpcclient Event) endif() # bitcoin-tx if(BUILD_BITCOIN_TX) add_executable(bitcoin-tx bitcoin-tx.cpp) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") target_sources(bitcoin-tx PRIVATE bitcoin-tx-res.rc) endif() target_link_libraries(bitcoin-tx bitcoinconsensus) endif() # bitcoind add_executable(bitcoind bitcoind.cpp) target_link_libraries(bitcoind server) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") target_sources(bitcoind PRIVATE bitcoind-res.rc) endif() # Bitcoin-qt if(BUILD_BITCOIN_QT) add_subdirectory(qt) endif() diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt index 3df6cf5fc..4337c50ea 100644 --- a/src/config/CMakeLists.txt +++ b/src/config/CMakeLists.txt @@ -1,179 +1,179 @@ # Copyright (c) 2017-2019 The Bitcoin developers # This generates config.h which provides numerous defines # about the state of the plateform we are building on. include(CheckIncludeFiles) include(CheckSymbolExists) include(CheckCXXSourceCompiles) -# Package informations +# Package information set(PACKAGE_NAME "Bitcoin ABC") # Version set(CLIENT_VERSION_MAJOR 0) set(CLIENT_VERSION_MINOR 19) set(CLIENT_VERSION_REVISION 8) set(CLIENT_VERSION_BUILD 0) option(CLIENT_VERSION_IS_RELEASE "Build a release version" OFF) # Copyright set(COPYRIGHT_YEAR 2019) set(COPYRIGHT_HOLDERS "The %s developers") set(COPYRIGHT_HOLDERS_SUBSTITUTION Bitcoin) string(REPLACE "%s" ${COPYRIGHT_HOLDERS_SUBSTITUTION} COPYRIGHT_HOLDERS_FINAL ${COPYRIGHT_HOLDERS}) # Generate the version.h file configure_file(version.h.cmake.in version.h ESCAPE_QUOTES) # Endianness check_include_files("endian.h" HAVE_ENDIAN_H) check_include_files("sys/endian.h" HAVE_SYS_ENDIAN_H) if(HAVE_ENDIAN_H) set(ENDIAN_FILE "endian.h") elseif(HAVE_SYS_ENDIAN_H) set(ENDIAN_FILE "sys/endian.h") else() endif() if(ENDIAN_FILE) check_symbol_exists(htole16 ${ENDIAN_FILE} HAVE_DECL_HTOLE16) check_symbol_exists(htobe16 ${ENDIAN_FILE} HAVE_DECL_HTOBE16) check_symbol_exists(be16toh ${ENDIAN_FILE} HAVE_DECL_BE16TOH) check_symbol_exists(le16toh ${ENDIAN_FILE} HAVE_DECL_LE16TOH) check_symbol_exists(htobe32 ${ENDIAN_FILE} HAVE_DECL_HTOBE32) check_symbol_exists(htole32 ${ENDIAN_FILE} HAVE_DECL_HTOLE32) check_symbol_exists(be32toh ${ENDIAN_FILE} HAVE_DECL_BE32TOH) check_symbol_exists(le32toh ${ENDIAN_FILE} HAVE_DECL_LE32TOH) check_symbol_exists(htobe64 ${ENDIAN_FILE} HAVE_DECL_HTOBE64) check_symbol_exists(htole64 ${ENDIAN_FILE} HAVE_DECL_HTOLE64) check_symbol_exists(be64toh ${ENDIAN_FILE} HAVE_DECL_BE64TOH) check_symbol_exists(le64toh ${ENDIAN_FILE} HAVE_DECL_LE64TOH) endif() # Byte swap check_include_files("byteswap.h" HAVE_BYTESWAP_H) check_symbol_exists(bswap_16 "byteswap.h" HAVE_DECL_BSWAP_16) check_symbol_exists(bswap_32 "byteswap.h" HAVE_DECL_BSWAP_32) check_symbol_exists(bswap_64 "byteswap.h" HAVE_DECL_BSWAP_64) # sys/select.h and sys/prctl.h headers check_include_files("sys/select.h" HAVE_SYS_SELECT_H) check_include_files("sys/prctl.h" HAVE_SYS_PRCTL_H) # Bitmanip intrinsics function(check_builtin_exist SYMBOL VARIABLE) set( SOURCE_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckBuiltinExists.c" ) set( CMAKE_CONFIGURABLE_FILE_CONTENT "int main(int argc, char** argv) { (void)argv; return ${SYMBOL}(argc); }\n" ) configure_file( "${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in" "${SOURCE_FILE}" @ONLY ) if(NOT CMAKE_REQUIRED_QUIET) message(STATUS "Looking for ${SYMBOL}") endif() try_compile(${VARIABLE} ${CMAKE_BINARY_DIR} ${SOURCE_FILE} OUTPUT_VARIABLE OUTPUT ) if(${VARIABLE}) if(NOT CMAKE_REQUIRED_QUIET) message(STATUS "Looking for ${SYMBOL} - found") endif() set(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}" PARENT_SCOPE) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the ${SYMBOL} " "exist passed with the following output:\n" "${OUTPUT}\nFile ${SOURCEFILE}:\n" "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n") else() if(NOT CMAKE_REQUIRED_QUIET) message(STATUS "Looking for ${SYMBOL} - not found") endif() set(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}" PARENT_SCOPE) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the ${SYMBOL} " "exist failed with the following output:\n" "${OUTPUT}\nFile ${SOURCEFILE}:\n" "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n") endif() endfunction() check_builtin_exist(__builtin_clz HAVE_DECL___BUILTIN_CLZ) check_builtin_exist(__builtin_clzl HAVE_DECL___BUILTIN_CLZL) check_builtin_exist(__builtin_clzll HAVE_DECL___BUILTIN_CLZLL) check_builtin_exist(__builtin_popcount HAVE_DECL___BUILTIN_POPCOUNT) # Memory management capabilities check_symbol_exists(M_ARENA_MAX "malloc.h" HAVE_MALLOPT_ARENA_MAX) check_symbol_exists(malloc_info "malloc.h" HAVE_MALLOC_INFO) # Various system libraries check_symbol_exists(strnlen "string.h" HAVE_DECL_STRNLEN) check_symbol_exists(daemon "unistd.h" HAVE_DECL_DAEMON) # Check for ways to obtain entropy check_symbol_exists(getentropy "unistd.h" HAVE_GETENTROPY) check_symbol_exists(getentropy "sys/random.h" HAVE_GETENTROPY_RAND) check_cxx_source_compiles(" #include /* for syscall */ #include /* for SYS_getrandom */ int main() { syscall(SYS_getrandom, nullptr, 0, 0); return 0; } " HAVE_SYS_GETRANDOM) check_cxx_source_compiles(" #include #include int main() { static const int name[2] = {CTL_KERN, KERN_ARND}; sysctl(name, 2, nullptr, nullptr, nullptr, 0); return 0; } " HAVE_SYSCTL_ARND) # OpenSSL functionality set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_CRYPTO_INCLUDES}) set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY}) check_symbol_exists(EVP_MD_CTX_new "openssl/evp.h" HAVE_DECL_EVP_MD_CTX_NEW) # Activate wallet set(ENABLE_WALLET ${BUILD_BITCOIN_WALLET}) # Activate ZeroMQ set(ENABLE_ZMQ ${BUILD_BITCOIN_ZMQ}) # Try to find libqrencode # Only used in the wallet GUI if(ENABLE_QRCODE AND BUILD_BITCOIN_WALLET AND BUILD_BITCOIN_QT) find_package(QREncode REQUIRED) set(USE_QRCODE 1 CACHE INTERNAL "QR code is enabled") endif() # Try to find miniupnpc if(ENABLE_UPNP) find_package(MiniUPnPc REQUIRED) # The expected behavior is as follow: # - If UPnP is enabled USE_UPNP must be defined # - If UPnP should be the default port map method, USE_UPNP should be # defined to 1, otherwise it should be defined to 0. set(USE_UPNP ${START_WITH_UPNP} CACHE INTERNAL "UPnP is enabled") endif() # Generate the config configure_file(bitcoin-config.h.cmake.in bitcoin-config.h ESCAPE_QUOTES) diff --git a/src/core_write.cpp b/src/core_write.cpp index c47b272d9..a68ddf899 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -1,246 +1,246 @@ // Copyright (c) 2009-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. #include #include #include #include