Skip to content

Commit

Permalink
pivx update 3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nashanas committed Sep 29, 2019
1 parent e4547ac commit df7b65e
Show file tree
Hide file tree
Showing 459 changed files with 6,642 additions and 9,707 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -85,7 +85,7 @@ src/qt/test/moc*.cpp
*.qm
Makefile
digidinar-qt
DigiDinar-Qt.app
DIGIDINAR-Qt.app
background.tiff*

# Unit-tests
Expand Down
4 changes: 3 additions & 1 deletion .travis/test_06_script_b.sh
Expand Up @@ -16,6 +16,8 @@ fi

if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
BEGIN_FOLD functional-tests
DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 ${TEST_RUNNER_EXTRA} --quiet
DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 ${TEST_RUNNER_EXTRA}
END_FOLD
fi

cd ${TRAVIS_BUILD_DIR} || (echo "could not enter travis build dir $TRAVIS_BUILD_DIR"; exit 1)
18 changes: 9 additions & 9 deletions Makefile.am
Expand Up @@ -24,7 +24,7 @@ BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EX
empty :=
space := $(empty) $(empty)

OSX_APP=DigiDinar-Qt.app
OSX_APP=DIGIDINAR-Qt.app
OSX_VOLNAME = $(subst $(space),-,$(PACKAGE_NAME))
OSX_DMG = $(OSX_VOLNAME).dmg
OSX_BACKGROUND_SVG=background.svg
Expand All @@ -51,14 +51,14 @@ DIST_SHARE = \
BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
$(top_srcdir)/contrib/devtools/security-check.py

WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/digidinar.ico \
$(top_srcdir)/share/pixmaps/nsis-header.bmp \
$(top_srcdir)/share/pixmaps/nsis-wizard.bmp \
$(top_srcdir)/doc/README_windows.txt

LINUX_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin16.xpm \
$(top_srcdir)/share/pixmaps/bitcoin32.xpm \
$(top_srcdir)/share/pixmaps/bitcoin128.png
LINUX_PACKAGING = $(top_srcdir)/share/pixmaps/digidinar16.xpm \
$(top_srcdir)/share/pixmaps/digidinar32.xpm \
$(top_srcdir)/share/pixmaps/digidinar128.png

OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
$(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_SVG) \
Expand Down Expand Up @@ -99,7 +99,7 @@ $(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
$(MKDIR_P) $(@D)
$(INSTALL_DATA) $< $@

$(OSX_APP)/Contents/MacOS/DigiDinar-Qt: all-recursive
$(OSX_APP)/Contents/MacOS/DIGIDINAR-Qt: all-recursive
$(MKDIR_P) $(@D)
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $@

Expand All @@ -109,7 +109,7 @@ $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings:

OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
$(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
$(OSX_APP)/Contents/MacOS/DigiDinar-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings
$(OSX_APP)/Contents/MacOS/DIGIDINAR-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings

osx_volname:
echo $(OSX_VOLNAME) >$@
Expand All @@ -134,7 +134,7 @@ $(APP_DIST_DIR)/Applications:
@rm -f $@
@cd $(@D); $(LN_S) /Applications $(@F)

$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/DigiDinar-Qt
$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/DIGIDINAR-Qt

$(OSX_DMG): $(APP_DIST_EXTRAS)
$(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -apple -o $@ dist
Expand All @@ -149,7 +149,7 @@ $(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE_DPIF
$(APP_DIST_DIR)/.DS_Store: $(OSX_DSSTORE_GEN)
$(PYTHON) $< "$@" "$(OSX_VOLNAME)"

$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/DigiDinar-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/DIGIDINAR-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2

deploydir: $(APP_DIST_EXTRAS)
Expand Down
8 changes: 4 additions & 4 deletions configure.ac
@@ -1,7 +1,7 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 1)
define(_CLIENT_VERSION_MAJOR, 2)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
Expand Down Expand Up @@ -1100,8 +1100,8 @@ CXXFLAGS="${save_CXXFLAGS}"
AC_CHECK_LIB([crypto],[RAND_egd],[],[
AC_ARG_WITH([unsupported-ssl],
[AS_HELP_STRING([--with-unsupported-ssl],[Build with system SSL (default is no; DANGEROUS; NOT SUPPORTED; You should use OpenSSL 1.0)])],
[AC_MSG_WARN([Detected unsupported SSL version: This is NOT supported, and may break consensus compatibility!])],
[AC_MSG_ERROR([Detected unsupported SSL version: This is NOT supported, and may break consensus compatibility!])]
[AC_MSG_WARN([Detected unsupported SSL version: This is NOT supported, and may break consensus compatibility! Use '--with-unsupported-ssl' if you don't care])],
[AC_MSG_ERROR([Detected unsupported SSL version: This is NOT supported, and may break consensus compatibility! Use '--with-unsupported-ssl' if you don't care])]
)
])

Expand Down
2 changes: 1 addition & 1 deletion contrib/debian/control
Expand Up @@ -61,4 +61,4 @@ Description: peer-to-peer network based digital currency - Qt GUI
Full transaction history is stored locally at each client. This
requires 10+ GB of space, slowly growing.
.
This package provides Digidinar-Qt, a GUI for DIGIDINAR based on Qt.
This package provides DigiDinar-Qt, a GUI for DIGIDINAR based on Qt.
2 changes: 1 addition & 1 deletion contrib/debian/digidinar-qt.desktop
Expand Up @@ -10,4 +10,4 @@ Type=Application
Icon=digidinar128
MimeType=x-scheme-handler/digidinar;
Categories=Office;Finance;
StartupWMClass=Digidinar-qt
StartupWMClass=DigiDinar-qt
10 changes: 5 additions & 5 deletions contrib/debian/examples/digidinar.conf
Expand Up @@ -51,10 +51,10 @@
#maxconnections=

#
# JSON-RPC options (for controlling a running Digidinar/digidinard process)
# JSON-RPC options (for controlling a running DigiDinar/digidinard process)
#

# server=1 tells Digidinar-QT and digidinard to accept JSON-RPC commands
# server=1 tells DigiDinar-QT and digidinard to accept JSON-RPC commands
#server=0

# You must set rpcuser and rpcpassword to secure the JSON-RPC api
Expand All @@ -72,7 +72,7 @@
# 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 Digidinar-QT to accept JSON-RPC commands.
# server=1 tells DigiDinar-QT to accept JSON-RPC commands.
# it is also read by digidinard to determine if RPC should be enabled
#rpcallowip=10.1.1.34/255.255.255.0
#rpcallowip=1.2.3.4/24
Expand All @@ -81,7 +81,7 @@
# Listen for RPC connections on this TCP port:
#rpcport=32002

# You can use Digidinar or digidinard to send commands to Digidinar/digidinard
# You can use DigiDinar or digidinard to send commands to DigiDinar/digidinard
# running on another host using this option:
#rpcconnect=127.0.0.1

Expand All @@ -98,7 +98,7 @@

# User interface options

# Start Digidinar minimized
# Start DigiDinar minimized
#min=1

# Minimize to the system tray
Expand Down
163 changes: 131 additions & 32 deletions contrib/devtools/README.md
@@ -1,5 +1,5 @@
Contents
===========
========
This directory contains tools for developers working on this repository.

check-doc.py
Expand All @@ -8,6 +8,93 @@ check-doc.py
Check if all command line args are documented. The return value indicates the
number of undocumented args.

clang-format-diff.py
===================

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

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.

```
git diff -U0 HEAD~1.. | ./contrib/devtools/clang-format-diff.py -p1 -i -v
```

copyright\_header.py
====================

Provides utilities for managing copyright headers of `The PIVX
developers` in repository source files. It has three subcommands:

```
$ ./copyright_header.py report <base_directory> [verbose]
$ ./copyright_header.py update <base_directory>
$ ./copyright_header.py insert <file>
```
Running these subcommands without arguments displays a usage string.

copyright\_header.py report \<base\_directory\> [verbose]
---------------------------------------------------------

Produces a report of all copyright header notices found inside the source files
of a repository. Useful to quickly visualize the state of the headers.
Specifying `verbose` will list the full filenames of files of each category.

copyright\_header.py update \<base\_directory\> [verbose]
---------------------------------------------------------
Updates all the copyright headers of `The PIVX developers` which were
changed in a year more recent than is listed. For example:
```
// Copyright (c) <firstYear>-<lastYear> The PIVX developers
```
will be updated to:
```
// Copyright (c) <firstYear>-<lastModifiedYear> The PIVX developers
```
where `<lastModifiedYear>` is obtained from the `git log` history.

This subcommand also handles copyright headers that have only a single year. In
those cases:
```
// Copyright (c) <year> The PIVX developers
```
will be updated to:
```
// Copyright (c) <year>-<lastModifiedYear> The PIVX developers
```
where the update is appropriate.

copyright\_header.py insert \<file\>
------------------------------------
Inserts a copyright header for `The PIVX developers` at the top of the
file in either Python or C++ style as determined by the file extension. If the
file is a Python file and it has `#!` starting the first line, the header is
inserted in the line below it.

The copyright dates will be set to be `<year_introduced>-<current_year>` where
`<year_introduced>` is according to the `git log` history. If
`<year_introduced>` is equal to `<current_year>`, it will be set as a single
year rather than two hyphenated years.

If the file already has a copyright for `The PIVX developers`, the
script will exit.

gen-manpages.sh
===============

A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
This requires help2man which can be found at: https://www.gnu.org/software/help2man/

With in-tree builds this tool can be run from any directory within the
repostitory. To use this tool with out-of-tree builds set `BUILDDIR`. For
example:

```bash
BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh
```

github-merge.py
===============

Expand All @@ -18,7 +105,7 @@ For example:
./github-merge.py 3077

(in any git repository) will help you merge pull request #3077 for the
DigiDinar-Project/DigiDinar repository.
DIGIDINAR-Project/DIGIDINAR repository.

What it does:
* Fetch master and the pull request.
Expand All @@ -36,47 +123,48 @@ couldn't mess with the sources.

Setup
---------
Configuring the github-merge tool for the DigiDinar repository is done in the following way:
Configuring the github-merge tool for the DIGIDINAR repository is done in the following way:

git config githubmerge.repository DigiDinar-Project/DigiDinar
git config githubmerge.repository DIGIDINAR-Project/DIGIDINAR
git config githubmerge.testcmd "make -j4 check" (adapt to whatever you want to use for testing)
git config --global user.signingkey mykeyid (if you want to GPG sign)

optimize-pngs.py
================
git config --global user.signingkey mykeyid

A script to optimize png files in the DigiDinar
repository (requires pngcrush).

fix-copyright-headers.py
===========================
Authentication (optional)
--------------------------

Every year newly updated files need to have its copyright headers updated to reflect the current year.
If you run this script from src/ it will automatically update the year on the copyright header for all
.cpp and .h files if these have a git commit from the current year.
The API request limit for unauthenticated requests is quite low, but the
limit for authenticated requests is much higher. If you start running
into rate limiting errors it can be useful to set an authentication token
so that the script can authenticate requests.

For example a file changed in 2014 (with 2014 being the current year):
```// Copyright (c) 2009-2013 The Bitcoin developers```
- First, go to [Personal access tokens](https://github.com/settings/tokens).
- Click 'Generate new token'.
- Fill in an arbitrary token description. No further privileges are needed.
- Click the `Generate token` button at the bottom of the form.
- Copy the generated token (should be a hexadecimal string)

would be changed to:
```// Copyright (c) 2009-2014 The Bitcoin developers```
Then do:

logprint-scanner.py
===================
LogPrint and LogPrintf are known to throw exceptions when the number of arguments supplied to the
LogPrint(f) function is not the same as the number of format specifiers.
git config --global user.ghtoken "pasted token"

Ideally, the presentation of this mismatch would be at compile-time, but instead it is at run-time.
Create and verify timestamps of merge commits
---------------------------------------------
To create or verify timestamps on the merge commits, install the OpenTimestamps
client via `pip3 install opentimestamps-client`. Then, dowload the gpg wrapper
`ots-git-gpg-wrapper.sh` and set it as git's `gpg.program`. See
[the ots git integration documentation](https://github.com/opentimestamps/opentimestamps-client/blob/master/doc/git-integration.md#usage)
for further details.

This script scans the src/ directory recursively and looks in each .cpp/.h file and identifies all
errorneous LogPrint(f) calls where the number of arguments do not match.
optimize-pngs.py
================

The filename and line number of the errorneous occurence is given.
A script to optimize png files in the DIGIDINAR
repository (requires pngcrush).

The script returns with the number of erroneous occurences as an error code to help facilitate
integration with a continuous integration system.
security-check.py and test-security-check.py
============================================

The script can be ran from any working directory inside the git repository.
Perform basic ELF security checks on a series of executables.

symbol-check.py
===============
Expand All @@ -87,7 +175,7 @@ still compatible with the minimum supported Linux distribution versions.

Example usage after a gitian build:

find ../gitian-builder/build -type f -executable | xargs python contrib/devtools/symbol-check.py
find ../gitian-builder/build -type f -executable | xargs python3 contrib/devtools/symbol-check.py

If only supported symbols are used the return value will be 0 and the output will be empty.

Expand All @@ -109,3 +197,14 @@ It will do the following automatically:
- add missing translations to the build system (TODO)

See doc/translation-process.md for more information.

circular-dependencies.py
========================

Run this script from the root of the source tree (`src/`) to find circular dependencies in the source code.
This looks only at which files include other files, treating the `.cpp` and `.h` file as one unit.

Example usage:

cd .../src
../contrib/devtools/circular-dependencies.py {*,*/*,*/*/*}.{h,cpp}

0 comments on commit df7b65e

Please sign in to comment.