mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-13 18:55:52 +00:00
PeerGroup: use a default FP rate that's much lower than the current rate, to boost performance. As there are various well documented de-anonymization attacks on Bloom filtering in bitcoinj (and BreadWallet) wasting bandwidth without getting additional privacy benefit doesn't help us much, so may as well take the performance until one day the code is smart enough to lie convincingly.
This commit is contained in:
parent
dd453ca677
commit
eb15ded065
@ -229,15 +229,16 @@ public class PeerGroup implements TransactionBroadcaster {
|
|||||||
private final PeerEventListener startupListener = new PeerStartupListener();
|
private final PeerEventListener startupListener = new PeerStartupListener();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>A reasonable default for the bloom filter false positive rate on mainnet. FP rates are values between 0.0 and 1.0
|
* The default Bloom filter false positive rate, which is selected to be extremely low such that you hardly ever
|
||||||
* where 1.0 is "all transactions" i.e. 100%.</p>
|
* download false positives. This provides maximum performance. Although this default can be overridden to push
|
||||||
*
|
* the FP rate higher, due to <a href="https://groups.google.com/forum/#!msg/bitcoinj/Ys13qkTwcNg/9qxnhwnkeoIJ">
|
||||||
* <p>Users for which low data usage is of utmost concern, 0.0001 may be better, for users
|
* various complexities</a> there are still ways a remote peer can deanonymize the users wallet. This is why the
|
||||||
* to whom anonymity is of utmost concern, 0.001 (0.1%) should provide very good privacy.</p>
|
* FP rate is chosen for performance rather than privacy. If a future version of bitcoinj fixes the known
|
||||||
|
* de-anonymization attacks this FP rate may rise again (or more likely, become expressed as a bandwidth allowance).
|
||||||
*/
|
*/
|
||||||
public static final double DEFAULT_BLOOM_FILTER_FP_RATE = 0.0005;
|
public static final double DEFAULT_BLOOM_FILTER_FP_RATE = 0.00001;
|
||||||
/** Maximum increase in FP rate before forced refresh of the bloom filter */
|
/** Maximum increase in FP rate before forced refresh of the bloom filter */
|
||||||
public static final double MAX_FP_RATE_INCREASE = 2.0f;
|
public static final double MAX_FP_RATE_INCREASE = 10.0f;
|
||||||
// An object that calculates bloom filters given a list of filter providers, whilst tracking some state useful
|
// An object that calculates bloom filters given a list of filter providers, whilst tracking some state useful
|
||||||
// for privacy purposes.
|
// for privacy purposes.
|
||||||
private final FilterMerger bloomFilterMerger;
|
private final FilterMerger bloomFilterMerger;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user