Skip to content

[pull] master from bitcoin:master#1015

Merged
pull[bot] merged 6 commits intomrpeertopeer:masterfrom
bitcoin:master
Feb 27, 2026
Merged

[pull] master from bitcoin:master#1015
pull[bot] merged 6 commits intomrpeertopeer:masterfrom
bitcoin:master

Conversation

@pull
Copy link

@pull pull bot commented Feb 27, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

ryanofsky and others added 6 commits February 24, 2026 08:31
There's no change in behavior. This is just a refactoring to avoid a minor
layer violation in init code. The node.init object is intended to return
interface pointers for code outside the node (like wallet and gui code), not
used by node itself to initialize its internal state.

(Motivation for this change is to introduce a MakeMining wait_loaded option in
an upcoming commit that can only be used internally and not set by external
clients.)
Instead of having the InitAndLoadChainstate function delete and create the
KernelNotifications object each time it is called (it can be called twice when
reindexing) to clear cached state, create it just one time and add a
setChainstateLoaded() method to manage state as it is loaded and unloaded.

This refactoring should make sense by itself to be more explicit about how
KernelNotifications state is cleared, but it's also needed to make outside code
accessing KernelNotifications state (currently just mining code) safe during
node startup and shutdown so the KernelNofications mutex can be used for
synchronization and does not get recreated itself.
…early startup

This fixes ``Assertion `m_node.chainman' failed`` errors first reported
#33994 (comment) when
IPC mining methods are called before ChainstateManager is loaded.

The fix works by making the `Init.makeMining` method block until chainstate
data is loaded.
…d`` errors on early startup

bbc8f1e ipc mining: Prevent ``Assertion `m_node.chainman' failed`` errors on early startup (Ryan Ofsky)
a7cabf9 init refactor: Only initialize node.notifications one time (Ryan Ofsky)
c8e332c init refactor: Remove node.init accesss in AppInitInterfaces (Ryan Ofsky)

Pull request description:

  This fixes ``Assertion `m_node.chainman' failed`` errors first reported #33994 (comment) when IPC mining methods are called before ChainstateManager is loaded.

  The fix works by making the `Init.makeMining` method wait until chainstate data is loaded. It's probably the simplest possible fix but other alternatives like moving the wait to `Mining.createNewBlock` were discussed in the thread #34661 (comment) and could be implemented later without changes to clients.

ACKs for top commit:
  Sjors:
    utACK bbc8f1e
  ismaelsadeeq:
    ACK bbc8f1e
  achow101:
    ACK bbc8f1e

Tree-SHA512: 3e2e4e28ccff364b2303efd06ce337a229c28609076638500acb29559f716a15ad99409c6970ce9ad91776d53e3f9d959f1bbbd144ea9a4a2fb578ddbf2da267
fa48f8c test: Add missing timeout_factor to zmq socket (MarcoFalke)

Pull request description:

  Fixes #34189

  Otherwise, the test may intermittently fail on slow CI systems that have `--timeout-factor=` properly set.

  It can be tested by running `./bld-cmake/test/functional/interface_zmq.py --timeout-factor=10` with this diff:

  ```diff
  diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp
  index c7be6ab..b14cf2aee6 100644
  --- a/src/validationinterface.cpp
  +++ b/src/validationinterface.cpp
  @@ -166,2 +166,3 @@ void ValidationSignals::SyncWithValidationInterfaceQueue()
               LOG_EVENT(fmt, local_name, __VA_ARGS__);           \
  +            UninterruptibleSleep(45ms); \
               event();                                           \
  diff --git a/test/functional/interface_zmq.py b/test/functional/interface_zmq.py
  index 6717007..eee377daea 100755
  --- a/test/functional/interface_zmq.py
  +++ b/test/functional/interface_zmq.py
  @@ -176,3 +176,3 @@ class ZMQTest (BitcoinTestFramework):
           for sub in subscribers:
  -            sub.socket.set(zmq.RCVTIMEO, recv_timeout*1000)
  +            sub.socket.set(zmq.RCVTIMEO, int(recv_timeout * 1000))

  @@ -271,3 +271,3 @@ class ZMQTest (BitcoinTestFramework):
               [(topic, address) for topic in ["hashblock", "hashtx"]],
  -            recv_timeout=2)  # 2 second timeout to check end of notifications
  +            recv_timeout=0.2)  # 2 second timeout to check end of notifications
           self.disconnect_nodes(0, 1)
  ```

  Before this pull: Test fails with `zmq.error.Again: Resource temporarily unavailable`

  After this pull: Test passes

ACKs for top commit:
  l0rinc:
    code review ACK fa48f8c
  achow101:
    ACK fa48f8c

Tree-SHA512: 5ff8bdd807ff4b644daa634bb7b469da3da3915f58afba63a90e662df99cbebc86636e34e2b1b313c8629773aef2a239fb3025226a84d2ec22f6ecd4cea666c4
@pull pull bot locked and limited conversation to collaborators Feb 27, 2026
@pull pull bot added the ⤵️ pull label Feb 27, 2026
@pull pull bot merged commit 9cad97f into mrpeertopeer:master Feb 27, 2026
1 of 6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants