Skip to content

Commit

Permalink
Merge branch 'namecoin'
Browse files Browse the repository at this point in the history
  • Loading branch information
domob1812 committed Mar 18, 2019
2 parents 6f9da19 + faf2072 commit b02d02e
Show file tree
Hide file tree
Showing 29 changed files with 123 additions and 109 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -163,7 +163,7 @@ jobs:
name: 'macOS 10.10 [GOAL: deploy] [no functional tests]'
env: >-
HOST=x86_64-apple-darwin14
PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python3-dev python3-setuptools-git"
PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python3-dev python3-setuptools"
OSX_SDK=10.11
RUN_UNIT_TESTS=false
RUN_FUNCTIONAL_TESTS=false
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -62,7 +62,7 @@ Commit messages should be verbose by default consisting of a short subject line
paragraph(s), unless the title alone is self-explanatory (like "Corrected typo
in init.cpp") in which case a single title line is sufficient. Commit messages should be
helpful to people reading your code in the future, so explain the reasoning for
your decisions. Further explanation [here](http://chris.beams.io/posts/git-commit/).
your decisions. Further explanation [here](https://chris.beams.io/posts/git-commit/).

If a particular commit references another issue, please add the reference. For
example: `refs #1234` or `fixes #4321`. Using the `fixes` or `closes` keywords
Expand Down
2 changes: 2 additions & 0 deletions contrib/devtools/README.md
Expand Up @@ -7,6 +7,8 @@ clang-format-diff.py

A script to format unified git diffs according to [.clang-format](../../src/.clang-format).

Requires `clang-format`, installed e.g. via `brew install clang-format` on macOS.

For instance, to format the last commit with 0 lines of context,
the script should be called from the git root folder as follows.

Expand Down
1 change: 1 addition & 0 deletions contrib/gitian-descriptors/gitian-linux.yml
@@ -1,6 +1,7 @@
---
name: "xaya-core-linux-1.3"
enable_cache: true
distro: "ubuntu"
suites:
- "bionic"
architectures:
Expand Down
1 change: 1 addition & 0 deletions contrib/gitian-descriptors/gitian-osx-signer.yml
@@ -1,5 +1,6 @@
---
name: "bitcoin-dmg-signer"
distro: "ubuntu"
suites:
- "bionic"
architectures:
Expand Down
1 change: 1 addition & 0 deletions contrib/gitian-descriptors/gitian-osx.yml
@@ -1,6 +1,7 @@
---
name: "xaya-core-osx-1.3"
enable_cache: true
distro: "ubuntu"
suites:
- "bionic"
architectures:
Expand Down
1 change: 1 addition & 0 deletions contrib/gitian-descriptors/gitian-win-signer.yml
@@ -1,5 +1,6 @@
---
name: "bitcoin-win-signer"
distro: "ubuntu"
suites:
- "bionic"
architectures:
Expand Down
1 change: 1 addition & 0 deletions contrib/gitian-descriptors/gitian-win.yml
@@ -1,6 +1,7 @@
---
name: "xaya-core-win-1.3"
enable_cache: true
distro: "ubuntu"
suites:
- "bionic"
architectures:
Expand Down
1 change: 1 addition & 0 deletions contrib/gitian-keys/keys.txt
Expand Up @@ -9,6 +9,7 @@ C519EBCF3B926298946783EFF6430754120EC2F4 Christian Decker (cdecker)
F20F56EF6A067F70E8A5C99FFF95FAA971697405 centaur
C060A6635913D98A3587D7DB1C2491FFEB0EF770 Cory Fields
BF6273FAEF7CC0BA1F562E50989F6B3048A116B5 Dev Random
6D3170C1DC2C6FD0AEEBCA6743811D1A26623924 Douglas Roark
9A1689B60D1B3CCE9262307A2F40A9BF167FBA47 Erik Mossberg (erkmos)
D35176BE9264832E4ACA8986BF0792FBE95DC863 fivepiece
01CDF4627A3B88AAE4A571C87588242FBE38D3A8 Gavin Andresen
Expand Down
2 changes: 1 addition & 1 deletion depends/config.site.in
Expand Up @@ -67,7 +67,7 @@ fi
if test -n "@CXX@" -a -z "${CXX}"; then
CXX="@CXX@"
fi
PYTHONPATH=$depends_prefix/native/lib/python/dist-packages:$PYTHONPATH
PYTHONPATH=$depends_prefix/native/lib/python3/dist-packages:$PYTHONPATH

if test -n "@AR@"; then
AR=@AR@
Expand Down
6 changes: 3 additions & 3 deletions depends/packages/native_biplist.mk
Expand Up @@ -3,13 +3,13 @@ $(package)_version=1.0.3
$(package)_download_path=https://bitbucket.org/wooster/biplist/downloads
$(package)_file_name=biplist-$($(package)_version).tar.gz
$(package)_sha256_hash=4c0549764c5fe50b28042ec21aa2e14fe1a2224e239a1dae77d9e7f3932aa4c6
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
$(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages

define $(package)_build_cmds
python setup.py build
python3 setup.py build
endef

define $(package)_stage_cmds
mkdir -p $($(package)_install_libdir) && \
python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
endef
6 changes: 3 additions & 3 deletions depends/packages/native_ds_store.mk
Expand Up @@ -3,14 +3,14 @@ $(package)_version=1.1.2
$(package)_download_path=https://github.com/al45tair/ds_store/archive/
$(package)_file_name=v$($(package)_version).tar.gz
$(package)_sha256_hash=3b3ecb7bf0a5157f5b6010bc3af7c141fb0ad3527084e63336220d22744bc20c
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
$(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages
$(package)_dependencies=native_biplist

define $(package)_build_cmds
python setup.py build
python3 setup.py build
endef

define $(package)_stage_cmds
mkdir -p $($(package)_install_libdir) && \
python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
endef
6 changes: 3 additions & 3 deletions depends/packages/native_mac_alias.mk
Expand Up @@ -3,13 +3,13 @@ $(package)_version=2.0.7
$(package)_download_path=https://github.com/al45tair/mac_alias/archive/
$(package)_file_name=v$($(package)_version).tar.gz
$(package)_sha256_hash=6f606d3b6bccd2112aeabf1a063f5b5ece87005a5d7e97c8faca23b916e88838
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
$(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages

define $(package)_build_cmds
python setup.py build
python3 setup.py build
endef

define $(package)_stage_cmds
mkdir -p $($(package)_install_libdir) && \
python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
endef
2 changes: 1 addition & 1 deletion depends/packages/native_protobuf.mk
Expand Up @@ -5,7 +5,7 @@ $(package)_file_name=protobuf-$($(package)_version).tar.bz2
$(package)_sha256_hash=ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910

define $(package)_set_vars
$(package)_config_opts=--disable-shared
$(package)_config_opts=--disable-shared --without-zlib
endef

define $(package)_config_cmds
Expand Down
32 changes: 16 additions & 16 deletions doc/build-unix.md
@@ -1,12 +1,12 @@
UNIX BUILD NOTES
====================
Some notes on how to build Bitcoin Core in Unix.
Some notes on how to build Namecoin Core in Unix.

(For BSD specific instructions, see `build-*bsd.md` in this directory.)

Note
---------------------
Always use absolute paths to configure and compile Bitcoin Core and the dependencies.
Always use absolute paths to configure and compile Namecoin Core and the dependencies.
For example, when specifying the path of the dependency:

../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
Expand All @@ -24,7 +24,7 @@ make
make install # optional
```

This will build bitcoin-qt as well, if the dependencies are met.
This will build namecoin-qt as well, if the dependencies are met.

Dependencies
---------------------
Expand Down Expand Up @@ -55,7 +55,7 @@ Memory Requirements
--------------------

C++ compilers are memory-hungry. It is recommended to have at least 1.5 GB of
memory available when compiling Bitcoin Core. On systems with less, gcc can be
memory available when compiling Namecoin Core. On systems with less, gcc can be
tuned to conserve memory with additional CXXFLAGS:


Expand Down Expand Up @@ -85,7 +85,7 @@ pass `--with-incompatible-bdb` to configure.

Otherwise, you can build from self-compiled `depends` (see above).

To build Bitcoin Core without wallet, see [*Disable-wallet mode*](/doc/build-unix.md#disable-wallet-mode)
To build Namecoin Core without wallet, see [*Disable-wallet mode*](/doc/build-unix.md#disable-wallet-mode)


Optional (see --with-miniupnpc and --enable-upnp-default):
Expand All @@ -98,7 +98,7 @@ ZMQ dependencies (provides ZMQ API):

GUI dependencies:

If you want to build bitcoin-qt, make sure that the required packages for Qt development
If you want to build namecoin-qt, make sure that the required packages for Qt development
are installed. Qt 5 is necessary to build the GUI.
To build without GUI pass `--without-gui`.

Expand All @@ -110,7 +110,7 @@ libqrencode (optional) can be installed with:

sudo apt-get install libqrencode-dev

Once these are installed, they will be found by configure and a bitcoin-qt executable will be
Once these are installed, they will be found by configure and a namecoin-qt executable will be
built by default.


Expand All @@ -136,7 +136,7 @@ libqrencode (optional) can be installed with:

Notes
-----
The release is built with GCC and then "strip bitcoind" to strip the debug
The release is built with GCC and then "strip namecoind" to strip the debug
symbols, which reduces the executable size by about 90%.


Expand Down Expand Up @@ -177,7 +177,7 @@ If you need to build Boost yourself:

Security
--------
To help make your Bitcoin Core installation more secure by making certain attacks impossible to
To help make your Namecoin Core installation more secure by making certain attacks impossible to
exploit even if a vulnerability is found, binaries are hardened by default.
This can be disabled with:

Expand All @@ -199,21 +199,21 @@ Hardening enables the following features:

To test that you have built PIE executable, install scanelf, part of paxutils, and use:

scanelf -e ./bitcoin
scanelf -e ./namecoin

The output should contain:

TYPE
ET_DYN

* _Non-executable Stack_: If the stack is executable then trivial stack-based buffer overflow exploits are possible if
vulnerable buffers are found. By default, Bitcoin Core should be built with a non-executable stack,
vulnerable buffers are found. By default, Namecoin Core should be built with a non-executable stack,
but if one of the libraries it uses asks for an executable stack or someone makes a mistake
and uses a compiler extension which requires an executable stack, it will silently build an
executable without the non-executable stack protection.

To verify that the stack is non-executable after compiling use:
`scanelf -e ./bitcoin`
`scanelf -e ./namecoin`

The output should contain:
STK/REL/PTL
Expand All @@ -223,7 +223,7 @@ Hardening enables the following features:

Disable-wallet mode
--------------------
When the intention is to run only a P2P node without a wallet, Bitcoin Core may be compiled in
When the intention is to run only a P2P node without a wallet, Namecoin Core may be compiled in
disable-wallet mode with:

./configure --disable-wallet
Expand All @@ -244,8 +244,8 @@ Setup and Build Example: Arch Linux
This example lists the steps necessary to setup and build a command line only, non-wallet distribution of the latest changes on Arch Linux:

pacman -S git base-devel boost libevent python
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin/
git clone https://github.com/namecoin/namecoin-core.git
cd namecoin-core/
./autogen.sh
./configure --disable-wallet --without-gui --without-miniupnpc
make check
Expand All @@ -254,7 +254,7 @@ Note:
Enabling wallet support requires either compiling against a Berkeley DB newer than 4.8 (package `db`) using `--with-incompatible-bdb`,
or building and depending on a local version of Berkeley DB 4.8. The readily available Arch Linux packages are currently built using
`--with-incompatible-bdb` according to the [PKGBUILD](https://projects.archlinux.org/svntogit/community.git/tree/bitcoin/trunk/PKGBUILD).
As mentioned above, when maintaining portability of the wallet between the standard Bitcoin Core distributions and independently built
As mentioned above, when maintaining portability of the wallet between the standard Namecoin Core distributions and independently built
node software is desired, Berkeley DB 4.8 must be used.


Expand Down
18 changes: 15 additions & 3 deletions doc/productivity.md
Expand Up @@ -76,7 +76,7 @@ Writing code

### Format C/C++/Protobuf diffs with `clang-format-diff.py`

See [contrib/devtools/README.md](contrib/devtools/README.md#clang-format-diff.py).
See [contrib/devtools/README.md](/contrib/devtools/README.md#clang-format-diff.py).

### Format Python diffs with `yapf-diff.py`

Expand Down Expand Up @@ -136,7 +136,7 @@ This will add an `upstream-pull` remote to your git repository, which can be fet

### Diff the diffs with `git range-diff`

It is very common for contributors to rebase their pull requests, or make changes to commits (perhaps in response to review) that are not at the head of their branch. This poses a problem for reviewers as when the contributor force pushes, the reviewer is no longer sure that his previous reviews of commits are still valid (as the commit hashes can now be different even though the diff is semantically the same). `git range-diff` can help solve this problem by diffing the diffs.
It is very common for contributors to rebase their pull requests, or make changes to commits (perhaps in response to review) that are not at the head of their branch. This poses a problem for reviewers as when the contributor force pushes, the reviewer is no longer sure that his previous reviews of commits are still valid (as the commit hashes can now be different even though the diff is semantically the same). [git range-diff](https://git-scm.com/docs/git-range-diff) (Git >= 2.19) can help solve this problem by diffing the diffs.

For example, to identify the differences between your previously reviewed diffs P1-5, and the new diffs P1-2,N3-4 as illustrated below:
```
Expand All @@ -152,7 +152,19 @@ You can do:
git range-diff master previously-reviewed-head new-head
```

Note that `git range-diff` also work for rebases.
Note that `git range-diff` also work for rebases:

```
P1--P2--P3--P4--P5 <-- previously-reviewed-head
/
...--m--m1--m2--m3 <-- master
\
P1--P2--N3--N4 <-- new-head (with P3 modified, P4 & P5 squashed)
PREV=P5 N=4 && git range-diff `git merge-base --all HEAD $PREV`...$PREV HEAD~$N...HEAD
```

Where `P5` is the commit you last reviewed and `4` is the number of commits in the new version.

-----

Expand Down
7 changes: 7 additions & 0 deletions doc/release-notes-14054.md
@@ -0,0 +1,7 @@
P2P changes
-----------

BIP 61 reject messages were deprecated in v0.18. They are now disabled by
default, but can be enabled by setting the `-enablebip61` command line option.
BIP 61 reject messages will be removed entirely in a future version of
Bitcoin Core.
3 changes: 3 additions & 0 deletions doc/release-notes-15566.md
@@ -0,0 +1,3 @@
Miscellaneous CLI Changes
-------------------------
- The `testnet` field in `bitcoin-cli -getinfo` has been renamed to `chain` and now returns the current network name as defined in BIP70 (main, test, regtest).
2 changes: 1 addition & 1 deletion share/examples/xaya.conf
Expand Up @@ -130,7 +130,7 @@
# This setting is over-ridden by the -paytxfee option.
#txconfirmtarget=n

# Pay a transaction fee every time you send bitcoins.
# Pay a transaction fee every time you send coins.
#paytxfee=0.000x

# Miscellaneous options
Expand Down
11 changes: 5 additions & 6 deletions share/setup.nsi.in
Expand Up @@ -5,7 +5,6 @@ SetCompressor /SOLID lzma

# General Symbol Definitions
!define REGKEY "SOFTWARE\$(^Name)"
!define VERSION @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@
!define COMPANY "@PACKAGE_NAME@ project"
!define URL @PACKAGE_URL@

Expand Down Expand Up @@ -49,7 +48,7 @@ Var StartMenuGroup
!insertmacro MUI_LANGUAGE English

# Installer attributes
OutFile @abs_top_srcdir@/@PACKAGE_TARNAME@-${VERSION}-win@WINDOWS_BITS@-setup.exe
OutFile @abs_top_srcdir@/@PACKAGE_TARNAME@-@PACKAGE_VERSION@-win@WINDOWS_BITS@-setup.exe
!if "@WINDOWS_BITS@" == "64"
InstallDir $PROGRAMFILES64\Xaya
!else
Expand All @@ -59,12 +58,12 @@ CRCCheck on
XPStyle on
BrandingText " "
ShowInstDetails show
VIProductVersion ${VERSION}.@CLIENT_VERSION_BUILD@
VIProductVersion @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@.@CLIENT_VERSION_BUILD@
VIAddVersionKey ProductName "@PACKAGE_NAME@"
VIAddVersionKey ProductVersion "${VERSION}"
VIAddVersionKey ProductVersion "@PACKAGE_VERSION@"
VIAddVersionKey CompanyName "${COMPANY}"
VIAddVersionKey CompanyWebsite "${URL}"
VIAddVersionKey FileVersion "${VERSION}"
VIAddVersionKey FileVersion "@PACKAGE_VERSION@"
VIAddVersionKey FileDescription ""
VIAddVersionKey LegalCopyright ""
InstallDirRegKey HKCU "${REGKEY}" Path
Expand Down Expand Up @@ -99,7 +98,7 @@ Section -post SEC0001
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe
!insertmacro MUI_STARTMENU_WRITE_END
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}"
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "@PACKAGE_VERSION@"
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}"
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}"
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe
Expand Down
6 changes: 1 addition & 5 deletions src/bitcoin-cli.cpp
Expand Up @@ -258,16 +258,12 @@ class GetinfoRequestHandler: public BaseRequestHandler
}
result.pushKV("version", batch[ID_NETWORKINFO]["result"]["version"]);
result.pushKV("protocolversion", batch[ID_NETWORKINFO]["result"]["protocolversion"]);
if (!batch[ID_WALLETINFO].isNull()) {
result.pushKV("walletversion", batch[ID_WALLETINFO]["result"]["walletversion"]);
result.pushKV("balance", batch[ID_WALLETINFO]["result"]["balance"]);
}
result.pushKV("blocks", batch[ID_BLOCKCHAININFO]["result"]["blocks"]);
result.pushKV("timeoffset", batch[ID_NETWORKINFO]["result"]["timeoffset"]);
result.pushKV("connections", batch[ID_NETWORKINFO]["result"]["connections"]);
result.pushKV("proxy", batch[ID_NETWORKINFO]["result"]["networks"][0]["proxy"]);
result.pushKV("difficulty", batch[ID_MININGINFO]["result"]["difficulty"]);
result.pushKV("testnet", UniValue(batch[ID_BLOCKCHAININFO]["result"]["chain"].get_str() == "test"));
result.pushKV("chain", UniValue(batch[ID_BLOCKCHAININFO]["result"]["chain"]));
if (!batch[ID_WALLETINFO].isNull()) {
result.pushKV("walletversion", batch[ID_WALLETINFO]["result"]["walletversion"]);
result.pushKV("balance", batch[ID_WALLETINFO]["result"]["balance"]);
Expand Down

0 comments on commit b02d02e

Please sign in to comment.