diff --git a/CMakeLists.txt b/CMakeLists.txt index ac966cd6af..bf09d05cc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,36 +1,41 @@ # Copyright (c) 2017 The Bitcoin developers cmake_minimum_required(VERSION 3.5) -project(bitcoin-abc) +project(bitcoin-abc + VERSION 0.20.2.0 + # TODO add description and homepage when CMake > 3.12 is enforced. + # DESCRIPTION "Bitcoin ABC is a full node implementation of the Bitcoin Cash protocol." + # HOMEPAGE "https://www.bitcoinabc.org" +) # Add path for custom modules set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ) # Make contrib script accessible. set(CONTRIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/contrib) # If ccache is available, then use it. find_program(CCACHE ccache) if(CCACHE) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE}) set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE}) endif(CCACHE) # Default to RelWithDebInfo configuration if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Select the configuration for the build" FORCE) endif() # Add the magic targets `check` and `check-all` add_custom_target(check-all) add_custom_target(check) add_subdirectory(src) add_subdirectory(test) add_subdirectory(contrib/devtools) add_subdirectory(doc) diff --git a/doc/release-process.md b/doc/release-process.md index bd30b3263a..1a3231957b 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -1,72 +1,72 @@ Bitcoin ABC Release Process =========================== ## Before Release 1. Check configuration - Check features planned for the release are implemented and documented (or more informally, that the Release Manager agrees it is feature complete) - Check that finished tasks / tickets are marked as resolved 2. Verify tests passed - Any known issues or limitations should be documented in release notes - Known bugs should have tickets - Run `arc lint --everything` and check there is no linter error - Ensure that bitcoind and bitcoin-qt run with no issue on all supported platforms. Manually test bitcoin-qt by sending some transactions and navigating through the menus. 3. Update the documents / code which needs to be updated every release - Check that doc/release-notes.md is complete, and fill in any missing items. - Update [bips.md](/doc/bips.md) to account for changes since the last release. - (major releases) Update [`BLOCK_CHAIN_SIZE`](/src/qt/intro.cpp) to the current size plus some overhead. - Update `src/chainparams.cpp` defaultAssumeValid and nMinimumChainWork with information from the getblockhash rpc. - The selected value must not be orphaned so it may be useful to set the value two blocks back from the tip. - Testnet should be set some tens of thousands back from the tip due to reorgs there. - This update should be reviewed with a reindex-chainstate with assumevalid=0 to catch any defect that causes rejection of blocks in the past history. - Regenerate manpages (run `contrib/devtools/gen-manpages.sh`, or for out-of-tree builds run `BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh`). - Update seeds as per [contrib/seeds/README.md](/contrib/seeds/README.md). 4. Add git tag for release 5. Increment version number for the next release in: - doc/release-notes.md (and copy existing one to versioned doc/release-notes/*.md) - configure.ac - - src/config/CMakeLists.txt + - CMakeLists.txt - contrib/gitian-descriptors/*.yml (before a new major release) - contrib/seeds/makeseeds.py (only after a new major release) ## Release 6. Create Gitian Builds (see [gitian-building.md](/doc/gitian-building.md)) 7. Verify matching Gitian Builds, gather signatures 8. Verify IBD bith with and without `-checkpoints=0 -assumevalid=0` 9. Upload Gitian Builds to [bitcoinabc.org](https://download.bitcoinabc.org/) 10. Create a [GitHub release](https://github.com/Bitcoin-ABC/bitcoin-abc/releases). The Github release name should be the same as the tag (without the prepended 'v'), and the contents of the release notes should be copied from release-notes.md. 11. Notify maintainers of Ubuntu PPA, AUR, and Docker images to build their packages. They should be given 1-day advance notice if possible. ## After Release 12. Update version number on www.bitcoinabc.org 13. Publish signed checksums (various places, e.g. blog, reddit/r/BitcoinABC) 14. Announce Release: - [Reddit](https://www.reddit.com/r/BitcoinABC/) - Twitter @Bitcoin_ABC - Public slack channels friendly to Bitcoin ABC announcements (eg. #abc-announce on BTCforks, #hardfork on BTCchat) diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt index 3c5cb67de1..6ee2d5d698 100644 --- a/src/config/CMakeLists.txt +++ b/src/config/CMakeLists.txt @@ -1,192 +1,192 @@ # 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 information set(PACKAGE_NAME "Bitcoin ABC" CACHE STRING "Package name") # Version -set(CLIENT_VERSION_MAJOR 0 CACHE STRING "Major version number") -set(CLIENT_VERSION_MINOR 20 CACHE STRING "Minor version number") -set(CLIENT_VERSION_REVISION 2 CACHE STRING "Revision version number") -set(CLIENT_VERSION_BUILD 0 CACHE STRING "Build version number") +set(CLIENT_VERSION_MAJOR ${bitcoin-abc_VERSION_MAJOR} CACHE STRING "Major version number") +set(CLIENT_VERSION_MINOR ${bitcoin-abc_VERSION_MINOR} CACHE STRING "Minor version number") +set(CLIENT_VERSION_REVISION ${bitcoin-abc_VERSION_PATCH} CACHE STRING "Revision version number") +set(CLIENT_VERSION_BUILD ${bitcoin-abc_VERSION_TWEAK} CACHE STRING "Build version number") 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) # getifaddrs and freeifaddrs may be unavailable with some Android versions check_symbol_exists(getifaddrs "sys/types.h;ifaddrs.h" HAVE_DECL_GETIFADDRS) check_symbol_exists(freeifaddrs "sys/types.h;ifaddrs.h" HAVE_DECL_FREEIFADDRS) 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) check_cxx_source_compiles(" #include #include int main() { static_assert(std::is_same::value, \"\"); return 0; } " CHAR_EQUALS_INT8) # 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)