Commit Graph

414 Commits

Author SHA1 Message Date
Kittywhiskers Van Gogh
6718789ada merge bitcoin#17449: fix uninitialized variable nMinerConfirmationWindow 2021-12-12 20:32:49 +05:30
Kittywhiskers Van Gogh
ac4dc7f4a6 merge bitcoin#16713: Ignore old versionbit activations to avoid 'unknown softforks' warning 2021-12-12 20:32:48 +05:30
pravblockc
459bc3ee7e
add ehf special tx (#4577) 2021-12-11 23:00:27 +03:00
PastaPastaPasta
49bd9bdc1b
fix: decrease devnet gov_fee activation params (#4596)
No reason for devnet activation to take this long
2021-12-01 21:12:39 +03:00
Holger Schinzel
ae98cd41af
Remove decomissioned mainnet seeder dnsseed.dashdot.io (#4588)
I'll switch off dnsseed.dashdot.io on 2021/12/31 - testnet seeder testnet-seed.dashdot.io will stay online until further notice.
2021-11-29 12:45:43 -05:00
PastaPastaPasta
2204c85370
governance: Implement reduced governance fee (#4241)
* Implement hf for reduced governance fee

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

* update VersionBitsDeploymentInfo

* Adjust activation times for gov fee hard fork

* Use raw timestamps

* Adjust timestamps

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-11-01 18:31:48 +03:00
UdjinM6
ea8d4c26b6
refactor: more LLMQ params related refactoring (#4517)
* refactor: Turn LLMQType into `enum class`

* refactor: Simplify/make LLMQ additions safer

* refactor: Move `is_serializable_enum<Consensus::LLMQType>` to `src/llmq/params.h`

* refactor: Add missing include

* refactor: Add missing comment

* Use `static_cast`

* make available_llmqs constexpr array

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

* cleanup/fixes

Co-authored-by: pasta <pasta@dashboost.org>
2021-10-15 13:28:19 +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
Kittywhiskers Van Gogh
af7cae777b move-only: move llmq parameters to their own file 2021-10-09 22:28:13 +05:30
rkarthik2k21
f456edb07e
merge bitcoin#13311: Don't edit Chainparams after initialization (#4362)
* Merge #13311: Don't edit Chainparams after initialization

6fa901fb47 Don't edit Chainparams after initialization (Jorge Timón)
980b38f8a1 MOVEONLY: Move versionbits info out of versionbits.o (Jorge Timón)

Pull request description:

  This encapsulates the "-vbparams" option, which is only meant for regtest, directly on CRegTestParams.

  This is a refactor and doesn't change functionality.

  Related to https://github.com/bitcoin/bitcoin/pull/8994

Tree-SHA512: 79771d729a63a720e743a9c77d5e2d80369f072d66202a43c1304e83a7d0ef7c6103d4968a03aea9666cc89a7203c618da972124a677b38cfe62ddaeb28f9f5d

* Resolve Merge with #13311

* Incorporated review changes

* Apply suggestions from code review

* Update src/chainparams.cpp

* Update src/chainparams.cpp

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

* Apply suggestions from code review

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

Co-authored-by: MarcoFalke <falke.marco@gmail.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2021-09-03 01:36:11 +03:00
Jonas Schnelli
583c2ee123 Merge #13216: [Qt] implements concept for different disk sizes on intro
9d0e52834 implements different disk sizes for different networks on intro (marcoagner)

Pull request description:

  Fixes https://github.com/bitcoin/bitcoin/issues/13213.
  Mostly, I layed out the concept to open the PR for refinement and getting feedback if the approach is okay. Changes are expected.

  Two points:
  - The values for both new consts `TESTNET_BLOCK_CHAIN_SIZE` and `TESTNET_CHAIN_STATE_SIZE` is certainly not optimal; I just checked the size of my testnet3 related dirs and set them to little bit higher values. Which values should be used?
  - Should we do something like this to regtest? Or these "niceties" do not matter when on regtest?

  Thanks!

Tree-SHA512: 8ae87a29fa8356b899e7a823c76cde793d9126b4ee59554d7a2a8edb088fe42a19976b34c06c2fd4a98a727e1e4971dd983f42b6093ea6caa255b45004e22bb4
2021-08-24 19:14:49 -04:00
UdjinM6
541d0a0255
Disable DIP0020 activation timeout on devnet (#4299) 2021-07-29 12:59:21 +03:00
Wladimir J. van der Laan
d42dc653ab Merge #14149: doc: Remove misleading checkpoints comment in CMainParams
fab52675144480c96c5564da4650205f1a41b08e doxygen: Remove misleading checkpoints comment in CMainParams (MarcoFalke)

Pull request description:

  This removes the checkpoints comment because it is misleading for two reasons:

  * It shows up in the doxygen documentation of `CMainParams` https://dev.visucore.com/bitcoin/doxygen/class_c_main_params.html
  * The comment refers to "strange transactions" in a block, which are not specified further. Transactions in blocks are always consensus-valid or rejected as consensus-invalid.

  Also sort the includes with `clang-format`, as the file is touched anyway.

Tree-SHA512: b75f38dd0422b9310218307cbaa4dd5afa7579612d7dcdf781b8f25626f79c11e090dbcc83a05571f4418220c1a005f6254a9c461534d517ccecf7f1920be6be

# Conflicts:
#	src/chainparams.cpp
2021-07-07 12:04:54 -04:00
Kittywhiskers Van Gogh
ef4dfa8524 merge bitcoin#14555: Move util files to directory
(script modified to account for Dash backports, doesn't account for rebasing)

------------- BEGIN SCRIPT ---------------
mkdir -p src/util
git mv src/util.h src/util/system.h
git mv src/util.cpp src/util/system.cpp
git mv src/utilmemory.h src/util/memory.h
git mv src/utilmoneystr.h src/util/moneystr.h
git mv src/utilmoneystr.cpp src/util/moneystr.cpp
git mv src/utilstrencodings.h src/util/strencodings.h
git mv src/utilstrencodings.cpp src/util/strencodings.cpp
git mv src/utiltime.h src/util/time.h
git mv src/utiltime.cpp src/util/time.cpp
git mv src/utilasmap.h src/util/asmap.h
git mv src/utilasmap.cpp src/util/asmap.cpp
git mv src/utilstring.h src/util/string.h
git mv src/utilstring.cpp src/util/string.cpp

gsed -i 's/<util\.h>/<util\/system\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
gsed -i 's/<utilmemory\.h>/<util\/memory\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
gsed -i 's/<utilmoneystr\.h>/<util\/moneystr\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
gsed -i 's/<utilstrencodings\.h>/<util\/strencodings\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
gsed -i 's/<utiltime\.h>/<util\/time\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
gsed -i 's/<utilasmap\.h>/<util\/asmap\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
gsed -i 's/<utilstring\.h>/<util\/string\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')

gsed -i 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h
gsed -i 's/BITCOIN_UTILMEMORY_H/BITCOIN_UTIL_MEMORY_H/g' src/util/memory.h
gsed -i 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h
gsed -i 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h
gsed -i 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h
gsed -i 's/BITCOIN_UTILASMAP_H/BITCOIN_UTIL_ASMAP_H/g' src/util/asmap.h
gsed -i 's/BITCOIN_UTILSTRING_H/BITCOIN_UTIL_STRING_H/g' src/util/string.h

gsed -i 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am
gsed -i 's/utilmemory\.\(h\|cpp\)/util\/memory\.\1/g' src/Makefile.am
gsed -i 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am
gsed -i 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am
gsed -i 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am
gsed -i 's/utilasmap\.\(h\|cpp\)/util\/asmap\.\1/g' src/Makefile.am
gsed -i 's/utilstring\.\(h\|cpp\)/util\/string\.\1/g' src/Makefile.am

gsed -i 's/-> util ->/-> util\/system ->/' test/lint/lint-circular-dependencies.sh
gsed -i 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-format-strings.py test/lint/lint-locale-dependence.sh
gsed -i 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh
gsed -i 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh
------------- END   SCRIPT ---------------
2021-06-27 12:03:13 +05:30
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
UdjinM6
7616b04cb2
Rename bit 6 from "v17" to "dip0020" (#4142) 2021-05-07 18:36:30 +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
UdjinM6
cc21461baf
Bump chainparams for mainnet and testnet (#4087)
* Bump nMinimumChainWork and defaultAssumeValid for mainnet and testnet

* Bump DEPLOYMENT_V17 start and timeout

* Bump chaintxdata

mainnet:
{
  "time": 1617874573,
  "txcount": 34709765,
  "window_final_block_hash": "000000000000000bd7dac80e97279c984a3266145c130ab76021f5bac6d80ff3",
  "window_block_count": 17280,
  "window_tx_count": 822851,
  "window_interval": 2723924,
  "txrate": 0.3020829509193355
}

testnet:
{
  "time": 1617874832,
  "txcount": 4926985,
  "window_final_block_hash": "000000b0940bec06e3245dc787743b3a7f039068878aa1c7c6d5b44c443770bf",
  "window_block_count": 17280,
  "window_tx_count": 26190,
  "window_interval": 2438451,
  "txrate": 0.01074042496650538
}
2021-04-10 16:34:26 -04:00
UdjinM6
8da57523b7
Make recently added help strings dynamic, add one missing string (#3996)
* docs: Add help for -recsigsmaxage option

* Make `-llmq-data-recovery` help string dynamic

* Make devnet/regtest specific help strings dynamic

Only show devnet related help strings on devnet.

* Make linter happy

* Skip FindDevNetGenesisBlock when creating devnet params for help purposes only
2021-02-23 01:46:40 +03:00
dustinface
ccbf574fa3
chainparams|init: Add -llmqinstantsend command line parameter for devnets (#3956)
* chainparams: Add methods to adjust llmqTypeInstantSend

* init: Add -llmqinstantsend command line parameter for devnets
2021-01-21 14:29:14 -06:00
UdjinM6
52cbc7fe0d
Extend activation timeout for all past bits (#3905)
Set `nTimeout` to `999999999999ULL` on testnet and devents for all bits that were activated on mainnet already to ensure they are going to be activated on future network resets.
2020-12-31 15:43:43 +01:00
UdjinM6
687aece098
Harden DIP0008 activation (#3889)
* Harden DIP0008 activation

* Update src/llmq/quorums_instantsend.cpp

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

* Update test/functional/test_framework/test_framework.py

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

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2020-12-28 12:21:01 +01:00
UdjinM6
cf64339517
consenus: Implement LLMQ_100_67 quorums (#3844)
* Add LLMQ_100_67 quorums

* Re-use DEPLOYMENT_V17 bit to activate LLMQ_100_67 quorums

* Add LLMQ_TEST_NEW quorum and test its activation

* Tweak mine_quorum to work correctly with multiple quorum types

And to avoid a potentialy endless "while" loop

* llmq: Rename IsQuorumTypeEnabledAtBlock -> IsQuorumTypeEnabled

* chainparams|test: Rename llmq_test_new -> llmq_test_v17

* chainparams|consensus|llmq: Rename LLMQ_TEST_NEW -> LLMQ_TEST_V17

* Tweak few strings and the name of the test

* llmq: Make GetEnabledQuorumTypes return a vector of LLMQTypes, introduce GetLLMQParams

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

* Tweak minSize

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

* Exclude LLMQ_100_67 from Concentrated Recovery

* Update test/functional/feature_new_quorum_type_activation.py

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

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
Co-authored-by: pasta <pasta@dashboost.org>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2020-12-10 00:08:05 +01:00
UdjinM6
f13852e662
PrivateSend: Harden SPORK_22_PS_MORE_PARTICIPANTS (#3860) 2020-12-09 20:00:08 +00:00
PastaPastaPasta
a4d254389c
Implement new hardfork for v17 to be used in future changes (#3808)
* Implement new hardfork for v17 to be used in future changes

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

* fix comment

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-11-17 19:28:14 +00:00
PastaPastaPasta
69b36f9672
bump nMinimumChainWork, defaultAssumeValid, checkpointData for mainnet and testnet (#3789)
Signed-off-by: pasta <pasta@dashboost.org>
2020-11-04 16:40:50 +03:00
UdjinM6
b441e31ecb
Bump few things and update man pages for v0.16 (#3737)
* Update nMinimumChainWork and defaultAssumeValid

* Update chainTxData

* Bump BLOCK_CHAIN_SIZE

It's 21Gb on my local machine atm, bumping to 25Gb to give it some space

* `gen-manpages.sh`

* bupm BLOCK_CHAIN_SIZE 25->30
2020-09-28 19:53:41 +03:00
UdjinM6
ab8347e06b
Implement dynamic activation thresholds (#3692)
* Implement dynamic activation thresholds

* fix

* Revert unrelated changes

* Clarify switching to/staying in LOCKED_IN state

* Fix signal function to work correctly with num_blocks=0

* Add simplified threshold calculation and use it in tests

* Check that thresholds are decreasing, reach the min level and stay there

* Drop `;`
2020-09-12 17:33:12 +03:00
dustinface
1e835a629e
chainparams: Remove llmq_50_60 from regtest (#3696)
Its just not used anywhere so there is no point in starting the thread 
for it imo since it just spams the test logs with tries/failures.
2020-09-10 19:28:56 +03:00
UdjinM6
d838ec0370
Implement Block Reward Reallocation (#3691)
* Implement Block Reward Reallocation

* Add integr. test

* drop unused variable

* Sep -> Oct

* Update test/functional/feature_block_reward_reallocation.py

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

* Revert to Sep for testnet and devnet

* validation: Refactor reallocation calculations

Makes it much more readable imo and avoids calculating the percentage
each time.

* test: Align reallocation calculation with c++ (GetMasternodePayment)

* test: Make feature_block_reward_allocation.py executable

* Make linter happy

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2020-09-10 19:23:11 +03:00
PastaPastaPasta
8baf69d448
Harden spork6 logic then remove spork6 (#3662)
* Harden Spork6

Spork6 was previously activated on testnet, but we then developed an alternative fix for the issue and never activated spork6 on mainnet. At this point, Spork6 will not be activated on mainnet.
As such, it makes sense to harden Spork6 and ensure that spork6 will never be activated on mainnet. So, we just change from checking Spork6 to checking if we are on testnet. If we are on testnet, use spork6 logic, else don't.

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

* remove now unused SPORK_6_NEW_SIGS

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

* force fSporkSixActive to be correct, otherwise return

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

* Harden spork6 even more

* Add TODO in chainparams as a reminder to drop all spork6 related code on next testnet reset

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-08-30 17:22:21 +03:00
PastaPastaPasta
1d94d914c5
privatesend: Increase max participants to 20 (#3610)
* Add spork to change max mixing participants to 20

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

* Also change min participants on devnet/testnet

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

* adjust formatting

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

* add nPoolNewMinParticipants under regtest

Signed-off-by: pasta <pasta@dashboost.org>
2020-07-17 13:19:29 +03:00
MarcoFalke
005d241fea Merge #11878: Add Travis check for duplicate includes
c36b720d00 Add Travis check for duplicate includes (practicalswift)
280023f31d Remove duplicate includes (practicalswift)

Pull request description:

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

  Example run:

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

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

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

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

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

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

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

Tree-SHA512: f653d23c58ebc024dfc5b1fb8570698fd3c515c75b60b5cabbc43595548c488fca92349fa4c8b64460edbe61c879ff1d24f37f959e18552e202a7342460ddbf1
2020-07-01 20:12:03 -05:00
Alexander Block
aab4852801
Fix argument handling for devnets (#3549)
* Use "devnet" instead of "dev" for network id

Otherwise one would have to use "dev.port=123" in configs, which might
be confusing as we usually name such networks "devnet".

* Fix ArgsManager::GetChainName to work with devnets again

-devnet is not a boolean arg, but a string. So we have to check for
existence only.
2020-06-24 10:03:53 +02:00
MarcoFalke
0d4d3c3254
Merge #12283: Fix typos
1340eda3b7 Fix typos (practicalswift)

Pull request description:

  Fix typos.

Tree-SHA512: 533a136831387ef26e9a74ba078437496bee38cc026da73fa9e6f6e7f4d5665eccac24cf3ef05e6d3af1329a1214f5ce71b039ddb8378b074e6d4408b8701f95
2020-06-10 18:32:43 -05:00
Jonas Schnelli
aaf5bf1a7e Merge #12878: [refactor] Config handling refactoring in preparation for network-specific sections
77a733a99 [tests] Add additional unit tests for -nofoo edge cases (Anthony Towns)
af173c2be [tests] Check GetChainName works with config entries (Anthony Towns)
fa27f1c23 [tests] Add unit tests for ReadConfigStream (Anthony Towns)
087c5d204 ReadConfigStream: assume the stream is good (Anthony Towns)
6d5815aad Separate out ReadConfigStream from ReadConfigFile (Anthony Towns)
834d30341 [tests] Add unit tests for GetChainName (Anthony Towns)
11b6b5b86 Move ChainNameFromCommandLine into ArgsManager and rename to GetChainName (Anthony Towns)

Pull request description:

  This does a bit of refactoring of the configuration handling code in order to add additional tests to make adding support for [test]/[regtest] sections in the config file in #11862 easier. Should not cause any behaviour changes.

Tree-SHA512: 8d2ce1449fc180de03414e7e569d1a21ba1e9f6564e13d3faf3961f710adc725fa0d4ab49b89ebd2baa11ea36ac5018377f693a84037d386a8b8697c9d6db3e9
2020-05-09 17:35:59 -05:00
UdjinM6
d2756fb210
Merge pull request #3395 from PastaPastaPasta/backports-0.16-pr16
Backports 0.16 pr16
2020-04-10 13:11:03 +03:00
Peter Bushnell
c1d9dd553a
FindDevNetGenesisBlock remove unused arg (#3405) 2020-04-08 22:18:04 +02:00
Luke Dashjr
38ccf6f628
Bugfix: Include <memory> for std::unique_ptr 2020-04-08 11:46:27 -05:00
Alexander Block
c7b6eb851d
Merge pull request #3389 from codablock/pr_concentrated_recovery
Implement "concentrated recovery" of LLMQ signatures
2020-04-02 13:59:05 +02:00
Alexander Block
e518ce4e13
Increase DIP0008 bip9 window by 10 years (#3391) 2020-04-02 08:19:41 +02:00
Alexander Block
b212f21c15 Implement new way of concentrated signature recovery
Instead of propagating all sig shares to all LLMQ members, this will now
make all members send their individual sig share to a single member, which
is then responsible for the recovery and propagation of the recovered
signature. This process is repeated by all members every second for another
target/recovering member, until a recovered signature appears.
2020-03-31 19:58:07 +02:00
Alexander Block
99414ed754 Fix fRequireRoutableExternalIP for devnets 2020-03-31 07:16:35 +02:00
Alexander Block
3e3eba63e2 Fix LLMQ dkgBadVotesThreshold parameter in regtest and devnet 2020-03-31 07:07:52 +02:00
UdjinM6
f43cdbc586
Gradually bump mocktime in wait_for_quorum_connections (#3388)
* Gradually bump mocktime in wait_for_quorum_connections

* Lower nLLMQConnectionRetryTimeout to 1 sec for regtest
2020-03-31 07:06:41 +02:00
Alexander Block
2a6465a6fb Move LLMQ connection retry timeout into chainparams 2020-03-21 12:21:09 +01:00
PastaPastaPasta
8a1ec935a0
Backport 11651 (#3358)
* scripted-diff: Replace #include "" with #include <> (ryanofsky)

-BEGIN VERIFY SCRIPT-
for f in \
  src/*.cpp \
  src/*.h \
  src/bench/*.cpp \
  src/bench/*.h \
  src/compat/*.cpp \
  src/compat/*.h \
  src/consensus/*.cpp \
  src/consensus/*.h \
  src/crypto/*.cpp \
  src/crypto/*.h \
  src/crypto/ctaes/*.h \
  src/policy/*.cpp \
  src/policy/*.h \
  src/primitives/*.cpp \
  src/primitives/*.h \
  src/qt/*.cpp \
  src/qt/*.h \
  src/qt/test/*.cpp \
  src/qt/test/*.h \
  src/rpc/*.cpp \
  src/rpc/*.h \
  src/script/*.cpp \
  src/script/*.h \
  src/support/*.cpp \
  src/support/*.h \
  src/support/allocators/*.h \
  src/test/*.cpp \
  src/test/*.h \
  src/wallet/*.cpp \
  src/wallet/*.h \
  src/wallet/test/*.cpp \
  src/wallet/test/*.h \
  src/zmq/*.cpp \
  src/zmq/*.h
do
  base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-

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

* scripted-diff: Replace #include "" with #include <> (Dash Specific)

-BEGIN VERIFY SCRIPT-
for f in \
  src/bls/*.cpp \
  src/bls/*.h \
  src/evo/*.cpp \
  src/evo/*.h \
  src/governance/*.cpp \
  src/governance/*.h \
  src/llmq/*.cpp \
  src/llmq/*.h \
  src/masternode/*.cpp \
  src/masternode/*.h \
  src/privatesend/*.cpp \
  src/privatesend/*.h
do
  base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-

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

* build: Remove -I for everything but project root

Remove -I from build system for everything but the project root,
and built-in dependencies.

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

# Conflicts:
#	src/Makefile.test.include

* qt: refactor: Use absolute include paths in .ui files

* qt: refactor: Changes to make include paths absolute

This makes all include paths in the GUI absolute.

Many changes are involved as every single source file in
src/qt/ assumes to be able to use relative includes.

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

# Conflicts:
#	src/qt/dash.cpp
#	src/qt/optionsmodel.cpp
#	src/qt/test/rpcnestedtests.cpp

* test: refactor: Use absolute include paths for test data files

* Recommend #include<> syntax in developer notes

* refactor: Include obj/build.h instead of build.h

* END BACKPORT #11651 Remove trailing whitespace causing travis failure

* fix backport 11651

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

* More of 11651

* fix blockchain.cpp

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

* Add missing "qt/" in includes

* Add missing "test/" in includes

* Fix trailing whitespaces

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Co-authored-by: MeshCollider <dobsonsa68@gmail.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-03-20 01:46:56 +03:00
Wladimir J. van der Laan
39a8e20de6
Merge #11558: Minimal code changes to allow msvc compilation
fbf327b Minimal code changes to allow msvc compilation. (Aaron Clauson)

Pull request description:

  These changes are required to allow the Bitcoin source to build with Microsoft's C++ compiler (#11562 is also required).

  I looked around for a better place for the typedef of ssize_t which is in random.h. The best candidate looks like src/compat.h but I figured including that header in random.h is a bigger change than the typedef. Note that the same typedef is in at least two other places including the OpenSSL and Berkeley DB headers so some of the Bitcoin code already picks it up.

Tree-SHA512: aa6cc6283015e08ab074641f9abdc116c4dc58574dc90f75e7a5af4cc82946d3052370e5cbe855fb6180c00f8dc66997d3724ff0412e4b7417e51b6602154825
2020-02-27 09:51:33 -06:00
Cofresi
2521970a50
Add configurable devnet quorums (#3348)
* add new quorum type LLMQ_EVONET

* add params for new quorum type LLMQ_EVONET

* add LLMQ_EVONET to devnet llmqs

* allow modifying of LLMQ_EVONET params on startup

* rename LLMQ_EVONET to LLMQ_DEVNET

* Update src/chainparams.cpp

Co-Authored-By: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

* Update src/chainparams.cpp

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-02-25 19:06:10 +03:00
Alexander Block
0067d7b52a
Bump nMinimumChainWork and defaultAssumeValid (#3336) 2020-02-18 12:34:18 +03:00
PastaPastaPasta
e1fc378ffd
Refactor PS a bit and make it so that the expected flow for mixing is to time out and fallback (#3309)
* Refactor PS a bit and make it so that the expected flow is for a mixing tx to time out, however there is in effect no max on the number of participants.

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

* revert maxParticipants bump, to be bumped with next breaking change

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

* revert min participants to 3 on testnet / devnet, regtest at 2

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

* nit extraneous

Co-Authored-By: thephez <thephez@users.noreply.github.com>

Co-authored-by: thephez <thephez@users.noreply.github.com>
2020-01-31 13:56:45 +03:00
Wladimir J. van der Laan
94e99441c5
Merge #11512: Use GetDesireableServiceFlags in seeds, dnsseeds, fixing static seed adding
2b839ab Update chainparams comment for more info on service bits per dnsseed (Matt Corallo)
62e7642 Fall back to oneshot for DNS Seeds which don't support filtering. (Matt Corallo)
51ae766 Use GetDesireableServiceFlags in static seeds, document this. (Matt Corallo)
fb6f6b1 bluematt's testnet-seed now supports x9 (and is just a static list) (Matt Corallo)

Pull request description:

  4440710 broke inserting entries into addrman from dnsseeds which
  did not support service bits, as well as static seeds. Static seeds
  were already being filtered by UA for 0.13.1+ (ie NODE_WITNESS), so
  simply changing the default service bits to include NODE_WITNESS
  (and updating docs appropriately) is sufficient. For DNS Seeds, not
  supporting NODE_WITNESS is no longer useful, so instead use
  non-filtering seeds as oneshot hosts irrespective of named proxy.

  I've set my testnet-seed to also support x9, though because it is simply a static host, it may be useful to leave the support off so that it is used as a oneshot to get addresses from a live node instead. I'm fine with either.

Tree-SHA512: 3f17d4d2b0b84d876981c962d2b44cb0c8f95f52c56a48c6b35fd882f6d7a40805f320ec452985a1c0b34aebddb1922709156c3ceccd1b9f8363fd7cb537d21d
2020-01-26 01:15:36 -06:00
UdjinM6
7d39637b02 Bump copyright year to 2020 (#3290)
* Bump _COPYRIGHT_YEAR

* Run copyright update script

./contrib/devtools/copyright_header.py update .

* Update COPYING

* Bump copyright year in dash-cli/qt/tx and dashd map pages
2020-01-17 15:42:55 +01:00
Alexander Block
aca6af0a0e
Use smaller LLMQs in regtest (#3269)
* Rename LLMQ_5_60 to LLMQ_TEST

* Introduce -llmqtestparams which allows to modify LLMQ_TEST on regtest

Also add support in DashTestFramework

* Use parameters size=3, threshold=2 as default for LLMQ_TEST

And fall back to the old parameters where necessary

* Wait for all contributions, even when one member is lying

Otherwise we might end up continuing too fast, which would fail the DKG.

* Update src/chainparams.cpp

Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-01-07 13:49:51 +01:00
UdjinM6
dad102669b Update static and dns seeds for mainnet and testnet (#3234)
* Drop (test.)dnsseed.masternode.io

* makeseeds.py

mainnet 1185193, testnet 225964

* generate-seeds.py

* Update tor.md with live onion nodes

All old nodes are down
2019-12-11 12:30:38 +01:00
UdjinM6
37f96f5a3a
Bump version to 0.15 and update few const-s/chainparams (#3204)
* Bump const-s

* Bump version to 0.15

* Run gen-manpages.sh
2019-11-21 23:52:35 +03:00
UdjinM6
9f1ee8c70a
scripted-diff: Refactor llmq type consensus param names (#3093)
-BEGIN VERIFY SCRIPT-
sed -i 's/llmqChainLocks/llmqTypeChainLocks/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/llmqForInstantSend/llmqTypeInstantSend/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
-END VERIFY SCRIPT-
2019-09-24 12:38:50 +03:00
UdjinM6
0d126c2ae4
Use chainparams factory for devnet (#3087) 2019-09-17 15:08:37 +03:00
UdjinM6
becca24fcc
Few fixes in docs/comments (#3068)
* Few fixes in docs/comments

* Add descriptions
2019-08-28 10:54:19 +03:00
UdjinM6
0f088d03af
Change regtest and devnet p2p/rpc ports (#3064) 2019-08-28 10:52:00 +03:00
Pasta
f4736b3829
update seeds emplace_back based on code review
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-12 11:34:49 -05:00
Wladimir J. van der Laan
64ef42c797
Merge #10446: net: avoid extra dns query per seed
c1be285 chainparams: make supported service bits option explicit (Cory Fields)
d5c7c1c net: use an internal address for fixed seeds (Cory Fields)
6cdc488 net: switch to dummy internal ip for dns seed source (Cory Fields)
6d0bd5b net: do not allow resolving to an internal address (Cory Fields)
7f31762 net: add an internal subnet for representing unresolved hostnames (Cory Fields)

Tree-SHA512: 9bf1042bef546ac3ef0e0d3a9a5555eb21628ff2674a0cf8c6367194b22bfdab477adf452c0e7c56f44e0fb37debc5e14bdb623452e076fb9c492c7702601d7a
2019-07-11 10:34:46 -05:00
Alexander Block
2f21e55514 Remove legacy InstantSend code (#3020)
* Remove ppszTypeName from protocol.cpp and reimplement GetCommand

This removes the need to carefully maintain ppszTypeName, which required
correct order and also did not allow to permanently remove old message
types.

To get the command name for an INV type, GetCommandInternal uses a switch
which needs to be maintained from now on.

The way this is implemented also resembles the way it is implemented in
Bitcoin today, but it's not identical. The original PR that introduced the
switch case in Bitcoin was part of the Segwit changes and thus never got
backported. I decided to implement it in a slightly different way that
avoids throwing exceptions when an unknown INV type is encountered.

IsKnownType will now also leverage GetCommandInternal() to figure out if
the INV type is known locally. This has the side effect of old/legacy
message types to return false from now on. We will depend on this side
effect in later commits when we remove legacy InstantSend code.

* Stop handling/relaying legacy IX messages

When we receive an IX message, we simply treat it as a regular TX and relay
it as such.

We'll however still request IX messages when they are announced to us. We
can't simply revert to requesting TX messages in this case as it might
result in the other peer not answering due to the TX not being in mapRelay
yet. We should at some point in the future completely drop handling of IX
messages instead.

* Remove IsNewInstantSendEnabled() and only use IsInstantSendEnabled()

* Remove legacy InstantSend from GUI

* Remove InstantSend from Bitcoin/Dash URIs

* Remove legacy InstantSend from RPC commands

* Remove legacy InstantSend from wallet

* Remove legacy instantsend.h include

* Remove legacy InstantSend from validation code

* Completely remove remaining legacy InstantSend code

* Remove now unused spork

* Fix InstantSend related test failures

* Remove now obsolete auto IS tests

* Make spork2 and spork3 disabled by default

This should have no influence on mainnet as these sporks are actually set
there. This will however affect regtest, which shouldn't have LLMQ based
InstantSend enabled by default.

* Remove instantsend tests from dip3-deterministicmns.py

These were only testing legacy InstantSend

* Fix .QCheckBox#checkUsePrivateSend styling a bit

* s/TXLEGACYLOCKREQUEST/LEGACYTXLOCKREQUEST/

* Revert "verified via InstantSend" back to "verified via LLMQ based InstantSend"

* Use cmd == nullptr instead of !cmd

* Remove last parameter from AvailableCoins call

This was for fUseInstantSend which is not present anymore since rebase
2019-07-09 17:50:08 +03:00
Pasta
e9b389d19c
continued, dash code
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-08 10:24:30 -05:00
Wladimir J. van der Laan
b92d2dd66a
Merge #10545: Use list initialization (C++11) for maps/vectors instead of boost::assign::map_list_of/list_of
3fb81a8 Use list initialization (C++11) for maps/vectors instead of boost::assign::map_list_of/list_of (practicalswift)

Tree-SHA512: 63a9ac9ec5799472943dce1cd92a4b14e7f1fe12758a5fc4b1efceaf2c85a4ba71dad5ccc50813527f18b192e7714c076e2478ecd6ca0d452b24e88416f872f7
2019-07-08 10:24:30 -05:00
Wladimir J. van der Laan
42985c31bb
Merge #10463: Names: BIP9 vs versionbits
b463bc9 scripted-diff: s/BIP9DeploymentInfo/VBDeploymentInfo/ (Jorge Timón)
29c0719 Rename -bip9params to -vbparams (shaolinfry)

Tree-SHA512: a8a2bf6e24a4a7fc82f784c78c0cd92472e9ba55ce3fb22dafef3eccdcfccb2da5a6078fbeec1a8a4b6ab1f1b226976c5aba964dd5e3d029a21b109a7c044374
2019-07-08 10:23:19 -05:00
Pasta
9e2235a4bc
add initializing to regtest
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-02 10:34:23 -05:00
Alexander Block
e740604f60 No need for zero initialization of devnet params 2019-06-26 12:45:10 -05:00
Wladimir J. van der Laan
50652674b5 Merge #8855: Use a proper factory for creating chainparams
c1082a7 Chainparams: Use the factory for pow tests (Jorge Timón)
2351a06 Chainparams: Get rid of CChainParams& Params(std::string) (Jorge Timón)
f87f362 Chainparams: Use a regular factory for creating chainparams (Jorge Timón)

Tree-SHA512: 359c8a2a1bc9d02db7856d02810240ada28048ac088f878b575597a7255cdb0ffdd1a647085ee67a34c6a7e7ed9e6cfdb61240cf6e75139619b640dbb096072c
2019-06-26 12:45:10 -05:00
Wladimir J. van der Laan
a1770b0c25 Merge #7692: Remove p2p alert system
cfd519e Add release note documentation (BtcDrak)
6601ce5 protocol.h/cpp: Removes NetMsgType::ALERT (Thomas Kerin)
ad72104 Formatting (BtcDrak)
1b77471 Remove alert keys (BtcDrak)
01fdfef Remove `-alerts` option (BtcDrak)
9206634 Update alert notification and GUI (BtcDrak)
bbb9d1d Remove p2p alert handling (BtcDrak)

manual fixes

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

remove sendalert.cpp

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

CAlertNotify -> AlertNotify

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

remove alert.h

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

remove vAlertPubKey for DevNet

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

remove src/main.cpp
2019-06-21 19:33:53 -05:00
UdjinM6
89d8f7a37d
Merge pull request #2763 from PastaPastaPasta/backports-0.15-pr8
Backports 0.15 pr8
2019-05-17 12:22:18 +03:00
UdjinM6
c8a80b2792
Set DIP0008 mainnet activation params (#2915) 2019-05-13 13:35:03 +03:00
PastaPastaPasta
040abafe3a [0.14] Bump chainparams (#2910)
* Bump nMinimumChainWork and defaultAssumeValid for mainnet

Signed-off-by: Pasta <Pasta@dash.org>

add back 0x

Signed-off-by: Pasta <Pasta@dash.org>

* Bump nMinimumChainWork and defaultAssumeValid for testnet

Signed-off-by: Pasta <Pasta@dash.org>

add back 0x 2nd time

Signed-off-by: Pasta <Pasta@dash.org>

* Add a checkpoint for 0.14

Signed-off-by: Pasta <Pasta@dash.org>

* add testnet checkpoint 0.14

Signed-off-by: Pasta <Pasta@dash.org>

* update mainnet ChainTxData

Signed-off-by: Pasta <Pasta@dash.org>

formatting fix mainnet chaintxdata

Signed-off-by: Pasta <Pasta@dash.org>

update mainnet ChainTxData to specific block

Signed-off-by: Pasta <Pasta@dash.org>

* update testnet chainTxData

Signed-off-by: Pasta <Pasta@dash.org>

update testnet ChainTxData to specific block

Signed-off-by: Pasta <Pasta@dash.org>
2019-05-13 11:02:30 +02:00
Alexander Block
4dc5c0e9ed
Bump "keepOldConnections" by one for all LLMQ types (#2909)
And for llmq5_60, set it to 3 instead of 24 (which was incorrect from the
beginning).

Increasing all LLMQs "keepOldConnections" by one is required because we
don't use the tip when scanning active quorums, but a block that is 8 blocks
in the past. This however means that we need to keep connections for one
additional quorum alive.

This fixes an issue with signing sessions randomly failing with timeouts.
2019-05-10 11:26:39 +02:00
Wladimir J. van der Laan
eea8027380
Merge #9987: Remove unused code
8dc957a Remove unused code (practicalswift)

Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a

resolve usage of `MiningRequiresPeers()`

remove `fMiningRequiresPeers`
2019-05-06 14:51:44 -05:00
UdjinM6
8ffdcbf999
A bunch of mostly trivial tweaks/fixes (#2889)
* Trivial: vout->txout

* Re-use SetHexStr in few more places

* Tweak log output

* fix v13 release notes links

* Drop no longer used stuff

* Few more trivial fixes

* Adjust few rpc help strings

* Apply review suggestions
2019-04-30 15:48:21 +03:00
UdjinM6
03021fa53c
Harden DIP3 activation (#2881)
* Harden DIP3 activation height

Also drop all related but no longer used parts.

* Pass current block index to GetCommitmentsFromBlock

* Allow to change dip3 activation height for tests

And fix them.
2019-04-25 18:39:04 +03:00
UdjinM6
992922c495 Specify DIP3 enforcement block height/hash for mainnet params 2019-04-03 12:15:41 +03:00
Alexander Block
010752d4eb Set fAllowMultiplePorts to true for testnet (#2817)
On testnet it's quite usual to have multiple MNs on the same IP. Now that
we have LLMQs and DKGs which require deterministic intra quorum connections,
we must allow them to connect to each other even if the IPs are shared very
often.
2019-03-30 17:55:34 +03:00
Alexander Block
7b76e7abb2
Implement BIP9 style deployment for DIP8/ChainLocks and fix a bug with late headers (#2793)
* Also update bestChainLockWithKnownBlock in AcceptedBlockHeader

* Implement BIP9 style DIP8 deployment

* Fix ChainLocks tests

* Apply suggestions from code review

Co-Authored-By: codablock <ablock84@gmail.com>
2019-03-22 11:51:50 +01:00
UdjinM6
43d1ddefdc Merge branch 'master' into mergemaster132develop
Resolved conflicts:
	configure.ac
	doc/Doxyfile
	doc/guide-startmany.md
	src/clientversion.h
	src/evo/deterministicmns.cpp
	src/evo/providertx.cpp
	src/qt/masternodelist.cpp
	src/qt/masternodelist.h
	src/rpc/masternode.cpp
	src/rpc/rpcevo.cpp
	src/validation.cpp
2019-03-15 15:53:58 +03:00
Alexander Block
a69a5cf4a0 Use smaller (3 out of 5) quorums for regtest/Travis (#2774)
* Require only 3 out of 5 signatures for old InstantSend in regtest mode

* Use LLMQs of size 5 with threshold of 3 for regtest

* Fix wrong check for out-of-range bits in CFixedBitSet

* Reduce number of masternodes in masternode/LLMQ tests

* Add missing \n to LogPrintf call

* Use correct indexes for isolated/receiver/sender nodes

The way it was before resulted in nodes 1-3 being unused and 6-8 being used
for these 3 special nodes even though these are masternodes.

* Avoid stopping/starting isolated node in p2p-instantsend.py

It's enough to disable networking for this node.
2019-03-15 11:48:24 +03:00
PastaPastaPasta
9dd16cdbe7 Bump minChainWork and AssumeValid to block #1033120 (#2750) 2019-03-08 10:21:33 +03:00
Alexander Block
e2f99f4ae1 Set llmqForInstantSend for mainnet and testnet 2019-03-07 21:15:09 +01:00
Alexander Block
83dbcc483f Implement CInstantSendManager and related P2P messages 2019-03-07 21:14:31 +01:00
Alexander Block
f305cf77b6 Multiple fixes and optimizations for LLMQs and ChainLocks (#2724)
* Indicate success when signing was unnecessary

* Fix typo in name of LLMQ_400_60

* Move RemoveAskFor call for CLSIGs into ProcessNewChainLock

In case we got INV items for the same CLSIG that we recreated through
HandleNewRecoveredSig, (re-)requesting of the CLSIG from other peers
becomes unnecessary.

* Move Cleanup() call in CChainLocksHandler::UpdatedBlockTip up

We bail out early in a few situations from this method, so that Cleanup()
might not be called while its at the bottom.

* Bail out from CChainLocksHandler::UpdatedBlockTip if we already got the CLSIG

* Call RemoveAskFor when QFCOMMITMENT was received

Otherwise we might end up re-requesting it for a very long time when the
commitment INV was received shortly before it got mined.

* Call RemoveSigSharesForSession when a recovered sig is received

Otherwise we end up with session data in node states lingering around until
a fake "timeout" occurs (can be seen in the logs).

* Better handling of false-positive conflicts in CSigningManager

The old code was emitting a lot of messages in logs as it treated sigs
for exactly the same session as a conflict. This commit fixes this by
looking at the signHash before logging.

Also handle a corner-case where a recovered sig might be deleted between
the HasRecoveredSigForId and GetRecoveredSigById call.

* Don't run into session timeout when sig shares come in slow

Instead of just tracking when the first share was received, we now also
track when the last (non-duplicate) share was received. Sessios will now
timeout 5 minutes after the first share arrives, or 1 minute after the last
one arrived.
2019-02-27 16:10:12 +03:00
UdjinM6
252ee89c34
Implement new algo for quorum connections (#2710)
Instead of trying to manually figure out params for different quorum/ring sizes, connect to nodes at indexes (i+2^k)%n where k: 0..floor(log2(n-1))-1, n: size of the quorum/ring
2019-02-19 13:05:39 +03:00
Alexander Block
7e4257254c
Allow to override llmqChainLocks with "-llmqchainlocks" on devnet (#2683) 2019-02-05 15:46:05 +01:00
Alexander Block
6da341379d Use smaller LLMQs for ChainLocks on testnet and devnet (#2669)
* Move llmqChainLocks initialization closer to other LLMQ related assignments

* Use smaller LLMQs for ChainLocks on testnet and devnet

We very often don't have enough MNs on testnet so we should use a smaller
quorum quorum for ChainLocks.
2019-01-30 21:52:41 +03:00
Alexander Block
f6828b19b6
Merge pull request #2643 from codablock/pr_llmq_chainlocks
Implement LLMQ based ChainLocks
2019-01-29 15:59:05 +01:00
UdjinM6
25cb14b615 Fix confusion between dip3 activation and enforcement (#2651)
* Fix confusion between dip3 activation and enforcement

* drop DIP0003ActivationHeight for now
2019-01-29 15:54:38 +01:00
PastaPastaPasta
f123248f1c update copyright (#2648)
* update copyright

* Update copyright in configure.ac and COPYING
2019-01-29 15:53:14 +01:00
Alexander Block
29532ba196 Implement and enforce ChainLocks 2019-01-28 12:24:15 +01:00
Alexander Block
7ee31cbd65 Speed up integration tests with masternodes (#2642)
* Implement copy_datadir to allow easy copying of state from one node to another

* Instead of starting with a fresh datadir for MNs, reuse a copy of the faucet

* Start masternodes in parallel instead of waiting for the previous to finish

* Allow specifying of window and threshold with -bip9params

* Implement -dip3activationheight for regtests

* Implement fast DIP3 activation in DashTestFramework

* Speed up activation of DIP3 in dip3-deterministicmns.py

* Update qa/rpc-tests/test_framework/test_framework.py

Co-Authored-By: codablock <ablock84@gmail.com>

* Always assign fast_dip3_activation
2019-01-23 19:36:51 +03:00
Alexander Block
e7981e468d Remove fLLMQAllowDummyCommitments from consensus params (#2636)
This should have been removed together with removal of the dummy DKG
2019-01-22 14:16:30 +03:00
Alexander Block
43fd1b352f Implement CSigningManager to process and propagage recovered signatures 2019-01-21 14:42:08 +01:00
Alexander Block
5958f8b81d Remove dkgRndSleepTime from consensus params and make sleeping it non-random 2019-01-10 07:07:58 +01:00
Alexander Block
6836f8c38b Implement LLMQ DKG 2019-01-09 12:16:12 +01:00
PastaPastaPasta
5c5932eb93 [PrivateSend] Allow more than 3 mixing participants (#2612) 2019-01-07 13:21:10 +03:00