0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-11 15:56:58 -04:00
bitcoin-core/src/kernel
fanquake e695d8536e
Merge bitcoin/bitcoin#26177: refactor / kernel: Move non-gArgs chainparams functionality to kernel
b3e78dc91d refactor: Don't use global chainparams in chainstatemanager method (TheCharlatan)
382b692a50 Split non/kernel chainparams (Carl Dong)
edabbc78a3 Add factory functions for Main/Test/Sig/Reg chainparams (Carl Dong)
d938098398 Remove UpdateVersionBitsParameters (Carl Dong)
84b85786f0 Decouple RegTestChainParams from ArgsManager (Carl Dong)
76cd4e7c96 Decouple SigNetChainParams from ArgsManager (Carl Dong)

Pull request description:

  This pull request is part of the `libbitcoinkernel` project https://github.com/bitcoin/bitcoin/issues/24303 https://github.com/bitcoin/bitcoin/projects/18 and more specifically its "Step 2: Decouple most non-consensus code from libbitcoinkernel". dongcarl is the original author of this patchset, these commits were taken from https://github.com/dongcarl/bitcoin/tree/2022-03-libbitcoinkernel-chainparams-args-only.

  #### Context

  The bitcoin kernel library currently relies on code containing user configurations through the `ArgsManager`. This is not optimal, since as a stand-alone library it should not rely on bitcoind's argument parsing logic. Instead, its interfaces should accept control and options structs that control the kernel library's desired configuration.

  Similar work towards decoupling the `ArgsManager` from the kernel has been done in
  https://github.com/bitcoin/bitcoin/pull/25290, https://github.com/bitcoin/bitcoin/pull/25487, https://github.com/bitcoin/bitcoin/pull/25527 and https://github.com/bitcoin/bitcoin/pull/25862.

  #### Changes

  By moving the `CChainParams` class definition into the kernel and giving it new factory functions `CChainParams::{RegTest,SigNet,Main,TestNet}`it can be constructed without an `ArgsManager` reference, unlike the current factory function `CreateChainParams`.

  The first few commits remove uses of `ArgsManager` within `CChainParams`. Then the `CChainParams` definition is moved to a new file in the `kernel/` subdirectory.

ACKs for top commit:
  MarcoFalke:
    re-ACK b3e78dc91d 🛁
  ryanofsky:
    Code review ACK b3e78dc91d. Only changes since last review were recent review suggestions.
  ajtowns:
    ACK b3e78dc91d

Tree-SHA512: 3835aca1d3e3c75cc3303dd584bab3a77e58f6c678724a5e359fe4b0e17e0763a00931ee6191f516b9fde50496f59cc691f0709c0254206db3863bbf7ab2cacd
2023-03-16 13:56:35 +00:00
..
bitcoinkernel.cpp b-cs: Define G_TRANSLATION_FUN in bitcoinkernel.cpp 2022-04-26 16:30:53 -04:00
blockmanager_opts.h Move ::nPruneTarget into BlockManager 2023-03-15 15:33:12 +01:00
chain.cpp interfaces, refactor: Add more block information to block connected notifications 2022-07-18 13:39:55 -05:00
chain.h interfaces, refactor: Add more block information to block connected notifications 2022-07-18 13:39:55 -05:00
chainparams.cpp Split non/kernel chainparams 2023-03-15 16:43:31 +01:00
chainparams.h Split non/kernel chainparams 2023-03-15 16:43:31 +01:00
chainstatemanager_opts.h refactor, validation: Add ChainstateManagerOpts db options 2023-02-10 04:39:11 -04:00
checks.cpp ci: Enable IWYU in src/kernel directory 2022-07-19 16:54:52 -04:00
checks.h refactor: Reduce number of SanityChecks return values 2022-07-19 16:54:52 -04:00
coinstats.cpp refactor: Move error() from util/system.h to logging.h 2023-03-13 17:09:54 +01:00
coinstats.h Use DataStream where possible 2023-01-26 10:44:05 +01:00
context.cpp Adapt to libsecp256k1 API changes 2022-12-13 15:08:24 -05:00
context.h Adapt to libsecp256k1 API changes 2022-12-13 15:08:24 -05:00
cs_main.cpp kernel: add missing include 2023-02-22 15:46:21 +00:00
cs_main.h refactor: add kernel/cs_main.* 2023-01-05 09:05:14 +00:00
mempool_entry.h refactor: Move txmempool_entry.h --> kernel/mempool_entry.h 2022-11-30 10:37:57 +00:00
mempool_limits.h refactor: mempool: add MemPoolLimits::NoLimits() 2022-10-05 13:07:11 +01:00
mempool_options.h doc: Fix comment syntax error 2023-01-30 10:26:02 +00:00
mempool_persist.cpp scripted-diff: rename CChainState -> Chainstate 2022-09-09 11:47:27 -04:00
mempool_persist.h scripted-diff: rename CChainState -> Chainstate 2022-09-09 11:47:27 -04:00
validation_cache_sizes.h validationcaches: Use size_t for sizes 2022-08-03 12:03:28 -04:00