Commit Graph

20944 Commits

Author SHA1 Message Date
MarcoFalke
652a36b0f2 Merge #15943: tests: Fail if RPC has been added without tests
fad0ce59e9 tests: Fail if RPC has been added without tests (MarcoFalke)

Pull request description:

  Need to be run with --coverage

ACKs for commit fad0ce:
  ryanofsky:
    utACK fad0ce59e9154f9b7e61907a71c740a942c60282. New comment in travis.yml is the only change since last review.

Tree-SHA512: b53632dfe9865ec06991bfcba2fd67238bebbb866b355f09624eaf233257b2bca902caac6c24abb358b2f4c1c43f28ca75e30982765911e1a117102df65276d9
2021-10-12 15:56:33 -07:00
MarcoFalke
fec569b9ef Merge #14984: rpc: Speedup getrawmempool when verbose=true
2d5cf4c41d rpc: Speedup getrawmempool when verbose=true (João Barbosa)

Pull request description:

  Instead of calling `pushKV(hash, info)`, which incurs in duplicate key checks, call `__pushKV` which (currently) doesn't.

  Improves RPC `getrawmempool` and REST `/rest/mempool/contents.json`.

  Fixes #14765.

ACKs for commit 2d5cf4:

Tree-SHA512: c3e91371bb41f39e79dcef820815e1dc27fb689ca3c4bf3a00467d2215b3baecd44d9792f7a481577a5b7ae1fc6cbaa07b1cd62123b845082eba65b35c2b3ca5
2021-10-12 15:56:33 -07:00
MarcoFalke
0d58cdabb7 Merge #15841: [test] combine_logs: append node stderr and stdout if it exists
fa90a89eee [test] combine_logs: append node stderr and stdout if it exists (MarcoFalke)

Pull request description:

  See issue:

  * tests: bitcoind stdout and error should be passed to the logger #13519

ACKs for commit fa90a8:
  laanwj:
    utACK fa90a89eeefcc362970216d95973ad01a21366ed

Tree-SHA512: 39c4596e2e133c9011ab01bc4dc24e884d0a8cce7a67d3765f17c288d3ffbd438e1ff6016d0f817a981b27fce17fa77a1ff56787ddb1ea55123ce9ecffb44c08
2021-10-12 15:56:33 -07:00
MarcoFalke
772dad995c Merge #14683: tests: better combine_logs.py behavior
4aabadbf44 tests: have combine_logs default to most recent test dir (James O'Beirne)

Pull request description:

  Have `combine_logs.py` default to the most recent test directory if no argument is provided. This allows you to avoid an annoying copy-paste when iterating on a failing test, since you can do something like
  ```sh
  alias testlogs='./test/functional/combine_logs.py -c | less'

  ./test/functional/some_test.py  # fails
  testlogs
  ```

Tree-SHA512: 919642ab09c314888a23c9491963b35b9da87e60deb740d1d5e816444aa9bdda5e519dc8ca131669f2d563167ef5f5abb14e22f20f47bf8362915ed578181846
2021-10-12 15:56:33 -07:00
Kittywhiskers Van Gogh
ee705af2cd merge bitcoin#14906: Make explicit CMutableTransaction -> CTransaction conversion 2021-10-12 08:58:08 +05:30
Kittywhiskers Van Gogh
b50aab204d merge bitcoin#14908: Removed implicit CTransaction constructor calls from tests and benchmark 2021-10-12 08:58:08 +05:30
Kittywhiskers Van Gogh
cf59264631 merge bitcoin#13013: Move constructors out of mempool_eviction hot loop 2021-10-12 08:58:08 +05:30
PastaPastaPasta
7578684a1b
Cxx17 refac ci focal (#4509)
* ci: use ubuntu focal, bump g++ version, adjustments required for ubuntu focal

* build cross for macOS requires installing libncurses5
2021-10-12 02:57:06 +03:00
PastaPastaPasta
fb03681423
spork: make sporkDefs static constexpr, remove sporkDefsById, sporkDefsByName maps (#4510)
* spork: make sporkDefs static constexpr, remove sporkDefsById, sporkDefsByName maps

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

* fixes

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

* Revert "fixes"

This reverts commit 42f599ee

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

* access statically

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

* add [[maybe_unused]] to sporkDefs

Signed-off-by: pasta <pasta@dashboost.org>
2021-10-12 02:08:02 +03:00
Wladimir J. van der Laan
8caf2f002f Merge #14594: qt: Fix minimized window bug on Linux
a88640e123ca0c00d81719f9a009699c26e85b90 Fix minimized window bug on Linux (Hennadii Stepanov)

Pull request description:

  Fix #14591

  On some Linux systems the minimized to the taskbar (iconified) main window cannot be restored properly using actions from the systray icon menu when `QSystemTrayIcon::contextMenu()` is a child of the main window.

Tree-SHA512: 05c9f724fc2278d45dac6fe72b09859f12b5d71f54659bb779403c8cd81b55e610fb7b5aa912ac273d3cd19bf953b0405bbc6451feb00d1827c95dd9f0876aa4
2021-10-11 17:17:31 -05:00
Wladimir J. van der Laan
33a38b84de Merge #15136: qt: "Peers" tab overhaul
3537c8345c788a527bb4e1d00683ca7f8ee5fb1a Do not deselect peer when switching away from tab (Hennadii Stepanov)
b0037c51909dc55e279baa81f063c169c9735105 Improve Peers tab layout (Hennadii Stepanov)

Pull request description:

  This is an alternative to #14798.

  The "Peers" tab of the "Debug" window improved to address comments https://github.com/bitcoin/bitcoin/pull/6209#issuecomment-108072605 (by @jonasschnelli) and https://github.com/bitcoin/bitcoin/pull/14798#issuecomment-441618268 (by @promag).

  This allows to keep the peer selection while navigating to other places and effectively reverts e059726811.

  Screenshots with this PR:
  ![screenshot from 2019-01-09 22-01-36](https://user-images.githubusercontent.com/32963518/50927352-2e6fb700-1460-11e9-9173-582348210492.png)
  ![screenshot from 2019-01-09 22-02-11](https://user-images.githubusercontent.com/32963518/50927354-329bd480-1460-11e9-9926-d0eb0f026a35.png)
  ![screenshot from 2019-01-09 22-02-37](https://user-images.githubusercontent.com/32963518/50927358-3596c500-1460-11e9-864d-c8704451f3d9.png)

Tree-SHA512: 3d086007f6d72930bc2fc3c395175adda0f1a7722de3842bc246ee4f3bfc5ebda4b9a626fb68a7ee8663a88d0842deb37c0c460ad84cc58e22f138acf8bc71ea
2021-10-11 17:17:24 -05:00
fanquake
e447c4e0cd Partial Merge #20491: refactor: Drop noop gcc version checks
830ddf413934226d0b6ca99165916790cc52ca18 Drop noop gcc version checks (Hennadii Stepanov)

Pull request description:

  Since #20413 the minimum required GCC version is 7.

ACKs for top commit:
  fanquake:
    ACK 830ddf413934226d0b6ca99165916790cc52ca18

Tree-SHA512: 36264661d6ced1683a0c907efba7c700502acaf8e9fd50d9066bc9c7b877b25165b0684c2d7fe74bd58e500a77d7702bdbdd53691c274f29e4abccd241c10964
2021-10-11 17:17:24 -05:00
Wladimir J. van der Laan
550b2777fd Merge #14715: Drop defunct prevector compat handling
69ca48717ceb31e37e90276278362c809cf98cc6 Implement prevector::fill once (Ben Woosley)
7bad78c2c83d73b7e0518f3e1b835f0157b80ec6 Drop defunct IS_TRIVIALLY_CONSTRUCTIBLE handling from prevector.h (Ben Woosley)

Pull request description:

  This is clean-up post #14651:
  * Use one implementation of `prevector::fill`, as it's possible now that the implementations are identical.
  * Only apply the `IS_TRIVIALLY_CONSTRUCTIBLE` handling to the bench file where it is used, and drop the now-unnecessary associated compat includes.

Tree-SHA512: 5930b3a17fccd39af10add40202ad97a297aebecc049af72ca920d0d55b3e4c3c30ce864c8a683355895f0196396d4ea56ba9f9637bdc7d16964cdf66c195485
2021-10-11 17:17:07 -05:00
PastaPastaPasta
7be48286f4
Cxx17 refac ci build (#4508)
* Merge #18750: build: optionally skip external warnings

ba8950ee0134a7958e3e9b041cd54d222feb09a1 build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950ee0134a7958e3e9b041cd54d222feb09a1: diff looks correct!
  hebasto:
    ACK ba8950ee0134a7958e3e9b041cd54d222feb09a1, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950ee0134a7958e3e9b041cd54d222feb09a1

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9

* add --enable-suppress-external-warnings to matrix.sh

Co-authored-by: Wladimir J. van der Laan <laanwj@protonmail.com>
2021-10-12 00:56:11 +03:00
PastaPastaPasta
628c6160b6
Cxx17 refac ci trivial (#4507)
* guard gmtime_r with HAVE_GMTIME_R properly

* resolve dash-cppcheck linter error

* Mark stuff as override to resolve compiler warnings

Co-authored-by: Wladimir J. van der Laan <laanwj@protonmail.com>
2021-10-12 00:55:49 +03:00
Dzutte
0f2e8aa504
Merge bitcoin#14726: Use RPCHelpMan for all RPCs (#4492)
* Merge #14726: Use RPCHelpMan for all RPCs

fa5e0452e875a7ca6bf6fe61fdd652d341eece40 rpc: Documentation fixups (MarcoFalke)
fa91e8eda541acdb78ca481b74605639f319c108 Use RPCHelpMan for all RPCs (MarcoFalke)
fa520e72f7b5964cea1ade666e71212914556cf3 lint: Must use RPCHelpMan to generate the RPC docs (MarcoFalke)

Pull request description:

  The resulting documentation should not change unless the type in the oneline-summary was previously incorrect. (E.g. string vs bool)

Tree-SHA512: 4ff355b6a53178f02781e97a7aca7ee1d0d97ff348b6bf5a01caa1c96904ee33c704465fae54c2cd7445097427fd04c71ad3779bb7a7ed886055ef36c1b5a1d0

* Dash-specific changes to support RPCHelpMan with RPC commands

Signed-off-by: Dzutte <dzutte.tomsk@gmail.com>

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
2021-10-12 00:55:23 +03:00
UdjinM6
63df2b79eb
depends: Bump protobuf to 3.17.3 (#4503)
* bump protobuf to 3.17.3

3.18.x are broken for mmingw builds atm

* fix `warning: 'ByteSize' is deprecated: Please use ByteSizeLong() instead [-Wdeprecated-declarations]`
2021-10-11 23:23:41 +03:00
PastaPastaPasta
0c7278268e
minor refactorings in mnauth.cpp (#4501)
* minor refactorings in mnauth.cpp

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

* tweak if statement

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-10-11 20:19:02 +03:00
PastaPastaPasta
e2d12d184e
Use make_unique instead of using new (#4502)
Signed-off-by: pasta <pasta@dashboost.org>
2021-10-11 20:11:42 +03:00
PastaPastaPasta
89e0ccc3dd
llmq: move more llmq params into llmq/params.h remove llmq/params.cpp, use string_view and constexpr (#4500)
string_view is needed for compile time interpretation (constexpr) of the LLMQParams

constexpr is good to add such that we aren't initializing in static scope, but instead at compile time

Sadly using string_view will require that we construct a std::string when passing into univalue, however, this isn't in a performance important section (rpc) and as such another allocation is an okay trade off for the benefits of constexpr

Also, now we aren't having extern variables, which should make the linker mildly happier

Signed-off-by: pasta <pasta@dashboost.org>
2021-10-11 20:11:08 +03:00
PastaPastaPasta
501cdaa91b
refac: use make_unique and constexpr (#4493)
* use make_unique

* use constexpr everywhere possible in dash code
2021-10-11 00:41:53 +03:00
PastaPastaPasta
b944c04a41
refactor: refactor and improve platformUser restrictions, add some documentation (#4490)
* refactor: refactor and improve platformUser restrictions, add some documentation

* refactor: use a lambda to slightly improve readability
2021-10-11 00:41:39 +03:00
UdjinM6
77b2cfc374
ci/lint: Fix lint-shell.sh in CI (#4489)
* lint: Skip shell linting if gawk is not installed

* lint: Skip Gitian descriptor scripts checking if jq is not installed

* ci: Install gawk and jq

`yq` requires `jq`

* Fix shellcheck warnings
2021-10-11 00:41:20 +03:00
UdjinM6
35ed2b08c1
Merge pull request #4486 from Munkybooty/appveyor-backports-v0.18
Appveyor Backports v0.18
2021-10-10 22:11:56 +03:00
UdjinM6
fc6d76dae8
Merge pull request #4480 from kittywhiskers/llmqrefac
refactor: remove redundant filename prefixes in llmq source filenames, move params
2021-10-10 21:59:13 +03:00
UdjinM6
e81e1a570f
Merge pull request #4448 from vijaydasmp/backport_v18_vijay_batch4_2
Merge (Partial) bitcoin#14822,  bitcoin#14903, bitcoin#12246, bitcoin#14008
2021-10-10 21:48:29 +03:00
Kittywhiskers Van Gogh
9747f12401 docs: elaborate llmq parameter uses, tidy up 2021-10-09 22:28:13 +05:30
Kittywhiskers Van Gogh
af7cae777b move-only: move llmq parameters to their own file 2021-10-09 22:28:13 +05:30
MarcoFalke
500dfdb31a
partial Merge #14822: bench: Destroy wallet txs instead of leaking their memory
fa5cef0f78 bench: Destroy wallet txs instead of leaking their memory (MarcoFalke)

Pull request description:

  This should destroy the wallet txs when the benchmark ends to avoid having to hold them when the following benchmarks run.

Tree-SHA512: e2510946e6a47fad3ec5fb28d298df8ddc2e017455fcff777fa7bbc12d801c08739db6a7a7289509aaa881ccdc59dfff9bcb6772b48db2c457d3787081a46c06
2021-10-08 19:13:56 +05:30
Wladimir J. van der Laan
2833db6e0b
Merge #14008: Preserve a format of RPC command definitions
d9d79576f423cd9c5cef4547c7e3648dbb339460 Preserve a format of RPC command definitions (Kostiantyn Stepaniuk)

Pull request description:

  Currently, RPC commands are formatted in a way that it's easy to read
  and that `test/lint/check-rpc-mappings.py` can parse it.

  To void breaking `test/lint/check-rpc-mappings.py` script by running
  `clang-format`, RPC command definitions should be disabled for clang-format.

Tree-SHA512: e17d20ec0e6c4e19410198b55687ebbe6fa01654d214d4578cd16c00b872bf8b0b306594a45523685cd2e9d9280702e00471d9366e87954428e8bbeacd8cad60
2021-10-08 19:13:56 +05:30
MarcoFalke
ea750966f9
Merge #12246: Bugfix: Only run bitcoin-tx tests when bitcoin-tx is enabled
a2a04a5abb Bugfix: Only run bitcoin-tx tests when bitcoin-tx is enabled (Luke Dashjr)
92af71cea9 configure: Make it possible to build only one of bitcoin-cli or bitcoin-tx (Luke Dashjr)

Pull request description:

  Includes #5618 (which the reasons for rejecting no longer hold true)

Tree-SHA512: f30a8e4a2f70166b7cabef77c4674163b3a9da14c6a547d34f00d1056a19bf4d23e22851eea726fad2afc8735d5473ae91122c770b65ac3886663dc20e2c5b70
2021-10-08 19:13:56 +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
5cc78ce06b Merge #13787: Test for Windows encoding issue
15b31032a6 appveyor: Remove outdated libraries (Chun Kuan Lee)
ae892adceb tests: accept unicode characters on Windows (Chun Kuan Lee)

Pull request description:

  This PR removes unused Windows compatible path. Encoding issues has been solved.

Tree-SHA512: d24dce035fe3b576eaa002896f815a6691e88618ea371171d7e39883e1d63b3ed4d4631ab3b3a26bd67ae4e8ae13b1ff188942ab7ac6a93d704e0de301368cd0

# Conflicts:
#	.appveyor.yml
2021-10-06 20:05:01 -04:00
Wladimir J. van der Laan
6ef164513c Merge #14151: windows: Fix remaining compiler warnings (MSVC)
b9dafe7d9ffcbe7928ffbfba816b54e196c57664 Fix remaining compiler warnings (MSVC). Move disabling of specific warnings from /nowarn to project file. (practicalswift)

Pull request description:

  Fix remaining compiler warnings (MSVC).

  Before:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo
  …\script\script.cpp(272): warning C4018: '>': signed/unsigned mismatch
  …\test\allocator_tests.cpp(147): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size
  …\boost\test\tools\old\impl.hpp(107): warning C4805: '==': unsafe mix of type 'const Left' and type 'const Right' in operation
  …\test\crypto_tests.cpp(535): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
  …\test\script_tests.cpp(188): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(190): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(191): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  $
  ```

  After:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715;C4805 /nologo
  $
  ```

Tree-SHA512: 5b30334d3804e869779e77dad75a799e8e5e7eb2e08634cd40035cce140edd623cbb6c8b5806d2158c3df97888d3ea9ff4b8b6a5a83de3fe2cb361e29588c115

# Conflicts:
#	.appveyor.yml
#	build_msvc/common.vcxproj
#	src/test/script_tests.cpp
2021-10-06 20:05:01 -04:00
Kittywhiskers Van Gogh
f22be5a16b refactor: llmq/quorums_*[cpp/h] --> llmq/*.[cpp/h] 2021-10-06 09:04:45 +05:30
UdjinM6
28a5e599bf
Merge pull request #4487 from UdjinM6/fix_linter_p1
backport 15166, 15257, 16667, 16186, partial 16465, 16907, 16921, 16961, partial 19348, 21096
2021-10-06 00:55:44 +03:00
PastaPastaPasta
8d5c586477
refactor: replace instances of typedef with using in dash code (#4488) 2021-10-06 00:26:29 +03:00
gabriel-bjg
b4d001a602
instantsend: deterministic lock using the same msg hash as islock (#4381)
When receiving an islock, propagate it as islock.
When creating/receiving and isdlock, propagate it as isdlock to peers which support it and as islock to peers which don't.
Functional tests to cover both islock and isdlock scenarios.
2021-10-05 20:42:34 +03:00
UdjinM6
1b3bd26138
Fix python dead code warnings
Fixes
```
contrib/auto_gdb/log_size.py:22: unused variable 'from_tty' (100% confidence)
contrib/auto_gdb/used_size.py:29: unused variable 'from_tty' (100% confidence)
```
2021-10-05 20:34:01 +03:00
MarcoFalke
078ae49dc7
partial merge #19348: test: Bump linter versions
39d526bde48d98af4fa27906e85db0399b6aa8b1 test: Bump linter versions (Duncan Dean)

Pull request description:

  As per #19346, `mypy==0.700` was incompatible with Python 3.8.

  I've bumped the versions of all the linters to their latest stable versions.

  Checked with both Python 3.7 and 3.8 and everything still seems to work fine.

ACKs for top commit:
  hebasto:
    ACK 39d526bde48d98af4fa27906e85db0399b6aa8b1, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: f3ee7fda8095aa25aa68685e863076d52a6b82649770d24b0064d652763c0ceb8ebcbf9024fc74fca45c754e67b2a831dd070b3af23bc099140e6d27e89a5319
2021-10-05 20:34:01 +03:00
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
dbfa92990a
Merge #21096: Re-add dead code detection
3f8776a1391c3978ed66144df15fd9bcb9edd35d Re-add dead code detection (flack)

Pull request description:

  This re-adds unreachable code detection for Python based on `vulture`.

  Effectively, this reverts f4beb4996d27f2cdaf4f0a63e7dc044bf17decce. The difference to the previous version is that this runs with the `--min-confidence 100` setting. From https://pypi.org/project/vulture/:

  > Use `--min-confidence 100` to only report code that is guaranteed to be unused within the analyzed files.

  So this should avoid the previous issues where static analysis had wrong positives due to the dynamic nature of Python code by only reporting things that are unambiguous (such as code after a `return` statement). As such, there is not suppressions list.

  My motivation was mainly #21081 which would have been caught by this (as can be seen by the CI run failing). This is still marked as draft because #21081 is needed to get the linter to pass. Also, there is a second problem that this found (see https://github.com/bitcoin/bitcoin/pull/19509/files#r571454691). From what I can tell, this is a spurious type comment that could just be removed (or if that line has no side effects it could also be deleted altogether?). I could add a commit here to fix it, but I wanted to see if there is interest in having this linter again in the first place

ACKs for top commit:
  practicalswift:
    ACK 3f8776a1391c3978ed66144df15fd9bcb9edd35d

Tree-SHA512: 52314ad4f627d969de1eb15375ca677ed86a2e816fe773756a1ce22421214ba407b5a09a4bf701a3aab1a10c7b336f548e4cef3327edf154acba55e987db21f6
2021-10-05 20:34:00 +03:00
MarcoFalke
313d79e319
Merge #16961: test: Remove python dead code linter
f4beb4996d27f2cdaf4f0a63e7dc044bf17decce test: Remove python dead code linter (Wladimir J. van der Laan)

Pull request description:

  Primarily I'd like to remove this because it is very imprecise, due to Python's dynamic nature, giving it a large list of false positives that need to be listed as exceptions. See for example #16906.

  It's also a frequent source of complaints. I'm doubtful of the usefulness of checking for dead code in a linter in the first place.
  Having some dead code in the test framework for a while is not a
  disaster.

ACKs for top commit:
  sdaftuar:
    utACK f4beb4996d27f2cdaf4f0a63e7dc044bf17decce
  practicalswift:
    ACK f4beb4996d27f2cdaf4f0a63e7dc044bf17decce -- diff looks correct
  jamesob:
    ACK f4beb4996d

Tree-SHA512: 329b1555210311d5d15799fd2cb794b3208b0ac4d8a2ffaf4dece1bcc3e0e8b1fe952d5e7a394f94a98919cab579fb579eae7db2a796cc9a1a42ef495dd17507
2021-10-05 20:34:00 +03:00
MarcoFalke
a8f615748c
Merge #16907: test: lint: Add DisabledOpcodeTemplates to whitelist
fac35b21e2c2d798face7e289dcff4c1cce0e1a6 test: lint: Add DisabledOpcodeTemplates to whitelist (MarcoFalke)

Pull request description:

  Fixes #16906

Top commit has no ACKs.

Tree-SHA512: 98b175bb062425fd3a8bd0d0258f4c0e0d5106980f1e037df7c2b2b2e5aa6031b11b582c026265d7b2de56049ccbadb0b7add9130d323f15886f681c6268ba0a
2021-10-05 20:34:00 +03:00
fanquake
dc14874d3e
Merge #16921: tests: Add information on how to add Vulture suppressions
72a18a73af26ea551d39397787a2d178c8bbde7b tests: Add information on how to add Vulture suppressions (practicalswift)

Pull request description:

  Add information on how to add `vulture` suppressions.

  As requested by MarcoFalke in https://github.com/bitcoin/bitcoin/issues/16906#issuecomment-533264107 -- your wish is my command! :)

ACKs for top commit:
  fanquake:
    ACK 72a18a73af26ea551d39397787a2d178c8bbde7b - similar sort of message as in [lint-spelling.sh](https://github.com/bitcoin/bitcoin/blob/master/test/lint/lint-spelling.sh).

Tree-SHA512: b347f8cea33d4b0ba987a972979b0ac3423938084fea923a2c457a8081bc839a94ad818689d147477104b9197dc35be413f76a96026cd1507b4411d7513e3464
2021-10-05 20:34:00 +03:00
MarcoFalke
7aefec8de0
partial merge #16465: lint: Add false positive to python dead code linter 2021-10-05 20:34:00 +03:00
fanquake
53b2f81892
Merge #16186: doc/lint: Fix spelling errors identified by codespell 1.15.0
b748bf6f50dda6bb57eadf697edc320b2695e01a Fix spelling errors identified by codespell 1.15.0 (Ben Woosley)

Pull request description:

  Note all changes are to comments / documentation.

  After this commit, the only remaining output is:

  ```
    $ test/lint/lint-spelling.sh
    src/test/base32_tests.cpp:14: fo  ==> of, for
    src/test/base64_tests.cpp:14: fo  ==> of, for
    ^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in test/lint/lint-spelling.ignore-words.txt
  ```

  Note:
  * I ignore several valid alternative spellings ~, but changed homogenous
  to homogeneous as the latter is a more specific term according to the
  Google dictionary definitions I found~
  * homogenous is present in tinyformat, hence should be addressed upstream
  * process' is correct only if there are plural processes

ACKs for commit b748bf:
  practicalswift:
    ACK b748bf6f50dda6bb57eadf697edc320b2695e01a
  fanquake:
    ACK b748bf6f50

Tree-SHA512: 9add7044643ce015e0a44d8b27a3f300d72c485ffff550fb6491a17f14528085289ec5caddfe02f291ea9b2cded38a0dd3079652a054e2d7fe2ff4f7b53db5d7
2021-10-05 20:34:00 +03:00
MarcoFalke
26449bcccf
Merge #15166: qa: Pin shellcheck version
a517541794 Remove no longer needed shellcheck suppressions (practicalswift)
0b7196ecad Fix warnings introduced in shellcheck v0.6.0 (practicalswift)
07a53dce9f Remove repeated suppression. Fix indentation. (practicalswift)
638e53b472 Pin shellcheck version to v0.6.0 (practicalswift)

Pull request description:

  Pin `shellcheck` version.

Tree-SHA512: 996e438e424020fe888de1d77ffd33fa32848332febfffbc21a842784aee339332c79c41687c9c577ba1206eb20674623157d584a072e8ae88ae086ee2277bc8
2021-10-05 20:33:59 +03:00
MarcoFalke
d7707cde7a
Merge #16667: build: remove mingw linker workaround from win gitian descriptor
bd3f5a90ecd6de40516141b23b0861dbba0b31b6 build: remove mingw linker workaround from win gitian descriptor (fanquake)

Pull request description:

  This workaround was added as part of the switch to gitian building using Ubuntu 14.04 (#6900).
  However, it should no longer be required, as we have switched to Bionic (#13171) and that
  has a far newer version of binutils.

  Original discussion: https://github.com/bitcoin/bitcoin/pull/6900
  binutils patch: https://sourceware.org/bugzilla/show_bug.cgi?id=16192

ACKs for top commit:
  MarcoFalke:
    ACK bd3f5a90ecd6de40516141b23b0861dbba0b31b6
  theuni:
    ACK bd3f5a90ecd6de40516141b23b0861dbba0b31b6
  laanwj:
    ACK bd3f5a90ecd6de40516141b23b0861dbba0b31b6

Tree-SHA512: 01a5789994decf8cdedf7aaa0a449d2100a77e2e6b422d6b9dd5a4ac3e2e0b538c3d43aae4a1c3713614782f3c6b09d8d8bb21c20e86ce3c1734183dedd02d0c
2021-10-05 20:33:55 +03:00
UdjinM6
7b94386da3
ci: Drop excessive $CI_PROJECT_DIR (#4485)
Paths are relative to `$CI_PROJECT_DIR`:
https://docs.gitlab.com/ee/ci/yaml/index.html#cachepaths
https://docs.gitlab.com/ee/ci/yaml/index.html#artifactspaths
2021-10-05 19:58:19 +03:00