From e7aed48e7a65b34a11ca2c93c13e0773c7b1a87e Mon Sep 17 00:00:00 2001 From: Eirik Ogilvie-Wigley Date: Thu, 17 Oct 2019 15:16:51 -0600 Subject: [PATCH] Wording and grammatical fixes --- doc/release-notes.md | 10 ++++++---- src/mempool_limit.h | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 3cc2cb848..c5422000c 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -6,6 +6,7 @@ Notable changes DoS Mitigation: Mempool Size Limit and Random Drop -------------------------------------------------- + This release adds a mechanism for preventing nodes from running out of memory in the situation where an attacker is trying to overwhelm the network with transactions. This is achieved by keeping track of and limiting the total @@ -13,10 +14,11 @@ transactions. This is achieved by keeping track of and limiting the total mempool. The maximum total cost is configurable via the parameter `mempooltotalcostlimit` which defaults to 80,000,000 (up to 20,000 txs). If a node's total mempool `cost` exceeds this limit the node will evict a random -transaction, weighted by its cost. To prevent a node from re-accepting evicted -transactions, it keeps track of ones that it has evicted recently. By default, -a transaction will be considered recently evicted for 60 minutes, but this can -be configured with the parameter `mempoolevictionmemoryminutes`. +transaction, preferentially picking larger transactions and ones with below +the standard fee. To prevent a node from re-accepting evicted transactions, it +keeps track of ones that it has evicted recently. By default, a transaction +will be considered recently evicted for 60 minutes, but this can be configured +with the parameter `mempoolevictionmemoryminutes`. Fake chain detection during initial block download -------------------------------------------------- diff --git a/src/mempool_limit.h b/src/mempool_limit.h index 1a3cde7c6..b94e34ab8 100644 --- a/src/mempool_limit.h +++ b/src/mempool_limit.h @@ -96,10 +96,10 @@ class WeightedTxTree std::vector childWeights; // The following map is to simplify removal. When removing a tx, we do so by txid. - // This map allows look up the transactions index in the tree. + // This map allows looking up the transaction's index in the tree. std::map txIdToIndexMap; - // Returns the sum of a node and all of its childrens' TxWeights for a given index. + // Returns the sum of a node and all of its children's TxWeights for a given index. TxWeight getWeightAt(size_t index) const; // When adding and removing a node we need to update its parent and all of its