Commit Graph

21892 Commits

Author SHA1 Message Date
MarcoFalke
1c20456a52 Merge #17423: ci: Make ci system read-only on the git work tree
fa7523d3aa75b0266015af59901c2397b52265b5 ci: Extend docs (MarcoFalke)
fa493ef08830efe493150d07411af85518959804 ci: Make ci system read-only on the git work tree (MarcoFalke)
fab133329281cdaa3804585a2cdadd0478fefa4f ci: Remove git from required packages on host (MarcoFalke)
fa00393bce0c6128c6188afc7a1d50cc01b0277f ci: Make all filesystem operations inside docker (MarcoFalke)

Pull request description:

  Running the ci completely in a docker, without leaving any traces on the host system is not possible right now because the ccache and depends dir needs to be propagated back and picked up by the host for caching.

  Fixes #17372

ACKs for top commit:
  JeremyRubin:
    tested ACK fa7523d3aa75b0266015af59901c2397b52265b5

Tree-SHA512: 4bce1a0f883bcbdb34abf409bdbc80d420c5da2045d2f9c5536ac433f9e5b490f23df084546c8c049f688b487572bbfc4f9c4029e9e672f4d9279739d066ed2e
2022-06-16 01:34:30 -04:00
MarcoFalke
9f9c3dc725 Merge #17420: travis: Rework CACHE_ERR_MSG
9999a790749c583845a3ff7a265d540c2905aa12 travis: Rework CACHE_ERR_MSG (MarcoFalke)

Pull request description:

  This should fix the misconception that we can fix build problems in forked repos. See https://github.com/bitcoin/bitcoin/pull/17418#issuecomment-551917920

Top commit has no ACKs.

Tree-SHA512: e0c86f6613fa38f4d4984420fa1fdc999829407c71024c3b92fd1d35afa98f4b5073af72656c83f607d5f6fab15f9ea629ca8be0b4e892c2fb65a226036c470a
2022-06-16 01:34:30 -04:00
Wladimir J. van der Laan
482aa166d3 Merge #17446: gui: Changed tooltip for 'Label' & 'Message' text fields to be more clear
8944c1d340ac2be45b505ada7e187b770b0b036f Changed tooltips of receive form to highlight difference between Label and Message (dannmat)

Pull request description:

  I have changed the tooltips for 'Label' & 'Message' text fields to be more clear, stating the difference between the two (#17173)

ACKs for top commit:
  MarcoFalke:
    ACK 8944c1d340ac2be45b505ada7e187b770b0b036f
  laanwj:
    ACK 8944c1d340ac2be45b505ada7e187b770b0b036f

Tree-SHA512: 7fbea4d3c4416264ae6c146d51d29958c418a278bdd6744133db0b684ad7a9413178c005592aa21a81d127f3f3a8583fc5de00078239db08e6f101f657a5dd3a
2022-06-16 01:34:30 -04:00
fanquake
1ff571fc2c Merge #17515: Remove straggling OpenSSL references from doc and build
ea3c7e585c382998212fd7f41114462a8168a734 test: Remove libssl-dev packages from CI scripts (Wladimir J. van der Laan)
7ea55264b9d60325bc7a5c15d78e9063de145970 test: remove lsan suppression for libcrypto (Wladimir J. van der Laan)
2d7066527a456f8e1f4f603fe104b0bd9d864559 build: remove libcrypto as internal dependency in libbitcoinconsensus.pc (Wladimir J. van der Laan)
278751ea11f2cfe68b0c98f504f65586720cb5a4 doc: Remove ssl as a required dependency from build-unix (Wladimir J. van der Laan)

Pull request description:

  Some doc and build cleanups following #17265.

  I intentionally left the libssl-dev install in `gitian-win-signer.yml`, as it's necessary for the ossl signer.

ACKs for top commit:
  MarcoFalke:
    ACK ea3c7e585c382998212fd7f41114462a8168a734 🗯
  jamesob:
    ACK ea3c7e585c
  practicalswift:
    ACK ea3c7e585c382998212fd7f41114462a8168a734 - nice!
  fanquake:
    ACK ea3c7e585c382998212fd7f41114462a8168a734 - thanks.

Tree-SHA512: 67ea35bdd6d6e512d69e6734713534c88cae033a2ed695677ea15c3e3d5ff570374e342775c88e60877fa43a19047853e7b2a433e2c9a4349a5c423726a7457e
2022-06-16 01:34:30 -04:00
PastaPastaPasta
e090d9a9e7
trivial(llmq): trivial fixes in llmq/utils.cpp (#4884)
* trivial(llmq): fix indentation

* trivial(llmq): remove unused / commented out includes

* trivial(llmq): adjust formatting

* trivial(llmq): use const

* trivial(llmq): use ranges

* trivial: fix linter
2022-06-16 00:00:43 +03:00
MarcoFalke
6e709d48c4 Merge #15770: rpc: Validate maxfeerate with AmountFromValue
aa410c2b17 rpc: Validate maxfeerate with AmountFromValue (João Barbosa)

Pull request description:

  With this change `maxfeerate` can also be set as a string, accordingly to the help test:
  ```
    maxfeerate    (numeric or string,
  ```
  Beside, there are no tests for the removed errors.

ACKs for commit aa410c:
  meshcollider:
    utACK aa410c2b17
  MarcoFalke:
    utACK aa410c2b17 Good catch

Tree-SHA512: f3bfea91dc7daa943729e270585dbf333055aeda805fbd01eaab20a7e0e6147382647c11525334382d198df0d3d45da6102b541efda5a1361f96271c98d5d89d
2022-06-14 16:48:23 +07:00
MarcoFalke
376a6a04f1 Merge #17750: util: change GetWarnings parameter to bool
7aab8d1024996c7c422bd34a8226df0117b813f7 [style] Code style fixups in GetWarnings() (John Newbery)
492c6dc1e742a62599dc6d5ba6c3896825b5144f util: change GetWarnings parameter to bool (John Newbery)
869b6314fd180856b6054fff28b5de994252c54c [qt] remove unused parameter from getWarnings() (John Newbery)

Pull request description:

  `GetWarnings()` changes the format of the output warning string based on a passed-in string argument that can be set to "gui" or "statusbar".

  Change the argument to a bool:

  - there are only two types of behaviour, so a bool is a more natural argument type
  - changing the name to `verbose` does not set any expectations for the how the calling code will use the returned string (currently, `statusbar` is used for RPC warnings, not a status bar)
  - removes some error-handling code for when the passed-in string is not one of the two strings expected.

ACKs for top commit:
  laanwj:
    code review ACK 7aab8d1024996c7c422bd34a8226df0117b813f7
  practicalswift:
    ACK 7aab8d1024996c7c422bd34a8226df0117b813f7 -- diff looks correct :)
  MarcoFalke:
    ACK 7aab8d1024996c7c422bd34a8226df0117b813f7 otherwise.
  promag:
    Code review ACK 7aab8d1024996c7c422bd34a8226df0117b813f7.

Tree-SHA512: 75882c6e3e44aa9586411b803149b36ba487f4eb9cac3f5c8f07cd9f586870bba4488a51e674cf8147f05718534f482836e6a4e3f66e0d4ef6821900c7dfd04e
2022-06-14 16:48:15 +07:00
fanquake
f286654862 Merge #17752: doc: fix directory path for secp256k1 subtree in developer-notes
a5089f62bda9a39c1d6cbba285477670f1aa1f3f fix directory path for secp256k1 subtree in developer-notes (hackerrdave)

Pull request description:

  Documentation update to fix the directory path of the `secp256k1` subtree in the developer notes

ACKs for top commit:
  laanwj:
    ACK a5089f62bda9a39c1d6cbba285477670f1aa1f3f

Tree-SHA512: d0986721d7091af26edaee769db78c9aabac25bbaddb2a1bfa96c7208187226e280e9c38897b5227ee6c9e40d5a1af86bb7c58e72c6a30a94a478c4bf54c086e
2022-06-14 16:48:08 +07:00
Nathan Marley
d43f9d4ae1
fix(gov): do not allow empty proposal names (#4883)
* gov: Do not allow empty proposal names

* Add test for invalid (empty) proposal name

* Use pasta suggestion
2022-06-14 12:04:56 +03:00
UdjinM6
bcc4b2d1ac
Merge pull request #4867 from knst/bc-bp-3
Bitcoin backports #12763 #17511 #17675 #17617 #17698 #17703 #17705 #17787 #17806 #17743
2022-06-14 12:02:25 +03:00
Wladimir J. van der Laan
0f13a30378 Merge #17743: doc: Add release note for RPC Whitelist
7965e0b41ae03110ad784a1b374f831600c0cca1 doc: Add release note for RPC Whitelist (Emil Engler)

Pull request description:

  A release note for #12763

ACKs for top commit:
  laanwj:
    ACK 7965e0b41ae03110ad784a1b374f831600c0cca1

Tree-SHA512: 4ac3e62029a403e64e4cd3183433dc7aa071d42688b689d7cffb8f08dc4b26d2a586d32fa791d2b5679d6b95cd6e34c56e40a5592b9af446ad9429307f7267fe
2022-06-13 14:35:18 +07:00
UdjinM6
9958ba6ea0
refactor(qt): Reuse QRImageWidget in QRDialog (#4853)
4570 follow-up (15928 backport)
2022-06-11 12:18:01 +03:00
Nathan Marley
fc794738af
trivial: Fix typo in gobject getcurrentvotes help (#4881)
This help text didn't make sense to me 'til I realized it should be `present`. I kept wondering what txid should be presenting...
2022-06-11 12:16:15 +03:00
Odysseas Gabrielides
0db7c7d709
docs(llmq): Improved documentation for keepOldConnections (#4876) 2022-06-10 23:26:02 -05:00
Munkybooty
7097171123
tests: basic functional tests for CoinJoin (#4730)
* refactor: create separate function for processing dsq messages in client.cpp

* refactor: avoid duplicate checks in CCoinJoinClientSession::ProcessMessage

* test: create tests for mixing and pending dsa requests in coinjoin_tests.cpp

* test: create tests for CTxDSIn in coinjoin_tests.cpp

* test: create tests for CoinJoinAccept in coinjoin_tests.cpp

* test: create tests for CoinJoinStatusUpdate in coinjoin_tests.cpp

* removal of check peer version

* Apply suggestions from code review

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-06-10 23:05:48 -05:00
UdjinM6
7fb8ae7d27
Merge pull request #4874 from UdjinM6/addrv2_followups
backport: bitcoin 20564, 20661 (addrv2 follow-ups)
2022-06-08 13:01:44 +03:00
Konstantin Akimov
25f78025f5 Fixed base58 fuzz tests, part of #17511 2022-06-08 12:36:52 +07:00
Konstantin Akimov
56a9f9b0dd Fixed fuzz build on Kubuntu 22.04 2022-06-08 12:36:52 +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
MarcoFalke
f7ac575861 Merge #17806: test: Change filemode of rpc_whitelist.py
90df92206cfce4e61eff9d584112643512f6b91c test: Change filemode of rpc_whitelist.py (Emil Engler)

Pull request description:

  All python tests have the file mode `755`.
  Probably due to a mistake `rpc_whitelist.py` is the only test with the permission `644`.
  This PR makes it coherent with the other tests and updates it to `755` as well.

ACKs for top commit:
  practicalswift:
    ACK 90df92206cfce4e61eff9d584112643512f6b91c -- all tests should be executable

Tree-SHA512: b9e69cb5184a3bbee4c7b14ac35985145a9fd3403d0e449d79f15c18e9660cafec495d639f5f730e0c69dde5f4a3d7590b4e42d385e794cd02add1f4e3b785e7
2022-06-08 12:36:52 +07:00
Konstantin Akimov
5aa0fe2bea Add a flag "no cli" for rpc_whitelist functional test 2022-06-08 12:36:52 +07:00
Wladimir J. van der Laan
b89fd6128b Merge #12763: Add RPC Whitelist Feature from #12248
2081442c421cc4376e5d7839f68fbe7630e89103 test: Add test for rpc_whitelist (Emil Engler)
7414d3820c833566b4f48c6c120a18bf53978c55 Add RPC Whitelist Feature from #12248 (Jeremy Rubin)

Pull request description:

  Summary
  ====

  This patch adds the RPC whitelisting feature requested in #12248. RPC Whitelists help enforce application policies for services being built on top of Bitcoin Core (e.g., your Lightning Node maybe shouldn't be adding new peers). The aim of this PR is not to make it advisable to connect your Bitcoin node to arbitrary services, but to reduce risk and prevent unintended access.

  Using RPC Whitelists
  ====
  The way it works is you specify (in your bitcoin.conf) configurations such as

  ```
  rpcauth=user1:4cc74397d6e9972e5ee7671fd241$11849357f26a5be7809c68a032bc2b16ab5dcf6348ef3ed1cf30dae47b8bcc71
  rpcauth=user2:181b4a25317bff60f3749adee7d6bca0$d9c331474f1322975fa170a2ffbcb176ba11644211746b27c1d317f265dd4ada
  rpcauth=user3:a6c8a511b53b1edcf69c36984985e$13cfba0e626db19061c9d61fa58e712d0319c11db97ad845fa84517f454f6675
  rpcwhitelist=user1:getnetworkinfo
  rpcwhitelist=user2:getnetworkinfo,getwalletinfo, getbestblockhash
  rpcwhitelistdefault=0
  ```

  Now user1 can only call getnetworkinfo, user2 can only call getnetworkinfo or getwalletinfo, while user3 can still call all RPCs.

  If any rpcwhitelist is set, act as if all users are subject to whitelists unless rpcwhitelistdefault is set to 0. If rpcwhitelistdefault is set to 1 and no rpcwhitelist is set, act as if all users are subject to whitelists.

  Review Request
  =====
  In addition to normal review, would love specific review from someone working on LN (e.g., @ roasbeef) and someone working on an infrastructure team at an exchange (e.g., @ jimpo) to check that this works well with their system.

  Notes
  =====

  The rpc list is spelling sensitive -- whitespace is stripped though. Spelling errors fail towards the RPC call being blocked, which is safer.

  It was unclear to me if HTTPReq_JSONRPC is the best function to patch this functionality into, or if it would be better to place it in exec or somewhere else.

  It was also unclear to me if it would be preferred to cache the whitelists on startup or parse them on every RPC as is done with multiUserAuthorized. I opted for the cached approach as I thought it was a bit cleaner.

  Future Work
  =====

  In a future PR, I would like to add an inheritance scheme. This seemed more controversial so I didn't want to include that here. Inheritance semantics are tricky, but it would also make these whitelists easier to read.

  It also might be good to add a `getrpcwhitelist` command to facilitate permission discovery.

  Tests
  =====
  Thanks to @ emilengler for adding tests for this feature. The tests cover all cases except for where `rpcwhitelistdefault=1` is used, given difficulties around testing with the current test framework.

ACKs for top commit:
  laanwj:
    ACK 2081442c421cc4376e5d7839f68fbe7630e89103

Tree-SHA512: 0dc1ac6a6f2f4b0be9c9054d495dd17752fe7b3589aeab2c6ac4e1f91cf4e7e355deedcb5d76d707cbb5a949c2f989c871b74d6bf129351f429569a701adbcbf
2022-06-08 12:36:51 +07:00
Konstantin Akimov
5031114de3 Enabled extra functional tests thanks to previous commit with new Decimal json output 2022-06-08 12:35:12 +07:00
fanquake
f08497c93e Merge #17705: test: re-enable CLI test support by using EncodeDecimal in json.dumps()
b6f9e3576a1ea18572e4803aeb3f39330f0cb759 test: re-enable CLI test support by using EncodeDecimal in json.dumps() (fanquake)

Pull request description:

  As mentioned in https://github.com/bitcoin/bitcoin/pull/17675#issuecomment-563188648.

ACKs for top commit:
  practicalswift:
    ACK b6f9e3576a1ea18572e4803aeb3f39330f0cb759 assuming Travis is happy too -- diff looks correct :)
  MarcoFalke:
    > ACK b6f9e35 assuming Travis is happy too -- diff looks correct :)

Tree-SHA512: 79fa535cc1756c8ee610a3d6a316a1c4f036797d6990a5620e44985393a2e52f78450f8e0021d0a148c08705fd1ba765508464a365f9030ae0d2cacbd7a93e19
2022-06-08 12:35:12 +07:00
MarcoFalke
6dbc9aba0d Merge #17675: tests: Enable tests which are incorrectly skipped when running test_runner.py --usecli
5ac804a9eb0cdbdcff8b50ecfb736f8793cab805 tests: Use a default of supports_cli=True (instead of supports_cli=False) (practicalswift)
993e38a4e2fa66093314b988dfbe459f46aa5864 tests: Mark functional tests not supporting bitcoin-cli (--usecli) as such (practicalswift)

Pull request description:

  Annotate functional tests supporting `bitcoin-cli` (`--usecli`) as such.

  Prior to this commit 74 tests were unnecessarily skipped when running `test_runner.py --usecli`.

  Before [bitcoin original commit stats]:

  ```
  $ test/functional/test_runner.py --usecli > /dev/null 2>&1
  $ echo $?
  0
  $ test/functional/test_runner.py --usecli 2>&1 | cut -f2 -d'|' | \
      grep -E ' (Passed|Skipped) *$' | sort | uniq -c
        9  ✓ Passed
      126  ○ Skipped
  ```

  After [dash numbers]:

  ```
  $ test/functional/test_runner.py --usecli > /dev/null 2>&1
  $ echo $?
  0
  $ test/functional/test_runner.py --usecli 2>&1 | cut -f2 -d'|' | \
      grep -E ' (Passed|Skipped) *$' | sort | uniq -c
       110  ✓ Passed
       51  ○ Skipped
  ```

  Context: `--usecli` was introduced in f6ade9ce1a

ACKs for top commit:
  laanwj:
    Code review ACK 5ac804a9eb0cdbdcff8b50ecfb736f8793cab805

Tree-SHA512: 249c0b691a74cf201c729df86c3db2b3faefa53b94703941e566943d252c6d14924e935a8da4f592951574235923fbb7cd22612a5e7e02ff6c762c55a2320ca3
2022-06-08 12:35:12 +07:00
Konstantin Akimov
9e5b2c87ba Added missing unification cases of UNIX timestamp string constant 2022-06-08 12:35:12 +07:00
Wladimir J. van der Laan
a334f590ff Merge #17617: doc: unify unix epoch time descriptions
d94d34f05f4ae3efa07de409489d68bbcc216346 doc: update developer notes wrt unix epoch time (Jon Atack)
e2f32cb5c5c7f2b1d1fc7003587b6573fb59526a qa: unify unix epoch time descriptions (Jon Atack)

Pull request description:

  Closes #17613.

  Updated call sites: mocktime, getblockheader, getblock, pruneblockchain,
  getchaintxstats, getblocktemplate, setmocktime, getpeerinfo, setban,
  getnodeaddresses, getrawtransaction, importmulti, listtransactions,
  listsinceblock, gettransaction, getwalletinfo, getaddressinfo

  Commands for testing manually:
  ```
  bitcoind -help-debug | grep -A1 mocktime
  bitcoin-cli help getblockheader
  bitcoin-cli help getblock
  bitcoin-cli help pruneblockchain
  bitcoin-cli help getchaintxstats
  bitcoin-cli help getblocktemplate
  bitcoin-cli help setmocktime
  bitcoin-cli help getpeerinfo
  bitcoin-cli help setban
  bitcoin-cli help getnodeaddresses
  bitcoin-cli help getrawtransaction
  bitcoin-cli help importmulti
  bitcoin-cli help listtransactions
  bitcoin-cli help listsinceblock
  bitcoin-cli help gettransaction
  bitcoin-cli help getwalletinfo
  bitcoin-cli help getaddressinfo
  ```

ACKs for top commit:
  laanwj:
    re-ACK d94d34f05f4ae3efa07de409489d68bbcc216346

Tree-SHA512: 060713ea4e20ab72c580f06c5c7e3ef344ad9c2c9cb034987d980a54e3ed2ac0268eb3929806daa5caa7797c45f5305254fd499767db7f22862212cf77acf236
2022-06-08 12:35:11 +07:00
Wladimir J. van der Laan
85c28b4b1f Merge #17511: Add bounds checks before base58 decoding
5909bcd3bf3c3502355e89fd0b76bb8e93d8a95b Add bounds checks in key_io before DecodeBase58Check (Pieter Wuille)
2bcf1fc444d5c4b8efa879e54e7b6134b7e6b986 Pass a maximum output length to DecodeBase58 and DecodeBase58Check (Pieter Wuille)

Pull request description:

  Fixes #17501.

ACKs for top commit:
  laanwj:
    code review ACK 5909bcd3bf3c3502355e89fd0b76bb8e93d8a95b
  practicalswift:
    ACK 5909bcd3bf3c3502355e89fd0b76bb8e93d8a95b -- code looks correct

Tree-SHA512: 4807f4a9508dee9c0f1ad63f56f70f4ec4e6b7e35eb91322a525e3da3828521a41de9b8338a6bf67250803660b480d95fd02ce6b2fe79c4c88bc19b54f9d8889
2022-06-08 12:33:00 +07:00
Wladimir J. van der Laan
b9893e5025 Merge #17698: depends: don't configure xcb_proto
e97f5c18238835bc3a3aee2e9e65b287f1c8b938 depends: don't configure xcb_proto (fanquake)

Pull request description:

  xcb_proto's configure doesn't understand `--disable-shared` or
  `--with-pic`. All the package does it put a stack of XML files into
  a directory to be used by libxcb.

  Probably enough to close #16354.

ACKs for top commit:
  dongcarl:
    ACK e97f5c18238835bc3a3aee2e9e65b287f1c8b938

Tree-SHA512: 1a49fd7c8269405bbf312be33c1aeaac5f25ef8666829b01dc3c58f3a2a9281c23c42614a7f1cfc3ee260be4ea3e71285869b1cb9c2035dceda336296d9d9dea
2022-06-08 12:33:00 +07:00
MarcoFalke
59c55fd274 Merge #17703: build: Improve configure.ac formatting
3ab18246254019896132d1cdb8af2dcdb213ec3b build: Use dnl for all comments in configure.ac, rather than # (fanquake)
8ddcbb4e41fa91e7f80efe6d9c4d5e9bb1355036 build: Remove backticks from configure.ac (fanquake)

Pull request description:

  Use `dnl` for all comments, rather than `#`.
  Remove backticks - Their usage for the `bdb_prefix` and `qt5_prefix` commands may have improved backwards compatibility in some cases, however we now require recent versions of macOS. I'm not sure why they were being used in the `HAVE_STD__SYSTEM` and `HAVE_WSYSTEM` defines.

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

Tree-SHA512: 2bcffb52c365acff87a0e6b9527ae31f36fdabb7ea095a8fd261f9a39b2c2848f5dfc148bc38d21e21e7bd761b1a2960e9a96f508c66be84d9569b8a401e812a
2022-06-08 12:33:00 +07:00
UdjinM6
cfbc38c185
dashification: Introduce ADDRV2_PROTO_VERSION and bump PROTOCOL_VERSION to avoid conflicts with previous v18.x rcs 2022-06-08 02:53:55 +03:00
Wladimir J. van der Laan
b0d655216b
Merge #20661: Only select from addrv2-capable peers for torv3 address relay
37fe80e6267094f6051ccf9bec0c7f1a6b9e15da Only consider addrv2 peers for relay of non-addrv1 addresses (Pieter Wuille)
83f8821a6f41854edd5c0b11deabba658890cde1 refactor: add IsAddrCompatible() to CNode (Pieter Wuille)

Pull request description:

  When selecting peers to relay an address to, only pick addrv2-capable ones if the address cannot be represented in addr(v1).

  Without this I expect that propagation of torv3 addresses over the cleartext network will be very hard for a while.

ACKs for top commit:
  jonatack:
    ACK 37fe80e6267094f6051ccf9bec0c7f1a6b9e15da
  vasild:
    ACK 37fe80e6267094f6051ccf9bec0c7f1a6b9e15da

Tree-SHA512: 18a854ea43ad473cf89b9c5193b524109d7af75c26f7aa7e26cd72ad0db52f19c8001d566c607a7e6772bc314f770f09b6c3e07282d110c5daea193edc592cd2
2022-06-08 02:41:31 +03:00
MarcoFalke
7b2026e49b
Merge #20564: Don't send 'sendaddrv2' to pre-70016 software, and send before 'verack'
1583498fb6781c01ca2f33c09319ed793964c574 Send and require SENDADDRV2 before VERACK (Pieter Wuille)
c5a89196602e43ebb1cdc9cd4f08d153419c13e1 Don't send 'sendaddrv2' to pre-70016 software (Pieter Wuille)

Pull request description:

  BIP155 defines addrv2 and sendaddrv2 for all protocol versions, but some implementations reject messages they don't know. As a courtesy, don't send it to nodes with a version before 70016, as no software is known to support BIP155 that doesn't announce at least that protocol version number.

  Also move the sending of sendaddrv2 earlier (before sending verack), as proposed in https://github.com/bitcoin/bips/pull/1043. This has the side effect that local address broadcast of torv3 will work (as it'll only trigger after we know whether or not the peer supports addrv2).

ACKs for top commit:
  MarcoFalke:
    ACK 1583498fb6781c01ca2f33c09319ed793964c574
  jnewbery:
    ACK 1583498fb6781c01ca2f33c09319ed793964c574
  jonatack:
    ACK 1583498fb6781c01ca2f33c09319ed793964c574
  vasild:
    ACK 1583498

Tree-SHA512: 3bd5833fa8c8567b6dedd99e4a9b6bb71c127aa66d5284b217503c86d597dc59aa7382c41f3a4bf561bb658b89db81d1a7703a700eef4ffc17cb916660e23a82
2022-06-08 02:41:28 +03: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
UdjinM6
2c54777306
feat(tests): check that old masternode connections are dropped (#4863)
* chore: Drop legacy ticks in CMasternodeUtils, use scheduler directly

* feat(tests): check that old masternode connections are dropped
2022-06-08 01:43:03 +03:00
UdjinM6
89ecf90ee5
Merge pull request #4869 from PastaPastaPasta/develop-trivial-2022-06-07
backport: trivial backports 2022 06 07
2022-06-08 01:40:10 +03:00
Odysseas Gabrielides
5270e533a2
fix!: Rotation fixes and adjustments (#4868)
* Typos

* Fix for Rotated member calculation

* Adjusted keepOldConnections logic to rotation

* Fix for Rotated member calculation + more logs

* Fix for Rotated member calculation

* Added LogAcceptCategory

* fix: brackets and LLMQ_TEST_DIP0024 changes

* fix: decrease keepOldConnections to 4

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

Co-authored-by: pasta <pasta@dashboost.org>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-06-08 00:32:37 +03:00
Nathan Marley
a99e92f16a
refactor: Remove some unused governance legacy code (#4870) 2022-06-07 16:13:04 -05:00
pasta
34f2c76619
fix: avoid bind to temporary compilation error
llmq/snapshot.cpp:31:22: error: loop variable 'h' binds to a temporary value produced by a range of type 'const std::vector<bool>' [-Werror,-Wrange-loop-bind-reference]
    for (const auto& h : activeQuorumMembers) {
                     ^
llmq/snapshot.cpp:31:10: note: use non-reference type 'std::__bit_const_reference<std::vector<bool>>'
    for (const auto& h : activeQuorumMembers) {
         ^~~~~~~~~~~~~~~
1 error generated.
2022-06-07 16:11:24 -05:00
MarcoFalke
8efad5c8c7
Merge #20218: test: Suppress epoll_ctl data race
fa949b3c1325693ea7ecc5556b2de50d2a6c9ead test: Suppress epoll_ctl data race (MarcoFalke)

Pull request description:

  Happens intermittently: https://cirrus-ci.com/task/5462892373868544?command=ci#L5385

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

Tree-SHA512: d5aa559fc105053da594531722f2a03d898eadeb4413c3a728fc5116cc4d1a2c16c49649a24c75ea810e4ec6bb9728b0bcd2ea991886bb9d206170218eddf6d2
2022-06-07 16:11:24 -05:00
MarcoFalke
cca48357bc
Merge #20092: util: Do not use gArgs global in ArgsManager member functions
d103484fe81a8a5bf1d692f3f7d1c0ef1be5f63c util: Do not use gArgs global in ArgsManager member functions (Hennadii Stepanov)

Pull request description:

ACKs for top commit:
  practicalswift:
    ACK d103484fe81a8a5bf1d692f3f7d1c0ef1be5f63c: patch looks correct

Tree-SHA512: dda7a5062363170c6995f2fd8fda48c0a919e5ca67be9faa8f0fa66f9d3b535f134eb6f4860a0859bc5457c02230b34a8d1264045f22bed8d30668158ac2271f
2022-06-07 16:11:24 -05:00
Wladimir J. van der Laan
f5831cbbdb
Merge #19984: log: Remove static log message "Initializing chainstate Chainstate [ibd] @ height -1 (null)"
f22d6a11423a4462196de24cd68e7f45513cc001 log: Remove static log message "Initializing chainstate Chainstate [ibd] @ height -1 (null)" (practicalswift)

Pull request description:

  Remove static log message `Initializing chainstate Chainstate [ibd] @ height -1 (null)`.

  AFAICT `chainstate->ToString()` will always equal `"Chainstate [ibd] @ height -1 (null)"` here which makes the log message neither relevant nor interesting :)

ACKs for top commit:
  laanwj:
    ACK f22d6a11423a4462196de24cd68e7f45513cc001
  promag:
    ACK f22d6a11423a4462196de24cd68e7f45513cc001, just get rid of it.
  hebasto:
    ACK f22d6a11423a4462196de24cd68e7f45513cc001, I agree that the removed log message in its current state is cryptic and useless.

Tree-SHA512: 1a65c0d14c9a433afcdaadef9bfcdd5d63276d5d2caee1bf3c48ac477e54fa28138f64020e6e26ca5e67872954a1e7d93fa24a12accc7c7211bc6e7a6039051d
2022-06-07 16:11:24 -05:00
fanquake
9efc177bd1
Merge #19805: wallet: Avoid deserializing unused records when salvaging
0bbe26a1af2aab2287b18048f80b3f70e63e0044 wallet: filter for keys only before record deser in salvage (Andrew Chow)
544e12a4e81633d222574eec253a1ff292d3c4a5 walletdb: Add KeyFilterFn to ReadKeyValue (Andrew Chow)

Pull request description:

  When salvaging a wallet, the only things that matter are the private keys. It is not necessary to attempt to deserialize any other records, especially if those records are corrupted too.

  This PR adds a `KeyFilterFn` function callback to `ReadKeyValue` that salvage uses to filter for only the records that it wants. Of course doing it this way also lets us do other filters in the future from other places should we so desire.

ACKs for top commit:
  ryanofsky:
    Code review ACK 0bbe26a1af2aab2287b18048f80b3f70e63e0044. Looks great! This should make the recovery code more robust. Normally it'd be good to have a test case for the problem this fixes, but Marco already wrote one in #19078, so I think we're covered
  laanwj:
    Code review ACK 0bbe26a1af2aab2287b18048f80b3f70e63e0044

Tree-SHA512: 8e3ee283a22a79273915711c4fb751f3c9b02ce94e6bf08dc468f1cfdf9fac35c693bbfd2435ce43c3a06c601b9b0a67e209621f6814bedfe3bc7a7ccc37bb01
2022-06-07 16:11:23 -05:00
fanquake
ddd6ff38e9
Merge #19861: build: add /usr/local/ to LCOV_FILTER_PATTERN for macOS builds
9bdde3c802e1512cbcd8ae8f7db72b6fe13ea829 build: add /usr/local/ to LCOV_FILTER_PATTERN for macOS builds (eugene)

Pull request description:

  With this commit, the files in /usr/local/ will not be included in
  `make cov` or `make cov_fuzz` coverage reports. This behavior could
  be observed when generating the reports on macOS with brew-installed
  clang.

ACKs for top commit:
  fanquake:
    ACK 9bdde3c802e1512cbcd8ae8f7db72b6fe13ea829

Tree-SHA512: 15cbe8d514651448f3d7b8b0a00939fd6bd6f15e6812f1959fcaaab7364ca2ef4ee34f2ff8950b7fdc8ae64d043dc5f7185c0601dd94780b41331337e5e84c45
2022-06-07 16:11:23 -05:00
MarcoFalke
fd852e5d8c
Merge #19777: docs: Correct description for getblockstats's txs field
4148f55dd016f940df50a44cf03d117cdb1dd929 docs: Correct description for getblockstats's txs field (Nadav Ivgi)

Pull request description:

  It does count the coinbase transaction.

  Refs #19766

ACKs for top commit:
  MarcoFalke:
    ACK 4148f55dd016f940df50a44cf03d117cdb1dd929
  theStack:
    ACK 4148f55dd016f940df50a44cf03d117cdb1dd929

Tree-SHA512: ccd420f19242efbbbecfe822c825363bc89e26618834de0d805f5cdb07461c8bdc6e077c61ea8cd0d40564a96c67d8a71c68175c8543bb849909d7ae375b2a92
2022-06-07 16:11:23 -05:00
fanquake
3dbbdf6775
Merge #19719: build: Add Werror=range-loop-analysis
fa55c1d5fdd88c4bc4d361da231cd63b20255b50 build: Add Werror=range-loop-analysis (MarcoFalke)

Pull request description:

  The warning is implicitly enabled for Bitcoin Core. Also explicitly since commit d92204c900d.

  To avoid "fix range loop" follow-up refactors, we have two options:

  * Disable the warning, so that issues never appear
  * Enable it as an error, so that issues are either caught locally or by ci

ACKs for top commit:
  fanquake:
    ACK fa55c1d5fdd88c4bc4d361da231cd63b20255b50
  practicalswift:
    ACK fa55c1d5fdd88c4bc4d361da231cd63b20255b50 -- pre-review fix-up is better than post-review fix-up
  hebasto:
    re-ACK fa55c1d5fdd88c4bc4d361da231cd63b20255b50

Tree-SHA512: 019aa133f254af8882c1d5d10c420d9882305db0fc2aa9dad7d285168e2556306c3eedcc03bd30e63f11eae4cc82b648d83fb6e9179d6a6364651fb602d70134
2022-06-07 16:11:23 -05:00
MarcoFalke
b7b4f37dca
Merge #19709: test: Fix 'make cov' with clang
35cd2da623e32b975fbc485c3605934e4aa8bdc5 test: Fix 'make cov' with clang (Hennadii Stepanov)

Pull request description:

  This is a follow up of #19688.

  With this PR it is possible to do the following:
  ```
  $ ./autogen.sh
  $ ./configure --enable-lcov CC=clang CXX=clang++
  $ make
  $ make cov
  ```

  Currently, on master (8a85377cd0b60cb00dae4f595d628d1afbd28bd5), `make cov` fails to `Processing src/test/test_bitcoin-util_tests.gcda`.

ACKs for top commit:
  vasild:
    ACK 35cd2da
  Crypt-iQ:
    ACK 35cd2da

Tree-SHA512: aaf56118e2644064e9738a8279889c617db5805c5c804c904469b24c496bd609f9c5fc2aebcf1a422f8a5ed2eb38bd6e76b484680310b55c36d922b73a4c33cf
2022-06-07 16:11:22 -05:00
Wladimir J. van der Laan
1be11a0d7c
Merge #19696: rpc: Fix addnode remove command error
a51d0ad2de89b9757d158df95ddeba2bfcb23935 rpc: Improve addnode remove command error message (Fabian Jahr)

Pull request description:

  The `addnode` RPC with the `remove` command parameter is used to remove a node from the "added nodes". It did not have test coverage and in case of failure to remove the node it responded with the confusing message "Error: Node has not been added.".

  This PR adds test coverage and introduces a new error code as well as changes the error message to something that makes sense.

ACKs for top commit:
  laanwj:
    Code review ACK a51d0ad2de89b9757d158df95ddeba2bfcb23935
  theStack:
    Tested ACK https://github.com/bitcoin/bitcoin/commit/a51d0ad2de

Tree-SHA512: 033ef5de0d4d49d58ef4df3759b838c9d19ee9dfb0aff9f814a3a63d124ca231a442c930efa7d343fe1f65727c4b59fc23dd5e26fe6ea69f9e84fda48b5c5cc2
2022-06-07 16:11:22 -05:00
Wladimir J. van der Laan
2b295a85b0
Merge #19028: test: Set -logthreadnames in unit tests
99993489da9bc003b823bcab10e5f5297b369431 test: Set -logthreadnames in unit tests (MarcoFalke)
fa4ea997b4da1ae0afafba223fff9efbeefaf555 init: Setup scheduler in tests and init in exactly the same way (MarcoFalke)

Pull request description:

  Generally the unit tests are single threaded, with the exception of the script check threads, the schedule, and optionally indexer threads.

  Like the functional tests, the thread name can serve additional debug information, so set `-logthreadnames` in unit tests.

  Can be tested with

  ```
  ./src/test/test_bitcoin -l test_suite -t validation_tests/test_combiner_all -- DEBUG_LOG_OUT

ACKs for top commit:
  laanwj:
    ACK 99993489da9bc003b823bcab10e5f5297b369431

Tree-SHA512: 3bdbfc211da146da64b50b0826246aff5c611a84b69ab896a55b3c9d1adc92c5975da36ab92aee577df82e229c4326b477f4105bfdd1a5df4c9a0b018cf61602
2022-06-07 16:11:22 -05:00
fanquake
b3510fc212
Merge #17907: doc: Fix improper Doxygen inline comments
498cdbb42616bc1e6c44492c907678b4dce41870 Fix improper Doxygen inline comments (Ben Woosley)

Pull request description:

  The proper syntax is `//!<`
  http://www.doxygen.nl/manual/docblocks.html#memberdoc

  Identified via `-Wdocumentation`:

  ```
  In file included from ./util/system.h:26:
  ./util/settings.h:74:41: error: not a Doxygen trailing comment [-Werror,-Wdocumentation]
      const SettingsValue* begin() const; //<! Pointer to first non-negated value.
                                          ^~~~
                                          ///<
  ./util/settings.h:75:41: error: not a Doxygen trailing comment [-Werror,-Wdocumentation]
      const SettingsValue* end() const;   //<! Pointer to end of values.
                                          ^~~~
                                          ///<
  ./util/settings.h:76:41: error: not a Doxygen trailing comment [-Werror,-Wdocumentation]
      bool empty() const;                 //<! True if there are any non-negated values.
                                          ^~~~
                                          ///<
  ./util/settings.h:77:41: error: not a Doxygen trailing comment [-Werror,-Wdocumentation]
      bool last_negated() const;          //<! True if the last value is negated.
                                          ^~~~
                                          ///<
  ./util/settings.h:78:41: error: not a Doxygen trailing comment [-Werror,-Wdocumentation]
      size_t negated() const;             //<! Number of negated values.
                                          ^~~~
                                          ///<
  ```

ACKs for top commit:
  fanquake:
    ACK 498cdbb42616bc1e6c44492c907678b4dce41870

Tree-SHA512: 2851fc1cbbcf700d198d82ce4923b2ef4a700f8ce19dff431ecf24f4e6fecda9fed1b4b4d148f3c1adfb6b0c6bff5d5315ee01bbcd855eb3d83e1a69b0c98893
2022-06-07 16:11:17 -05:00