backport: bitcoin/bitcoin#24304: [kernel 0/n] Introduce bitcoin-chainstate#7234
Draft
knst wants to merge 42 commits intodashpay:developfrom
Draft
backport: bitcoin/bitcoin#24304: [kernel 0/n] Introduce bitcoin-chainstate#7234knst wants to merge 42 commits intodashpay:developfrom
bitcoin-chainstate#7234knst wants to merge 42 commits intodashpay:developfrom
Conversation
…ce instead of returning std::variant
- Rename IsKnownTx to HasTxForLock for clarity (returns true when the lock's transaction is known, not pending without a TX) - Fix unconditional LookupBlockIndex in CheckCanLock: only take cs_main on cache miss instead of every call - Fix log prefix typos: NetSigning -> NetInstantSend in ProcessInstantSendLock - Remove redundant LookupBlockIndex fallback in ProcessInstantSendLock that duplicated the static GetBlockHeight helper - Simplify AttachISLockToTx: use for-loop with early-continue, remove unnecessary variable - Remove double blank line Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…PackageSelection, final part)
There's new helper IsValidAndSynced in CGovernanceManager that incapsulate usages of CMasternodeSync in CMNPayment
…otifier is introduced to use it for CChainState
…r.cpp for chain-state
2c03cec ci: Build bitcoin-chainstate (Carl Dong) 095aa6c build: Add example bitcoin-chainstate executable (Carl Dong) Pull request description: Part of: bitcoin#24303 This PR introduces an example/demo `bitcoin-chainstate` executable using said library which can print out information about a datadir and take in new blocks on stdin. Please read the commit messages for more details. ----- #### You may ask: WTF?! Why is `index/*.cpp`, etc. being linked in? This PR is meant only to capture the state of dependencies in our consensus engine as of right now. There are many things to decouple from consensus, which will be done in subsequent PRs. Listing the files out right now in `bitcoin_chainstate_SOURCES` is purely to give us a clear picture of the task at hand, it is **not** to say that these dependencies _belongs_ there in any way. ### TODO 1. Clean up `bitcoin-chainstate.cpp` It is quite ugly, with a lot of comments I've left for myself, I should clean it up to the best of my abilities (the ugliness of our init/shutdown might be the upper bound on cleanliness here...) ACKs for top commit: ajtowns: ACK 2c03cec ryanofsky: Code review ACK 2c03cec. Just rebase, comments, formatting change since last review MarcoFalke: re-ACK 2c03cec 🏔 Tree-SHA512: 86e7fb5718caa577df8abc8288c754f4a590650d974df9d2f6476c87ed25c70f923c4db651c6963f33498fc7a3a31f6692b9a75cbc996bf4888c5dac2f34a13b
…avoid extra heavy dependencies Implemented: - ValueFromAmount (core_write.cpp) - GetPrettyExceptionStr (stacktrackes.cpp)
…dex dependency for linking
…posed to be but to fix linkage errors
…ssage for detailed notes about further todo-to-remove TODO to remove: base58.cpp \ core_write.cpp \ evo/core_write.cpp \ key_io.cpp \ node/interface_ui.cpp \ protocol.cpp \ scheduler.cpp \ node/bloom.cpp \ index/txindex.cpp \ batchedlogger.cpp \ Reduce governance significantly so far as there's no actual governance enabled Reduce llmq: dkgsession, dkgsessionmgr, dkgsessionohandler, debug Remove CSigningManager from LLMQContext. LLMQContext should be quorum-only-context
|
This pull request has conflicts, please rebase. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
This PR sum up all changes that are required to backport bitcoin#24304 and proof-of-concept that it is possible after just couple extra tiny steps.
The first blocker is already have PR: #7178
What was done?
Beside changes that already has been merged or having PRs such as #7178 [in review], #7070, #7008, #6992, #6959, #7106 (by Udjin), #7065 (by kwvg) and many other PRs:
bitcoin-chainstatebitcoin/bitcoin#24304 which unblocks the whole multiple series of all kernel backportsThere are several dirty hacks that meant to be fixed and they will be done by extra PRs; local branches for these fixes are semi-ready:
CDKGSessionManagershould be split to network & non-network pieces. For right now a workaround for linkage is used by moving some code to net_processing.cppCQuorumManager::RequestQuorumDatashould be moved away to avoid network dependenciesThere are several dependencies of dash-chainstate that looks excessive, but they are not a blocker and may be removed in any time in the future:
- base58.cpp
- core_write.cpp
- evo/core_write.cpp
- key_io.cpp
- node/interface_ui.cpp
- protocol.cpp
- scheduler.cpp
- node/bloom.cpp
- index/txindex.cpp
- batchedlogger.cpp
- Reduce governance significantly so far as there's no actual governance enabled in chainstate mode (governance is out of blockchain anyway)
- Reduce llmq dependencies, probably to drop: dkgsession, dkgsessionmgr, dkgsessionohandler, debug
- Remove CSigningManager from LLMQContext. LLMQContext should be quorum-only-context; CSigningManager should be inside active/
How Has This Been Tested?
Build succeed with bitcoin#24304, functional & unit tests runs
Run dash-chainstate:
Breaking Changes
N/A
Checklist:
Go over all the following points, and put an
xin all the boxes that apply.