[pull] master from bitcoin:master#1680
Merged
Merged
Conversation
add comment explaining coinstatsindex cache exclusion update cache allocations to 10%/5%/5%
Allows `stream << sv` to serialize from a string_view directly, without converting to a string or similar first.
BIP434 defines FEATURE messages which are sent between VERSION and VERACK to indicate support for new P2P protocol features. This commit provides the infrastructure for easily using BIP434 negotiation when implementing such new P2P protocol features. Note that advertised protocol version is bumped to 70017, as per BIP434's specification.
Tests without a fixture did not have their file names linted because the grep matches on `BOOST_FIXTURE`. Updates to match `BOOST_FIXTURE` or `BOOST_TEST`. Co-authored-by: l0rinc <pap.lorinc@gmail.com>
da74ff9 test: Add functional test for BIP434 (Fabian Jahr) 01b8a11 test_framework: BIP 434 support (Anthony Towns) 6a12998 BIP434: FEATURE message support (Anthony Towns) 3210fc4 net: Add AdvertisedVersion() for protocol version advertised to a peer (Anthony Towns) 94ed454 serialize: add LimitedVectorFormatter (Anthony Towns) 1b3f776 serialize: string_view serialization (Anthony Towns) Pull request description: Adds support for [BIP 434](https://github.com/bitcoin/bips/blob/master/bip-0434.md). ACKs for top commit: fjahr: ACK da74ff9 pseudoramdom: ACK da74ff9 achow101: ACK da74ff9 darosior: ACK da74ff9 w0xlt: reACK da74ff9 sedited: ACK da74ff9 Tree-SHA512: 74aa01b9b296a1a498b3aa119af6db906453f0809ec7ae271fc26690491c3f5677bf2cd03817caf9e287f5b3bc977768cdfefbe74ed2dd0da1cd339e043fe010
5a2e359 clarify blockfilterindex cache allocation rationale (Sebastian van Staa) d06dabf node: allocate index caches proportional to usage patterns (Sebastian van Staa) Pull request description: The current cache allocation for optional indexes (txindex, txospenderindex, blockfilterindex) uses a sequential total_cache / 8 approach where each index gets 1/8 of the remaining budget after the previous index has been allocated. This means the order in which indexes appear in the code silently determines how much cache each one gets. |Index|Current share of total| |---|---| |txindex|~12%| |txospenderindex|~11%| |blockfilterindex|~10%| This is unintuitive, undocumented, and probably doesn't reflect actual usage patterns. This PR replaces the sequential 1/8 allocation with explicit percentages based on how the indexes are typically used. The current values are an educated guess, and subject to further benchmark and research of typical client usage patterns. |Index|Allocation|Rationale| |---|---|---| |txindex |10% |Serves getrawtransaction RPCs with mostly unique lookups across the entire blockchain: low cache reuse| |txospenderindex|5%|Serves gettxspendingprevout RPCs with very specific outpoint queries: likely the least repetitive access pattern| |blockfilterindex|5%|Serves BIP 157 light clients that repeatedly query the same recent blocks: highest cache benefit| UPDATE: blockfilterindex allocation changed from 15% to 5% in the course of the discussion This is a continuation of the related discussion: #24539 (comment) and #31483. Further feedback and input is very much appreciated. ACKs for top commit: fjahr: ACK 5a2e359 rustaceanrob: ACK 5a2e359 achow101: ACK 5a2e359 sedited: ACK 5a2e359 Tree-SHA512: 69be2b0c274b975da58aef2513c3042be8a4c8acf0a86af86b962d4ebfd8cf90bcb1d9251d53995652b4825d0d1da24aabe92cdada9148c627690f8ad2ad8a29
f6bdbcf lint: Grep for `AUTO` test suites in file names (rustaceanrob) Pull request description: Tests without a fixture did not have their file names linted because the grep matches on `BOOST_FIXTURE`. Updates to match `BOOST_FIXTURE` or `BOOST_TEST`. ACKs for top commit: l0rinc: ACK f6bdbcf achow101: ACK f6bdbcf hebasto: ACK f6bdbcf. Tree-SHA512: dd1763b6ac90fa87b7e0d2faa56d1c7beedb1e2d37d16367c60ebcadd155f5955113fff7cf5c0ce5eaa9e63aeeb67ffff2c8e081f7c23978cb072207f072f2ef
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )