Commit Graph

19116 Commits

Author SHA1 Message Date
dustinface
021671bc4e
depends: Bump bls-dash to 1.1.0 (#4162) 2021-05-19 04:20:44 +03:00
UdjinM6
cd7cd85fe7
instantsend: Use NotifyEntryRemoved signal instead of calling CInstantSendManager::TransactionRemovedFromMempool from CTxMemPool::removeUnchecked directly (#4160)
* instantsend: Use `NotifyEntryRemoved` signal instead of calling `CInstantSendManager::TransactionRemovedFromMempool` from `CTxMemPool::removeUnchecked` directly

Fixes potential mempool.cs vs cs_main (in RemoveConflictingLock) deadlock

* Apply suggestions from code review

yay, typso!

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2021-05-19 01:02:31 +02:00
UdjinM6
a02f8302d9
instantsend: Postpone mempool related cleanup fixes until dip0020 activation (#4159)
* instantsend: Upgrade IS db on dip0020 activation

* instantsend: Do not remove islocks for txes removed from mempool until dip0020 is activated

* refactor: introduce fUpgradedDB to avoid excessive locking and checking the state

* llmq: Decouple `fUpgradedDB` from `cs`

* Update src/llmq/quorums_instantsend.cpp

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* Fix deadlock

Upgrade locks cs_main via GetTransaction

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2021-05-18 15:29:51 -05:00
UdjinM6
288f5976a8
build: Fix cmake prefix for bls-dash package (#4158) 2021-05-17 23:22:48 +03:00
UdjinM6
a89202726f
instantsend: Remove islocks for rejected/removed txes (#4155)
* instantsend: Resolve block conflicts first and take care of mempool ones later

* refactor: Rename RemoveChainLockConflictingLock -> RemoveConflictingLock

* instantsend: Handle transaction removal from mempool (for all reasons besides inclusion in blocks)

* instantsend: Remove old islocks with no known txes from db (once)

* refactor: Replace magic number with CURRENT_VERSION

* fix: Do not remove islocks for (yet) valid orphans

* Apply suggestions from code review

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2021-05-14 19:17:16 -05:00
UdjinM6
20b71700dc
Merge pull request #4037 from kittywhiskers/serialize
merge #12752, #10785, #17896, #17957, #18021, #18112: serialization improvements
2021-05-15 02:06:43 +03:00
UdjinM6
73b5359532
evo: Fix two mempool issues (#4154)
* evo: Remove all protx-es that refer to a ProRegTx removed from mempool

* tests: Check that removal of ProRegTx causes removal of other protx-es that refer to it

* evo: Consider tx itself a collateral in mempool maps when payload collateral hash is null

* tests: Should not allow a ProRegTx which uses another ProRegTx as an external collateral to enter mempool
2021-05-14 12:55:03 -05:00
Kittywhiskers Van Gogh
748e175680
depends: update Qt 5.9 source url (#4153) 2021-05-13 12:32:12 +03:00
dustinface
314844d330
contrib|src: Update hard coded seeds (#4152)
* contrib: Update IPs in nodes_main.txt and nodes_test.txt

Mainnet: 1469339
Testnet: 498026

* src: Update static seeds in chainparamsseeds.h
2021-05-13 12:31:45 +03:00
PastaPastaPasta
1072e23ff5
increase BLOCK_CHAIN_SIZE marginally (#4150) 2021-05-12 11:49:12 -05:00
UdjinM6
a02e754fd9
qt: Transaltions202105 (#4137)
* Abstract some error specifics away

* `make translate`

* ru

* fi
2021-05-12 00:56:24 +02:00
thephez
79f1f96603
docs: update bips.md for v0.17 (#4149) 2021-05-11 16:31:48 -05:00
dustinface
b06c69a48c
llmq: Drop quorumHeight in CDKGSessionHandler (#4128)
* llmq: Drop unused quorumHeight

* llmq: Adjust variable name in log

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2021-05-11 16:28:58 -05:00
UdjinM6
5cdd67ed53
tests: Use wait_for_chainlocked_block_all_nodes in more places (#4139) 2021-05-11 18:55:40 +02:00
dustinface
5285bd801c
Merge pull request #4138 from UdjinM6/make_shellcheck_0.7.2_happy
Backport 13066, 13448 and fix `commit-script-check.sh` to make shellcheck 0.7.2 happy
2021-05-11 18:54:55 +02:00
UdjinM6
1a31669cf1
build: Bump relic to 3a23142be0a5510a3aa93cd6c76fc59d3fc732a5 (#4144) 2021-05-11 18:50:44 +02:00
UdjinM6
90d7e1f370
instantsend: Partially revert 3987, add more tests for CL vs IS conflicts (#4146)
* tests: Check that CLs override ISes which invalidated non-CLed blocks earlier

* partial revert 3987: Do not mark blocks which conflict with ISes as "conflicting"
2021-05-11 18:50:14 +02:00
UdjinM6
721db5bbeb
qt: Fix recent txes list not shoing up initially when CJ is disabled (#4136) 2021-05-07 18:41:32 +02:00
UdjinM6
3ebef510bc
Improve CHDChain (#4125)
* Protect all CHDChain's internals

* Do not create default HD chain account in CHDChain's ctor
2021-05-07 18:40:50 +02:00
UdjinM6
7616b04cb2
Rename bit 6 from "v17" to "dip0020" (#4142) 2021-05-07 18:36:30 +02:00
UdjinM6
1fde524ccb
llmq: Bump llmq leveldb cache size to 8 MiB (#4133) 2021-05-06 13:43:33 -04:00
dustinface
3a1d168a33
qt: Fix some font weight related issues (#4131)
* qt: Add missing -font-family overridden check

* qt: Add missing `QFont::ExtraBold`

* qt: Remove settings depencency from GUIUtil::loadFonts and load earlier

* qt: Modify supportedWeightToIndex

Return -1 in case of failure

* qt: Add GUIUtil::isSupportedWeight

* qt: Make sure there are always supported weights in the settings

* qt: Add "supported defaults" + store weights based on font family

* qt: Use supported defaults in update weight sliders

* qt: Use supported defaults when updating weight sliders

* qt: Fix tests
2021-05-06 13:15:47 -04:00
Kittywhiskers Van Gogh
d03eed72a7
Merge #21662: build: update Boost download URL (#4140)
See 36c10b9f4b from https://github.com/bitcoin/bitcoin/pull/21662/commits
2021-05-06 13:14:22 -04:00
Wladimir J. van der Laan
c0db4fddf0
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
2021-05-06 12:06:09 +03:00
Wladimir J. van der Laan
9dac547275
Merge #13066: Migrate verify-commits script to python, run in travis
e5b2cd8e7564b9fc2ed4f63fe49efb0af60b4460 Use python instead of slow shell script on verify-commits (Chun Kuan Lee)

Pull request description:

  The cron job that runs every day would fail because of git checkout a single commit, not a branch.

  #12708 introduce a method to check whether merges are clean.
  However, there are four merges are not clean.
  So, I add a list of merges that are dirty and ignore them.

  Also, I modify the current shell script to python, it makes the script speed up a lot.
  The python code `tree_sha512sum` was copied from `github-merge.py`

  I've re-designed this. Now we verify all the things by default.
  - Add `--disable-tree-check` option, not to check SHA-512 tree
  - Add `--clean-merge NUMBER` option, only verify commits after &lt;NUMBER> days ago

  Travis running time:

  |option|time|
  |-|-|
  |verify-commits.py|[25m47.02s(1547.02s)](https://travis-ci.org/ken2812221/bitcoin/jobs/373321423)|
  |verify-commits.py --disable-tree-check|[19m10.08s(1150.08s)](https://travis-ci.org/ken2812221/bitcoin/jobs/373321423)|
  |verify-commits.py --clean-merge 30|[9m18.18s(558.18s)](https://travis-ci.org/ken2812221/bitcoin/jobs/373321423)|
  |verify-commits.py --disable-tree-check --clean-merge 30|[1m16.51s(76.51s)](https://travis-ci.org/ken2812221/bitcoin/jobs/373321423)|

  Since the cron job always fail, I've created a respository to verify this daily.
   [![Build Status](https://travis-ci.org/ken2812221/bitcoin-verify-commits.svg?branch=master)](https://travis-ci.org/ken2812221/bitcoin-verify-commits)

Tree-SHA512: 476bcf707d92ed3d431ca5642e013036df1506120d3dd2aa718f74240063ce856abd78f4c948336c2a6230dfe5c60c6f2d52d19bdb52d647a1c5f838eaa02e3b
2021-05-06 12:06:09 +03:00
UdjinM6
c56b7dfefe
evo: Refactor (Add/Update/Remove)MNs to do the job in one go (#4132)
* evo: Refactor (Add/Update/Remove)MNs to do the job in one go

Instead of hashing the value and querying `mnUniquePropertyMap` both 2 or 3 times per property.

Also unify their error messages while at it.

* evo: Align nullValue checks with others in {Add|Delete}UniqueProperty

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2021-05-05 23:40:45 -04:00
UdjinM6
9862ea7e10
refactor: Drop excessive std::string conversions (#4130) 2021-05-05 23:30:35 -04:00
UdjinM6
fa2909d25b
Initialize nTime* members of CMasternodeSync with GetTime() (#4129) 2021-05-05 23:27:42 -04:00
UdjinM6
43b443d187
qt: Drop custom migration logic (#4135)
Use OptionsModel::checkAndMigrate() instead and clean up the mess one more time.

Also fixes `-resetguisettings`.
2021-05-05 23:26:02 -04:00
UdjinM6
182887acb9
instantsend: Push matching islocks when replying to merkleblock inv in getdata only when all txes are pushed (#4134) 2021-05-05 23:24:30 -04:00
UdjinM6
f488d938f9
Make shellcheck 0.7.2 happy
Fixes `SC2268: Avoid x-prefix in comparisons as it no longer serves a purpose.`
2021-05-05 14:12:04 +03:00
PastaPastaPasta
15f7336396
rpc: spend less time in cs_main lock (#4120)
* rpc: spend less time in cs_main lock

* Do not access chainActive without cs_main, hold cs_main while accessing GetMineableCommitment

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-04-29 12:14:53 -04:00
UdjinM6
ca93a5cb55
Initialize CMasternodeSync class members instead of calling Reset() in ctor (#4124) 2021-04-29 01:04:03 -04:00
PastaPastaPasta
38a4ce2742
Resolve a number of data races (#4122)
* refactor: add cs for mn sync

* refactor: add better locking in mn sync

* refactor: lock cs_main in mining

* masternode: Fix log after 8bbf2c7435

* masternode: Fix another `pindexBestHeader` access by removing it

Should be the same at the end because `pindexBestHeader` is what is
getting notified by `pindexNew`.

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2021-04-28 14:15:49 -04:00
UdjinM6
704d34b2e4
bls|ci: Fix C++17 build, add it to CI (#4055)
* ci: Add C++17 build

* bls: Add explicit CBLSSecretKey copy ctor and operator=
2021-04-28 16:44:01 +02:00
UdjinM6
08ebd31fdb
rpc: Bail out early when no wallet is available in rpcs that require it, even on help <cmd> (#4123) 2021-04-27 17:12:12 +03:00
PastaPastaPasta
bf7b6adef2
refactor: Add a bunch of GUARDED_BY(*) in llmq code (#4121) 2021-04-27 17:11:45 +03:00
PastaPastaPasta
81067b435f
tests: Add more unit tests for bls/bls.cpp (#4118)
* tests: Add more unit tests for bls/bls.cpp

* Make bls_key_agg_tests a bit more readable

* Compare pubkeys, not their string representations

* Use GetRandHash

* Clarify sig manipulations in bls_sig_agg_sub_tests

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-04-27 17:10:43 +03:00
UdjinM6
bf01ed7881
Merge pull request #4036 from kittywhiskers/spans
partial merge #13697, #18591, #19387, #18468: update constructors to match c++20 draft spec
2021-04-27 17:10:19 +03:00
dustinface
9feb9250ce
rpc|llmq|test: Implement verifychainlock (#4119)
* llmq: Make CLSIG_REQUESTID_PREFIX available outside of quorums_chainlocks.cpp

* rpc: Implement `verifychainlock`

* test: Add rpc_verifychainlock.py

* rpc: Fix help text

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-04-26 13:51:15 +02:00
Kittywhiskers Van Gogh
5667698546 Merge #19387: span: update constructors to match c++20 draft spec and add lifetimebound attribute
62733fee87
1d58cc7cb0
e3e7446305
2021-04-23 20:02:41 +05:30
Kittywhiskers Van Gogh
ec2eec0ccd Partial #18468: Span improvements
1f790a1147
bb3d38fc06
ab303a16d1
26acc8dd9b
2021-04-23 20:02:41 +05:30
Kittywhiskers Van Gogh
9304ba296f Merge #18388: Make VerifyWitnessProgram use a Span stack
2b0fcff7f2
2021-04-23 20:02:38 +05:30
Kittywhiskers Van Gogh
de0af7b7b3 Merge #18591: Add C++17 build to Travis
7cbfebbf3d
0fbde488b2
7829685e27
2021-04-23 20:02:35 +05:30
PastaPastaPasta
da480fcd70
refactoring: governance tidying and include refactoring (#4111)
* remove unneeded semi-colons

* remove an unneeded CGovernanceException

* adjust and optimize listVotes to vector conversion

* governance-vote.h forward declare and include in cpp

* governance: use more forward decl. less includes in headers

* remove a number of unneeded includes in dash rpc code

* resolve circular depends linter

* Reorder includes

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-04-23 00:32:03 +02:00
PastaPastaPasta
78f277bfe4
trivial/refactoring: simple bls refactoring / adjustments (#4114)
* use std::make_unique instead of reset which prevents a theoretical memory leak

* pass by value and use std::move

* use empty instead of comparing to size

* remove extra space

* adjust include postitioning

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-04-23 00:26:22 +02:00
PastaPastaPasta
c5b919d084
Update copyright (#4115)
* run: `python3 contrib/devtools/copyright_header.py update .`

* bump copyright year
2021-04-20 22:33:02 +03:00
PastaPastaPasta
d70d987be2
refactor: remove some validationinterface includes, resolve circular depends (#4116) 2021-04-20 22:32:27 +03:00
PastaPastaPasta
89ba06e72c
trivial/refactoring: include adjustments and typo fixes (#4112)
* unused include

* fix typos

* unused include in rpc/coinjoin.cpp
2021-04-20 22:31:25 +03:00
dustinface
cea353f4b8
Merge pull request #4099 from PastaPastaPasta/backports-0.17-pr28
Backports 0.17 pr28
2021-04-19 17:20:00 +02:00