aboutsummaryrefslogtreecommitdiff
path: root/src/banman.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Ignore incorrectly-serialized banlist.dat entriesPieter Wuille2020-10-121-1/+1
|
* banlist: log post-swept banlist size at startupfanquake2020-07-081-1/+1
| | | | | We are currently logging the size of the banlist before SweepBanned() has been called, meaning the value may be incorrect.
* Clean up separated ban/discourage interfacePieter Wuille2020-07-031-30/+16
|
* Replace automatic bans with discouragement filterPieter Wuille2020-07-031-4/+9
| | | | | | | | | | | | | | | | | | | | This patch improves performance and resource usage around IP addresses that are banned for misbehavior. They're already not actually banned, as connections from them are still allowed, but they are preferred for eviction if the inbound connection slots are full. Stop treating these like manually banned IP ranges, and instead just keep them in a rolling Bloom filter of misbehaving nodes, which isn't persisted to disk or exposed through the ban framework. The effect remains the same: preferred for eviction, avoided for outgoing connections, and not relayed to other peers. Also change the name of this mechanism to better reflect reality; they're not banned, just discouraged. Contains release notes and several interface improvements by John Newbery.
* scripted-diff: Move ui_interface to the node libMarcoFalke2020-06-271-1/+1
| | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- # Move files git mv src/ui_interface.h src/node/ui_interface.h git mv src/ui_interface.cpp src/node/ui_interface.cpp sed -i -e 's/BITCOIN_UI_INTERFACE_H/BITCOIN_NODE_UI_INTERFACE_H/g' src/node/ui_interface.h # Adjust includes and makefile sed -i -e 's|ui_interface|node/ui_interface|g' $(git grep -l ui_interface) # Sort includes git diff -U0 | clang-format-diff -p1 -i -v -END VERIFY SCRIPT-
* scripted-diff: Bump copyright of files changed in 2019MarcoFalke2019-12-301-1/+1
| | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* scripted-diff: Make translation bilingualHennadii Stepanov2019-07-241-1/+1
| | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/inline std::string _(const char\* psz)/inline bilingual_str _(const char\* psz)/' src/util/translation.h sed -i 's/return G_TRANSLATION_FUN ? (G_TRANSLATION_FUN)(psz) : psz;/return bilingual_str{psz, G_TRANSLATION_FUN ? (G_TRANSLATION_FUN)(psz) : psz};/' src/util/translation.h sed -i 's/\b_("\([^"]\|\\"\)*")/&.translated/g' $(git grep --files-with-matches '\b_("' src) echo Hard cases - multiline strings. sed -i 's/"Visit %s for further information about the software.")/&.translated/g' src/init.cpp sed -i "s/\"Only rebuild the block database if you are sure that your computer's date and time are correct\")/&.translated/g" src/init.cpp sed -i 's/" restore from a backup.")/&.translated/g' src/wallet/db.cpp sed -i 's/" or address book entries might be missing or incorrect.")/&.translated/g' src/wallet/wallet.cpp echo Special case. sed -i 's/_(COPYRIGHT_HOLDERS)/&.translated/' src/util/system.cpp test/lint/lint-format-strings.py -END VERIFY SCRIPT-
* Refactor out translation.hHennadii Stepanov2019-07-241-0/+1
| | | | | This is a prerequisite for introducing bilingual error messages. Note: #includes are arranged by clang-format-diff.py script.
* Allow connections from misbehavior banned peers.Gregory Maxwell2019-01-221-2/+25
| | | | | | | | | | | | | | | | | | | | | | This allows incoming connections from peers which are only banned due to an automatic misbehavior ban if doing so won't fill inbound. These peers are preferred for eviction when inbound fills, but may still be kept if they fall into the protected classes. This eviction preference lasts the entire life of the connection even if the ban expires. If they misbehave again they'll still get disconnected. The main purpose of banning on misbehavior is to prevent our connections from being wasted on unhelpful peers such as ones running incompatible consensus rules. For inbound peers this can be better accomplished with eviction preferences. A secondary purpose was to reduce resource waste from repeated abuse but virtually any attacker can get a nearly unlimited supply of addresses, so disconnection is about the best we can do.
* scripted-diff: batch-recase BanMan variablesCarl Dong2019-01-161-42/+42
| | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i "s/banMap/banmap/g" src/banman.h src/banman.cpp sed -i "s/netAddr/net_addr/g" src/banman.h src/banman.cpp sed -i "s/sinceUnixEpoch/since_unix_epoch/g" src/banman.h src/banman.cpp sed -i "s/bantimeoffset/ban_time_offset/g" src/banman.h src/banman.cpp sed -i "s/subNet/sub_net/g" src/banman.h src/banman.cpp sed -i "s/banReason/ban_reason/g" src/banman.h src/banman.cpp sed -i "s/notifyUI/notify_ui/g" src/banman.h src/banman.cpp sed -i "s/banEntry/ban_entry/g" src/banman.h src/banman.cpp sed -i "s/nStart/n_start/g" src/banman.h src/banman.cpp -END VERIFY SCRIPT-
* banman: Add, use CBanEntry ctor that takes ban reasonCarl Dong2019-01-161-2/+1
|
* banman: reformulate nBanUtil calculationCarl Dong2019-01-161-3/+6
| | | | Avoid reassigning parameters.
* scripted-diff: batch-rename BanMan membersCory Fields2019-01-161-37/+37
| | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i "s/clientInterface/m_client_interface/g" src/banman.h src/banman.cpp sed -i "s/setBannedIsDirty/m_is_dirty/g" src/banman.h src/banman.cpp sed -i "s/cs_setBanned/m_cs_banned/g" src/banman.h src/banman.cpp sed -i "s/setBanned/m_banned/g" src/banman.h src/banman.cpp -END VERIFY SCRIPT-
* net: move BanMan to its own filesCory Fields2019-01-161-0/+195