Commit Graph

264 Commits

Author SHA1 Message Date
Wladimir J. van der Laan
3c4982205c
Merge #18415: scripts: add MACHO tests to test-security-check.py
7142d50ac33e0ad7d24e49e04c1fc7e3e769ed46 scripts: rename test_64bit_PE to test_PE (fanquake)
edaca2dd123cef958699c07ab248cf0ffc71af07 scripts: add MACHO NX check to security-check.py (fanquake)
1a4e9f32efcc5f6a74290446dc58784fd85c7b31 scripts: add MACHO tests to test-security-check.py (fanquake)

Pull request description:

  Adds tests for the MACHO checks in security-check.py:
  ac579ada7e/contrib/devtools/security-check.py (L212-L214)

  I'm planning on following up with more checks in security-check.py, and corresponding tests in test-security-check.py.

  Note that you'll probably have to be on macOS to run them. You can run just this suite with `python3 test-security-check.py TestSecurityChecks.test_MACHO`.

ACKs for top commit:
  laanwj:
    ACK 7142d50ac33e0ad7d24e49e04c1fc7e3e769ed46

Tree-SHA512: ace3ca9f6df5d4fedd5988938fb7dc7563ec7dc587aa275f780b5f51e9b8d7d6f7768e0a1e05ce438510a07b8640aba92c76847b30c2990f46c66b78a0acf960
2022-06-18 22:14:02 -07:00
Wladimir J. van der Laan
a25ee06cc1 Merge #17787: scripts: add MACHO PIE check to security-check.py
7c9e821c4e6cb186208ead9c8df616d1f393a49a scripts: add MACHO NOUNDEFS check to security-check.py (fanquake)
4ca92dc6d3f3e487d63286d8871d1829b3d279ff scripts: add MACHO PIE check to security-check.py (fanquake)

Pull request description:

  This uses `otool -vh` to print the mach header and look for the `PIE` flag:
  ```bash
  otool -vh src/bitcoind
  Mach header
        magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
  MH_MAGIC_64  X86_64        ALL LIB64     EXECUTE    24       2544   NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK PIE
  ```

  From [`mach-o/loader.h`](https://opensource.apple.com/source/cctools/cctools-927.0.2/include/mach-o/loader.h.auto.html):
  ```c
  #define	MH_PIE 0x200000			/* When this bit is set, the OS will
  					   load the main executable at a
  					   random address.  Only used in
  					   MH_EXECUTE filetypes. */
  ```

ACKs for top commit:
  laanwj:
    code review ACK 7c9e821c4e6cb186208ead9c8df616d1f393a49a

Tree-SHA512: 5ba2f60440d0e31c70371a355c91ca4f723d80f7287d04e2098bf5b11892cc74216ff8f1454603c4db9675d4f7983614843b992b8dcfca0309aadf2aa7ab2e4b
2022-06-08 12:36:52 +07:00
PastaPastaPasta
d64b7229cd
chore: bump copyrights (#4873)
* chore: bump copyright in configure.ac

* chore: bump copyright via copyright_header.py

ran command `python3 contrib/devtools/copyright_header.py update .`
2022-06-08 02:36:46 +03:00
Kittywhiskers Van Gogh
3ba8431900 merge bitcoin#16899: UTXO snapshot creation (dumptxoutset)
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-05-23 10:38:33 +05:30
PastaPastaPasta
b421cfacae
perf: enable more multi-threading and caching in linters (#4807)
* perf: enable more multi-threading and caching in linters

20s -> 6s

* ci: add multiprocess to ci dockerfile

* Update test/lint/lint-cppcheck-dash.sh

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-27 21:14:40 +03:00
UdjinM6
c6e724bf21 partial bitcoin#22244: Add xkb version to symbol-check 2022-04-26 20:37:20 +05:30
Kittywhiskers Van Gogh
1763f727b5 merge bitcoin#21376: Qt 5.12.10 2022-04-26 00:54:10 +05:30
UdjinM6
89f606a927
trivial: add some missing dashifications (#4772) 2022-04-19 09:09:42 +03:00
MarcoFalke
6270a09847
Merge #17691: doc: Add missed copyright headers
fac86ac7b3ceac2f884412c7a9f4bd5bab5e3916 scripted-diff: Add missed copyright headers (Hennadii Stepanov)
6fde9d5e47fc9a1042b3fb68031eab5bf55e508d script: Update EXLUDE list in copyright_header.py (Hennadii Stepanov)
1998152f15fd2b0e83f5068c375a34feaf73db8c script: Add empty line after C++ copyright (Hennadii Stepanov)
071f2fc204f542c5a287ca8835115a2ee0bf2f50 script: Add ability to insert copyright to *.sh (Hennadii Stepanov)

Pull request description:

  This PR improves `contrib/devtools/copyright_header.py` script and adds copyright headers to the files in `src` and `test` directories with two exceptions:
  - [`src/reverse_iterator.h`](https://github.com/bitcoin/bitcoin/blob/master/src/reverse_iterator.h) (added to exceptions)
  - [`src/test/fuzz/FuzzedDataProvider.h`](https://github.com/bitcoin/bitcoin/blob/master/src/test/fuzz/FuzzedDataProvider.h) (added to exceptions)

  On master 5622d8f3156a293e61d0964c33d4b21d8c9fd5e0:
  ```
  $ ./contrib/devtools/copyright_header.py report . | grep zero
    25 with zero copyrights
  ```

  With this PR:
  ```
  $ ./contrib/devtools/copyright_header.py report . | grep zero
     2 with zero copyrights
  ```

  ~I am uncertain about our copyright policy with `build_msvc` and `contrib` directories content, so they are out of scope of this PR.~

ACKs for top commit:
  MarcoFalke:
    ACK fac86ac7b3ceac2f884412c7a9f4bd5bab5e3916

Tree-SHA512: d7832c4a7a1a3b7806119775b40ec35d7982f49ff0e6199b8cee4c0e0a36e68d51728b6ee9924b1c161df4bc6105bd93391b79d42914357fa522f499cb113fa8
2022-04-02 09:19:20 +05:30
MarcoFalke
54de28adce Merge #15354: doc: Add missing bitcoin-wallet tool manpages
fa1e281547 doc: Add missing wallet-tool manpages (MarcoFalke)
fa0fe3b8a4 contrib: Add missing wallet tool to gen-manpages.sh (MarcoFalke)

Pull request description:

Tree-SHA512: 8c5c7e98f634cb1c8b43ecc9a15f22df2f572f5d752fb20f09910fb0d31e74df8144c1833f54bb44ad53cb5ca166f7e896317951899d4b0aa05bd3262f66835c
2022-03-04 23:38:32 -05:00
PastaPastaPasta
06998263bb
Optimize linters (#4637)
* optimize: somehow optimize circular-dependencies.py

Signed-off-by: pasta <pasta@dashboost.org>

* optimize: use parallel if available to lint in parallel

Signed-off-by: pasta <pasta@dashboost.org>

* suggestions

* more suggestions

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-12-30 19:34:36 +03:00
fanquake
ffe950bbc7
partial merge #16327: scripts and tools: Update ShellCheck linter
1ac454a3844b9b8389de0f660fa9455c0efa7140 Enable ShellCheck rules (Hennadii Stepanov)

Pull request description:

  Enable some simple ShellCheck rules.

  Note for reviewers: `bash` and `shellcheck` on macOS are different from ones on Ubuntu.
  For local tests the latest `shellcheck` version 0.6.0 should be used (see #15166).

ACKs for top commit:
  practicalswift:
    utACK 1ac454a3844b9b8389de0f660fa9455c0efa7140
  dongcarl:
    utACK 1ac454a
  fanquake:
    ACK 1ac454a3844b9b8389de0f660fa9455c0efa7140

Tree-SHA512: 8d0a3a5c09fe1a0c22120178f5e6b80f81f746f8c3356b7701ff301c117acb2edea8fe08f08fb54ed73f94b1617515fb239fa28e7ab4121f74872e6494b6f20e
2021-12-03 18:13:01 +03:00
Kittywhiskers Van Gogh
2c98320c1a merge bitcoin#15288: Remove wallet -> node global function calls 2021-11-14 15:32:37 +05:30
Wladimir J. van der Laan
f4cac953c3
Merge #14903: tests: Handle ImportError explicitly, improve comparisons against None
c9ba253f4f5d675d7736d24c1167229d0898ef1a Add E711 to flake8 check (Daniel Ingram)
17b55202dae8d6e21d2490de89b345c55f7694c0 Compare to None with is/is not (Daniel Ingram)
1b89074ae27ce123adbeed57343deaef13c14f81 Change '== None' to 'is None' (Daniel Ingram)
16d293772365d57cc1a279d5ad0fa6f44b12ed54 Handle exception as ImportError (Daniel Ingram)

Pull request description:

Tree-SHA512: aa5875ea3d9ac47ac898545ff023b511042cd377ea0c4594074daae119f3d4f3fc295721aad94a732a907086ecb32bce19a8eed38adf479f12663c4e8944f721
2021-10-08 19:13:52 +05:30
MarcoFalke
60b3c5a64e
Merge #15257: Scripts and tools: Bump flake8 to 3.7.8
3d0a82cff8cbb809876e82dbe62d14d2adc07d94 devtools: Accomodate block-style copyright blocks (Ben Woosley)
0ef0e51fe4bb592e67255776b5a0ba04679fb8c4 lint: Bump flake8 to 3.7.8 (Ben Woosley)
838920704ad90a71cf288b700052503db8abb17e lint: Disable flake8 W504 warning (Ben Woosley)
b21680baf5391a602b295b9d7d0ef66553661cb9 test/contrib: Fix invalid escapes in regex strings (Ben Woosley)

Pull request description:

  This is a second go at #15221, fixing new lints in:
  W504 line break after binary operator
  W605 invalid escape sequence
  F841 local variable 'e' is assigned to but never used

  This time around:
  * One commit per rule, for easier review
  * I went with the PEP-8 style of breaking before binary operators
  * I looked into the raw regex newline issue, and found that raw strings with newlines embedded do work appropriately. E.g. run `re.match(r" \n ", " \n ")` to check this for yourself. `re.MULTILINE` exists to modify `^` and `$` in multiline scenarios, but  all of these searches are per-line.

ACKs for top commit:
  practicalswift:
    ACK 3d0a82cff8cbb809876e82dbe62d14d2adc07d94 -- diff looks correct

Tree-SHA512: bea0c144cadd72e4adf2e9a4b4ee0535dd91a8e694206924cf8a389dc9253f364a717edfe9abda88108fbb67fda19b9e823f46822d7303c0aaa72e48909a6105
2021-10-05 20:34:01 +03:00
MarcoFalke
b184989b4d Merge #17569: build: Allow export of environ symbols and work around rv64 toolchain issue
eafd2593674b6890418a50eadf69425071b824e4 build: Add NX workaround for RV64 (Wladimir J. van der Laan)
f6e42256fe8900ed90f9644906b77f97e1600952 build: Allow export of environ symbols (Wladimir J. van der Laan)

Pull request description:

  This export was introduced in #17270 which added
  ```
  //! Necessary on some platforms
  extern char** environ;
  ```
  This should (finally) make the gitian build pass again (fix issue #17525.).

  Built on top of #17538 which should be merged first.

Top commit has no ACKs.

Tree-SHA512: 5c2054d52d0957aec3dc945b76d8e219187d22dc03889e7a88fb76049bf8e4a3e9f4da00dd1e9dd0351211f8e70d1a1b8ad7244f0348dab698e9d14b9d0c0bd4
2021-09-14 14:30:13 -04:00
MarcoFalke
ede3de195d
Merge #16223: devtools: Fetch and display ACKs at sign-off time in github-merge
0e01e4522e devtools: Fetch and display ACKs at sign-off time in github-merge (Wladimir J. van der Laan)

Pull request description:

  - Fetch the ACKs only at sign-off time. This makes sure that any last-minute ACKs are included (fixes #16200)
  - Show a list of ACKs that will be included and their author before signing off, and warn if there are none

  ![1](https://user-images.githubusercontent.com/126646/59605250-ad070980-910e-11e9-9f9a-d789c7f06ebb.png)
  ![2](https://user-images.githubusercontent.com/126646/59605255-b1332700-910e-11e9-80a5-d1e244f48264.png)

  There's a slight change to the merge commit format—before it was
  ```
      ACKs for commit 88884c:
  (list of ACKs, could be empty)
  ```
  now it is
  ```
  ACKs for top commit:
        jnewbery:
          ACK 5ebc6b0eb
      ... (list of ACKs cannot be empty)
  ```
  or
  ```
  Top commit has no ACKs.
  ```
  I don't think there's a reason to have the abbreviated commit ID there, after all the full commit id is already in the beginning of the merge commit message, and at least the abbreviated one is in every single ACK message.

ACKs for commit 0e01e4:
  fanquake:
    ACK 0e01e4522e0f9e2e994f80fc61f40d61a4a70d79

Tree-SHA512: 8576de016137d71cfc101747e9bb6779c13e0953cf2babee7afc9972bf2bd46f6912be4982b54fa5abf4d91e98e8fdae6b4ca3eef7d6892b7a5f04a7017b6882
2021-09-12 14:15:11 -04:00
Wladimir J. van der Laan
7e5260568f
Merge #15838: scripts and tools: Fetch missing review comments in github-merge.py
942ff2054b41fe3f78f1b3d88cfd032bc95fd62f contrib: gh-merge: Use pagination to fetch all review comments (nkostoulas)

Pull request description:

  Use GitHub API pagination to do multiple requests if required.

  Tested with some PRs that have a large number of comments.

  For issue #15816

ACKs for commit 942ff2:
  MarcoFalke:
    utACK 942ff2054b41fe3f78f1b3d88cfd032bc95fd62f
  laanwj:
    utACK 942ff2054b41fe3f78f1b3d88cfd032bc95fd62f

Tree-SHA512: cf0dcdc40212a7c5cfcd1afe873e068399bc6499fd2e32207c5516595c93e5cb478178b04185ce21c3de0312621e05fda268411e59864d51046fb7a049989f42
2021-09-12 14:15:08 -04:00
Wladimir J. van der Laan
0bb6e9000e
Merge #15643: contrib: gh-merge: Include ACKs in merge commit
fa1c073154c6a39dca878f5c9a37abee8af0fd30 contrib: gh-merge: Include review comments in merge commit (MarcoFalke)

Pull request description:

  This includes all up-to-date ACKs in the merge commit for reference

Tree-SHA512: 32c9352d884f9ecf94940f50f2921fc9fc026083c120f54d0651a41814872e852aee8d0c4ad5bcd03292329f05d76fcb7bac11741e1dd3bf417211a186005afb
2021-09-10 20:54:54 -04:00
Wladimir J. van der Laan
07a7fda225
Merge #15939: gitian: Remove Windows 32 bit build
fa193dc8e6f3b96fa2dba2f1c1668f7720fed320 doc: Remove win32 from the release process (MarcoFalke)
faf666f8148eeb305a9c4f78459aff2c7268016b Remove Windows 32 bit build (MarcoFalke)

Pull request description:

  The Windows 32 bit build has been removed from https://bitcoincore.org/en/download/, so unless there are complaints, we don't need to build it even

ACKs for commit fa193d:
  fanquake:
    utACK fa193dc8e6

Tree-SHA512: d6f2976a2e0c407698f720b00ac23ec4056626de4eff8621f4c5581120af0460afd1bdef72329cc0e7d92afca48d94ae5fce6777cb36bfabb60b8034ff08fd88
2021-09-02 22:27:58 +03:00
PastaPastaPasta
b483948627
Merge pull request #4255 from kittywhiskers/darwinqol
build: gitian, linting and macOS-specific QoL improvements (part 1)
2021-09-01 19:51:48 -04:00
PastaPastaPasta
bbc8623245
Merge pull request #4356 from kittywhiskers/depends
merge bitcoin#18820, #19764, #13686, #17538, #18405: zmq backports, boost depends split
2021-08-31 15:31:38 -04:00
Kittywhiskers Van Gogh
0b13db2ac5 merge #14954: Require python 3.5 2021-08-31 11:16:12 +05:30
Kittywhiskers Van Gogh
dc0e918126 merge bitcoin#17538: Bump minimum libc to 2.17 for release binaries 2021-08-28 11:52:01 +05:30
Wladimir J. van der Laan
6e81d04ecc Merge #15165: contrib: Allow use of github API authentication in github-merge
f1bd219a5b318e4bea361e1247a233e4f251f517 contrib: Allow use of github API authentication in github-merge (Wladimir J. van der Laan)
a4c5bbfcd3a12f310b26cccc78ded32dd3f32ebb contrib: Add support for http[s] URLs in github-merge (Wladimir J. van der Laan)
059a3cffdfa596aa3adaace3f57fa86fdd3f80fc contrib: Detailed reporting for http errors in github-merge (Wladimir J. van der Laan)

Pull request description:

  Three commits I had locally for `github-merge.py`:

  -  *Detailed reporting for http errors in github-merge*: Print detailed error, this makes it easier to diagnose github API issues.
  - *Add support for http[s] URLs in github-merge*: Sometimes it can be useful to use github-merge with read-only access (say, for reviewing and testing from untrusted VMs).
  - *Allow use of github API authentication in github-merge*: The API request limit for unauthenticated requests is quite low. I started running into rate limiting errors. The limit for authenticated requests is much higher. This patch adds an optional configuration setting `user.ghtoken` that, when set, is used to authenticate requests to the API.

Tree-SHA512: ca8ae1874a787263e49d915d7cf31c0c0f50aba229c9440265bf1fda69f7e00641d1492512b93d76c17ff1766859283d640d37770acb120898736ad97efbd5c2
2021-08-24 19:14:50 -04:00
Kittywhiskers Van Gogh
fc8952aa19
build: add libgmp detection, make immer a package (#4311)
* build: detect the presence of libgmp before generating Makefile

* depends: add arximboldi/immer@v0.6.2 as a package and add detection

* depends: remove immer from source tree, build using package only

* Drop immer refs from tools

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-08-10 22:35:55 +03:00
MarcoFalke
a309982e82 Merge #14947: scripts: Remove Python 2 import workarounds
4de11a3682 Remove Python 2 import workarounds (practicalswift)

Pull request description:

  Remove Python 2 import workarounds.

  As noted by @jnewbery in https://github.com/bitcoin/bitcoin/pull/14903#discussion_r241396925:

  > This exception handling is a vestige from when github-merge.py supported Python 2 and Python 3. We only support Python 3 now so we should be able to remove it entirely and just import from urllib.request.

Tree-SHA512: e0d21e6299dd62fb669ad95cbd3d19f7c803195fd336621aac72fd10ddc7431d90443831072a2e1eb2fc880d1d88eb7c3e2ead3da59f545f6db07d349af98fb3
2021-08-03 18:39:42 -03:00
UdjinM6
95f89eec56
Fix more spelling errors 2021-07-19 12:52:03 -05:00
UdjinM6
f11c1bc1f8
Ignore immer in code coverage checks, lint-whitespace.sh and copyright_header.py scripts (#4268) 2021-07-19 12:32:29 +03:00
MarcoFalke
9ff78a0644 Merge #21481: doc: Tell howto install clang-format on Debian/Ubuntu
ea76f4ac7d6e8c268d301d7ae6c8d4d8d804d55f Doc: Tell howto install clang-format on Debian/Ubuntu (wodry)

Pull request description:

  Because only macOS wasy mentioned, I was unsure if this would be a macOS specific tool. I guess Linux is more used than Mac, so Linux guide should be there, too.

ACKs for top commit:
  hebasto:
    ACK ea76f4ac7d6e8c268d301d7ae6c8d4d8d804d55f, every system upgrade via clean installation I do the same.

Tree-SHA512: 75c28540e8815cb41f4cf92784b6349978988b679e4deef9ae77ede951f93516ca13ec7b313ab72865b01273e115b49ed2b67cdcd68015af1b643a6186b190dd
2021-07-15 19:39:10 -05:00
Kittywhiskers Van Gogh
da33c9619c
partial merge #17398: Update leveldb to 1.22+ (#4230)
* Update to leveldb upstream using subtree merge

* Import crc32c using subtree merge as as 'src/crc32c'

* build: Update build system for new leveldb

Upstream leveldb switched build systems, which means we need to define
a few different values.

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* doc: Add crc32c subtree to developer notes

* test: Add crc32c to subtree check linter

* test: Add crc32c exception to various linters and generation scripts

* build: Add LCOV exception for crc32c

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* build: CRC32C build system integration

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-07-15 15:42:55 -05:00
UdjinM6
07e7be34d2
Merge pull request #4250 from PastaPastaPasta/backport-triv-pr11
backport: 'trivial' pr11
2021-07-15 20:34:04 +03:00
fanquake
9a4636d57d Merge #18010: test: rename test suite name "tx_validationcache_tests" to match filename
b3c4d9bac6910f6c28f6008c5ca7064a315fd2a5 test: rename test suite name "tx_validationcache_tests" to match filename (Sebastian Falbesoner)

Pull request description:

  Quoting `src/test/README.md`, '`Adding test cases`':

  >     "The file naming convention is `<source_filename>_tests.cpp`
  >      and such files should wrap their tests in a test suite
  >      called `<source_filename>_tests`."

  Currently the unit test source file `txvalidationcache_tests.cpp` contains a unit test suite with the name `tx_validationcache_tests`, which is fixed by this PR. The following shell script shows that this is the only mismatch and for all other unit test source files the test suite names are correct:

  ```
   #!/bin/bash
   shopt -s globstar
   for test_full_filename in **/*_tests.cpp; do
       test_name_file=`basename $test_full_filename .cpp`
       test_name_suite=`sed -n "s/^.*TEST_SUITE(\(.*_tests\).*$/\1/p" $test_full_filename`
       if [ $test_name_file != $test_name_suite ]; then
           echo "TestFilename: $test_name_file != TestSuitname: $test_name_suite"
       fi
   done
  ```

ACKs for top commit:
  practicalswift:
    ACK b3c4d9bac6910f6c28f6008c5ca7064a315fd2a5 -- expected naming is better than unexpected naming :)
  kristapsk:
    ACK b3c4d9bac6910f6c28f6008c5ca7064a315fd2a5

Tree-SHA512: 29d409b1eb22057ee2cc407508e2580d2bc03f412401df11b8ecf77be5ada6bda8f7d2cb5338c5e079490fa12242c1fd6230a09e47252c1b0d9fe535a828ca4c
2021-07-15 11:07:36 -05:00
fanquake
824107ecfb
Merge #17545: build: remove libanl.so.1 from ALLOWED_LIBRARIES
ec89d2882a591f6af5aad57ab8638250d9dc1add build: remove libanl.so.1 from ALLOWED_LIBRARIES (fanquake)

Pull request description:

  It should no longer be needed after: 10ae7a7b23.

  Symbol checker output for the `0.19.0.1` gitian built Linux binaries:
  ```bash
  aarch64  arm  i686-pc  risvc  symbol-check.py  x86_64
  root@557096f567b5:/test# find aarch64/ -type f -executable | xargs python3 symbol-check.py
  ['libpthread.so.0', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-aarch64.so.1']
  ['libpthread.so.0', 'libfontconfig.so.1', 'libfreetype.so.6', 'libxcb.so.1', 'libdl.so.2', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-aarch64.so.1']
  root@557096f567b5:/test# find arm -type f -executable | xargs python3 symbol-check.py
  ['libpthread.so.0', 'librt.so.1', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-armhf.so.3']
  ['libpthread.so.0', 'librt.so.1', 'libfontconfig.so.1', 'libfreetype.so.6', 'libxcb.so.1', 'libdl.so.2', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-armhf.so.3']
  root@557096f567b5:/test# find i686-pc -type f -executable | xargs python3 symbol-check.py
  ['libpthread.so.0', 'librt.so.1', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux.so.2']
  ['libpthread.so.0', 'librt.so.1', 'libfontconfig.so.1', 'libfreetype.so.6', 'libxcb.so.1', 'libdl.so.2', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux.so.2']
  root@557096f567b5:/test# find risvc/ -type f -executable | xargs python3 symbol-check.py
  ['libpthread.so.0', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-riscv64-lp64d.so.1']
  ['libpthread.so.0', 'libfontconfig.so.1', 'libfreetype.so.6', 'libxcb.so.1', 'libdl.so.2', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-riscv64-lp64d.so.1', 'libatomic.so.1']
  root@557096f567b5:/test# find x86_64/ -type f -executable | xargs python3 symbol-check.py
  ['libpthread.so.0', 'librt.so.1', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-x86-64.so.2']
  ['libpthread.so.0', 'librt.so.1', 'libfontconfig.so.1', 'libfreetype.so.6', 'libxcb.so.1', 'libdl.so.2', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-x86-64.so.2']
  ```

ACKs for top commit:
  laanwj:
    ACK, good catch ec89d2882a591f6af5aad57ab8638250d9dc1add

Tree-SHA512: 6bc118da190a5c37d26f0dfad5d4661add2ef15525668efb93425423bddbddabf3d7d8809464e79691f517fbe2aab241678652b3dc55ec3f452cf0dcbc26057c
2021-07-14 18:43:47 -05:00
UdjinM6
90e990e1ac
Merge pull request #4244 from PastaPastaPasta/backport-triv-pr8
backport: 'trivial' pr8
2021-07-13 20:53:57 +03:00
fanquake
184c0e0f8f Merge #16201: devtools: Always use unabbreviated commit IDs in github-merge.py
067fba563 devtools: Always use unabbreviated commit IDs in github-merge.py (Wladimir J. van der Laan)

Pull request description:

  Always put the unabbreviated commit IDs in the generated commit messages and other places. This prevents the developer's `core.abbrev` git setting from leaking through and is better against ambiguity too.

ACKs for commit 067fba:
  MarcoFalke:
    ACK 067fba56314f399674dd471c663e663040be52a3 (replaces `h` with `H`, didn't test)
  promag:
    ACK 067fba56314f399674dd471c663e663040be52a3, from the documentation https://git-scm.com/docs/pretty-formats:
  fanquake:
    ACK 067fba5631. Tested by merging this PR into master, then merging a second PR ontop and checking that full commit hashes were being used. Also checked documentation linked to above. Did not check that this works when a different `core.abbrev` is set locally.

Tree-SHA512: a851d10490cd8bcd8bca29094b08a6b9f883cfe1b0767ccda7ca789e4c8eff6260a4d82c33cb3d9bab01dd30ac8c9100cb7adbcb1911bb399d9385c1e1f15ecd
2021-07-12 17:11:12 -05:00
MarcoFalke
0de37c265a Merge #16143: tests: Mark unit test blockfilter_index_initial_sync as non-deterministic
c061be1e2f tests: Mark unit test blockfilter_index_initial_sync as non-deterministic (practicalswift)

Pull request description:

  Mark unit test `blockfilter_index_tests/blockfilter_index_initial_sync` as non-deterministic.

  Before this PR:

  ```
  $ contrib/devtools/test_deterministic_coverage.sh 500
  [2019-06-04 09:58:57] Measuring coverage, run #1 of 500
  [2019-06-04 10:00:33] Measuring coverage, run #2 of 500
  [2019-06-04 10:02:19] Measuring coverage, run #3 of 500

  The line coverage is non-deterministic between runs. Exiting.

  The test suite must be deterministic in the sense that the set of lines executed at least
  once must be identical between runs. This is a necessary condition for meaningful
  coverage measuring.

  --- gcovr.run-1.txt     2019-06-04 10:00:33.389059973 +0000
  +++ gcovr.run-3.txt     2019-06-04 10:03:45.619491207 +0000
  @@ -72,7 +72,7 @@
   hash.h                                        54      33    61%   71,74-77,82,85-89,111,113,128,147-148,175,178-181
   httprpc.cpp                                  120       3     2%   31,34-35,38-40,46,49,52,54,56,58,70,73-74,76,78-79,81,83-84,89,91,94-95,97,99-101,103,106-107,111-112,117-119,121-122,125,128,130,132,134-136,138-139,142,145,148,151-153,156-160,163-166,171,173-175,180-182,185,187,189-190,192,195,198-199,201,203-204,212,215,217,219-222,224,227-228,230,232,237,239-240,243-245,247-251,254,256,259,261-264,266-267 [* 205-206,208-209]
   httpserver.cpp                               312       6     1%   46,49-50,53,55,80-81,90,92-93,96-98,101,104,106-109,111-112,114,118,120-122,126,128-129,153,155,157-158,164,166-178,180,182,184-188,192,194-196,198-199,201-202,204-205,207-208,213,216-221,225,228-232,236-239,243-244,247-254,256-258,264-267,270-271,274,279,281-282,286,288-290,292-293,297,299-300,303-307,309-310,312-317,322-328,330,332,335,339,341-342,346,352-353,355,358,360,364,368-369,375,378,381-384,388-391,393-394,398-400,402,404-406,409,411-412,414,416,426,428-431,433-434,438,440-441,443,445-446,449,451-455,457-459,463-464,466-469,471-473,475-477,479,482,484,487,490-493,496-497,499-500,502,504,506,508-509,511,513-514,517,519,521-522,527,529-533,535,538,540-543,550-555,558,560-562,570,572-574,577-582,585-590,594-597,600,602-604,606-609,611,614,616,619,621,625-626,628-629,631-632,634-635,640,642-643,646,648-651,653,655-656
  -index/base.cpp                               149      94    63%   20,22-25,28,66,98,102-103,117-118,140-141,145-146,155,163,175,177-178,181-182,184-185,200-201,203,212,214-215,219-221,228-229,234,236,240,243-244,247-249,258-260,262,270,292-294,308-309 [* 263]
  +index/base.cpp                               149      97    65%   20,22-25,28,66,98,102-103,117-118,140-141,145-146,155,163,175,177-178,181-182,184-185,200-201,203,212,214-215,219-221,228-229,234,236,240,243-244,247-249,258-260,262,270,308-309 [* 263]
   index/base.h                                   3       2    66%   77
   index/blockfilterindex.cpp                   199     134    67%   70,79,81,84-88,91,122,139,142,179-181,184-185,188-189,193-194,201-202,207,233,258,262-263,265-266,268,271-272,274,277,279,284,286,288-289,294,301-302,304,322,329,332-333,350,371,373,438,440-441,444,446,449,455-456,459,461,464,466 [* 162-163]
   index/blockfilterindex.h                       4       4   100%
  @@ -358,7 +358,7 @@
   util/validation.cpp                            5       1    20%   12,15-17
   validation.cpp                              2167     808    37%   291,293,297-300,302,330,332,340,348,355-357,359,362,364-365,368,371,380,382-383,385-386,388-389,396,398-402,406-413,415,417,419,422-425,439-440,442-443,446,449,455-458,461-464,467,469-470,472,474,476,492,494-495,502-503,505-507,511-513,515,517,523,526,528,533,535,540,542-544,550,552-556,558-560,564,574,578-583,586,590-591,594-596,601-602,607-608,611-612,616-617,619-621,635-636,638,640,647-648,651,657-658,660-662,665-667,673,675,677-678,682-683,690,693,700-701,703-705,709-710,713-714,716,719-720,724-727,733-735,737-739,741-743,747-748,751-752,754,757-764,771,773-774,776-779,785-788,793-794,796-800,815-816,818-822,825,827,830,835,838-839,841-843,846-848,850,853,859,864-867,875,877-879,884-885,887-891,895,899-900,904-906,908-909,911,930-931,933,936,942,944-950,952,959,962,965-968,972,978,982-984,990-991,994-996,999,1003-1004,1011,1013,1015-1019,1022-1023,1026-1032,1056,1065,1079,1091,1108,1112,1114-1118,1125,1127-1130,1133-1135,1138-1139,1147,1149,1151-1152,1155,1197,1199-1201,1206-1209,1211-1212,1226,1230,1232-1234,1236,1238-1241,1245-1246,1256,1258,1260-1262,1264-1266,1268,1278-1280,1282-1283,1286,1289,1291-1292,1294-1302,1305-1311,1319-1323,1330,1332-1333,1336-1339,1379,1383-1384,1395,1401,1405-1407,1411-1414,1423-1428,1438-1440,1451,1455,1458,1471,1480,1497,1503,1519,1525,1527-1530,1532-1533,1536,1538-1539,1549,1551,1553,1555,1559-1562,1571,1573,1578,1580,1582-1584,1588-1589,1594-1597,1601-1606,1613-1616,1619-1623,1630,1632,1635,1637,1639-1640,1642-1646,1658,1660,1675,1688,1711,1713-1715,1742,1755,1760,1765,1769,1811,1815,1817,1841-1845,1855,1942,1946-1947,1956,1984-1986,1991-1992,1994,1996-1999,2005-2007,2010-2012,2022-2023,2028-2031,2038-2039,2042,2044,2049,2058-2061,2064,2114-2115,2117-2118,2120-2124,2152-2153,2156,2159-2163,2165-2169,2171-2172,2176-2178,2187-2188,2191-2194,2199,2207-2211,2215-2220,2224,2227-2230,2235,2237-2238,2261-2263,2265,2274,2278,2286,2301,2303-2304,2306-2309,2311,2313-2318,2320,2322,2325,2327-2328,2330,2332-2334,2338,2340,2343-2344,2407-2410,2430,2445-2447,2507-2509,2511-2514,2518,2520-2521,2523-2524,2561,2564,2590,2592-2593,2595-2598,2603,2620,2626,2658,2719,2724,2773,2776-2777,2779,2781,2783,2785-2788,2791,2793-2795,2799,2801-2802,2805,2807-2809,2813,2816,2818-2821,2825-2826,2832-2834,2841-2845,2848,2854,2858-2859,2861,2865-2868,2872-2875,2880,2884-2885,2890-2891,2894-2895,2897,2900-2906,2908,2910,2912,2918-2922,2924,2928-2929,2940,3002-3005,3009-3010,3026-3028,3036-3037,3039-3040,3045,3053,3056,3077,3080,3090,3112,3118,3129,3133,3135-3136,3141-3142,3150,3190-3193,3259,3268,3273,3277,3282-3285,3303,3314,3321-3324,3338-3341,3345-3346,3348-3350,3360,3372,3392,3397,3403,3406,3408,3435-3441,3443,3468-3469,3485,3487-3488,3492-3493,3534-3536,3542,3547-3549,3552,3565-3566,3601-3602,3610,3628,3630,3632,3645,3647,3649-3651,3653,3657,3659,3661-3669,3675-3680,3686-3687,3691,3693-3697,3702,3704,3706-3708,3711-3718,3720,3724,3726-3729,3748,3750-3752,3754,3758-3759,3763,3765,3767,3772,3774,3777-3778,3780-3781,3783,3787-3788,3790,3792-3794,3798-3800,3823,3825,3828,3830,3832,3836-3838,3841-3843,3845,3848,3850,3854-3856,3858-3859,3861-3862,3864-3867,3870-3873,3875-3876,3879,3882-3883,3886-3893,3899,3901,3905-3909,3911-3915,3922-3924,3926-3928,3931,3933-3934,3940-3942,3945-3947,3952,3954-3955,3957,3960-3961,3964,3966,3968-3972,3975,3977,3980,3982,3985,3987-3988,3992-3996,3998-4006,4008-4009,4011-4012,4014,4016,4019,4021-4022,4024-4026,4028-4032,4037-4041,4043-4045,4047,4050,4053-4054,4057,4060-4064,4066-4067,4069-4075,4079-4080,4086,4089-4091,4094-4097,4101,4106,4108,4110,4112-4114,4116-4117,4119,4121,4123-4124,4126,4128-4130,4132-4134,4138-4142,4144-4147,4154,4158-4163,4166-4169,4172-4173,4177,4179-4180,4183,4185,4187-4189,4191-4193,4195,4197-4201,4207-4208,4212,4220-4223,4230,4232-4233,4237,4240,4243,4247,4249,4251,4253-4255,4265-4266,4277,4279,4282,4285-4287,4292-4293,4296,4298,4302,4305-4306,4310-4311,4315-4318,4360,4363-4367,4370,4377,4397,4412,4415-4416,4418,4421-4422,4424,4426-4429,4433-4437,4439-4441,4448-4452,4454-4456,4458,4460,4462-4467,4471-4475,4477,4480-4481,4486-4488,4493,4496-4503,4505,4507-4511,4513-4514,4517-4519,4529-4531,4546,4600,4638-4639,4647,4653,4662-4664,4696,4703-4704,4718,4720,4723,4725,4727,4730,4732-4733,4736,4738-4739,4742,4744-4745,4750,4752-4757,4761-4765,4769-4770,4774-4776,4779-4781,4783-4785,4787-4790,4793-4794,4800-4801,4803,4807,4809-4810,4812-4813,4815-4816,4823,4827,4829,4831-4832,4834-4835,4838-4840,4842,4845,4848-4849,4853,4855-4856,4858-4863,4866-4872,4877,4891,4907 [* 1085-1086,1140-1141,1513-1514,2201-2202,2428,3569-3570,4400-4401,4442,4453,4504,4522-4523,4526-4527,4818-4819,4873-4874]
   validation.h                                  19       5    26%   338,350-352,356-363,366,484
  -validationinterface.cpp                       81      50    61%   78-82,85-86,112-113,116,119-120,123-124,126-128,130,133-136,151-153,163-165,169-171
  +validationinterface.cpp                       83      60    72%   78-82,85-86,112-113,116,133-136,151-153,163-165,169-171
   validationinterface.h                          9       4    44%   94,105,112,118,135
   versionbits.cpp                               92      27    29%   33,35-36,38-39,48-50,52-54,56-57,61-62,67-71,73,75-76,80,82-83,91,98,100,102-103,105,109-110,113-118,121-122,124,127,129-130,134,137,141,149,151,153-155,159,177,179,184,194,196,199,201,204,206 [* 26]
   versionbits.h                                  1       1   100%
  @@ -400,5 +400,5 @@
   zmq/zmqpublishnotifier.h                       5       0     0%   12,31,37,43,49
   zmq/zmqrpc.cpp                                23       3    13%   16,18,20,23,33-35,37,40-47,51,62,64-65
   ------------------------------------------------------------------------------
  -TOTAL                                      52472    7784    14%
  +TOTAL                                      52474    7797    14%
   ------------------------------------------------------------------------------
  $
  ```

  After this PR:

  ```
  $ contrib/devtools/test_deterministic_coverage.sh 500
  [2019-06-03 14:45:25] Measuring coverage, run #1 of 500
  [2019-06-03 14:48:15] Measuring coverage, run #2 of 500
  [2019-06-03 14:50:49] Measuring coverage, run #3 of 500
  [2019-06-03 14:52:20] Measuring coverage, run #4 of 500
  [2019-06-03 14:53:49] Measuring coverage, run #5 of 500
  …
  [2019-06-04 09:04:58] Measuring coverage, run #496 of 500
  [2019-06-04 09:07:42] Measuring coverage, run #497 of 500
  [2019-06-04 09:10:32] Measuring coverage, run #498 of 500
  [2019-06-04 09:13:26] Measuring coverage, run #499 of 500
  [2019-06-04 09:16:32] Measuring coverage, run #500 of 500

  Coverage test passed: Deterministic coverage across 500 runs.
  $
  ```

ACKs for commit c061be:

Tree-SHA512: 00cd55b4371290d8587ab667c64249bc31d26cc9dc3dd519677eb91ddb9dbc5333dfbdef5e90c7a0d74eecd24757113e7ec3eda836859ddc033b1de715df81b6
2021-07-12 17:11:12 -05:00
Wladimir J. van der Laan
87800e4bcc Merge #16130: Don't GPG sign intermediate commits with github-merge tool
a352d2ae5 Don't GPG sign intermediate commits with github-merge tool (Steven Roose)

Pull request description:

  When you don't have an unencrypted key and you have git configured to always sign all commits, you have to sign three times instead of one.

ACKs for commit a352d2:
  MarcoFalke:
    utACK a352d2ae5f5e8a0204d49d66ff458a1505609de3

Tree-SHA512: f5a1c0868c42de2b5df45126e1e94b4a7d88b041d179244228bb7b02d43d41f565388eb1052a097ab0666fc6003f8453b9e283801fcb33aef47f412b72ba9fb6
2021-07-12 17:11:12 -05:00
Kittywhiskers Van Gogh
2a5bcecb91 merge #17052: update copyright_header script to include additional files 2021-07-11 13:55:26 +05:30
Kittywhiskers Van Gogh
3ee097114e merge #16314: Update copyright_header.py script 2021-07-11 13:54:58 +05:30
Kittywhiskers Van Gogh
a2f4e9c74a merge #14785: Fix detection of copyright holders 2021-07-11 13:53:37 +05:30
UdjinM6
08558d67ee
Merge pull request #4235 from PastaPastaPasta/backport-triv-pr7
backport: 'trivial' pr7
2021-07-10 21:46:25 +03:00
MarcoFalke
206c1ed9ba Merge #15444: [docs] Additional productivity tips
ff7f31e07d [doc] productivity: more advanced git range-diff (Sjors Provoost)
3a21905a4e [doc] devtools: mention clang-format dependency (Sjors Provoost)
bf12093191 [doc] productivity: fix broken link (Sjors Provoost)

Pull request description:

  Fixes a broken link to `devtools/README.md`, points out the `clang-format` dependency and adds a `git range-diff` incantation that works even with rebases and squashes.

Tree-SHA512: 36e46282f1e28d1bf3f48ada995fbac548f61b7747091eb032b60919cf76c7bdad0fa8aecb0c47adbdaa9ef986d3ec7752b0bb94c63191401856e2ddeec48f3e
2021-07-10 12:10:51 -05:00
Wladimir J. van der Laan
a33756c72e Merge #15549: gitian: Improve error handling
32da92bdf6bb55d6d312b0f85797d439cc942db5 gitian: Improve error handling (Wladimir J. van der Laan)

Pull request description:

  Improve error handling in gitian builds:

  - Set fail-on-error and pipefail flag, this causes a command to fail when either of the pipe stages fails, not only when the last of the stages fails, so this improves error detection.
  - Also use `xargs` instead of `find -exec`, because `find` will not propagate errors in the executed command, but `xargs` will.

  This will avoid some issues like #15541 where non-determinism is silently introduced due to errors caused by environment conditions (such as lack of disk space in that case).

Tree-SHA512: d5d3f22ce2d04a75e5c25e935744327c3adc704c2d303133f2918113573a564dff3d3243d5569a2b93ee7eb0e97f8e1b1ba81767e966af9015ea711a14091035
2021-07-10 12:10:51 -05:00
MarcoFalke
dd2f85c084 Merge #15296: tests: Add script checking for deterministic line coverage in unit tests
43206239a8 tests: Add script checking for deterministic line coverage (practicalswift)

Pull request description:

  Add script checking for deterministic line coverage in unit tests.

  Context: #14343 ("coverage reports non-deterministic")

  When the coverage is deterministic this script can be invoked from Travis to guard against regressions, but left inactive for now.

  Output in case of determinism:

  ```
  $ contrib/test_deterministic_coverage.sh 2
  [2019-01-30 20:08:46] Measuring coverage, run #1 of 2
  [2019-01-30 20:10:45] Measuring coverage, run #2 of 2

  Coverage test passed: Deterministic coverage across 2 runs.
  ```

  Output in case of non-determinism:

  ```
  $ contrib/test_deterministic_coverage.sh 2
  [2019-01-30 20:08:46] Measuring coverage, run #1 of 2
  [2019-01-30 20:10:45] Measuring coverage, run #2 of 2

  The line coverage is non-deterministic between runs.

  The test suite must be deterministic in the sense that the set of lines executed at least
  once must be identical between runs. This is a neccessary condition for meaningful coverage
  measuring.

  --- gcovr.run-1.txt   2019-01-30 23:14:07.419418694 +0100
  +++ gcovr.run-2.txt   2019-01-30 23:15:57.998811282 +0100
  @@ -471,7 +471,7 @@
   test/crypto_tests.cpp                        270     270   100%
   test/cuckoocache_tests.cpp                   142     142   100%
   test/dbwrapper_tests.cpp                     148     148   100%
  -test/denialofservice_tests.cpp               225     225   100%
  +test/denialofservice_tests.cpp               225     224    99%   363
   test/descriptor_tests.cpp                    116     116   100%
   test/fs_tests.cpp                             24       3    12%   14,16-17,19-20,23,25-26,29,31-32,35-36,39,41-42,45-46,49,51-52
   test/getarg_tests.cpp                        111     111   100%
  @@ -585,5 +585,5 @@
   zmq/zmqpublishnotifier.h                       5       0     0%   12,31,37,43,49
   zmq/zmqrpc.cpp                                21       0     0%   16,18,20,22,33-35,38-45,49,52,56,60,62-63
   ------------------------------------------------------------------------------
  -TOTAL                                      61561   27606    44%
  +TOTAL                                      61561   27605    44%
   ------------------------------------------------------------------------------

  ```

  In this case line 363 of `test/denialofservice_tests.cpp` was executed only in the second run. Non-determinism detected!

Tree-SHA512: 03f45590e70a87146f89aa7838beeff0925d7fd303697ff03e0e69f8a5861694be5f0dd10cb0020e3e3d40c9cf662f71dfcd838f6affb31bd5212314e0a4e3a9
2021-07-10 12:10:51 -05:00
UdjinM6
637a8a28fe
Merge pull request #4226 from PastaPastaPasta/backport-triv-pr6
backport: 'trivial' pr6
2021-07-08 23:25:09 +03:00
Wladimir J. van der Laan
50168b66a2
Merge #14848: docs: Fix broken Gmane URL in security-check.py
af1ed206f Fix broken Gmane URLs (Craig Younkins)

Pull request description:

  This is an automated pull request to fix broken Gmane URLs.

    Here's what I did:
    First I searched for Gmane URLs in your repo. For each Gmane URL, I checked if the content was available at the URL. For URLs where the content was not available, I first checked the `article` subdomain of Gmane, which has some content not available on the `thread` and `comments` subdomains.

    If the content wasn't anywhere on Gmane's web interface, I resolved the URL to a [Message-ID](https://en.wikipedia.org/wiki/Message-ID) via the Gmane NNTP interface and tried to find the Message-ID on other mailing list archivers. I checked `mail-archive.com`, then `marc.info`, then `lists.debian.org` and so on.

    If a new URL was found, I replaced it in this pull request. If the content wasn't found, I left the link alone.

Tree-SHA512: b46258de485a411fc4fbd6b8fb044c30fa062fd3a7ef78c6b8b405802c91283bc5c9f7f8b8c83385f3a12fe39578ea0695efd19ce19f3bb4606fbbd1be894d0e
2021-07-08 11:57:04 -05:00
Wladimir J. van der Laan
7214b034eb Merge #14128: lint: Make sure we read the command line inputs using utf-8 decoding in python
5d62dcf9cfb5c0b2511c10667ed47ec3b3610d72 lint: Make sure we read the command line inputs using utf-8 decoding in python (Chun Kuan Lee)

Pull request description:

  Make sure we read the command line inputs using utf-8 decoding in python

  occurred from travis cron job:

  contrib/verify-commits/verify-commits.py should run with utf-8, otherwise it would raise UnicodeDecodeError
  `UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 744: ordinal not in range(128)`

Tree-SHA512: 90e4ad57fdbbbecb0a21fc2d2b03a04f5ef125e54124719ef36e5a85326930b732b47534757a7c3a8730096f3947b009ec898191928b5c2d38f9f4b3e37db48d

# Conflicts:
#	contrib/devtools/optimize-pngs.py
2021-07-07 12:04:53 -04:00
Kittywhiskers Van Gogh
b5db3c3d65 merge #18011: Replace current benchmarking framework with nanobench 2021-07-05 18:28:55 +05:30
Wladimir J. van der Laan
f5a46e294f Merge #13724: [contrib] Support ARM and RISC-V symbol check
c516c3a770e93dcd283dc4a9275cba88221d0e3a [contrib] Support ARM and RISC-V symbol check (Chun Kuan Lee)

Pull request description:

  Solve the TODO in the gitian-descripter

Tree-SHA512: 8115e2958af3dde43d9d9d05f0b1b1b93b1c2aa513e771a3e4e1342a5d78af2b0e40c0bbb7e9a0d15954897317e6f5a0d80996239af3b376d5ddd527f73428ae

# Conflicts:
#	contrib/devtools/symbol-check.py
#	contrib/gitian-descriptors/gitian-linux.yml
2021-07-02 11:39:23 -04:00
UdjinM6
a29d3d4332
Merge pull request #4218 from PastaPastaPasta/backport-triv-pr1
backport: 'trivial' pr3
2021-06-29 02:08:34 +03:00
UdjinM6
d5e432a278
Merge pull request #4215 from PastaPastaPasta/backports-0.18-triv
backport: 'trivial' pr1
2021-06-29 02:06:27 +03:00
Wladimir J. van der Laan
bb0200bf04
Merge #12852: [doc] devtools: Setup ots git integration
fa385c3 [doc] devtools: Setup ots git integration (MarcoFalke)

Pull request description:

  Document the simple steps on how to set up ots git integration.

Tree-SHA512: 1b9f99bfaa6cd9dc581243d3a3584301645e95450acc3b5898dcdb53849569de16bb8ef2676b18f6b8dd402de10aee80119e15c1b28cef36f17ad121cbba2ba3
2021-06-28 18:03:20 -05:00
MarcoFalke
a8ff3437d3
Merge #15258: Scripts and tools: Fix devtools/copyright_header.py to always honor exclusions
ad5e5a105e Scripts and tools: Drop no-longer-relevant copyright holder names (Ben Woosley)
2434ab5c2a Scripts and tools: Fix devtools/copyright_header.py to always honor exclusions (Ben Woosley)

Pull request description:

  This script compared paths relative to the report directory to test for exclusion,
  meaning the `EXCLUDE_DIRS` directory exclusions did not work properly, as
  they were relative to the project root.

  Fix this by creating absolute paths through the combination of:
  'git ls-files --full-name' and 'git rev-parse --show-toplevel'

  Once this is done, we can stop testing for the names that would otherwise
  appear when exclusion of leveldb, secp256k1, etc., did not work as intended.

Tree-SHA512: 0fa9b0a627e8ddb2d899eedee927ea8a809cb2ceee87c0920c151e5ca2103f7d8c463e3b379d5e2eb925fc3d7d8003082ffd9cbc03907ca0c448e8238e3a2684
2021-06-28 13:40:59 -05:00
Wladimir J. van der Laan
1f537f32f7
Merge #13374: utils and libraries: checking for bitcoin address in translations
85f0135eaefe3d9f696689a7e83606c579da40a8 utils: checking for bitcoin addresses in translations (Max Kaplan)

Pull request description:

  Closes #13363

Tree-SHA512: 8509b4ab004139942c847b93d7b44096a13df8e429dd05459b430a1cf7eaef16c4906ab9dc854f4e635312e1ebb064cfab1bad97fec914c7e926c83ad45cc99b
2021-06-28 02:31:49 +03:00
fanquake
086bb0bae8 Merge #16408: depends: Prune X packages
0c55d8b58186ba69fffc147cd02b174450dac578 depends: qt: Patch to remove dep on libX11 (Carl Dong)
222e6cc52075cf6f866ce4a2e5900f0d6358f903 gitignore: Actually pay attention to depends patches (Carl Dong)
65f8da08df601ac98bad6f638392343fd564c0b9 symbol-check: Disallow libX11-*.so.* shared libraries (Carl Dong)
924569914e6079763fd1692bed372ded2c63d685 depends: libXext isn't needed by anyone (Carl Dong)
689d3b4a030675b6de87a55463a8e155843293fb build-aux: Remove check for x11-xcb (Carl Dong)
aa53cb7a2f04a59a4722c662e67b7a6ec04e32b5 depends: libX11: Make package headers-only (Carl Dong)
9a01ab04e1125b37618266d7fd1c3a6e3bb7e3f8 depends: qt: Explicitly stop using Xlib/libX11 (Carl Dong)
1ec30b8fbe4a162d6e2e6a9711d83f1bafd9b645 depends: xproto is only directly needed by libXau (Carl Dong)

Pull request description:

  Related to: #16150

  We noticed that we could build QT without using XLib/libX11 as a library. XLib/libX11's headers are still used, and a minimal `configure.ac` has been added to eliminate overly-enthusiastic configure-time dependencies that aren't actually required to obtain the headers.

  This also means that we eliminate XLib/libX11 as required shared libraries at runtime, which is desirable.

  See commit messages for more details.

  ---

  Reviewers: I am least sure about the minimal `configure.ac`, as I'm not too familiar with the autoconf syntax. Any improvements w/re robustness would be welcome.

ACKs for top commit:
  theuni:
    ACK 0c55d8b58186ba69fffc147cd02b174450dac578
  fanquake:
    ACK 0c55d8b58186ba69fffc147cd02b174450dac578

Tree-SHA512: 41f653a0f91bc0e0faac49713c0c6dfd8cb605f9c4e34eb75a790dd808ebf3e5c160f1dd40bc8fbc911ee718ea319313b526d63733c98ff62d8dffecb58caa01
2021-02-18 16:24:11 +01:00
PastaPastaPasta
1c8f475a7f
Merge pull request #3882 from PastaPastaPasta/backports-0.17-pr25
Backports 0.17 pr25
2020-12-19 00:35:31 -06:00
Wladimir J. van der Laan
be4345ce12
Merge #13510: Scripts and tools: Obsolete #!/bin/bash shebang
000000035b20402dea3e8168165cd4eefdc97539 Obsolete #!/bin/bash shebang (DesWurstes)

Pull request description:

  > `#!/bin/bash` assumes it is always installed to `/bin/` which can cause issues
  > `#!/usr/bin/env bash` searches the user's `PATH` to find the `bash` binary

  Details: https://github.com/dylanaraps/pure-bash-bible#obsolete-syntax

  I'm open to comments: Should I also fix `#!/bin/sh`?

Tree-SHA512: b47bb4828116aa119f1899c68fee081270d51a898535490b9c616bf0f3660ad953f29c361eafc759bc64cdd54ee6eeecb2d79e9fdb5291a996a515c719805476
2020-12-18 12:55:45 -06:00
Wladimir J. van der Laan
2aee09c5ab
Merge #11881: Remove Python2 support
1874058 Make base58 python contrib code work with python3 (Evan Klitzke)
bc6fdf2 Change all python files to use Python3 (John Newbery)

Pull request description:

  Following discussion here: https://github.com/bitcoin/bitcoin/pull/11843#issuecomment-351033742

  It's easier for maintainers if all python tools/scripts support only a single version of Python. There are only a few scripts that aren't explicitly python3 at this point, so this PR changes those remaining scripts to explicitly require python3.

Tree-SHA512: 5d38eef6e0fc7d8515e23a1f4c75e8b4160fd0fe23cba52a1f41689b114e54a9e503e0724829e8b41982ef98f2d113df80d9e238213b74f09ceaed0344a19e24
2020-12-15 22:16:02 -06:00
MarcoFalke
7de10e4737
Merge #12284: Remove assigned but never used local variables. Enable Travis checking for unused local variables.
ea04bf7862 Enable flake8 warning F841 ("local variable 'foo' is assigned to but never used") (practicalswift)
169f3e8637 Remove assigned but never used local variables (practicalswift)

Pull request description:

  Remove assigned but never used local variables. Enable Travis checking for unused local variables.

Tree-SHA512: d6052ec9044c5d1f03d874ea3c8addd5a156779213ef9200f89d3ae53230f2fd1691aff405c3dae14178e5ef09912c4432e92f606ef4a5220ed9daa140cdee81
2020-10-26 20:35:28 -04:00
UdjinM6
6029f290b8 Add missing encoding="utf8" 2020-07-29 11:04:42 -05:00
Wladimir J. van der Laan
7be2b2456a Merge #13281: test: Move linters to test/lint, add readme
fa3c910bfeab00703c947c5200a64c21225b50ef test: Move linters to test/lint, add readme (MarcoFalke)

Pull request description:

  This moves the checks and linters from `devtools` to a subfolder in `test`. (Motivated by my opinion that the dev tools are mostly for generating code and updating the repo whereas the linters are read-only checks.)

  Also, adds a readme to clarify that checks and linters are only meant to prevent bugs and user facing issues, not merely stylistic preference or inconsistencies. (This is motivated by the diversity in developers and work flows as well as existing code styles. It would be too disruptive to change all existing code to a single style or too burdensome to force all developers to adhere to a single style. Also note that our style guide is changing, so locking in at the wrong style "too early" would only waste resources.)

Tree-SHA512: 9b10e89f2aeaf0c8a9ae248aa891d74e0abf0569f8e5dfd266446efa8bfaf19f0ea0980abf0b0b22f0d8416ee90d7435d21a9f9285b66df43f370b7979173406
2020-07-29 10:59:04 -05:00
MarcoFalke
79999469e4 Merge #13214: Enable Travis checking for two Python linting rules we are currently not violating
506c5785fb Enable Travis checking for two Python linting rules we are currently not violating (practicalswift)

Pull request description:

  Enable Travis checking for two Python linting rules we are currently not violating:
  * E101: indentation contains mixed spaces and tabs
  * E129: visually indented line with same indent as next logical line

Tree-SHA512: 955ea5ce4576a5bdd561f9d2bbcfaa82f66a23391c84ddb806830ed15e321e4742457ccc801f457819f626d4a66a1ffcaecee28c3b9f3f907ab8401323743485
2020-07-29 10:57:27 -05:00
MarcoFalke
18eebe5251 Merge #13210: Enable W191 indentation contains tabs and W291 trailing whitespace flake8 checks for Python files
0d31ef4762 Enable W191 and W291 flake8 checks. Remove trailing whitespace from Python files. Convert tabs to spaces. (John Bampton)

Pull request description:

Tree-SHA512: d062434310d6232469d7ca8e5f2ddb7db7e85cb2a299e609d98bacc318368e43e0777c9f4966df03d50f526bbe27207faa87a7464e62e14671194459a06ad969
2020-07-29 10:57:08 -05:00
UdjinM6
d514668f5e More of 13153 ("Continued") 2020-07-29 10:56:10 -05:00
Wladimir J. van der Laan
2af1c8d6e7 Merge #13153: Add missing newlines to debug logging
4b75dcf devtools: Make linter check LogPrint calls (MarcoFalke)
ff2ad2d Add missing newlines to LogPrint debug logging (Wladimir J. van der Laan)

Pull request description:

  ~~Don't we have a linter that should catch these?~~

Tree-SHA512: 1a58eca01ded9c1719e943c09447deeb59bb06dba00528cf460eefe857fdf95b42671fbdebc87cdd2f51e931e86942d06587ffd097cbb0d8dd9eb7a0ba17a8f0
2020-07-29 10:55:33 -05:00
MarcoFalke
a859ea12a9 Merge #13851: fix locale for lint-shell
83c48d9a1f fix locale for lint-shell (Julian Fleischer)

Pull request description:

  A piece of code from https://github.com/bitcoin/bitcoin/pull/13816 which I am hereby splitting into smaller PRs.

  The `shellcheck` executable shipped with travis's trusty linux environment (contains shellcheck `0.3.1` in `/usr/local/bin` as opposed to the distros `0.3.3` in `/usr/bin`) segfaults when `LC_ALL=C`.

  This makes sure that in travis, no matter from where the script is called, `LC_ALL` is left unset. Comment changed accordingly.

Tree-SHA512: 86afa9247f2adbeefa75bf3d56a94766f8e8e1839f40b73763ff7b893a09c848ee64648fc06ce3e6bd0f650127365f508b37fdefb48d61e49f5d551c074cb16e
2020-07-28 21:35:31 -05:00
Wladimir J. van der Laan
cb5d0d8b99 Merge #13454: Make sure LC_ALL=C is set in all shell scripts
47776a958b08382d76d69b5df7beed807af168b3 Add linter: Make sure all shell scripts opt out of locale dependence using "export LC_ALL=C" (practicalswift)
3352da8da1243c03fc83ba678d2f5d193bd5a0c2 Add "export LC_ALL=C" to all shell scripts (practicalswift)

Pull request description:

  ~~Make sure `LC_ALL=C` is set when using `grep` range expressions.~~

  Make sure `LC_ALL=C` is set in all shell scripts.

  From the `grep(1)` documentation:

  > Within a bracket expression, a range expression consists of two characters separated by a hyphen. It matches any single character that sorts between the two characters, inclusive, using the locale's collating sequence and character set. For example, in the default C locale, `[a-d]` is equivalent to `[abcd]`. Many  locales sort characters in dictionary order, and in these locales `[a-d]` is typically not equivalent to `[abcd]`; it might be equivalent to `[aBbCcDd]`, for example. To obtain the traditional interpretation of bracket expressions, you can use the C locale by setting the `LC_ALL` environment variable to the value C.

  Context: [Locale issue found when reviewing #13450](https://github.com/bitcoin/bitcoin/pull/13450/files#r194877736)

Tree-SHA512: fd74d2612998f9b49ef9be24410e505d8c842716f84d085157fc7f9799d40e8a7b4969de783afcf99b7fae4f91bbb4559651f7dd6578a6a081a50bdea29f0909
2020-07-28 21:35:31 -05:00
MarcoFalke
4a5dd0d80f Merge #12871: Add shell script linting: Check for shellcheck warnings in shell scripts
1499fdc350 Add shell script linting: Check for shellcheck warnings in shell scripts (practicalswift)

Pull request description:

  Add shell script linting: Check for `shellcheck` warnings in shell scripts.

Tree-SHA512: c7f3f5ed9933415666d2a02f5658cdc62b959ce8112f46b6327ff5f77bb5a66710704c0cde5fd8e719d1fa1fc4f0375a0c115faced166b78e81b75dfb862f08e
Signed-off-by: pasta <pasta@dashboost.org>
2020-07-28 21:35:31 -05:00
Wladimir J. van der Laan
f0b1c562a1 Merge #13764: contrib: Fix test-security-check fail in Ubuntu 18.04
1e60713a68296a0ff221befb48b2958fbf019ebf contrib: Fix test-security-check fail in Ubuntu 18.04 (Chun Kuan Lee)

Pull request description:

  - Fix test-security-check fail in Ubuntu 18.04. Those flags are enabled by default, so we must specify `-no` to make the executable does 'not' have those attributes.
  - Drop HIGH_ENTROPY_VA. After update our gitian system to Bionic, the compiler should support HIGH_ENTROPY_VA

Tree-SHA512: 78c1f2aae1253ddd52faa1af569b7151a503a217c7ccbe21b8004d8910c45d8a27ff04695eacbdadd7192d2c91c0d59941ca20c651dd2d5052b9999163a11ae4
2020-07-28 21:35:31 -05:00
MarcoFalke
fea0036e9f Merge #13726: Utils and libraries: Removes the boost/algorithm/string/join dependency
5f019d5354 Removes the boost/algorithm/string/join dependency (251)

Pull request description:

  This commit removes the `boost/algorithm/string/join` dependency from the project by replacing `boost::algorithm::join` with the helper function proposed by @MarcoFalke in https://github.com/bitcoin/bitcoin/pull/13726#discussion_r204159967

Tree-SHA512: d4ba3e7621b76bd5210aec9b8d6c320f7ee963d7f902e6d2d3fc0eadbee1cd77799e5c09be9c11452d2825f25740fc436cdec3a6b6c66ced674d771e4ed306ae
Signed-off-by: pasta <pasta@dashboost.org>

# Conflicts:
#	contrib/devtools/lint-includes.sh
#	src/validation.cpp
2020-07-26 19:39:13 -05:00
Wladimir J. van der Laan
c72e09442b Merge #13647: Scripts and tools: Fix BIND_NOW check in security-check.py
37d363dd4acf7d41196d44b295593019add241c3 Tools: fix BIND_NOW check in security-check.py (Conrado Gouvea)

Pull request description:

  Previously, the BIND_NOW check would work only if it was the first value in FLAGS.

Tree-SHA512: 39cd83f673a6b521803be5585ada516f2db4eede718f0c5aea3377825ed1adcefed5bbb41dd9a5f24a26f7d27116cfc81bde7e26283232593b72768c5ae3d321
2020-07-26 19:39:13 -05:00
UdjinM6
fd63b936d0
Merge pull request #3622 from PastaPastaPasta/backport-rpcauth
Backport rpcauth
2020-07-26 14:21:10 +03:00
pasta
78e2a0082e
add new-line to lint-python.sh
Signed-off-by: pasta <pasta@dashboost.org>
2020-07-22 12:17:47 -05:00
MarcoFalke
17acd6b472
Merge #12987: tests/tools: Enable additional Python flake8 rules for automatic linting via Travis
643aad17fa Enable additional flake8 rules (practicalswift)
f020aca297 Minor Python cleanups to make flake8 pass with the new rules enabled (practicalswift)

Pull request description:

  Enabled rules:

  ```
  * E242: tab after ','
  * E266: too many leading '#' for block comment
  * E401: multiple imports on one line
  * E402: module level import not at top of file
  * E701: multiple statements on one line (colon)
  * E901: SyntaxError: invalid syntax
  * E902: TokenError: EOF in multi-line string
  * F821: undefined name 'Foo'
  * W293: blank line contains whitespace
  * W606: 'async' and 'await' are reserved keywords starting with Python 3.7
  ```

  Note to reviewers:
  * In general we don't allow whitespace cleanups to existing code, but in order to allow for enabling Travis checking for these rules a few smaller whitespace cleanups had to made as part of this PR.
  * Use [this `?w=1` link](https://github.com/bitcoin/bitcoin/pull/12987/files?w=1) to show a diff without whitespace changes.

  Before this commit:

  ```
  $ flake8 -qq --statistics --ignore=B,C,E,F,I,N,W --select=E112,E113,E115,E116,E125,E131,E133,E223,E224,E242,E266,E271,E272,E273,E274,E275,E304,E306,E401,E402,E502,E701,E702,E703,E714,E721,E741,E742,E743,F401,E901,E902,F402,F404,F406,F407,F601,F602,F621,F622,F631,F701,F702,F703,F704,F705,F706,F707,F811,F812,F821,F822,F823,F831,F841,W292,W293,W504,W601,W602,W603,W604,W605,W606 .
  5     E266 too many leading '#' for block comment
  4     E401 multiple imports on one line
  6     E402 module level import not at top of file
  5     E701 multiple statements on one line (colon)
  1     F812 list comprehension redefines 'n' from line 159
  4     F821 undefined name 'ConnectionRefusedError'
  28    W293 blank line contains whitespace
  ```

  After this commit:

  ```
  $ flake8 -qq --statistics --ignore=B,C,E,F,I,N,W --select=E112,E113,E115,E116,E125,E131,E133,E223,E224,E242,E266,E271,E272,E273,E274,E275,E304,E306,E401,E402,E502,E701,E702,E703,E714,E721,E741,E742,E743,F401,E901,E902,F402,F404,F406,F407,F601,F602,F621,F622,F631,F701,F702,F703,F704,F705,F706,F707,F811,F812,F821,F822,F823,F831,F841,W292,W293,W504,W601,W602,W603,W604,W605,W606 .
  $
  ```

Tree-SHA512: fc7d5e752298a50d4248afc620ee2c173135b4ca008e48e02913ac968e5a24a5fd5396926047ec62f1d580d537434ccae01f249bb2f3338fa59dc630bf97ca7a
Signed-off-by: pasta <pasta@dashboost.org>
2020-07-22 12:12:46 -05:00
Wladimir J. van der Laan
6cd3050c7f
Merge #13340: doc: remove leftover check-doc documentation
93843f68918f234929cfddc62b507041ce06805e doc: remove leftover check-doc documentation (fanquake)

Pull request description:

  Remove leftover check-doc.py documentation. Mentioned [here](https://github.com/bitcoin/bitcoin/pull/13281#issuecomment-392010168), it's now [here](https://github.com/bitcoin/bitcoin/tree/master/test/lint#check-docpy).

Tree-SHA512: 95a0ac221ffae109c1d4baf18a9220cf993fc07c005920a0bd09abdf52e8fb298e3b5df31fa18887719c5080d8531d18b84b7bd9c7c664ee2501ccd9e0975eb6
2020-07-21 11:54:50 -05:00
MarcoFalke
7b091fb99f
Merge #12933: doc: Refine header include policy
fad0fc3c9a Refine travis check for duplicate includes (MarcoFalke)

Pull request description:

  Since there is no harm in having "duplicate" includes and it makes it obvious what are the dependencies of each file, without having to do static analysis or jumping between files, I'd suggest to revert the travis check for duplicate includes.

  Generally, I think that enforcing minor style preferences should not be done via travis. The cost of maintaining and the burden on other developers is too high. C.f discussion in https://github.com/bitcoin/bitcoin/pull/10973#discussion_r180142594

Tree-SHA512: 97ab0e769d457ccfb873fff6c99613f8b944cd7ef95bfdccb0e1bbe8f5df1f16548c658fa03af42516f806546e75646d338a061e7b057619490235d311ca21f1
2020-07-21 11:54:50 -05:00
UdjinM6
6e592cc691
Merge pull request #3618 from PastaPastaPasta/backports-0.17-pr16
Backports 0.17 pr16
2020-07-20 18:03:11 +03:00
pasta
a6cdb75b18 fix compilation in headers that contain 'dashes' and adjust linter
Signed-off-by: pasta <pasta@dashboost.org>
2020-07-19 00:42:54 -05:00
MarcoFalke
db747ea384 Merge #12757: Clarify include guard naming convention
3bcc0059b8 Add lint-include-guards.sh which checks include guard consistency (practicalswift)
8fd6af89a0 Fix missing or inconsistent include guards (practicalswift)
8af65d96f4 Document include guard convention (practicalswift)

Pull request description:

  * **Documentation**: Document include guard convention
  * **Fix**: Fix missing or inconsistent include guards
  * **Regression test**: Add `lint-include-guards.sh` which checks include guard consistency

Tree-SHA512: 8171878f60fd08ccbea943a11e835195750592abb9d7ab74eaa4265ae7fac523b1da9d31ca13d6ab73dd596e49986bfb7593c696e5f39567c93e610165bc2acc
Signed-off-by: pasta <pasta@dashboost.org>

# Conflicts:
#	src/bech32.h
#	src/consensus/merkle.h
#	src/key_io.h
#	src/policy/fees.h
#	src/rpc/server.h
#	src/script/bitcoinconsensus.h
#	src/wallet/coinselection.h
2020-07-19 00:42:54 -05:00
MarcoFalke
5103888706 Merge #13228: Add script to detect circular dependencies between source modules
a7b295e91e Add circular dependencies script (Pieter Wuille)

Pull request description:

  This script finds dependencies between source code modules, treating the `.cpp` and `.h` file as one unit (so it will detect `A.cpp` depending on `B.h` where `B.cpp` depends on `A.h`). This can be used to find out which modules cannot be used independently from each other.

  It is very simplistic at this point, and assumes that a `.cpp` file's corresponding header has the exact same name, with `.cpp` replaced by `.h`. Furthermore, it assumes all `#include`s are relative to the `src/` directory.

  This is not a linter, and is not enforced through Travis or otherwise.

  This is the current output:

  ```
  $ ../contrib/devtools/circular-dependencies.py {*,*/*,*/*/*}.{h,cpp}
  Circular dependency: chain -> pow -> chain
  Circular dependency: chainparamsbase -> util -> chainparamsbase
  Circular dependency: checkpoints -> validation -> checkpoints
  Circular dependency: init -> index/txindex -> init
  Circular dependency: init -> validation -> init
  Circular dependency: init -> net_processing -> init
  Circular dependency: init -> rpc/server -> init
  Circular dependency: init -> txdb -> init
  Circular dependency: init -> validationinterface -> init
  Circular dependency: random -> util -> random
  Circular dependency: sync -> util -> sync
  Circular dependency: txmempool -> validation -> txmempool
  Circular dependency: txmempool -> policy/fees -> txmempool
  Circular dependency: validation -> index/txindex -> validation
  Circular dependency: validation -> policy/policy -> validation
  Circular dependency: validation -> validationinterface -> validation
  Circular dependency: qt/addresstablemodel -> qt/walletmodel -> qt/addresstablemodel
  Circular dependency: qt/bantablemodel -> qt/clientmodel -> qt/bantablemodel
  Circular dependency: qt/bitcoingui -> qt/walletview -> qt/bitcoingui
  Circular dependency: qt/bitcoingui -> qt/walletframe -> qt/bitcoingui
  Circular dependency: qt/bitcoingui -> qt/utilitydialog -> qt/bitcoingui
  Circular dependency: qt/clientmodel -> qt/peertablemodel -> qt/clientmodel
  Circular dependency: qt/paymentserver -> qt/walletmodel -> qt/paymentserver
  Circular dependency: qt/recentrequeststablemodel -> qt/walletmodel -> qt/recentrequeststablemodel
  Circular dependency: qt/sendcoinsdialog -> qt/walletmodel -> qt/sendcoinsdialog
  Circular dependency: qt/transactiontablemodel -> qt/walletmodel -> qt/transactiontablemodel
  Circular dependency: qt/walletmodel -> qt/walletmodeltransaction -> qt/walletmodel
  Circular dependency: rpc/rawtransaction -> wallet/rpcwallet -> rpc/rawtransaction
  Circular dependency: wallet/coincontrol -> wallet/wallet -> wallet/coincontrol
  Circular dependency: wallet/fees -> wallet/wallet -> wallet/fees
  Circular dependency: wallet/rpcwallet -> wallet/wallet -> wallet/rpcwallet
  Circular dependency: wallet/walletdb -> wallet/wallet -> wallet/walletdb
  Circular dependency: txmempool -> validation -> policy/rbf -> txmempool
  Circular dependency: txmempool -> validation -> validationinterface -> txmempool
  Circular dependency: qt/addressbookpage -> qt/bitcoingui -> qt/walletview -> qt/addressbookpage
  Circular dependency: qt/guiutil -> qt/walletmodel -> qt/optionsmodel -> qt/guiutil
  Circular dependency: qt/addressbookpage -> qt/bitcoingui -> qt/walletview -> qt/signverifymessagedialog -> qt/addressbookpage
  Circular dependency: qt/addressbookpage -> qt/bitcoingui -> qt/walletview -> qt/receivecoinsdialog -> qt/addressbookpage
  Circular dependency: qt/guiutil -> qt/walletmodel -> qt/optionsmodel -> qt/intro -> qt/guiutil
  Circular dependency: qt/addressbookpage -> qt/bitcoingui -> qt/walletview -> qt/sendcoinsdialog -> qt/sendcoinsentry -> qt/addressbookpage
  ```

Tree-SHA512: 29bc985b7a41699f4666b0aaa785ca63c2145e84c37458536f4dcf8e3de8f1312cf0323fe09cb8f348a9d363583f76eac2d5bee574bc6a9f9cc97a9b0aad406f
2020-07-18 03:08:13 -05:00
MarcoFalke
d26bcfa183
Merge #12820: contrib: Fix check-doc script regexes
0c17e27630 init: Remove help text for non-existent -fuzzmessagestest arg (MarcoFalke)
136084470c contrib: Fix check-doc script regexes (MarcoFalke)

Pull request description:

  Fixup the regexes to properly find all used args. The regex should now match all of the getter and setter methods of the `ArgsManager`. See https://dev.visucore.com/bitcoin/doxygen/class_args_manager.html#pub-methods

  Before:
  ```
  Args used        : 159
  Args documented  : 188
  Args undocumented: 0
  Args unknown     : 29
  ```

  After:
  ```
  Args used        : 183
  Args documented  : 188
  Args undocumented: 0
  Args unknown     : 5
  ```

Tree-SHA512: 1a7fb7ea55b2f6030358a1055d8f2c19b31f69d0603be0b009e6e603564014b4e2bb824357c9d43d0fba3ce7159b7c4e7eaa60b3f962053d94f73d0e626294fc
2020-07-17 15:42:51 -05:00
MarcoFalke
2829b4d3b9
Merge #13656: Remove the boost/algorithm/string/predicate.hpp dependency
e3245f2e7b Removes Boost predicate.hpp dependency (251)

Pull request description:

  This pull request removes the `boost/algorithm/string/predicate.hpp` dependency from the project.

  To replace the the `predicate.hpp` dependency from the project the function calls to `boost::algorithm::starts_with` and `boost::algorithm::ends_with` have been replaced with respectively C++11's `std::basic_string::front` and `std::basic_string::back` function calls.

  Refactors that were not required, but have been done anyways:

  - The Boost function `all` was implicitly made available via the `predicate.hpp` header. Instead of including the appropriate header, function calls to `all` have been replaced with function calls to `std::all_of`.

  - The  `boost::algorithm::is_digit` predicate has been replaced with a custom `IsDigit` function that is locale independent and ASCII deterministic.

Tree-SHA512: 22dda6adfb4d7ac0cabac8cc33e8fb8330c899805acc1ae4ede402c4b11ea75a399414b389dfaa3650d23b47f41351b4650077af9005d598fbe48d5277bdc320
2020-07-17 15:42:20 -05:00
Wladimir J. van der Laan
d1200755f1 Merge #13448: Add linter: Make sure we explicitly open all text files using UTF-8 encoding in Python
c8176b3cc7556d7bcec39a55ae4d6ba16453baaa Add linter: Make sure we explicitly open all text files using UTF-8 or ASCII encoding in Python (practicalswift)
634bd970013eca90f4b4c1f9044eec8c97ba62c2 Explicitly specify encoding when opening text files in Python code (practicalswift)

Pull request description:

  Add linter: Make sure we explicitly open all text files using UTF-8 encoding in Python.

  As requested by @laanwj in #13440.

Tree-SHA512: 1651c00fe220ceb273324abd6703aee504029b96c7ef0e3029145901762c733c9b9d24927da281394fd4681a5bff774336c04eed01fafea997bb32192c334c06
Signed-off-by: pasta <pasta@dashboost.org>

# Conflicts:
#	contrib/devtools/circular-dependencies.py
#	contrib/linearize/linearize-data.py
#	contrib/linearize/linearize-hashes.py
#	contrib/seeds/generate-seeds.py
#	contrib/verify-commits/verify-commits.py
#	test/functional/multiwallet.py
#	test/functional/notifications.py
#	test/functional/test_runner.py
#	test/util/rpcauth-test.py
2020-07-07 11:50:56 -05:00
Wladimir J. van der Laan
6e5b3f3b9e Merge #13230: Simplify include analysis by enforcing the developer guide's include syntax
16e3cd380af570fb2f656e0344bab88829a4bcda Clarify include recommendation (practicalswift)
6d10f43738d58bf623975e3124fd5735aac7d3e1 Enforce the use of bracket syntax includes ("#include <foo.h>") (practicalswift)
906bee8e5f474f8718d02e6f1938f20dcfe3d2cc Use bracket syntax includes ("#include <foo.h>") (practicalswift)

Pull request description:

  When analysing includes in the project it is often assumed that the preferred bracket include syntax (`#include <foo.h>`) mentioned in `developer-docs.md` is used consistently. @sipa:s excellent circular dependencies script [`circular-dependencies.py`](50c69b7801/contrib/devtools/circular-dependencies.py) (#13228) is an example of a script making this reasonable assumption.

  This PR enables automatic Travis checking of the include syntax making sure that the bracket syntax includes (`#include <foo.h>`) is used consistently.

Tree-SHA512: a414921aabe8e487ebed42f3f1cbd02fecd1add385065c1f2244cd602c31889e61fea5a801507ec501ef9bd309b05d3c999f915cec1c2b44f085bb0d2835c182
Signed-off-by: pasta <pasta@dashboost.org>
2020-07-01 20:12:03 -05:00
MarcoFalke
72b69a35a3 Merge #13301: lint: Add linter to error on #include <*.cpp>
9d6c9dbb88 lint: Add linter to error on #include <*.cpp> (Ben Woosley)

Pull request description:

  Files should depend on one another by interface, not by implementation.
  This checks for quoted includes as well.

Tree-SHA512: d36d468f48d538077f5f927b9561729fd7d76319f6b2e2cc10414a9f243588194e90ca1d85eca65019f9259268f555d25106eaaa56da28c58fa8d5837b469661
2020-07-01 20:12:03 -05:00
pasta
02085df48b Adjust current boost includes present
Signed-off-by: pasta <pasta@dashboost.org>
2020-07-01 20:12:03 -05:00
Wladimir J. van der Laan
9a9aa3f467 Merge #13385: build: Guard against accidental introduction of new Boost dependencies
81bbd32a2c755482c6e8ef049a59de672715b545 build: Guard against accidental introduction of new Boost dependencies (practicalswift)

Pull request description:

  Guard against accidental introduction of new Boost dependencies.

  Context: #13383 – the usage of `boost::lexical_cast` was introduced in #11517 from December 2017

Tree-SHA512: 8d7b667ecf7ea62d84d9d41a71726f1e46c5a411b5a7db475c973ef364cac65609399afda7931e143a27d40c2947ff286e5e98ab263e8f0d225e2ae2c0872935
2020-07-01 20:12:03 -05:00
MarcoFalke
005d241fea Merge #11878: Add Travis check for duplicate includes
c36b720d00 Add Travis check for duplicate includes (practicalswift)
280023f31d Remove duplicate includes (practicalswift)

Pull request description:

  This enforces parts of the project header include guidelines (added by @sipa in #10575).

  Example run:

  ```
  $ git diff
  diff --git a/src/warnings.cpp b/src/warnings.cpp
  index c52a1fd..d8994dd 100644
  --- a/src/warnings.cpp
  +++ b/src/warnings.cpp
  @@ -5,6 +5,8 @@

   #include <sync.h>
   #include <clientversion.h>
  +#include <string>
   #include <util.h>
   #include <warnings.h>
  +#include <util.h>

  diff --git a/src/warnings.h b/src/warnings.h
  index e8e982c..8d2252e 100644
  --- a/src/warnings.h
  +++ b/src/warnings.h
  @@ -7,6 +7,7 @@
   #define BITCOIN_WARNINGS_H

   #include <stdlib.h>
   #include <string>
  +#include <stdlib.h>

   void SetMiscWarning(const std::string& strWarning);
  $ contrib/devtools/lint-includes.sh
  Duplicate include(s) in src/warnings.h:
  #include <stdlib.h>

  Include(s) from src/warnings.h duplicated in src/warnings.cpp:
  #include <string>

  Duplicate include(s) in src/warnings.cpp:
  #include <util.h>
  $ echo $?
  1
  $ git checkout .
  $ contrib/devtools/lint-includes.sh
  $ echo $?
  0
  ```

Tree-SHA512: f653d23c58ebc024dfc5b1fb8570698fd3c515c75b60b5cabbc43595548c488fca92349fa4c8b64460edbe61c879ff1d24f37f959e18552e202a7342460ddbf1
2020-07-01 20:12:03 -05:00
Wladimir J. van der Laan
8a09758298 Merge #13094: tests: Add test for 64-bit Windows PE, modify 32-bit test results
ab3f4dd tests: Add test for 64-bit PE, modify 32-bit test results (Chun Kuan Lee)

Pull request description:

  9a75d29b6f change the error result from `PIE` to `DYNAMIC_BASE`. And there are no test for 64-bit, so I made one

Tree-SHA512: 9d5643dadf4d9fc34ea32d94655bfb98eec2f7bc2820b4b0f525d5acf1cd22f3acf38bf8904dda4f50fd9ca5a5e56d566a392e6f804eea6e50e03cba40048621
2020-06-28 19:28:57 -05:00
MarcoFalke
714beebe07 Merge #12972: Add python3 script shebang lint
2bff472992 [contrib] convert test-security-check to python3 (John Newbery)
958bf40489 add lint tool to check python3 shebang (practicalswift)

Pull request description:

  base58.py can executed by python3

Tree-SHA512: 30511204feefd4ccd5b4bf698fb88e516633e692dc95d31fe957b1c0c4879de25906355b28a5a0522171887315c8464a611e601ff00540db172d5bd463ee13d9
2020-06-27 10:43:32 -05:00
UdjinM6
908c04f1e3
Merge pull request #3531 from PastaPastaPasta/backports-0.17-pr6
Backports 0.17 pr6
2020-06-27 14:49:35 +03:00
dustinface
f6e14ab57a
qt: Generalized css files, simple design changes, added scripts to keep track of color usage (#3508)
* qt: Send tab - Generalized related CSS and some redesign

- Removed grey boxes around labels of SendCoinEntry
- Changed button styles for add/clear button
- Removed padding for send button

* qt: Overview tab - Generalized related CSS and some redesign

- Removed grey boxes around balance labels

* qt: Receive tab & QPushButton - Generalized related CSS and some redesign

- Removed grey boxes around "Label", "Amount", "Message" and "Requested
payment history" labels and increased their textsize
- Changed the color of the "Requested payment history" label
- Adjusted the style of the "Clear", "Remove" and "Show" buttons

* qt: Transaction tab - Generalized related CSS and some redesign

- Increased size of selected sum labels

* qt: Masternode tab - Generalized related CSS and some redesign

- Increased the size of the "Filter list" and "Node count" labels

* qt: CoinControl dialog - Generalized related CSS and some redesign

- Removed alternated coloring

* qt: Sync overlay - Generalized related CSS and some redesign

- Adjusted colors
- Added rounded border

* qt: About dialog - Generalized related CSS

* qt: Edit address dialog - Generalized related CSS

* qt: Help message dialog - Generalized related CSS

* qt: RPC console  - Generalized related CSS and some redesign

- Changed colors for network activity legend (signal colors TBD in a
code change commit)

* qt: Options dialog - Generalized related CSS

* qt: Ask passphrase dialog - Generalized related CSS

* qt: Addressbook page - Generalized related CSS

* qt: Sign/Verify dialog - Generalized related CSS

* qt: Open URI dialog - Generalized related CSS

* qt: Generalized remaining individual Qt classes

* qt: Fixed indentation in css files

* qt: Use newlines for multiple selector entries

* qt: Formal cleanups in all css files

* qt: Add copyright and file description to all css files

* qt: Add update_colors.py, prepare css files for scripted color updates

- update_colors.py is a python script which parses the css files and prints some
details about their color usage into appropriate files in the css/colors directory. It also
updates the <colors></colors> section for each css file.
- Added <colors></colors> section to css files for automated color updates by update_colors.py

* qt/contrib: Moved update_colors.py to update-css-files.py 

This also moves the file from src/qt/res/css to contrib/devtools

* build: Remove files in src/qt/res/css/colors when running "make clean"

* git: Add src/qt/res/css/colors/* to gitignore and remove the files from the repo

* path -> css_folder_path

* Resolve path and fail early

* Create 'colors/' if it doesn't exist and fail if smth went wrong

* Run git after all filesystem preparations are done

* qt: Fix background-color of bgWidget in trad.css

Its #AARRGGBB not #RRGGBBAA!

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* qt: Run update_colors.py

* contrib: Use case insensitive regex for color matching

* qt: Update colors in css files

* contrib: Remove obsolete import in update-css-files.py

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-06-26 20:48:20 +03:00
MarcoFalke
9475fe553d
Merge #12572: [script] lint-whitespace: find errors more easily
0fbed98e42 [script] lint-whitespace: improve print linenumber (Akio Nakamura)

Pull request description:

  Before this PR, the linenumber infomaition is output if trailing-space or tab code was found, but the output occurence is only per a file.
  This PR separates the output timing of file name and line number.
  As a result, users will find where they need to fix more easily.

  example:

  0) git diff
  ```
  diff --git a/dummy.txt b/dummy.txt
  index c0ce4d776..aebbdb88d 100644
  --- a/dummy.txt
  +++ b/dummy.txt
  @@ -1,2 +1,2 @@
  -1
  -2
  +1
  +       2
  @@ -8,2 +8,2 @@
  -8
  -9
  +       8
  +9
  ```

  1) before this PR - Is there "9 " in second line? It may lead to be misunderstood.
  ```
  This diff appears to have added new lines with trailing whitespace.
  The following changes were suspected:

  diff --git a/dummy.txt b/dummy.txt
  @@ -1,2 +1,2 @@
  +1
  +9
  ```

  2) after this PR
  ```
  This diff appears to have added new lines with trailing whitespace.
  The following changes were suspected:

  diff --git a/dummy.txt b/dummy.txt
  @@ -1,2 +1,2 @@
  +1
  @@ -8,2 +8,2 @@
  +9
  ```

Tree-SHA512: 2fd52e3c982786f86cfe10aa2578589bc9c502bcad9b85111467840d726143330c23968cde5483ee0f563893c8381044b80e8c22a7c8eca56fc73c548b9a9496
2020-06-18 11:41:53 -05:00
Wladimir J. van der Laan
e9b42fd5c3
Merge #12098: [scripts] lint-whitespace: add param to check last N commits
8dbf740f8 [scripts] lint-whitespace: check last N commits or unstaged changes (Sjors Provoost)

Pull request description:

  E.g. before you push three commits to Github and upset Travis, check if you didn't make any whitespace mistakes:
  ```sh
  contrib/devtools/lint-whitespace.sh 3
  ```

  This is slightly more convenient than doing:
  ```sh
  TRAVIS_COMMIT_RANGE=HEAD~3...HEAD contrib/devtools/lint-whitespace.sh
  ```

Tree-SHA512: 5d9c1ae978ccbe59477e8cf53391e9bd697d2da87f417a2519264af560d4768138e0b2d320dd497a1f1e704e18ab279d724f523b57c17a80ccd753133a5445bf
2020-06-18 11:41:53 -05:00
Wladimir J. van der Laan
a88ad9384f
Merge #12097: [scripts] lint-whitespace: use perl instead of grep -P
40b17f5f9 [scripts] lint-whitespace: use perl instead of grep -P (Sjors Provoost)

Pull request description:

  MacOS does not support `grep -P` out of the box. This change makes
  it easier for developers to check for whitespace problems locally.

  Based on [this](https://stackoverflow.com/a/16658690) and [this](https://serverfault.com/a/504387) Stack Exchange answer.

  Tested with:
  ```sh
  export TRAVIS_COMMIT_RANGE='fe78c9a...62e0453'
  contrib/devtools/lint-whitespace.sh
  This diff appears to have added new lines with tab characters instead of spaces.
  The following changes were suspected:

  diff --git a/src/test/bignum_tests.cpp b/src/test/bignum_tests.cpp
  @@ -0,0 +1,110 @@
  +	num.setint64(n);
  ```

Tree-SHA512: 37c342a0ca2580289cf326a278a051a7c21ba918d6b2143fd9987f159fab85f1de3d770fcf532a642cd5d1957afc8595678128196e102dc473924758f133db7f
2020-06-18 11:41:53 -05:00
MarcoFalke
1cf2fff1c4 Merge #12308: contrib: Add support for out-of-tree builds in gen-manpages.sh
526e28220a contrib: Add support for out-of-tree builds in gen-manpages.sh (Wladimir J. van der Laan)

Pull request description:

  This adds support for setting the environment variable `BUILDDIR` to point to executables that are outside the source directory.

  E.g. to invoke the tool when the build is in $PWD/build:

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

  This avoids having to manually copy the generated manpages after they end up in the build instead of source path, when setting TOPDIR instead.

Tree-SHA512: 8dc6dd7a47a0c014ae7d27f0ac9d86f69238ec6bac8a3007b975bb88c9f37014755c716c5e62604dd91baad2f8a41fd1544cdca3ba4b59bc76602e6593f4a4a7
2020-06-17 14:29:55 -05:00
MarcoFalke
10a27192b1 Merge #12442: devtools: Exclude patches from lint-whitespace
fafbf7f74e devtools: Exclude patches from lint-whitespace (MarcoFalke)

Pull request description:

  By default, unified patches have trailing whitespace in all context lines. Thus, exclude patches from linting.

Tree-SHA512: 8f89f1584581e94dd4e34bd522cba21602bafe7933b4631a3abc5da5a8f25568810862d696618fe63c15edf3e046869ad5077d09373f09792985503c6a415538
2020-06-17 14:29:55 -05:00
Pasta
b40dc8f1ec fix lint-python.sh after 11835 and 12295
Signed-off-by: Pasta <pasta@dashboost.org>
2020-06-17 14:29:55 -05:00
MarcoFalke
89cf527e57 Merge #12295: Enable flake8 warnings for all currently non-violated rules
a9d0ebc262 Enable flake8 warnings for all currently non-violated rules (practicalswift)
4cbab15e75 tests: Fix accidental redefinition of previously defined variable via list comprehension (practicalswift)
0b9207efbe Enable flake8 warning for "list comprehension redefines 'foo' from line N" (F812) (practicalswift)

Pull request description:

  * Enable `flake8` warnings for all currently non-violated rules
  * Fix accidental redefinition via list comprehension

Tree-SHA512: 738b87789e99d02abb2c6b8ff58f65c0cbfeb93e3bf320763e033e510ebd0a4f72861bc8faaf42c14a056a5d4659c33dc70a63730a32cc15159559427bf21193
2020-06-17 14:29:55 -05:00