dash/contrib
MarcoFalke 2353920662
Merge #16878: Fix non-deterministic coverage of test DoS_mapOrphans
4455949d6f0218b40d33d7fe6de6555f8f62192f Make test DoS_mapOrphans deterministic (David Reikher)

Pull request description:

  This pull request proposes a solution to make the test `DoS_mapOrphans` in denialofservice_tests.cpp have deterministic coverage.

  The `RandomOrphan` function in denialofservice_tests.cpp and the implicitly called function `ecdsa_signature_parse_der_lax` in pubkey.cpp were causing the non-deterministic test coverage.

  In the former, if a random orphan was selected the index of which is bigger than the max. orphan index in `mapOrphanTransactions`, the last orphan was returned from `RandomOrphan`. If the random number generated was never large enough, this condition would not be fulfilled and the corresponding branch wouldn't run. The proposed solution is to force one of the 50 dependant orphans to depend on the last orphan in `mapOrphanTransactions` using the newly introduced function `OrphanByIndex` (and passing it a large uint256), forcing this branch to run at least once.

  In the latter, if values for ECDSA `R` or `S` (or both) had no leading zeros, some code would not be executed. The solution was to find a constant signature that would be comprised of `R` and `S` values with leading zeros and calling `CPubKey::Verify` at the end of the test with this signature forcing this code to always run at least once at the end even if it hadn't throughout the test.

  To test that the coverage is (at least highly likely) deterministic, I ran

  `contrib/devtools/test_deterministic_coverage.sh denialofservice_tests/DoS_mapOrphans 1000`

  and the result was deterministic coverage across 1000 runs.

  Also - removed denialofservice_tests test entry from the list of non-deterministic tests in the coverage script.

ACKs for top commit:
  MarcoFalke:
    ACK 4455949d6f0218b40d33d7fe6de6555f8f62192f

Tree-SHA512: 987eb1f94b80d5bec4d4944e91ef43b9b8603055750362d4b4665b7f011be27045808aa9f4c6ccf8ae009b61405f9a1b8671d65a843c3328e5b8acce1f1c00a6
2022-09-03 10:43:14 -05:00
..
auto_gdb Fix python dead code warnings 2021-10-05 20:34:01 +03:00
containers docker: fix gitian support, optimize container layer count and improve script consistency (#4983) 2022-08-22 22:42:36 +03:00
debian partial revert dash#2911: s/dash-config/bitcoin-config/g 2022-08-09 14:16:28 +05:30
devtools Merge #16878: Fix non-deterministic coverage of test DoS_mapOrphans 2022-09-03 10:43:14 -05:00
gitian-descriptors bump signapple to the latest commit used in bitcoin atm 2022-08-17 18:35:47 +03:00
gitian-keys contrib: Added thephez.pgp (#3750) 2020-09-30 15:30:55 +03:00
init Merge #16569: Increase init file stop timeout 2022-04-02 16:30:52 +05:30
linearize Merge #15257: Scripts and tools: Bump flake8 to 3.7.8 2021-10-05 20:34:01 +03:00
macdeploy Merge #20880: gitian: Use custom MacOS code signing tool 2022-08-17 18:30:05 +03:00
qos Partial Merge #14831: Scripts and tools: Use #!/usr/bin/env bash instead of #!/bin/bash. 2021-08-15 11:08:08 -04:00
seeds Update hard coded seeds for v18.0.0-rc12 (#4953) 2022-08-11 01:57:13 +03:00
testgen Merge #16812: doc: Fix whitespace errs in .md files, bitcoin.conf, and Info.plist.in 2022-01-20 13:09:17 -05:00
verify-commits partial merge #16327: scripts and tools: Update ShellCheck linter 2021-12-03 18:13:01 +03:00
verifybinaries partial merge #16327: scripts and tools: Update ShellCheck linter 2021-12-03 18:13:01 +03:00
windeploy partial merge #16327: scripts and tools: Update ShellCheck linter 2021-12-03 18:13:01 +03:00
zmq Merge bitcoin#14060: ZMQ: add options to configure outbound message high water mark, aka SNDHWM (#4360) 2021-09-08 12:39:06 -04:00
dash-cli.bash-completion Merge #17282: contrib: remove accounts from bash completion 2022-05-31 12:06:32 -04:00
dash-qt.pro merge bitcoin#15450: Create wallet menu option 2022-04-06 13:49:58 +05:30
dash-tx.bash-completion
dashd.bash-completion merge #17165: Remove BIP70 support (#4023) 2022-04-25 12:01:47 +03:00
filter-lcov.py Merge #17691: doc: Add missed copyright headers 2022-04-02 09:19:20 +05:30
gitian-build.py fix(gitian): Fetch tags while cloning the repo via gbuild (#4976) 2022-08-17 17:37:07 +03:00
README.md Merge #16812: doc: Fix whitespace errs in .md files, bitcoin.conf, and Info.plist.in 2022-01-20 13:09:17 -05:00
valgrind.supp Merge #17455: tests: Update valgrind suppressions 2022-08-24 14:29:45 -04:00

Repository Tools

Developer tools

Specific tools for developers working on this repository. Contains the script github-merge.py for merging GitHub pull requests securely and signing them using GPG.

Verify-Commits

Tool to verify that every merge commit was signed by a developer using the above github-merge.py script.

Linearize

Construct a linear, no-fork, best version of the blockchain.

Qos

A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Dash network. This means one can have an always-on dashd instance running, and another local dashd/dash-qt instance which connects to this node and receives blocks from it.

Seeds

Utility to generate the pnSeed[] array that is compiled into the client.

Build Tools and Keys

Debian

Contains files used to package dashd/dash-qt for Debian-based Linux systems. If you compile dashd/dash-qt yourself, there are some useful files here.

Gitian-descriptors

Notes on getting Gitian builds up and running using KVM.

Gitian-keys

PGP keys used for signing Dash Core Gitian release results.

MacDeploy

Scripts and notes for Mac builds.

Gitian-build

Script for running full Gitian builds.

Test and Verify Tools

TestGen

Utilities to generate test vectors for the data-driven Dash tests.

Verify Binaries

This script attempts to download and verify the signature file SHA256SUMS.asc from bitcoin.org.