bitcoin/doc
Ava Chow 7a4a2a38ea
Merge bitcoin/bitcoin#27826: validation: log which peer sent us a header
abe43dfadd doc: release note for #27826 (Sjors Provoost)
f9fa28788e Use LogBlockHeader for compact blocks (Sjors Provoost)
bad7c91479 Log which peer sent us a header (Sjors Provoost)
9d3e39c29c Log block header in net_processing (Sjors Provoost)

Pull request description:

  Fixes #27744

  Since #27278 we log received headers. For compact blocks we also log which peer sent it (e5ce857634), but not for regular headers. That required an additional refactor, which this PR provides.

  Move the logging from validation to net_processing.

  This also reduces the number of log entries (under default configuration) per compact block header from 3 to 2: one for the header and one for the connected tip.

  The PR introduces a new helper method `LogBlockHeader`.

  When receiving a _compact block_ we call `LogBlockHeader` from the exact same place as where we previously logged. So that log message doesn't change. What does change is that we no longer _also_ log from `AcceptBlockHeader`.

  When receiving a regular header(s) message, _we only log the last one_. This is a change in behaviour because it was simpler to implement, but it's probably better anyway. It does mean that if a peer sends of a bunch of headers of which _any_ is invalid, we won't log it (here).

  Lastly I expanded the code comment explaining why we log this. It initially only covered selfish mining, but we also care about peers sending us headers but not following up (see e.g. #27626).

  Example log:

  ```
  2023-06-05T13:12:21Z Saw new header hash=000000000000000000045910263ef84b575ae3af151865238f1e5c619e69c330 height=792964 peer=0
  2023-06-05T13:12:23Z UpdateTip: new best=000000000000000000045910263ef84b575ae3af151865238f1e5c619e69c330 height=792964 version=0x20000000 log2_work=94.223098 tx=848176824 date='2023-06-05T13:11:49Z' progress=1.000000 cache=6.4MiB(54615txo)
  2023-06-05T13:14:05Z Saw new cmpctblock header hash=00000000000000000003c6fd4ef2e1246a3f9e1fffab7247344f94cadb9de979 height=792965 peer=0
  2023-06-05T13:14:05Z UpdateTip: new best=00000000000000000003c6fd4ef2e1246a3f9e1fffab7247344f94cadb9de979 height=792965 version=0x20000000 log2_work=94.223112 tx=848179461 date='2023-06-05T13:13:58Z' progress=1.000000 cache=7.2MiB(61275txo)
  2023-06-05T13:14:41Z Saw new header hash=000000000000000000048e6d69c8399992782d08cb57f5d6cbc81a9f996c3f43 height=792966 peer=8
  2023-06-05T13:14:42Z UpdateTip: new best=000000000000000000048e6d69c8399992782d08cb57f5d6cbc81a9f996c3f43 height=792966 version=0x2db3c000 log2_work=94.223126 tx=848182944 date='2023-06-05T13:14:35Z' progress=1.000000 cache=8.0MiB(69837txo)
  ```

ACKs for top commit:
  danielabrozzoni:
    tACK abe43dfadd
  achow101:
    ACK abe43dfadd
  vasild:
    ACK abe43dfadd

Tree-SHA512: 081e0de62cbd8a0b35cf54daaa09e3e6991d0cc9f706ef3eb50908752fe7815de69b367f7313381c90cd8d5de0ae5f532d1cd54948c5c1133b1832f266d9c232
2025-04-29 14:48:16 -07:00
..
design scripted-diff: s/WITH_MULTIPROCESS/ENABLE_IPC/ in cmake 2025-04-02 08:41:16 -05:00
man build: Remove Autotools-based build system 2024-08-30 21:31:39 +01:00
policy fix typos 2025-01-24 09:12:38 +08:00
release-notes [doc] archive 29.0 release notes 2025-04-14 21:02:18 -04:00
assets-attribution.md [doc] Merge doc/assets-attribution.md into contrib/debian/copyright 2015-09-18 18:14:42 +02:00
assumeutxo.md doc: fix assumeutxo design doc link 2024-09-04 22:53:34 +01:00
benchmarking.md Merge bitcoin/bitcoin#31161: cmake: Set top-level target output locations 2025-03-12 11:19:00 +08:00
bips.md docs: remove requirement to signal bip125 2024-10-31 13:19:31 -04:00
bitcoin_logo_doxygen.png Lossless image optimization 2013-12-02 10:10:22 +01:00
bitcoin-conf.md doc: Add some general documentation about negated options 2025-02-13 12:30:15 -05:00
build-freebsd.md cmake: Require Qt 6 to build GUI 2025-04-02 09:11:48 +01:00
build-netbsd.md cmake: Require Qt 6 to build GUI 2025-04-02 09:11:48 +01:00
build-openbsd.md cmake: Require Qt 6 to build GUI 2025-04-02 09:11:48 +01:00
build-osx.md doc: Add deps install notes for multiprocess 2025-04-17 20:26:43 +02:00
build-unix.md doc: Add deps install notes for multiprocess 2025-04-17 20:26:43 +02:00
build-windows-msvc.md doc: build: Fix instructions for msvc gui builds 2025-02-12 12:53:59 -08:00
build-windows.md doc: add note to windows build about stripping bin 2025-03-07 17:19:05 +00:00
cjdns.md doc: update getnodeaddresses for CJDNS, I2P and Tor and rm link 2023-06-01 15:52:51 +02:00
CMakeLists.txt cmake: add USE_SOURCE_PERMISSIONS to all configure_file usage 2024-09-06 10:52:19 +01:00
dependencies.md doc: Update dependencies.md for Qt 6 2025-04-02 09:15:50 +01:00
descriptors.md descriptors doc: Correct Markdown format + wording 2025-03-25 21:13:35 +01:00
developer-notes.md Merge bitcoin/bitcoin#31741: multiprocess: Add libmultiprocess git subtree 2025-04-11 13:40:31 +01:00
dnsseed-policy.md Update the developer mailing list address. 2024-04-02 15:38:40 -03:00
Doxyfile.in build: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:35:55 +00:00
external-signer.md wallet: compare address returned by displayaddress 2024-04-16 17:47:43 +02:00
files.md Merge bitcoin/bitcoin#29775: Testnet4 including PoW difficulty adjustment fix 2024-08-07 13:05:04 -04:00
fuzzing.md doc: Fix fuzz test_runner.py path 2025-04-25 16:33:58 +00:00
guix.md docs: Point to contrib/guix/README.md in doc/guix.md 2021-01-08 11:40:01 -05:00
i2p.md doc: i2p: improve -i2pacceptincoming mention 2024-04-04 18:32:39 -03:00
init.md Merge bitcoin/bitcoin#28167: init: Add option for rpccookie permissions (replace 26088) 2024-06-27 17:35:08 -04:00
JSON-RPC-interface.md minor: remove unnecessary semicolons from RPC content type examples 2024-06-07 10:47:24 -04:00
managing-wallets.md Merge bitcoin/bitcoin#27064: system: use %LOCALAPPDATA% as default datadir on windows 2024-05-23 12:11:55 -04:00
multiprocess.md doc: Document WITH_EXTERNAL_LIBMULTIPROCESS build option better 2025-04-14 16:32:37 -04:00
multisig-tutorial.md scripted-diff: Adjust documentation per top-level target output location 2025-02-20 22:18:57 +00:00
offline-signing-tutorial.md scripted-diff: Adjust documentation per top-level target output location 2025-02-20 22:18:57 +00:00
p2p-bad-ports.md init, doc: improve -onlynet help and tor/i2p documentation 2022-03-03 16:14:01 +01:00
productivity.md doc: Update for CMake-based build system 2024-08-16 21:24:08 +01:00
psbt.md doc: mention descriptorprocesspsbt in psbt.md 2024-11-12 14:56:12 +01:00
README_doxygen.md doc: Improve doxygen readme navigation section 2019-09-23 19:22:06 -04:00
README_windows.txt doc: Remove version numbers from READMEs 2017-04-05 09:40:48 +02:00
README.md doc: update IBD requirements in doc/README.md 2024-10-02 17:46:11 +02:00
reduce-memory.md doc: Bring reduce-memory.md up to date 2025-03-04 15:37:59 +01:00
reduce-traffic.md doc: update/clarify max outbound connection count 2023-12-11 20:05:25 +01:00
release-notes-27826.md doc: release note for #27826 2025-04-15 08:04:50 -04:00
release-notes-31278.md Release notes 2025-03-16 11:12:03 +01:00
release-notes-31603.md docs: add release notes for 31603 2025-02-24 09:58:11 -03:00
release-notes-31953.md rpc: Allow fullrbf fee bump 2025-04-17 13:12:26 +02:00
release-notes-empty-template.md doc: remove note about macOS self-signing 2025-03-05 17:35:58 +00:00
release-process.md Merge bitcoin/bitcoin#31407: guix: Notarize MacOS app bundle and codesign all MacOS and Windows binaries 2025-03-05 17:34:26 +00:00
REST-interface.md doc: Fix missing comma in JSON example in REST-interface.md 2024-11-08 14:24:01 -08:00
tor.md doc: remove mentions of UPnP 2024-10-25 09:27:29 -04:00
tracing.md Merge bitcoin/bitcoin#31161: cmake: Set top-level target output locations 2025-03-12 11:19:00 +08:00
translation_process.md scripted-diff: s/WITH_MULTIPROCESS/ENABLE_IPC/ in cmake 2025-04-02 08:41:16 -05:00
translation_strings_policy.md doc: Updating docs from autotools to cmake 2024-09-18 11:04:52 -04:00
zmq.md doc: Fix and clarify description of ZMQ message format 2025-03-30 12:05:43 +08:00

Bitcoin Core

Setup

Bitcoin Core is the original Bitcoin client and it builds the backbone of the network. It downloads and, by default, stores the entire history of Bitcoin transactions, which requires several hundred gigabytes or more of disk space. Depending on the speed of your computer and network connection, the synchronization process can take anywhere from a few hours to several days or more.

To download Bitcoin Core, visit bitcoincore.org.

Running

The following are some helpful notes on how to run Bitcoin Core on your native platform.

Unix

Unpack the files into a directory and run:

  • bin/bitcoin-qt (GUI) or
  • bin/bitcoind (headless)

Windows

Unpack the files into a directory, and then run bitcoin-qt.exe.

macOS

Drag Bitcoin Core to your applications folder, and then run Bitcoin Core.

Need Help?

Building

The following are developer notes on how to build Bitcoin Core on your native platform. They are not complete guides, but include notes on the necessary libraries, compile flags, etc.

Development

The Bitcoin repo's root README contains relevant information on the development process and automated testing.

Resources

Miscellaneous

License

Distributed under the MIT software license.