diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-08-10 19:50:59 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-08-10 19:52:13 +0200 |
commit | 48bf8ff5b161e77079bf00a7a452b3f2fe511f84 (patch) | |
tree | c91bdef18a431cbbdcf8e63040e15578b03892fc /src/rpc | |
parent | 71dec5c81fa1e383f4cabe8686ac790288da99d9 (diff) | |
parent | e254ff5d53b79bee29203b965fca572f218bff54 (diff) |
Merge #13907: Introduce a maximum size for locators.
e254ff5d53b79bee29203b965fca572f218bff54 Introduce a maximum size for locators. (Gregory Maxwell)
Pull request description:
The largest sensible size for a locator is log in the number of blocks.
But, as noted by Coinr8d on BCT a maximum size message could encode a
hundred thousand locators. If height were used to limit the messages
that could open new attacks where peers on long low diff forks would
get disconnected and end up stuck.
Ideally, nodes first first learn to limit the size of locators they
send before limiting what would be processed, but common implementations
back off with an exponent of 2 and have an implicit limit of 2^32
blocks, so they already cannot produce locators over some size.
Locators are cheap to process so allowing a few more is harmless,
so this sets the maximum to 64-- which is enough for blockchains
with 2^64 blocks before the get overhead starts increasing.
Tree-SHA512: da28df9c46c988980da861046c62e6e7f93d0eaab3083d32e408d1062f45c00316d5e1754127e808c1feb424fa8e00e5a91aea2cc3b80326b71c148696f7cdb3
Diffstat (limited to 'src/rpc')
0 files changed, 0 insertions, 0 deletions