Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
cc38451
Merge #12755: [tests] Better stderr testing
laanwj Jun 17, 2021
13300e4
More of 12755 ("no governance validation" warnings in tests)
UdjinM6 Jun 17, 2021
ec9f526
Merge #13197: util: warn about ignored recursive -includeconf calls
laanwj May 14, 2018
21bb444
Merge #12924: Fix hdmaster-key / seed-key confusion (scripted diff)
jonasschnelli May 21, 2018
c8ee5e1
Merge #13011: Cache witness hash in CTransaction
laanwj May 23, 2018
01fccc4
partial merge bitcoin#11403: Abstract out IsSolvable from Witnessifier
sipa Dec 1, 2017
05f4da4
leftovers of bitcoin#12714
UdjinM6 Jun 18, 2021
99608c8
leftovers of bitcoin#12803
UdjinM6 Jun 18, 2021
6f694a6
Merge #13142: Separate IsMine from solvability
laanwj May 29, 2018
e8da18d
Merge #13194: Remove template matching and pseudo opcodes
laanwj May 30, 2018
5879316
Merge #13252: Wallet: Refactor ReserveKeyFromKeyPool for safety
laanwj May 30, 2018
0fcb967
Merge #13112: Throw an error for unknown args
May 30, 2018
a9dc0f3
Merge #13349: bench: Don't return a bool from main
May 31, 2018
ff9623e
Merge #13441: Prevent shared conf files from failing with different a…
Jun 19, 2021
3d4017d
Merge #13309: Directly operate with CMutableTransaction in SignSignature
laanwj May 31, 2018
dbb0c39
Merge #13355: Fix "gmake check" under OpenBSD 6.3 (probably *BSD): Av…
laanwj Jun 1, 2018
b12936b
Merge #13353: qa: Fixup setting of PATH env var
laanwj Jun 1, 2018
7d9504a
Merge #13383: bench: Use non-throwing ParseDouble(...) instead of thr…
laanwj Jun 4, 2018
8e23a74
Merge #13366: Docs: Rename “OS X” to the newer “macOS” convention
laanwj Jun 5, 2018
f679d8c
Merge #13269: refactoring: Drop UpdateTransaction in favor of UpdateI…
laanwj Jun 5, 2018
2c7c4bc
Merge #13367: qa: Increase includeconf test coverage
laanwj Jun 5, 2018
62c1477
Merge #13394: cli: Ignore libevent warnings
laanwj Jun 7, 2018
e52bf13
Merge #13404: [tests] speed up of tx_validationcache_tests by reusing…
Jun 7, 2018
26a56f2
Merge #13396: Drop unused arith_uint256 ! operator
laanwj Jun 7, 2018
1f537f3
Merge #13374: utils and libraries: checking for bitcoin address in tr…
laanwj Jun 19, 2021
05dd5c7
Merge #13421: qa: Remove portseed_offset from test runner
laanwj Jun 11, 2018
e47f2e9
Merge #13294: Fix compiler warnings emitted when compiling under stoc…
laanwj Jun 11, 2018
2615ebc
Merge #13445: build: Reset default -g -O2 flags when enable debug
laanwj Jun 13, 2018
c1a84f6
Merge #13457: tests: Drop variadic macro
laanwj Jun 13, 2018
5c913ef
Merge #13443: Removed unused == operator from CMutableTransaction.
laanwj Jun 18, 2018
68e4e5b
Merge #13563: bench: Simplify CoinSelection
Jun 28, 2018
a53599d
Merge #13491: Improve handling of INVALID in IsMine
laanwj Jul 4, 2018
0ef8fae
Merge #13425: Moving final scriptSig construction from CombineSignatu…
laanwj Jul 5, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ There are also [regression and integration tests](/test), written
in Python, that are run automatically on the build server.
These tests can be run (if the [test dependencies](/test) are installed) with: `test/functional/test_runner.py`

The Travis CI system makes sure that every pull request is built for Windows, Linux, and OS X, and that unit/sanity tests are run automatically.
The Travis CI system makes sure that every pull request is built for Windows, Linux, and macOS, and that unit/sanity tests are run automatically.

### Manual Quality Assurance (QA) Testing

Expand Down
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@ AC_LANG_PUSH([C++])
AX_CHECK_COMPILE_FLAG([-Werror],[CXXFLAG_WERROR="-Werror"],[CXXFLAG_WERROR=""])

if test "x$enable_debug" = xyes; then
# Clear default -g -O2 flags
if test "x$CXXFLAGS_overridden" = xno; then
CXXFLAGS=""
fi
# Prefer -Og, fall back to -O0 if that is unavailable.
AX_CHECK_COMPILE_FLAG(
[-Og],
Expand Down
19 changes: 18 additions & 1 deletion contrib/devtools/update-translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
LOCALE_DIR = 'src/qt/locale'
# Minimum number of messages for translation to be considered at all
MIN_NUM_MESSAGES = 10
# Regexp to check for Bitcoin addresses
ADDRESS_REGEXP = re.compile('([13]|bc1)[a-zA-Z0-9]{30,}')
# Regexp to check for Dash addresses
ADDRESS_REGEXP_DASH = re.compile('[X7][a-zA-Z0-9]{30,}')

def check_at_repository_root():
if not os.path.exists('.git'):
Expand Down Expand Up @@ -125,6 +129,18 @@ def escape_cdata(text):
text = text.replace('"', '"')
return text

def contains_bitcoin_addr(text, errors):
if text != None and ADDRESS_REGEXP.search(text) != None:
errors.append('Translation "%s" contains a bitcoin address. This will be removed.' % (text))
return True
return False

def contains_dash_addr(text, errors):
if text != None and ADDRESS_REGEXP_DASH.search(text) != None:
errors.append('Translation "%s" contains a Dash address. This will be removed.' % (text))
return True
return False

def postprocess_translations(reduce_diff_hacks=False):
print('Checking and postprocessing...')

Expand Down Expand Up @@ -163,7 +179,8 @@ def postprocess_translations(reduce_diff_hacks=False):
if translation is None:
continue
errors = []
valid = check_format_specifiers(source, translation, errors, numerus)
valid = check_format_specifiers(source, translation, errors, numerus) and not contains_bitcoin_addr(translation, errors)
valid = valid and not contains_dash_addr(translation, errors)

for error in errors:
print('%s: %s' % (filename, error))
Expand Down
2 changes: 1 addition & 1 deletion contrib/init/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Upstart: dashd.conf
OpenRC: dashd.openrc
dashd.openrcconf
CentOS: dashd.init
OS X: org.dash.dashd.plist
macOS: org.dash.dashd.plist
```
have been made available to assist packagers in creating node packages here.

Expand Down
6 changes: 3 additions & 3 deletions depends/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Common `host-platform-triplets` for cross compilation are:

- `i686-w64-mingw32` for Win32
- `x86_64-w64-mingw32` for Win64
- `x86_64-apple-darwin14` for MacOSX
- `x86_64-apple-darwin14` for macOS
- `arm-linux-gnueabihf` for Linux ARM 32 bit
- `aarch64-linux-gnu` for Linux ARM 64 bit
- `riscv32-linux-gnu` for Linux RISC-V 32 bit
Expand Down Expand Up @@ -57,7 +57,7 @@ The following can be set when running make: make FOO=bar

SOURCES_PATH: downloaded sources will be placed here
BASE_CACHE: built packages will be placed here
SDK_PATH: Path where sdk's can be found (used by OSX)
SDK_PATH: Path where sdk's can be found (used by macOS)
FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before giving up
NO_QT: Don't download/build/cache qt and its dependencies
NO_WALLET: Don't download/build/cache libs needed to enable the wallet
Expand All @@ -72,7 +72,7 @@ options will be passed to Dash Core's configure. In this case, `--disable-wallet
Additional targets:

download: run 'make download' to fetch all sources without building them
download-osx: run 'make download-osx' to fetch all sources needed for osx builds
download-osx: run 'make download-osx' to fetch all sources needed for macOS builds
download-win: run 'make download-win' to fetch all sources needed for win builds
download-linux: run 'make download-linux' to fetch all sources needed for linux builds

Expand Down
2 changes: 1 addition & 1 deletion depends/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ In theory, binaries for any target OS/architecture can be created, from a
builder running any OS/architecture. In practice, build-side tools must be
specified when the defaults don't fit, and packages must be amended to work
on new hosts. For now, a build architecture of x86_64 is assumed, either on
Linux or OSX.
Linux or macOS.

### No reliance on timestamps

Expand Down
4 changes: 2 additions & 2 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Unpack the files into a directory and run:

Unpack the files into a directory, and then run dash-qt.exe.

### OS X
### macOS

Drag Dash-Qt to your applications folder, and then run Dash-Qt.

Expand All @@ -35,7 +35,7 @@ Building
---------------------
The following are developer notes on how to build Dash Core on your native platform. They are not complete guides, but include notes on the necessary libraries, compile flags, etc.

- [OS X Build Notes](build-osx.md)
- [macOS Build Notes](build-osx.md)
- [Unix Build Notes](build-unix.md)
- [Windows Build Notes](build-windows.md)
- [OpenBSD Build Notes](build-openbsd.md)
Expand Down
10 changes: 5 additions & 5 deletions doc/README_osx.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Deterministic OS X DMG Notes.
Deterministic macOS DMG Notes.

Working OS X DMGs are created in Linux by combining a recent clang,
Working macOS DMGs are created in Linux by combining a recent clang,
the Apple binutils (ld, ar, etc) and DMG authoring tools.

Apple uses clang extensively for development and has upstreamed the necessary
functionality so that a vanilla clang can take advantage. It supports the use
of -F, -target, -mmacosx-version-min, and --sysroot, which are all necessary
when building for OS X.
when building for macOS.

Apple's version of binutils (called cctools) contains lots of functionality
missing in the FSF's binutils. In addition to extra linker options for
Expand Down Expand Up @@ -38,7 +38,7 @@ Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.1
Unfortunately, the usual linux tools (7zip, hpmount, loopback mount) are incapable of opening this file.
To create a tarball suitable for Gitian input, there are two options:

Using Mac OS X, you can mount the dmg, and then create it with:
Using macOS, you can mount the dmg, and then create it with:
```
$ hdiutil attach Xcode_7.3.1.dmg
$ tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.11.sdk.tar.gz MacOSX10.11.sdk
Expand Down Expand Up @@ -81,7 +81,7 @@ Background images and other features can be added to DMG files by inserting a
.DS_Store before creation. This is generated by the script
contrib/macdeploy/custom_dsstore.py.

As of OS X Mavericks (10.9), using an Apple-blessed key to sign binaries is a
As of OS X 10.9 Mavericks, using an Apple-blessed key to sign binaries is a
requirement in order to satisfy the new Gatekeeper requirements. Because this
private key cannot be shared, we'll have to be a bit creative in order for the
build process to remain somewhat deterministic. Here's how it works:
Expand Down
4 changes: 2 additions & 2 deletions doc/build-osx.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Mac OS X Build Instructions and Notes
macOS Build Instructions and Notes
====================================
The commands in this guide should be executed in a Terminal application.
The built-in one is located in `/Applications/Utilities/Terminal.app`.

Preparation
-----------
Install the OS X command line tools:
Install the macOS command line tools:

`xcode-select --install`

Expand Down
2 changes: 1 addition & 1 deletion doc/gitian-building.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ offline.
Building Dash Core
----------------

To build Dash Core (for Linux, OS X and Windows) just follow the steps under 'perform
To build Dash Core (for Linux, macOS and Windows) just follow the steps under 'perform
Gitian builds' in [doc/release-process.md](release-process.md#setup-and-perform-gitian-builds) in the Dash Core repository.

This may take some time as it will build all the dependencies needed for each descriptor.
Expand Down
6 changes: 3 additions & 3 deletions doc/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Service User

All three Linux startup configurations assume the existence of a "dashcore" user
and group. They must be created before attempting to use these scripts.
The OS X configuration assumes dashd will be set up for the current user.
The macOS configuration assumes dashd will be set up for the current user.

Configuration
---------------------------------
Expand Down Expand Up @@ -65,7 +65,7 @@ reasons to make the configuration file and data directory only readable by the
dashcore user and group. Access to dash-cli and other dashd rpc clients
can then be controlled by group membership.

### Mac OS X
### macOS

Binary: `/usr/local/bin/dashd`
Configuration file: `~/Library/Application Support/DashCore/dash.conf`
Expand Down Expand Up @@ -111,7 +111,7 @@ Using this script, you can adjust the path and flags to the dashd program by
setting the DASHD and FLAGS environment variables in the file
/etc/sysconfig/dashd. You can also use the DAEMONOPTS environment variable here.

### Mac OS X
### macOS

Copy org.dash.dashd.plist into ~/Library/LaunchAgents. Load the launch agent by
running `launchctl load ~/Library/LaunchAgents/org.dash.dashd.plist`.
Expand Down
22 changes: 11 additions & 11 deletions doc/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Ensure gitian-builder is up-to-date:
echo '5a60e0a4b3e0b4d655317b2f12a810211c50242138322b16e7e01c6fbb89d92f inputs/osslsigncode-2.0.tar.gz' | sha256sum -c
popd

Create the OS X SDK tarball, see the [OS X readme](README_osx.md) for details, and copy it into the inputs directory.
Create the macOS SDK tarball, see the [macOS readme](README_osx.md) for details, and copy it into the inputs directory.

### Optional: Seed the Gitian sources cache and offline git repositories

Expand All @@ -107,7 +107,7 @@ NOTE: Offline builds must use the --url flag to ensure Gitian fetches only from

The gbuild invocations below <b>DO NOT DO THIS</b> by default.

### Build and sign Dash Core for Linux, Windows, and OS X:
### Build and sign Dash Core for Linux, Windows, and macOS:

pushd ./gitian-builder
./bin/gbuild --num-make 2 --memory 3000 --commit dash=v${VERSION} ../dash/contrib/gitian-descriptors/gitian-linux.yml
Expand All @@ -130,7 +130,7 @@ Build output expected:
1. source tarball (`dash-${VERSION}.tar.gz`)
2. linux 32-bit and 64-bit dist tarballs (`dash-${VERSION}-linux[32|64].tar.gz`)
3. windows 32-bit and 64-bit unsigned installers and dist zips (`dash-${VERSION}-win[32|64]-setup-unsigned.exe`, `dash-${VERSION}-win[32|64].zip`)
4. OS X unsigned installer and dist tarball (`dash-${VERSION}-osx-unsigned.dmg`, `dash-${VERSION}-osx64.tar.gz`)
4. macOS unsigned installer and dist tarball (`dash-${VERSION}-osx-unsigned.dmg`, `dash-${VERSION}-osx64.tar.gz`)
5. Gitian signatures (in `gitian.sigs/${VERSION}-<linux|{win,osx}-unsigned>/(your Gitian key)/`)

### Verify other gitian builders signatures to your own. (Optional)
Expand Down Expand Up @@ -160,13 +160,13 @@ Commit your signature to gitian.sigs:
git push # Assuming you can push to the gitian.sigs tree
popd

Codesigner only: Create Windows/OS X detached signatures:
Codesigner only: Create Windows/macOS detached signatures:
- Only one person handles codesigning. Everyone else should skip to the next step.
- Only once the Windows/OS X builds each have 3 matching signatures may they be signed with their respective release keys.
- Only once the Windows/macOS builds each have 3 matching signatures may they be signed with their respective release keys.

Codesigner only: Sign the osx binary:
Codesigner only: Sign the macOS binary:

transfer dashcore-osx-unsigned.tar.gz to osx for signing
transfer dashcore-osx-unsigned.tar.gz to macOS for signing
tar xf dashcore-osx-unsigned.tar.gz
./detached-sig-create.sh -s "Key ID" -o runtime
Enter the keychain password and authorize the signature
Expand All @@ -191,12 +191,12 @@ Codesigner only: Commit the detached codesign payloads:
git tag -s v${VERSION} HEAD
git push the current branch and new tag

Non-codesigners: wait for Windows/OS X detached signatures:
Non-codesigners: wait for Windows/macOS detached signatures:

- Once the Windows/OS X builds each have 3 matching signatures, they will be signed with their respective release keys.
- Once the Windows/macOS builds each have 3 matching signatures, they will be signed with their respective release keys.
- Detached signatures will then be committed to the [dash-detached-sigs](https://github.com/dashpay/dash-detached-sigs) repository, which can be combined with the unsigned apps to create signed binaries.

Create (and optionally verify) the signed OS X binary:
Create (and optionally verify) the signed macOS binary:

pushd ./gitian-builder
./bin/gbuild -i --commit signature=v${VERSION} ../dash/contrib/gitian-descriptors/gitian-osx-signer.yml
Expand All @@ -215,7 +215,7 @@ Create (and optionally verify) the signed Windows binaries:
mv build/out/dash-*win32-setup.exe ../dash-${VERSION}-win32-setup.exe
popd

Commit your signature for the signed OS X/Windows binaries:
Commit your signature for the signed macOS/Windows binaries:

pushd gitian.sigs
git add ${VERSION}-osx-signed/"${SIGNER}"
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile.test.include
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ if EMBEDDED_UNIVALUE
endif

%.cpp.test: %.cpp
@echo Running tests: `cat $< | grep "BOOST_FIXTURE_TEST_SUITE(\|BOOST_AUTO_TEST_SUITE(" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1` from $<
$(AM_V_at)$(TEST_BINARY) -l test_suite -t "`cat $< | grep "BOOST_FIXTURE_TEST_SUITE(\|BOOST_AUTO_TEST_SUITE(" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1`" > $<.log 2>&1 || (cat $<.log && false)
@echo Running tests: `cat $< | grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1` from $<
$(AM_V_at)$(TEST_BINARY) -l test_suite -t "`cat $< | grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1`" > $<.log 2>&1 || (cat $<.log && false)

test/data/%.json.h: test/data/%.json
@$(MKDIR_P) $(@D)
Expand Down
8 changes: 0 additions & 8 deletions src/arith_uint256.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ class base_uint

explicit base_uint(const std::string& str);

bool operator!() const
{
for (int i = 0; i < WIDTH; i++)
if (pn[i] != 0)
return false;
return true;
}

const base_uint operator~() const
{
base_uint ret;
Expand Down
28 changes: 20 additions & 8 deletions src/bench/bench_dash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@

#include <crypto/sha256.h>
#include <key.h>
#include <random.h>
#include <stacktraces.h>
#include <validation.h>
#include <util/strencodings.h>
#include <util/system.h>
#include <random.h>

#include <boost/lexical_cast.hpp>
#include <validation.h>

#include <memory>

Expand Down Expand Up @@ -48,17 +47,25 @@ static void SetupBenchArgs()
gArgs.AddArg("-plot-plotlyurl=<uri>", strprintf("URL to use for plotly.js (default: %s)", DEFAULT_PLOT_PLOTLYURL), false, OptionsCategory::OPTIONS);
gArgs.AddArg("-plot-width=<x>", strprintf("Plot width in pixel (default: %u)", DEFAULT_PLOT_WIDTH), false, OptionsCategory::OPTIONS);
gArgs.AddArg("-plot-height=<x>", strprintf("Plot height in pixel (default: %u)", DEFAULT_PLOT_HEIGHT), false, OptionsCategory::OPTIONS);

// Hidden
gArgs.AddArg("-h", "", false, OptionsCategory::HIDDEN);
gArgs.AddArg("-help", "", false, OptionsCategory::HIDDEN);
}

int main(int argc, char** argv)
{
SetupBenchArgs();
gArgs.ParseParameters(argc, argv);
std::string error;
if (!gArgs.ParseParameters(argc, argv, error)) {
fprintf(stderr, "Error parsing command line arguments: %s\n", error.c_str());
return EXIT_FAILURE;
}

if (HelpRequested(gArgs)) {
std::cout << gArgs.GetHelpMessage();

return 0;
return EXIT_SUCCESS;
}

// Set the datadir after parsing the bench options
Expand All @@ -82,8 +89,11 @@ int main(int argc, char** argv)
std::string scaling_str = gArgs.GetArg("-scaling", DEFAULT_BENCH_SCALING);
bool is_list_only = gArgs.GetBoolArg("-list", false);

double scaling_factor = boost::lexical_cast<double>(scaling_str);

double scaling_factor;
if (!ParseDouble(scaling_str, &scaling_factor)) {
fprintf(stderr, "Error parsing scaling factor as double: %s\n", scaling_str.c_str());
return EXIT_FAILURE;
}

std::unique_ptr<benchmark::Printer> printer(new benchmark::ConsolePrinter());
std::string printer_arg = gArgs.GetArg("-printer", DEFAULT_BENCH_PRINTER);
Expand All @@ -103,4 +113,6 @@ int main(int argc, char** argv)
CleanupBLSTests();

ECC_Stop();

return EXIT_SUCCESS;
}
Loading