Commit Graph

19269 Commits

Author SHA1 Message Date
Wladimir J. van der Laan
ef83670bfa
Merge #14944: doc: update NetBSD build instructions for 8.0
be5ca825a38bc71c3a79ef35335e9c2e597ad225 doc: update NetBSD build instructions for 8.0 (fanquake)

Pull request description:

  Updates the NetBSD build documentation for 8.0.
  Use Python37 and add pkg-config.
  Switches to using our `contrib/install_db4.sh` script for installing bdb.

Tree-SHA512: c0ac1a89349a752d9d4d87e2d134fd402e9beaac84e471ec9a0b507ebc5e762e973c8d2821db3824dea82841e38c39b0bb0a0d97f7e58318f2b15e93e81bf654
2021-06-25 20:52:35 -05:00
Wladimir J. van der Laan
38c60bc2f5
Merge #12294: [Docs] Create NetBSD build instructions and fix compilation
11c5827 [build] Add NETBSD leveldb target to configure.ac (fanquake)
1944fa3 [doc] Create build-netbsd.md (Randolf Richardson)
336685e [build] Add db4_cxx to bitcoin_find_bdb48.m4 (Randolf Richardson)

Pull request description:

  Replaces #12125.

Tree-SHA512: 411d082ffff7198bcc1b2b6fcdf86c378baf228d8f4fee0e6c9f0688efe9c6b6dcfd5c1ab9c1dfd0c4637723b8584dbbb614634ace0e1a417b59e88a6c736dc0
2021-06-25 20:51:59 -05:00
UdjinM6
6e66592ba7
wallet: Use correct params when signing txes in CreateTransaction (#4207)
We do not sign amounts and default sighash is SIGHASH_ALL so everything still works but it would break if/when we would start to actually sign amounts.

Missed it in https://github.com/dashpay/dash/pull/3101/files#diff-1f2db0e4d5c12d109c7f0962333c245b49b696cb39ff432da048e9d6c08944d8R3914
2021-06-24 19:08:26 +03:00
UdjinM6
20659acbd7
refactor: Better CWallet isolation in rpcevo (#4206) 2021-06-24 19:07:54 +03:00
UdjinM6
347985a8a3
tests: Stop g_txindex properly (#4205) 2021-06-24 19:07:28 +03:00
UdjinM6
9fd284d637
qt: Avoid accessing PrepareShutdown directly from qt, use Node interface (#4204) 2021-06-24 19:07:08 +03:00
UdjinM6
988fa6a235
Merge pull request #4196 from kittywhiskers/override
merge bitcoin#18914, #13306, #16424, #13899, #17486, #17880, #18145, #18843, #16710: split warnings out of CXXFLAGS, add more flags
2021-06-23 10:48:28 +03:00
PastaPastaPasta
14c631691f
Merge pull request #4201 from kittywhiskers/txEpochs
merge bitcoin#17925, #16805: auxilliary backports
2021-06-21 01:10:02 -05:00
Kittywhiskers Van Gogh
b07abef88a bitcoin#16710: Enable -Wsuggest-override if available 2021-06-17 19:54:52 +05:30
Kittywhiskers Van Gogh
638fdf25fd bitcoin#18843: warn on potentially uninitialized reads 2021-06-17 19:54:52 +05:30
Kittywhiskers Van Gogh
49921dbdd8 bitcoin#18145: add Wreturn-type to Werror flags 2021-06-17 19:54:52 +05:30
Kittywhiskers Van Gogh
01b0fc9763 bitcoin#17880: add -Wdate-time to Werror flags 2021-06-17 19:54:52 +05:30
Kittywhiskers Van Gogh
52f3975cbc bitcoin#17486: make Travis catch unused variables 2021-06-17 19:54:52 +05:30
Kittywhiskers Van Gogh
8dbe886202 bitcoin#13899: Enable -Wredundant-decls (gcc) if available 2021-06-17 19:54:51 +05:30
Kittywhiskers Van Gogh
82c9431f20 bitcoin#16424: Treat -Wswitch as error when --enable-werror 2021-06-17 19:52:12 +05:30
Kittywhiskers Van Gogh
29288dc858 bitcoin#13306: split warnings out of CXXFLAGS 2021-06-17 19:50:41 +05:30
Kittywhiskers Van Gogh
73f9fcb7e2 bitcoin#18914: Apply override specifier consistently 2021-06-17 11:25:48 +05:30
Kittywhiskers Van Gogh
0206ca2dcb bitcoin#16805: add timing information to FlushStateToDisk() 2021-06-17 10:57:37 +05:30
Kittywhiskers Van Gogh
f3e5ca703c bitcoin#17925: Improve UpdateTransactionsFromBlock with Epochs 2021-06-16 21:44:58 +05:30
UdjinM6
a8aee57447
Merge pull request #4190 from kittywhiskers/tlocks
merge #11640, #11599, #16112, #16127, #18635, #19249: thread safety and locking improvements
2021-06-11 15:23:35 +03:00
Kittywhiskers Van Gogh
cbc6186b64 merge #19249: Add means to handle negative capabilities in thread safety annotations 2021-06-10 14:35:08 +05:30
Kittywhiskers Van Gogh
51fababb9c merge #18635: Replace -Wthread-safety-analysis with -Wthread-safety 2021-06-10 14:35:05 +05:30
Kittywhiskers Van Gogh
d559983eeb merge #16127: more thread safety annotation coverage 2021-06-09 17:36:31 +05:30
Kittywhiskers Van Gogh
8bc1cae8e2 merge #16112: Log early messages 2021-06-08 07:49:35 +05:30
PastaPastaPasta
d444752591
refactor: resolve clang tidy warnings in governance (#4194)
* refac: use .empty()

* refac: remove redundant string initialization

* refac: 'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character

* refac: use empty

* refac: access static member statically

* Update src/governance/governance-object.cpp

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-06-07 00:35:29 +03:00
PastaPastaPasta
55be0003e2
Continued refactoring in bls to resolve clang tidy warnings (#4189)
* refac/bls: use default for default constructor

* refac/bls: initialize doneCount via default member initializer

* refac/bls: initialize batchCount and verifyCount via default member initializer

* refac/bls: remove unused parameter

* refac/bls: add __attribute__((unused)) where functions are unused

* refac/bls: remove unused lambda this capture

* refac/bls: Move assignment operators should be marked noexcept

* refac/bls: Single-argument constructors must be marked explicit to avoid unintentional implicit conversions

* refac/bls: fix compilation due to explicit constructor
2021-06-06 23:43:44 +03:00
UdjinM6
eea77e9642
Merge pull request #4192 from UdjinM6/backports-0.17-pr32
Backports 0.17 pr32
2021-06-06 23:42:04 +03:00
Kittywhiskers Van Gogh
944aea8753 merge #11599: Small locking rename 2021-06-06 16:22:17 +05:30
Kittywhiskers Van Gogh
c5c3dee308 merge #11640: Make LOCK, LOCK2, TRY_LOCK work with CWaitableCriticalSection 2021-06-06 16:22:17 +05:30
UdjinM6
11aa04e7ec
Bump MIN_STANDARD_TX_SIZE to 85 bytes 2021-06-06 12:29:23 +03:00
MarcoFalke
464a5e3c77
Merge #13282: trivial: Mark overrides as such.
60ebc7da4c trivial: Mark overrides as such. (Daniel Kraft)

Pull request description:

  This trivial change adds the `override` keyword to some methods that override virtual base class / interface methods.  This ensures that any future changes to the interface's method signatures which are not correctly mirrored in the subclasses will break at compile time with a clear error message, rather than at runtime.

Tree-SHA512: cc1bfa5f03b5e29d20e3eab07b0b5fa2f77b47f79e08263dbff43e4f463e9dd8f4f537e2c8c9b6cb3663220dcf40cfd77723cd9fcbd623c9efc90a4cd44facfc
2021-06-05 22:13:02 +03:00
Wladimir J. van der Laan
bb44ac04c9
Merge #13023: Fix some concurrency issues in ActivateBestChain()
dd435ad Add unit tests for signals generated by ProcessNewBlock() (Jesse Cohen)
a3ae8e6 Fix concurrency-related bugs in ActivateBestChain (Jesse Cohen)
ecc3c4a Do not unlock cs_main in ABC unless we've actually made progress. (Matt Corallo)

Pull request description:

  Originally this PR was just to add tests around concurrency in block validation - those tests seem to have uncovered another bug in ActivateBestChain - this now fixes that bug and adds tests.

  ActivateBestChain (invoked after a new block is validated) proceeds in steps - acquiring and releasing cs_main while incrementally disconnecting and connecting blocks to sync to the most work chain known (FindMostWorkChain()). Every time cs_main is released the result of FindMostWorkChain() can change - but currently that value is cached across acquisitions of cs_main and only refreshed when an invalid chain is explored. It needs to be refreshed every time cs_main is reacquired. The test added in 6094ce7304 will occasionally fail without the commit fixing this issue 26bfdbaddb

  Original description below
  --

  After a bug discovered where UpdatedBlockTip() notifications could be triggered out of order (#12978), these unit tests check certain invariants about these signals.

  The scheduler test asserts that a SingleThreadedSchedulerClient processes callbacks fully and sequentially.

  The block validation test generates a random chain and calls ProcessNewBlock from multiple threads at random and in parallel. ValidationInterface callbacks verify that the ordering of BlockConnected BlockDisconnected and UpdatedBlockTip events occur as expected.

Tree-SHA512: 4102423a03d2ea28580c7a70add8a6bdb22ef9e33b107c3aadef80d5af02644cdfaae516c44933924717599c81701e0b96fbf9cf38696e9e41372401a5ee1f3c
2021-06-05 22:13:02 +03:00
Wladimir J. van der Laan
906be7e144
Merge #11423: [Policy] Several transaction standardness rules
364bae5 qa: Pad scriptPubKeys to get minimum sized txs (MarcoFalke)
7485488 Policy to reject extremely small transactions (Johnson Lau)
0f8719b Add transaction tests for constant scriptCode (Johnson Lau)
9dabfe4 Add constant scriptCode policy in non-segwit scripts (Johnson Lau)

Pull request description:

  This disables `OP_CODESEPARATOR` in non-segwit scripts (even in an unexecuted branch), and makes a positive `FindAndDelete` result invalid. This ensures that the `scriptCode` serialized in `SignatureHash` is always the same as the script passing to the `EvalScript`.

Tree-SHA512: a0552cb920294d130251c48053fa2ff1fbdd26332e62b52147d918837852750f0ce35ce2cd1cbdb86588943312f8154ccb4925e850dbb7c2254bc353070cd5f8
2021-06-05 22:13:01 +03:00
Wladimir J. van der Laan
913079b535
Merge #13149: Handle unsuccessful fseek(...):s
20ce5af Print a log message if we fail to shrink the debug log file (practicalswift)
29c9bdc Handle unsuccessful fseek(...):s (practicalswift)

Pull request description:

  Handle unsuccessful `fseek(...)`:s.

  **Note to reviewers:** What is the most appropriate course of actions for each of these unsuccessful `fseek(...)`:s?

Tree-SHA512: 5b3d82dbdd15d434d3f08dcb4df62888da4df8541d2586f56a4e529083005f6782c39e10645acd1ec403da83061bbfd8dbf2dddc66e09268d410ad0918c61876
2021-06-05 22:13:01 +03:00
Wladimir J. van der Laan
732697586f
Merge #13154: Trivial: s/SetBestChain/ChainStateFlushed in comments after #13106
21f5680 Trivial: s/SetBestChain/ChainStateFlushed in comments after #13106 (Russell Yanofsky)

Pull request description:

Tree-SHA512: 373896dd73c3ba202739433b22320a4b7ea6dc80ef84547b4ed72c7ae0d6746b109c8b1879359c43374d1816fe384cc31b24b87879ddefe993887140c2f0df9c
2021-06-05 22:13:01 +03:00
Wladimir J. van der Laan
56bd5aea1b
Merge #13106: Simplify semantics of ChainStateFlushed callback
9cb6cdc Simplify semantics of ChainStateFlushed callback (Matt Corallo)
50b6533 scripted-diff: Rename SetBestChain callback ChainStateFlushed (Matt Corallo)

Pull request description:

  Previously, ChainStateFlushed would fire either if a full flush
  completed (which can happen due to memory limits, forced flush, or
  on its own DATABASE_WRITE_INTERVAL timer) *or* on a
  ChainStateFlushed-specific DATABASE_WRITE_INTERVAL timer. This is
  both less clear for clients (as there are no guarantees about a
  flush having actually happened prior to the call), and reults in
  extra flushes not clearly intended by the code. We drop the second
  case, providing a strong guarantee without removing the periodit
  timer-based flushing.

  This is a follow-up to discussion in #11857.

Tree-SHA512: 22ba3a0954d265d28413dbf87040790ca5b439820ee7bbadab14028295ec190de82ce5cd664426c82e58b706dc84278868026fa8d066702eb6e6962c9ace1f8e
2021-06-05 22:13:01 +03:00
Wladimir J. van der Laan
370ec04a02
Merge #13002: Do not treat bare multisig outputs as IsMine unless watched
7d0f80b Use anonymous namespace instead of static functions (Pieter Wuille)
b61fb71 Mention removal of bare multisig IsMine in release notes (Pieter Wuille)
9c2a8b8 Do not treat bare multisig as IsMine (Pieter Wuille)
08f3228 Optimization: only test for witness scripts at top level (Pieter Wuille)
3619735 Track difference between scriptPubKey and P2SH execution in IsMine (Pieter Wuille)
ac6ec62 Switch to a private version of SigVersion inside IsMine (Pieter Wuille)
19fc973 Do not expose SigVersion argument to IsMine (Pieter Wuille)
fb1dfbb Remove unused IsMine overload (Pieter Wuille)
952d821 Make CScript -> CScriptID conversion explicit (Pieter Wuille)

Pull request description:

  Currently our wallet code will treat bare multisig outputs (meaning scriptPubKeys with multiple public keys + `OP_CHECKMULTISIG` operator in it) as ours without the user asking for it, as long as all private keys in it are in our wallet.

  This is a pointless feature. As it only works when all private keys are in one place, it's useless compared to single key outputs (P2PK, P2PKH, P2WPKH, P2SH-P2WPKH), and worse in terms of space, cost, UTXO size, and ability to test (due to lack of address format for them).

  Furthermore, they are problematic in that producing a list of all `scriptPubKeys` we accept is not tractable (it involves all combinations of all public keys that are ours). In further wallet changes I'd like to move to a model where all scriptPubKeys that are treated as ours are explicit, rather than defined by whatever keys we have. The current behavior of the wallet is very hard to model in such a design, so I'd like to get rid of it.

  I think there are two options:
  * Remove it entirely (do not ever accept bare multisig outputs as ours, unless watched)
  * Only accept bare multisig outputs in situations where the P2SH version of that output would also be acceptable

  This PR implements the first option. The second option was explored in #12874.

Tree-SHA512: 917ed45b3cac864cee53e27f9a3e900390c576277fbd6751b1250becea04d692b3b426fa09065a3399931013bd579c4f3dbeeb29d51d19ed0c64da75d430ad9a
2021-06-05 22:13:00 +03:00
Wladimir J. van der Laan
4ae641ca18
Partial merge #8499: Add several policy limits and disable uncompressed keys for segwit scripts
67d6ee1 remove redundant tests in p2p-segwit.py (Johnson Lau)
9260085 test segwit uncompressed key fixes (Johnson Lau)
248f3a7 Fix ismine and addwitnessaddress: no uncompressed keys in segwit (Pieter Wuille)
b811124 [qa] Add tests for uncompressed pubkeys in segwit (Suhas Daftuar)
9f0397a Make test framework produce lowS signatures (Johnson Lau)
4c0c25a Require compressed keys in segwit as policy and disable signing with uncompressed keys for segwit scripts (Johnson Lau)
3ade2f6 Add standard limits for P2WSH with tests (Johnson Lau)
2021-06-05 22:12:55 +03:00
PastaPastaPasta
ead46a6236
refactor: make nType an unsigned integer, resolve undefined behavior (#4184) 2021-06-05 22:10:27 +03:00
UdjinM6
bcc8b35194
Merge pull request #4178 from UdjinM6/backports-0.17-pr30
Merge #13033: Build txindex in parallel with validation
2021-06-05 22:08:47 +03:00
PastaPastaPasta
639f42abb7
instantsend: misc refactorings (#4017)
* instantsend: remove unused variable sum of input value

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

* instantsend: Access static member statically

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

* refac: make functions private as possible
2021-06-05 22:07:52 +03:00
strophy
85296954d3
feat: add tor entrypoint script for use in dashmate (#4182)
* feat: add entrypoint for tor features in dashmate

* fix: use spaces consistently for indendation

* fix: output blank line after info

* fix: ensure script is executable

* fix: keep linter happy
2021-06-02 12:54:57 -05:00
UdjinM6
2d500ee504
Merge pull request #4181 from UdjinM6/pr4025
ADDRv2 and TORv3
2021-06-01 13:39:37 +03:00
Kittywhiskers Van Gogh
680067ce7a
merge #19954: Complete the BIP155 implementation and upgrade to TORv3 2021-05-29 23:24:52 +03:00
Kittywhiskers Van Gogh
20bd3017b9
merge #19845: add support to (un)serialize as ADDRv2 2021-05-29 23:24:02 +03:00
UdjinM6
b4b24d370c
Merge pull request #4180 from UdjinM6/pre_pr4025_serialization
Various serialization backports
2021-05-29 23:23:19 +03:00
UdjinM6
ef8ae6cf92
Merge pull request #4179 from UdjinM6/backports-0.17-pr31
Backports 0.17 pr31
2021-05-29 23:04:03 +03:00
UdjinM6
011a178c60
Other Dash-specific serializations 2021-05-28 12:31:13 +03:00
UdjinM6
d60a6d1729
Convert bitset serializationis to use formatters 2021-05-28 12:31:13 +03:00
UdjinM6
64d4a48a09
Some missing non-Dash-specifc serializations 2021-05-28 11:39:25 +03:00