Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 26 additions & 24 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,19 @@ BITCOIN_CORE_H = \
dbwrapper.h \
limitedmap.h \
llmq/quorums.h \
llmq/quorums_blockprocessor.h \
llmq/quorums_commitment.h \
llmq/quorums_chainlocks.h \
llmq/quorums_debug.h \
llmq/quorums_dkgsessionhandler.h \
llmq/quorums_dkgsessionmgr.h \
llmq/quorums_dkgsession.h \
llmq/quorums_init.h \
llmq/quorums_instantsend.h \
llmq/quorums_signing.h \
llmq/quorums_signing_shares.h \
llmq/quorums_utils.h \
llmq/blockprocessor.h \
llmq/commitment.h \
llmq/chainlocks.h \
llmq/debug.h \
llmq/dkgsessionhandler.h \
llmq/dkgsessionmgr.h \
llmq/dkgsession.h \
llmq/init.h \
llmq/instantsend.h \
llmq/signing.h \
llmq/signing_shares.h \
llmq/utils.h \
llmq/params.h \
logging.h \
logging/timer.h \
masternode/node.h \
Expand Down Expand Up @@ -357,18 +358,18 @@ libdash_server_a_SOURCES = \
governance/vote.cpp \
governance/votedb.cpp \
llmq/quorums.cpp \
llmq/quorums_blockprocessor.cpp \
llmq/quorums_commitment.cpp \
llmq/quorums_chainlocks.cpp \
llmq/quorums_debug.cpp \
llmq/quorums_dkgsessionhandler.cpp \
llmq/quorums_dkgsessionmgr.cpp \
llmq/quorums_dkgsession.cpp \
llmq/quorums_init.cpp \
llmq/quorums_instantsend.cpp \
llmq/quorums_signing.cpp \
llmq/quorums_signing_shares.cpp \
llmq/quorums_utils.cpp \
llmq/blockprocessor.cpp \
llmq/commitment.cpp \
llmq/chainlocks.cpp \
llmq/debug.cpp \
llmq/dkgsessionhandler.cpp \
llmq/dkgsessionmgr.cpp \
llmq/dkgsession.cpp \
llmq/init.cpp \
llmq/instantsend.cpp \
llmq/signing.cpp \
llmq/signing_shares.cpp \
llmq/utils.cpp \
masternode/node.cpp \
masternode/meta.cpp \
masternode/payments.cpp \
Expand Down Expand Up @@ -592,6 +593,7 @@ libdash_common_a_SOURCES = \
key.cpp \
key_io.cpp \
keystore.cpp \
llmq/params.cpp \
netaddress.cpp \
netbase.cpp \
net_permissions.cpp \
Expand Down
2 changes: 1 addition & 1 deletion src/bloom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <evo/specialtx.h>
#include <evo/providertx.h>
#include <evo/cbtx.h>
#include <llmq/quorums_commitment.h>
#include <llmq/commitment.h>
#include <hash.h>
#include <script/script.h>
#include <script/standard.h>
Expand Down
140 changes: 1 addition & 139 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <chainparamsseeds.h>
#include <consensus/merkle.h>
#include <llmq/params.h>
#include <tinyformat.h>
#include <util/system.h>
#include <util/strencodings.h>
Expand Down Expand Up @@ -107,145 +108,6 @@ static CBlock FindDevNetGenesisBlock(const CBlock &prevBlock, const CAmount& rew
assert(false);
}

// this one is for testing only
static Consensus::LLMQParams llmq_test = {
.type = Consensus::LLMQ_TEST,
.name = "llmq_test",
.size = 3,
.minSize = 2,
.threshold = 2,

.dkgInterval = 24, // one DKG per hour
.dkgPhaseBlocks = 2,
.dkgMiningWindowStart = 10, // dkgPhaseBlocks * 5 = after finalization
.dkgMiningWindowEnd = 18,
.dkgBadVotesThreshold = 2,

.signingActiveQuorumCount = 2, // just a few ones to allow easier testing

.keepOldConnections = 3,
.recoveryMembers = 3,
};

// this one is for testing only
static Consensus::LLMQParams llmq_test_v17 = {
.type = Consensus::LLMQ_TEST_V17,
.name = "llmq_test_v17",
.size = 3,
.minSize = 2,
.threshold = 2,

.dkgInterval = 24, // one DKG per hour
.dkgPhaseBlocks = 2,
.dkgMiningWindowStart = 10, // dkgPhaseBlocks * 5 = after finalization
.dkgMiningWindowEnd = 18,
.dkgBadVotesThreshold = 2,

.signingActiveQuorumCount = 2, // just a few ones to allow easier testing

.keepOldConnections = 3,
.recoveryMembers = 3,
};

// this one is for devnets only
static Consensus::LLMQParams llmq_devnet = {
.type = Consensus::LLMQ_DEVNET,
.name = "llmq_devnet",
.size = 10,
.minSize = 7,
.threshold = 6,

.dkgInterval = 24, // one DKG per hour
.dkgPhaseBlocks = 2,
.dkgMiningWindowStart = 10, // dkgPhaseBlocks * 5 = after finalization
.dkgMiningWindowEnd = 18,
.dkgBadVotesThreshold = 7,

.signingActiveQuorumCount = 3, // just a few ones to allow easier testing

.keepOldConnections = 4,
.recoveryMembers = 6,
};

static Consensus::LLMQParams llmq50_60 = {
.type = Consensus::LLMQ_50_60,
.name = "llmq_50_60",
.size = 50,
.minSize = 40,
.threshold = 30,

.dkgInterval = 24, // one DKG per hour
.dkgPhaseBlocks = 2,
.dkgMiningWindowStart = 10, // dkgPhaseBlocks * 5 = after finalization
.dkgMiningWindowEnd = 18,
.dkgBadVotesThreshold = 40,

.signingActiveQuorumCount = 24, // a full day worth of LLMQs

.keepOldConnections = 25,
.recoveryMembers = 25,
};

static Consensus::LLMQParams llmq400_60 = {
.type = Consensus::LLMQ_400_60,
.name = "llmq_400_60",
.size = 400,
.minSize = 300,
.threshold = 240,

.dkgInterval = 24 * 12, // one DKG every 12 hours
.dkgPhaseBlocks = 4,
.dkgMiningWindowStart = 20, // dkgPhaseBlocks * 5 = after finalization
.dkgMiningWindowEnd = 28,
.dkgBadVotesThreshold = 300,

.signingActiveQuorumCount = 4, // two days worth of LLMQs

.keepOldConnections = 5,
.recoveryMembers = 100,
};

// Used for deployment and min-proto-version signalling, so it needs a higher threshold
static Consensus::LLMQParams llmq400_85 = {
.type = Consensus::LLMQ_400_85,
.name = "llmq_400_85",
.size = 400,
.minSize = 350,
.threshold = 340,

.dkgInterval = 24 * 24, // one DKG every 24 hours
.dkgPhaseBlocks = 4,
.dkgMiningWindowStart = 20, // dkgPhaseBlocks * 5 = after finalization
.dkgMiningWindowEnd = 48, // give it a larger mining window to make sure it is mined
.dkgBadVotesThreshold = 300,

.signingActiveQuorumCount = 4, // four days worth of LLMQs

.keepOldConnections = 5,
.recoveryMembers = 100,
};

// Used for Platform
static Consensus::LLMQParams llmq100_67 = {
.type = Consensus::LLMQ_100_67,
.name = "llmq_100_67",
.size = 100,
.minSize = 80,
.threshold = 67,

.dkgInterval = 24, // one DKG per hour
.dkgPhaseBlocks = 2,
.dkgMiningWindowStart = 10, // dkgPhaseBlocks * 5 = after finalization
.dkgMiningWindowEnd = 18,
.dkgBadVotesThreshold = 80,

.signingActiveQuorumCount = 24, // a full day worth of LLMQs

.keepOldConnections = 25,
.recoveryMembers = 50,
};


/**
* Main network
*/
Expand Down
4 changes: 2 additions & 2 deletions src/coinjoin/coinjoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include <masternode/node.h>
#include <masternode/sync.h>

#include <llmq/quorums_instantsend.h>
#include <llmq/quorums_chainlocks.h>
#include <llmq/instantsend.h>
#include <llmq/chainlocks.h>

#include <string>

Expand Down
2 changes: 1 addition & 1 deletion src/core_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <evo/cbtx.h>
#include <evo/providertx.h>
#include <evo/specialtx.h>
#include <llmq/quorums_commitment.h>
#include <llmq/commitment.h>

UniValue ValueFromAmount(const CAmount& amount)
{
Expand Down
6 changes: 3 additions & 3 deletions src/dsnotificationinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#include <evo/mnauth.h>

#include <llmq/quorums.h>
#include <llmq/quorums_chainlocks.h>
#include <llmq/quorums_instantsend.h>
#include <llmq/quorums_dkgsessionmgr.h>
#include <llmq/chainlocks.h>
#include <llmq/instantsend.h>
#include <llmq/dkgsessionmgr.h>

void CDSNotificationInterface::InitializeCurrentBlockTip()
{
Expand Down
4 changes: 2 additions & 2 deletions src/evo/cbtx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include <evo/cbtx.h>
#include <evo/deterministicmns.h>
#include <llmq/quorums_blockprocessor.h>
#include <llmq/quorums_commitment.h>
#include <llmq/blockprocessor.h>
#include <llmq/commitment.h>
#include <evo/simplifiedmns.h>
#include <evo/specialtx.h>
#include <consensus/validation.h>
Expand Down
4 changes: 2 additions & 2 deletions src/evo/deterministicmns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <evo/deterministicmns.h>
#include <evo/specialtx.h>
#include <evo/simplifiedmns.h>
#include <llmq/quorums_commitment.h>
#include <llmq/quorums_utils.h>
#include <llmq/commitment.h>
#include <llmq/utils.h>

#include <base58.h>
#include <chainparams.h>
Expand Down
2 changes: 1 addition & 1 deletion src/evo/mnauth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <evo/mnauth.h>

#include <evo/deterministicmns.h>
#include <llmq/quorums_utils.h>
#include <llmq/utils.h>
#include <masternode/node.h>
#include <masternode/meta.h>
#include <masternode/sync.h>
Expand Down
4 changes: 2 additions & 2 deletions src/evo/simplifiedmns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <evo/cbtx.h>
#include <core_io.h>
#include <evo/deterministicmns.h>
#include <llmq/quorums_blockprocessor.h>
#include <llmq/quorums_commitment.h>
#include <llmq/blockprocessor.h>
#include <llmq/commitment.h>
#include <evo/simplifiedmns.h>
#include <evo/specialtx.h>

Expand Down
4 changes: 2 additions & 2 deletions src/evo/specialtx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include <evo/deterministicmns.h>
#include <evo/specialtx.h>

#include <llmq/quorums_commitment.h>
#include <llmq/quorums_blockprocessor.h>
#include <llmq/commitment.h>
#include <llmq/blockprocessor.h>

bool CheckSpecialTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValidationState& state, const CCoinsViewCache& view)
{
Expand Down
8 changes: 4 additions & 4 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@

#include <evo/deterministicmns.h>
#include <llmq/quorums.h>
#include <llmq/quorums_init.h>
#include <llmq/quorums_blockprocessor.h>
#include <llmq/quorums_signing.h>
#include <llmq/quorums_utils.h>
#include <llmq/init.h>
#include <llmq/blockprocessor.h>
#include <llmq/signing.h>
#include <llmq/utils.h>

#include <statsd_client.h>

Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <init.h>
#include <interfaces/handler.h>
#include <interfaces/wallet.h>
#include <llmq/quorums_instantsend.h>
#include <llmq/instantsend.h>
#include <masternode/sync.h>
#include <net.h>
#include <net_processing.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <llmq/quorums_blockprocessor.h>
#include <llmq/quorums_commitment.h>
#include <llmq/quorums_debug.h>
#include <llmq/blockprocessor.h>
#include <llmq/commitment.h>
#include <llmq/debug.h>

#include <evo/evodb.h>
#include <evo/specialtx.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_LLMQ_QUORUMS_BLOCKPROCESSOR_H
#define BITCOIN_LLMQ_QUORUMS_BLOCKPROCESSOR_H
#ifndef BITCOIN_LLMQ_BLOCKPROCESSOR_H
#define BITCOIN_LLMQ_BLOCKPROCESSOR_H

#include <unordered_lru_cache.h>

Expand Down Expand Up @@ -75,4 +75,4 @@ extern CQuorumBlockProcessor* quorumBlockProcessor;

} // namespace llmq

#endif // BITCOIN_LLMQ_QUORUMS_BLOCKPROCESSOR_H
#endif // BITCOIN_LLMQ_BLOCKPROCESSOR_H
6 changes: 3 additions & 3 deletions src/llmq/quorums_chainlocks.cpp → src/llmq/chainlocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <llmq/quorums_chainlocks.h>
#include <llmq/chainlocks.h>
#include <llmq/quorums.h>
#include <llmq/quorums_instantsend.h>
#include <llmq/quorums_utils.h>
#include <llmq/instantsend.h>
#include <llmq/utils.h>

#include <chain.h>
#include <consensus/validation.h>
Expand Down
Loading