Skip to content

Commit 808ef36

Browse files
committed
[doc] Update thread information in developer docs
1 parent 4702cad commit 808ef36

File tree

1 file changed

+36
-11
lines changed

1 file changed

+36
-11
lines changed

doc/developer-notes.md

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -423,27 +423,52 @@ and its `cs_KeyStore` lock for example).
423423
Threads
424424
-------
425425

426-
- ThreadScriptCheck : Verifies block scripts.
426+
- [Main thread (`bitcoind`)](https://doxygen.bitcoincore.org/bitcoind_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97)
427+
: Started from `main()` in `bitcoind.cpp`. Responsible for starting up and
428+
shutting down the application.
427429

428-
- ThreadImport : Loads blocks from `blk*.dat` files or `-loadblock=<file>`.
430+
- [ThreadImport (`b-loadblk`)](https://doxygen.bitcoincore.org/init_8cpp.html#ae9e290a0e829ec0198518de2eda579d1)
431+
: Loads blocks from `blk*.dat` files or `-loadblock=<file>` on startup.
429432

430-
- ThreadDNSAddressSeed : Loads addresses of peers from the DNS.
433+
- [ThreadScriptCheck (`b-scriptch.x`)](https://doxygen.bitcoincore.org/validation_8cpp.html#a925a33e7952a157922b0bbb8dab29a20)
434+
: Parallel script validation threads for transactions in blocks.
431435

432-
- ThreadMapPort : Universal plug-and-play startup/shutdown.
436+
- [ThreadHTTP (`b-http`)](https://doxygen.bitcoincore.org/httpserver_8cpp.html#abb9f6ea8819672bd9a62d3695070709c)
437+
: Libevent thread to listen for RPC and REST connections.
433438

434-
- ThreadSocketHandler : Sends/Receives data from peers on port 8333.
439+
- [HTTP worker threads(`b-httpworker.x`)](https://doxygen.bitcoincore.org/httpserver_8cpp.html#aa6a7bc27265043bc0193220c5ae3a55f)
440+
: Threads to service RPC and REST requests.
435441

436-
- ThreadOpenAddedConnections : Opens network connections to added nodes.
442+
- [Indexer threads (`b-txindex`, etc)](https://doxygen.bitcoincore.org/class_base_index.html#a96a7407421fbf877509248bbe64f8d87)
443+
: One thread per indexer.
437444

438-
- ThreadOpenConnections : Initiates new connections to peers.
445+
- [SchedulerThread (`b-scheduler`)](https://doxygen.bitcoincore.org/class_c_scheduler.html#a14d2800815da93577858ea078aed1fba)
446+
: Does asynchronous background tasks like dumping wallet contents, dumping
447+
addrman and running asynchronous validationinterface callbacks.
439448

440-
- ThreadMessageHandler : Higher-level message handling (sending and receiving).
449+
- [TorControlThread (`b-torcontrol`)](https://doxygen.bitcoincore.org/torcontrol_8cpp.html#a4faed3692d57a0d7bdbecf3b37f72de0)
450+
: Libevent thread for tor connections.
441451

442-
- DumpAddresses : Dumps IP addresses of nodes to `peers.dat`.
452+
- Net threads:
443453

444-
- ThreadRPCServer : Remote procedure call handler, listens on port 8332 for connections and services them.
454+
- [ThreadMessageHandler (`b-msghand`)](https://doxygen.bitcoincore.org/class_c_connman.html#aacdbb7148575a31bb33bc345e2bf22a9)
455+
: Application level message handling (sending and receiving). Almost
456+
all net_processing and validation logic runs on this thread.
445457

446-
- Shutdown : Does an orderly shutdown of everything.
458+
- [ThreadDNSAddressSeed (`b-dnsseed`)](https://doxygen.bitcoincore.org/class_c_connman.html#aa7c6970ed98a4a7bafbc071d24897d13)
459+
: Loads addresses of peers from the DNS.
460+
461+
- [ThreadMapPort (`b-upnp`)](https://doxygen.bitcoincore.org/net_8cpp.html#a63f82a71c4169290c2db1651a9bbe249)
462+
: Universal plug-and-play startup/shutdown.
463+
464+
- [ThreadSocketHandler (`b-net`)](https://doxygen.bitcoincore.org/class_c_connman.html#a765597cbfe99c083d8fa3d61bb464e34)
465+
: Sends/Receives data from peers on port 8333.
466+
467+
- [ThreadOpenAddedConnections (`b-addcon`)](https://doxygen.bitcoincore.org/class_c_connman.html#a0b787caf95e52a346a2b31a580d60a62)
468+
: Opens network connections to added nodes.
469+
470+
- [ThreadOpenConnections (`b-opencon`)](https://doxygen.bitcoincore.org/class_c_connman.html#a55e9feafc3bab78e5c9d408c207faa45)
471+
: Initiates new connections to peers.
447472

448473
Ignoring IDE/editor files
449474
--------------------------

0 commit comments

Comments
 (0)