Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
e2485ca
refactor: move ProcessInstantSendLock to NetInstantSend
knst Jan 28, 2026
69e47be
refactor: simplify ProcessInstantSendLock by using PeerManager on pla…
knst Jan 28, 2026
9e97f7c
refactor: move usages of mempool from CInstantSendManager to NetInsta…
knst Jan 29, 2026
49edd0a
refactor: drop dependency of mempool from instantsend/instantsend
knst Jan 29, 2026
2019495
refactor: move all notification handlers from CInstantSendManager to …
knst Jan 29, 2026
eb05faa
refactor: move ResolveBlockConflicts to NetInstantSend
knst Feb 12, 2026
5ff6893
refactor: use only cached height of tip, don't retrieve it directly ever
knst Feb 12, 2026
29d33d7
refactor: remove dependency of CInstantSendManager on chainstate
knst Feb 12, 2026
00533ea
refactor: remove dependency of CInstantSendManager on signer
knst Feb 12, 2026
69547f7
refactor: re-order clean-up calls for confirmed block for instant-sen…
knst Feb 12, 2026
6d99e67
refactor: drop helper interface InstantSendSignerParent
knst Feb 12, 2026
2f359db
refactor: move usages sigman directly to NetInstantSend
knst Feb 12, 2026
9acaf7f
refactor: drop dependency of CInstantSendManager on llmq::CSigningMan…
knst Feb 12, 2026
a6551e1
refactor: drop dependency of CInstantSendManager on chainlocks
knst Feb 25, 2026
62a1850
refactor: removed unused includes
knst Feb 25, 2026
663a7be
refactor: review fixes for CInstantSendManager decoupling
UdjinM6 Feb 27, 2026
7e5db6e
fix: make regression miner_tests works correctly with InstantSend ena…
knst Mar 12, 2026
efc4ae7
fix: make regression miner_tests works correctly with InstantSend ena…
knst Mar 12, 2026
b008024
fix: make even more miner_tests friendly to InstantSend enabled (Test…
knst Mar 12, 2026
55dbf04
refactor: drop dependency of InstantSend on CMasternodeSync
knst Mar 12, 2026
9f879c7
refactor: drop dependency of CChainState on CMasternodeSync
knst Mar 11, 2026
bf2f188
refactor: remove usages of CMasternodeSync from chainstate
knst Mar 12, 2026
d84eba0
refactor: new stub implementation (NullNodeSyncNotifier) of NodeSyncN…
knst Mar 11, 2026
1d79045
refactor: move VerifyChainLock to clsig.h to avoid building up handle…
knst Mar 13, 2026
d71fa8b
refactor: drop dependency of governance/object on core_write (ScriptT…
knst Mar 13, 2026
a1c1432
refactor: drop pfrom from CGovernanceManager::ProcessVote
knst Mar 13, 2026
7862a50
fix: add guards if CTxMempool is nullptr in chainstate
knst Mar 13, 2026
9946317
Merge bitcoin/bitcoin#24304: [kernel 0/n] Introduce `bitcoin-chainstate`
Mar 3, 2022
31fb44c
fix: multiple dashifications applied to bitcoin-chainstate.cpp
knst Jan 17, 2026
b42f405
refactor: reimplementing some methods directly in dash-chainstate to …
knst Mar 13, 2026
f5a7d55
multiple fixes for Makefile.am
knst Mar 12, 2026
2d37a62
dashify name bitcoin-chainstate to dash-chainstate
knst Mar 14, 2026
8e9b17d
refactor: move CDeterministicMN::ToJson to core_write to avoid g_txin…
knst Mar 13, 2026
4834d5d
refactor: drop dependency of CGovernanceManager on net.cpp
knst Mar 13, 2026
b1fb03d
refactor: move multiple msg_result.h usages headers to implementation
knst Mar 13, 2026
3a98807
refactor: move network code from quorumsman.cpp to net_signing.cpp
knst Mar 13, 2026
92cc3d4
fixup net-signing
knst Mar 13, 2026
10248fa
refactor: move some llmq::utils to net_signing where they are not sup…
knst Mar 13, 2026
1e315c9
refactor: move temporary some code from spork.cpp to net_processing.cpp
knst Mar 13, 2026
d8085af
refactor: move code back from net_signing but completely commenting s…
knst Mar 13, 2026
dfefc14
todo for dkgsessiongmgr.h
knst Mar 13, 2026
dacccf8
finally works!!!! added some more files to Makefile.am. see commit me…
knst Mar 12, 2026
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ src/dash-gui
src/dash-node
src/dash-tx
src/dash-util
src/dash-chainstate
src/dash-wallet
src/test/fuzz/fuzz
src/test/test_dash
Expand Down
2 changes: 1 addition & 1 deletion ci/dash/matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ elif [ "$BUILD_TARGET" = "linux64_fuzz" ]; then
elif [ "$BUILD_TARGET" = "linux64_multiprocess" ]; then
source ./ci/test/00_setup_env_native_multiprocess.sh
elif [ "$BUILD_TARGET" = "linux64_nowallet" ]; then
source ./ci/test/00_setup_env_native_nowallet.sh
source ./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh
elif [ "$BUILD_TARGET" = "linux64_sqlite" ]; then
source ./ci/test/00_setup_env_native_sqlite.sh
elif [ "$BUILD_TARGET" = "linux64_tsan" ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_native_nowallet
export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
export HOST=x86_64-pc-linux-gnu
export PACKAGES="python3-zmq"
export DEP_OPTS="NO_WALLET=1 CC=gcc-14 CXX=g++-14"
export GOAL="install"
export BITCOIN_CONFIG="--enable-reduce-exports CC=gcc-14 CXX=g++-14"
export BITCOIN_CONFIG="--enable-reduce-exports CC=gcc-14 CXX=g++-14 --enable-experimental-util-chainstate"
14 changes: 14 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ BITCOIN_TEST_NAME=test_dash
BITCOIN_CLI_NAME=dash-cli
BITCOIN_TX_NAME=dash-tx
BITCOIN_UTIL_NAME=dash-util
BITCOIN_CHAINSTATE_NAME=dash-chainstate
BITCOIN_WALLET_TOOL_NAME=dash-wallet
dnl Multi Process
BITCOIN_MP_NODE_NAME=dash-node
Expand Down Expand Up @@ -769,6 +770,13 @@ AC_ARG_ENABLE([util-util],
[build_bitcoin_util=$enableval],
[build_bitcoin_util=$build_bitcoin_utils])

AC_ARG_ENABLE([experimental-util-chainstate],
[AS_HELP_STRING([--enable-experimental-util-chainstate],
[build experimental dash-chainstate executable (default=no)])],
[build_bitcoin_chainstate=$enableval],
[build_bitcoin_chainstate=no])


AC_ARG_WITH([libs],
[AS_HELP_STRING([--with-libs],
[build libraries (default=yes)])],
Expand Down Expand Up @@ -1443,6 +1451,7 @@ if test "$enable_fuzz" = "yes"; then
build_bitcoin_cli=no
build_bitcoin_tx=no
build_bitcoin_util=no
build_bitcoin_chainstate=no
build_bitcoin_wallet=no
build_bitcoind=no
build_bitcoin_libs=no
Expand Down Expand Up @@ -1781,6 +1790,10 @@ AC_MSG_CHECKING([whether to build dash-util])
AM_CONDITIONAL([BUILD_BITCOIN_UTIL], [test $build_bitcoin_util = "yes"])
AC_MSG_RESULT($build_bitcoin_util)

AC_MSG_CHECKING([whether to build experimental dash-chainstate])
AM_CONDITIONAL([BUILD_BITCOIN_CHAINSTATE], [test $build_bitcoin_chainstate = "yes"])
AC_MSG_RESULT($build_bitcoin_chainstate)

AC_MSG_CHECKING([whether to build libraries])
AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test $build_bitcoin_libs = "yes"])
if test "$build_bitcoin_libs" = "yes"; then
Expand Down Expand Up @@ -1995,6 +2008,7 @@ AC_SUBST(BITCOIN_TEST_NAME)
AC_SUBST(BITCOIN_CLI_NAME)
AC_SUBST(BITCOIN_TX_NAME)
AC_SUBST(BITCOIN_UTIL_NAME)
AC_SUBST(BITCOIN_CHAINSTATE_NAME)
AC_SUBST(BITCOIN_WALLET_TOOL_NAME)
AC_SUBST(BITCOIN_MP_NODE_NAME)
AC_SUBST(BITCOIN_MP_GUI_NAME)
Expand Down
161 changes: 161 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ if BUILD_BITCOIN_UTIL
bin_PROGRAMS += dash-util
endif

if BUILD_BITCOIN_CHAINSTATE
bin_PROGRAMS += dash-chainstate
endif

.PHONY: FORCE check-symbols check-security
# dash core #
BITCOIN_CORE_H = \
Expand Down Expand Up @@ -1157,6 +1161,163 @@ dash_util_LDADD = \
$(BACKTRACE_LIBS)

dash_util_LDADD += $(BOOST_LIBS)

# dash-chainstate binary #
dash_chainstate_SOURCES = \
bitcoin-chainstate.cpp \
addressindex.cpp \
arith_uint256.cpp \
base58.cpp \
batchedlogger.cpp \
blockfilter.cpp \
bls/bls.cpp \
bls/bls_worker.cpp \
chain.cpp \
chainparamsbase.cpp \
chainparams.cpp \
clientversion.cpp \
coins.cpp \
compressor.cpp \
chainlock/clsig.cpp \
chainlock/chainlock.cpp \
consensus/merkle.cpp \
consensus/tx_check.cpp \
consensus/tx_verify.cpp \
common/bloom.cpp \
core_read.cpp \
dbwrapper.cpp \
deploymentinfo.cpp \
deploymentstatus.cpp \
evo/assetlocktx.cpp \
evo/cbtx.cpp \
evo/creditpool.cpp \
evo/chainhelper.cpp \
evo/deterministicmns.cpp \
evo/dmnstate.cpp \
evo/evodb.cpp \
evo/netinfo.cpp \
evo/mnhftx.cpp \
evo/providertx.cpp \
evo/simplifiedmns.cpp \
evo/smldiff.cpp \
evo/specialtx.cpp \
evo/specialtx_filter.cpp \
evo/specialtxman.cpp \
flatfile.cpp \
fs.cpp \
governance/classes.cpp \
governance/common.cpp \
governance/exceptions.cpp \
governance/governance.cpp \
governance/object.cpp \
governance/validators.cpp \
governance/vote.cpp \
governance/votedb.cpp \
gsl/assert.cpp \
hash.cpp \
index/base.cpp \
index/blockfilterindex.cpp \
index/coinstatsindex.cpp \
index/txindex.cpp \
instantsend/db.cpp \
instantsend/instantsend.cpp \
init/common.cpp \
key.cpp \
key_io.cpp \
llmq/blockprocessor.cpp \
llmq/commitment.cpp \
llmq/context.cpp \
llmq/debug.cpp \
llmq/dkgsession.cpp \
llmq/dkgsessionhandler.cpp \
llmq/dkgsessionmgr.cpp \
llmq/options.cpp \
llmq/quorums.cpp \
llmq/quorumsman.cpp \
llmq/signhash.cpp \
llmq/signing.cpp \
llmq/snapshot.cpp \
llmq/utils.cpp \
logging.cpp \
netaddress.cpp \
netbase.cpp \
node/blockstorage.cpp \
node/chainstate.cpp \
node/transaction.cpp \
kernel/coinstats.cpp \
masternode/meta.cpp \
masternode/payments.cpp \
masternode/sync.cpp \
messagesigner.cpp \
merkleblock.cpp \
node/interface_ui.cpp \
policy/feerate.cpp \
policy/fees.cpp \
policy/packages.cpp \
policy/policy.cpp \
policy/settings.cpp \
pow.cpp \
protocol.cpp \
primitives/block.cpp \
primitives/transaction.cpp \
pubkey.cpp \
random.cpp \
randomenv.cpp \
saltedhasher.cpp \
scheduler.cpp \
script/interpreter.cpp \
script/script.cpp \
script/script_error.cpp \
script/sigcache.cpp \
script/standard.cpp \
spork.cpp \
shutdown.cpp \
support/cleanse.cpp \
support/lockedpool.cpp \
sync.cpp \
timedata.cpp \
txdb.cpp \
txmempool.cpp \
uint256.cpp \
util/asmap.cpp \
util/bytevectorhash.cpp \
util/check.cpp \
util/getuniquepath.cpp \
util/hasher.cpp \
util/message.cpp \
util/moneystr.cpp \
util/ranges_set.cpp \
util/serfloat.cpp \
util/settings.cpp \
util/sock.cpp \
util/string.cpp \
util/strencodings.cpp \
util/syserror.cpp \
util/system.cpp \
util/thread.cpp \
util/threadinterrupt.cpp \
util/threadnames.cpp \
util/time.cpp \
util/tokenpipe.cpp \
validation.cpp \
validationinterface.cpp \
versionbits.cpp \
warnings.cpp
dash_chainstate_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
dash_chainstate_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
dash_chainstate_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
dash_chainstate_LDADD = \
$(LIBBITCOIN_CRYPTO) \
$(LIBUNIVALUE) \
$(LIBSECP256K1) \
$(LIBDASHBLS) \
$(LIBLEVELDB) \
$(LIBLEVELDB_SSE42) \
$(LIBMEMENV)

# Required for obj/build.h to be generated first.
# More details: https://www.gnu.org/software/automake/manual/html_node/Built-Sources-Example.html
bitcoin_chainstate-clientversion.$(OBJEXT): obj/build.h
#

# dashconsensus library #
Expand Down
3 changes: 0 additions & 3 deletions src/active/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ ActiveContext::ActiveContext(CBLSWorker& bls_worker, ChainstateManager& chainman
const CMasternodeSync& mn_sync, const CBLSSecretKey& operator_sk,
const llmq::QvvecSyncModeMap& sync_map, const util::DbWrapperParams& db_params,
bool quorums_recovery, bool quorums_watch) :
m_isman{isman},
m_qman{qman},
nodeman{std::make_unique<CActiveMasternodeManager>(connman, dmnman, operator_sk)},
dkgdbgman{std::make_unique<llmq::CDKGDebugManager>(dmnman, qsnapman, chainman)},
Expand All @@ -53,14 +52,12 @@ ActiveContext::ActiveContext(CBLSWorker& bls_worker, ChainstateManager& chainman
qblockman, qsnapman, *nodeman, chainman, sporkman,
llmq_params, quorums_watch, quorum_idx);
});
m_isman.ConnectSigner(is_signer.get());
m_qman.ConnectManagers(qman_handler.get(), qdkgsman.get());
}

ActiveContext::~ActiveContext()
{
m_qman.DisconnectManagers();
m_isman.DisconnectSigner();
}

void ActiveContext::Start(CConnman& connman, PeerManager& peerman, int16_t worker_count)
Expand Down
4 changes: 3 additions & 1 deletion src/active/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ struct DbWrapperParams;

struct ActiveContext final : public CValidationInterface {
private:
llmq::CInstantSendManager& m_isman;
llmq::CQuorumManager& m_qman;

public:
Expand Down Expand Up @@ -97,8 +96,11 @@ struct ActiveContext final : public CValidationInterface {
const std::unique_ptr<llmq::CEHFSignalsHandler> ehf_sighandler;
const std::unique_ptr<llmq::QuorumParticipant> qman_handler;
const std::unique_ptr<chainlock::ChainLockSigner> cl_signer;

public:
const std::unique_ptr<instantsend::InstantSendSigner> is_signer;

public:
/** Owned by PeerManager, use GetCJServer() */
CCoinJoinServer* m_cj_server{nullptr};
};
Expand Down
1 change: 1 addition & 0 deletions src/active/quorums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <llmq/quorums.h>
#include <llmq/utils.h>
#include <masternode/sync.h>
#include <msg_result.h>
#include <util/helpers.h>

#include <chain.h>
Expand Down
Loading
Loading