0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00
bitcoin-core/doc
Ava Chow 6f24662eb9
Merge bitcoin/bitcoin#31175: rpc: Remove submitblock pre-checks
73db95c65c kernel: Make bitcoin-chainstate's block validation mirror submitblock's (TheCharlatan)
bb53ce9bda tests: Add functional test for submitting a previously pruned block (Greg Sanders)
1f7fc73825 rpc: Remove submitblock duplicate pre-check (TheCharlatan)
e62a8abd7d rpc: Remove submitblock invalid-duplicate precheck (TheCharlatan)
36dbebafb9 rpc: Remove submitblock coinbase pre-check (TheCharlatan)

Pull request description:

  With the introduction of a mining ipc interface and the potential future introduction of a kernel library API it becomes increasingly important to offer common behaviour between them. An example of this is ProcessNewBlock, which is used by ipc, rpc, net_processing and (potentially) the kernel library. Having divergent behaviour on suggested pre-checks and checks for these functions is confusing to both developers and users and is a maintenance burden.

  The rpc interface for ProcessNewBlock (submitblock) currently pre-checks if the block has a coinbase transaction and whether it has been processed before. While the current example binary for how to use the kernel library, bitcoin-chainstate, imitates these checks, the other interfaces do not.

  The coinbase check is repeated again early during ProcessNewBlock. Pre-checking it may also shadow more fundamental problems with a block. In most cases the block header is checked first, before validating the transactions. Checking the coinbase first therefore masks potential issues with the header. Fix this by removing the pre-check.

  Similary the duplicate checks are repeated early in the contextual checks of ProcessNewBlock. If duplicate blocks are detected much of their validation is skipped. Depending on the constitution of the block, validating the merkle root of the block is part of the more intensive workload when validating a block. This could be an argument for moving the pre-checks into block processing. In net_processing this would have a smaller effect however, since the block mutation check, which also validates the merkle root, is done before.

  Testing spamming a node with valid, but duplicate unrequested blocks seems to exhaust a CPU thread, but does not seem to significantly impact keeping up with the tip. The benefits of adding these checks to net_processing are questionable, especially since there are other ways to trigger the more CPU-intensive checks without submitting a duplicate block. Since these DOS concerns apply even less to the RPC interface, which does not have banning mechanics built in, remove them too.

  Finally, also remove the pre-checks from `bitcoin-chainstate.cpp`.

  ---

  This PR is part of the [libbitcoinkernel project](https://github.com/bitcoin/bitcoin/issues/27587).

ACKs for top commit:
  Sjors:
    re-utACK 73db95c65c
  achow101:
    ACK 73db95c65c
  instagibbs:
    ACK 73db95c65c
  mzumsande:
    ACK 73db95c65c

Tree-SHA512: 2d02e851cf402ecf6a1968c058df3576aac407e200cbf922a1a6391b7f97b4f42c6d9f6b0a78b9d1af0a6d40bdd529a7b11a1e6d88885bd7b8b090f6d1411861
2024-12-03 17:38:41 -05:00
..
design doc: multiprocess documentation improvements 2024-09-23 15:03:04 -05:00
man
policy docs: remove requirement to signal bip125 2024-10-31 13:19:31 -04:00
release-notes doc: archive release notes for v27.2 2024-11-04 11:19:54 +00:00
assets-attribution.md
assumeutxo.md
benchmarking.md doc: replace -? with -h for bench_bitcoin help 2024-10-19 18:44:22 +02:00
bips.md docs: remove requirement to signal bip125 2024-10-31 13:19:31 -04:00
bitcoin-conf.md doc: add testnet4 section header for config file 2024-10-01 15:18:12 +02:00
bitcoin_logo_doxygen.png
build-freebsd.md doc: remove mentions of UPnP 2024-10-25 09:27:29 -04:00
build-netbsd.md
build-openbsd.md doc: remove mentions of UPnP 2024-10-25 09:27:29 -04:00
build-osx.md doc: migrate from pkg-config to pkgconf in macOS build docs 2024-11-21 10:28:44 +00:00
build-unix.md cmake: Revamp FindLibevent module 2024-11-06 15:40:34 +00:00
build-windows-msvc.md build, msvc: Enable libqrencode vcpkg package 2024-11-05 16:38:56 +00:00
build-windows.md doc: remove dependency install instructions from win docs 2024-10-16 14:47:11 +01:00
cjdns.md
CMakeLists.txt
dependencies.md doc: remove mentions of UPnP 2024-10-25 09:27:29 -04:00
descriptors.md doc: update descriptors.md for getdescriptoractivity 2024-11-26 20:47:11 -05:00
developer-notes.md doc: Fix word order in developer-notes.md 2024-11-04 20:05:14 -08:00
dnsseed-policy.md
Doxyfile.in build: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:35:55 +00:00
external-signer.md
files.md
fuzzing.md doc: correct libfuzzer-nosan preset flag 2024-12-02 10:27:14 +00:00
guix.md
i2p.md
init.md
JSON-RPC-interface.md
managing-wallets.md
multiprocess.md doc: multiprocess documentation improvements 2024-09-23 15:03:04 -05:00
multisig-tutorial.md doc: Fix grammatical errors in multisig-tutorial.md 2024-11-05 12:13:02 -08:00
offline-signing-tutorial.md doc: Add missing 'blank=true' option in offline-signing-tutorial.md 2024-11-06 10:36:30 -08:00
p2p-bad-ports.md
productivity.md
psbt.md doc: mention descriptorprocesspsbt in psbt.md 2024-11-12 14:56:12 +01:00
README.md doc: update IBD requirements in doc/README.md 2024-10-02 17:46:11 +02:00
README_doxygen.md
README_windows.txt
reduce-memory.md
reduce-traffic.md
release-notes-28358.md
release-notes-30239.md Add release note for ephemeral dust 2024-11-12 09:41:24 -05:00
release-notes-30592.md doc: release note for mempoolrullrbf removal 2024-10-31 13:19:31 -04:00
release-notes-30708.md rpc: add getdescriptoractivity 2024-11-26 20:47:08 -05:00
release-notes-31130.md doc: add release note for #31130 2024-10-25 09:27:30 -04:00
release-notes-31156.md doc: add release note for 31156 2024-10-28 11:38:38 -04:00
release-notes-31175.md rpc: Remove submitblock duplicate pre-check 2024-11-21 22:18:33 +01:00
release-notes-empty-template.md release: target Windows 10 or later 2024-11-08 13:35:12 +00:00
release-process.md doc: Use more precise anchor links to Xcode SDK extraction 2024-11-28 05:36:25 +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 tracing: pass if replaced by tx/pkg to tracepoint 2024-11-13 13:27:01 -05:00
translation_process.md
translation_strings_policy.md
zmq.md doc: correct the zmq automatic build info 2024-09-25 07:07:04 -04: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.