diff options
author | Gregory Maxwell <greg@xiph.org> | 2018-08-07 20:37:45 +0000 |
---|---|---|
committer | Gregory Maxwell <greg@xiph.org> | 2018-08-09 20:54:01 +0000 |
commit | e254ff5d53b79bee29203b965fca572f218bff54 (patch) | |
tree | f4292a9196aa3c08945fae5d66fbb761a5d3c2a8 /test | |
parent | 9d86aad287f07e20066138b9f909758ad7a2e098 (diff) |
Introduce a maximum size for locators.
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.
This sets the limit to an absurdly high amount of 101 in order to
maximize compatibility with existing software.
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions