diff --git a/doc/REST-interface.md b/doc/REST-interface.md index ed46e22262bb..8f38238f60bb 100644 --- a/doc/REST-interface.md +++ b/doc/REST-interface.md @@ -33,8 +33,7 @@ Supported API Given a transaction hash: returns a transaction in binary, hex-encoded binary, or JSON formats. Responds with 404 if the transaction doesn't exist. -By default, this endpoint will only search the mempool. -To query for a confirmed transaction, enable the transaction index via "txindex=1" command line / configuration option. +This endpoint only searches the mempool. #### Blocks - `GET /rest/block/.` @@ -61,23 +60,6 @@ Returns empty if the block doesn't exist or it isn't in the active chain. *Deprecated (but not removed) since 24.0:* `GET /rest/headers//.` -#### Blockfilter Headers -`GET /rest/blockfilterheaders//.?count=` - -Given a block hash: returns amount of blockfilter headers in upward -direction for the filter type . -Returns empty if the block doesn't exist or it isn't in the active chain. - -*Deprecated (but not removed) since 24.0:* -`GET /rest/blockfilterheaders///.` - -#### Blockfilters -`GET /rest/blockfilter//.` - -Given a block hash: returns the block filter of the given block of type -. -Responds with 404 if the block doesn't exist. - #### Blockhash by height `GET /rest/blockhashbyheight/.` diff --git a/doc/bips.md b/doc/bips.md index eb35ca2d6ac0..03ddf085cc02 100644 --- a/doc/bips.md +++ b/doc/bips.md @@ -38,8 +38,6 @@ BIPs that are implemented by Bitcoin Core: * [`BIP 147`](https://github.com/bitcoin/bips/blob/master/bip-0147.mediawiki): NULLDUMMY softfork as of **v0.13.1** ([PR 8636](https://github.com/bitcoin/bitcoin/pull/8636) and [PR 8937](https://github.com/bitcoin/bitcoin/pull/8937)), *buried* since **v0.19.0** ([PR #16060](https://github.com/bitcoin/bitcoin/pull/16060)). * [`BIP 152`](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki): Compact block transfer and related optimizations are used as of **v0.13.0** ([PR 8068](https://github.com/bitcoin/bitcoin/pull/8068)). * [`BIP 155`](https://github.com/bitcoin/bips/blob/master/bip-0155.mediawiki): The 'addrv2' and 'sendaddrv2' messages which enable relay of Tor V3 addresses (and other networks) are supported as of **v0.21.0** ([PR 19954](https://github.com/bitcoin/bitcoin/pull/19954)). -* [`BIP 157`](https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki) - [`158`](https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki): Compact Block Filters for Light Clients can be indexed as of **v0.19.0** ([PR #14121](https://github.com/bitcoin/bitcoin/pull/14121)) and served to peers on the P2P network as of **v0.21.0** ([PR #16442](https://github.com/bitcoin/bitcoin/pull/16442)). * [`BIP 159`](https://github.com/bitcoin/bips/blob/master/bip-0159.mediawiki): The `NODE_NETWORK_LIMITED` service bit is signalled as of **v0.16.0** ([PR 11740](https://github.com/bitcoin/bitcoin/pull/11740)), and such nodes are connected to as of **v0.17.0** ([PR 10387](https://github.com/bitcoin/bitcoin/pull/10387)). * [`BIP 173`](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki): Bech32 addresses for native Segregated Witness outputs are supported as of **v0.16.0** ([PR 11167](https://github.com/bitcoin/bitcoin/pull/11167)). Bech32 addresses are generated by default as of **v0.20.0** ([PR 16884](https://github.com/bitcoin/bitcoin/pull/16884)). * [`BIP 324`](https://github.com/bitcoin/bips/blob/master/bip-0324.mediawiki): The v2 transport protocol specified by BIP324 and the associated `NODE_P2P_V2` service bit are supported as of **v26.0**, but off by default ([PR 28331](https://github.com/bitcoin/bitcoin/pull/28331)). On by default as of **v27.0** ([PR 29347](https://github.com/bitcoin/bitcoin/pull/29347)). diff --git a/doc/developer-notes.md b/doc/developer-notes.md index fdd6824e1f73..edd0e940105d 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -695,9 +695,6 @@ done by the components. - [HTTP worker threads (`b-http_pool_x`)](https://doxygen.bitcoincore.org/httpserver_8cpp.html#a2ad0a49dc9b5e8117c0dee98c24187d8) : Threads to service RPC and REST requests. -- [Indexer threads (`b-txindex`, etc)](https://doxygen.bitcoincore.org/class_base_index.html#a96a7407421fbf877509248bbe64f8d87) - : One thread per indexer. - - [SchedulerThread (`b-scheduler`)](https://doxygen.bitcoincore.org/class_c_scheduler.html#a14d2800815da93577858ea078aed1fba) : Does asynchronous background tasks like dumping addrman and running asynchronous validationinterface callbacks. diff --git a/doc/files.md b/doc/files.md index e3f4f1b4e1b0..760e2664bc47 100644 --- a/doc/files.md +++ b/doc/files.md @@ -46,11 +46,6 @@ Subdirectory | File(s) | Description `blocks/` | `revNNNNN.dat`[\[2\]](#note2) | Block undo data (custom format) `blocks/` | `xor.dat` | Rolling XOR pattern for block and undo data files `chainstate/` | LevelDB database | Blockchain state (a compact representation of all currently unspent transaction outputs (UTXOs) and metadata about the transactions they are from) -`indexes/txindex/` | LevelDB database | Transaction index; *optional*, used if `-txindex=1` -`indexes/txospenderindex/` | LevelDB database | Transaction spender index; *optional*, used if `-txospenderindex=1` -`indexes/blockfilter/basic/db/` | LevelDB database | Blockfilter index LevelDB database for the basic filtertype; *optional*, used if `-blockfilterindex=basic` -`indexes/blockfilter/basic/` | `fltrNNNNN.dat`[\[2\]](#note2) | Blockfilter index filters for the basic filtertype; *optional*, used if `-blockfilterindex=basic` -`indexes/coinstatsindex/db/` | LevelDB database | Coinstats index; *optional*, used if `-coinstatsindex=1` `./` | `anchors.dat` | Anchor IP address database, created on shutdown and deleted at startup. Anchors are last known outgoing block-relay-only peers that are tried to re-connect to on startup `./` | `banlist.json` | Stores the addresses/subnets of banned nodes. `./` | `bitcoin.conf` | User-defined [configuration settings](bitcoin-conf.md) for `bitcoind`. File is not written to by the software and must be created manually. Path can be specified by `-conf` option diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 67ec63c18940..ed4d9d83ddb6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -158,7 +158,6 @@ add_library(bitcoin_node STATIC EXCLUDE_FROM_ALL banman.cpp bip324.cpp blockencodings.cpp - blockfilter.cpp consensus/tx_verify.cpp dbwrapper.cpp deploymentstatus.cpp @@ -167,11 +166,6 @@ add_library(bitcoin_node STATIC EXCLUDE_FROM_ALL httprpc.cpp httpserver.cpp i2p.cpp - index/base.cpp - index/blockfilterindex.cpp - index/coinstatsindex.cpp - index/txindex.cpp - index/txospenderindex.cpp init.cpp kernel/chain.cpp kernel/checks.cpp diff --git a/src/bench/CMakeLists.txt b/src/bench/CMakeLists.txt index 9bb0cc886f12..f930702a7038 100644 --- a/src/bench/CMakeLists.txt +++ b/src/bench/CMakeLists.txt @@ -26,9 +26,7 @@ add_executable(bench_bitcoin duplicate_inputs.cpp ellswift.cpp examples.cpp - gcs_filter.cpp hashpadding.cpp - index_blockfilter.cpp load_external.cpp lockedpool.cpp logging.cpp diff --git a/src/bench/gcs_filter.cpp b/src/bench/gcs_filter.cpp deleted file mode 100644 index ea48592ac8fc..000000000000 --- a/src/bench/gcs_filter.cpp +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2018-present The Bitcoin Core developers -// Distributed under the MIT software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - -#include -#include -#include - -#include -#include -#include - -static GCSFilter::ElementSet GenerateGCSTestElements() -{ - GCSFilter::ElementSet elements; - - // Testing the benchmarks with different number of elements show that a filter - // with at least 100,000 elements results in benchmarks that have the same - // ns/op. This makes it easy to reason about how long (in nanoseconds) a single - // filter element takes to process. - for (int i = 0; i < 100000; ++i) { - GCSFilter::Element element(32); - element[0] = static_cast(i); - element[1] = static_cast(i >> 8); - elements.insert(std::move(element)); - } - - return elements; -} - -static void GCSBlockFilterGetHash(benchmark::Bench& bench) -{ - auto elements = GenerateGCSTestElements(); - - GCSFilter filter({0, 0, BASIC_FILTER_P, BASIC_FILTER_M}, elements); - BlockFilter block_filter(BlockFilterType::BASIC, {}, filter.GetEncoded(), /*skip_decode_check=*/false); - - bench.run([&] { - block_filter.GetHash(); - }); -} - -static void GCSFilterConstruct(benchmark::Bench& bench) -{ - auto elements = GenerateGCSTestElements(); - - uint64_t siphash_k0 = 0; - bench.run([&]{ - GCSFilter filter({siphash_k0, 0, BASIC_FILTER_P, BASIC_FILTER_M}, elements); - - siphash_k0++; - }); -} - -static void GCSFilterDecode(benchmark::Bench& bench) -{ - auto elements = GenerateGCSTestElements(); - - GCSFilter filter({0, 0, BASIC_FILTER_P, BASIC_FILTER_M}, elements); - auto encoded = filter.GetEncoded(); - - bench.run([&] { - GCSFilter filter({0, 0, BASIC_FILTER_P, BASIC_FILTER_M}, encoded, /*skip_decode_check=*/false); - }); -} - -static void GCSFilterDecodeSkipCheck(benchmark::Bench& bench) -{ - auto elements = GenerateGCSTestElements(); - - GCSFilter filter({0, 0, BASIC_FILTER_P, BASIC_FILTER_M}, elements); - auto encoded = filter.GetEncoded(); - - bench.run([&] { - GCSFilter filter({0, 0, BASIC_FILTER_P, BASIC_FILTER_M}, encoded, /*skip_decode_check=*/true); - }); -} - -static void GCSFilterMatch(benchmark::Bench& bench) -{ - auto elements = GenerateGCSTestElements(); - - GCSFilter filter({0, 0, BASIC_FILTER_P, BASIC_FILTER_M}, elements); - - bench.run([&] { - filter.Match(GCSFilter::Element()); - }); -} -BENCHMARK(GCSBlockFilterGetHash); -BENCHMARK(GCSFilterConstruct); -BENCHMARK(GCSFilterDecode); -BENCHMARK(GCSFilterDecodeSkipCheck); -BENCHMARK(GCSFilterMatch); diff --git a/src/bench/index_blockfilter.cpp b/src/bench/index_blockfilter.cpp deleted file mode 100644 index 805ad050bfcc..000000000000 --- a/src/bench/index_blockfilter.cpp +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2023-present The Bitcoin Core developers -// Distributed under the MIT software license, see the accompanying -// file COPYING or https://www.opensource.org/licenses/mit-license.php. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include