diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-11-12 17:04:53 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-11-12 17:05:51 +0100 |
commit | 0bd4929cd00e91bf4137f43b097cd62f72f503e4 (patch) | |
tree | 6ac6d083699b2baf6d8d0da56cc00eb34a02d30d /doc/fuzzing.md | |
parent | 9bd1316697292251ed5690390794fc64517fc86b (diff) | |
parent | 38ada892ed0ed9aaa46b1791db12a371a3c0c419 (diff) |
Merge #20284: addrman: ensure old versions don't parse peers.dat
38ada892ed0ed9aaa46b1791db12a371a3c0c419 addrman: ensure old versions don't parse peers.dat (Vasil Dimov)
Pull request description:
Even though the format of `peers.dat` was changed in a backwards
incompatible way, it is not guaranteed that old versions will fail to
parse it. There is a chance that old versions parse its contents as
garbage and use it.
Old versions expect the "key size" field to be 32 and fail the parsing
if it is not. Thus, we put something other than 32 in it. This will make
versions between 0.11.0 and 0.20.1 deterministically fail on the new
format. Versions prior to https://github.com/bitcoin/bitcoin/pull/5941
will still parse it as garbage.
Also, introduce a way to increment the `peers.dat` format in a way that
does not necessary make older versions refuse to read it.
ACKs for top commit:
jnewbery:
ACK 38ada892ed0ed9aaa46b1791db12a371a3c0c419
laanwj:
Code review ACK 38ada892ed0ed9aaa46b1791db12a371a3c0c419
MarcoFalke:
re-ACK 38ada892ed0ed9aaa46b1791db12a371a3c0c419 🥐
Tree-SHA512: 550bd660c5019dba0f9c334aca8a11c4a0463cfddf11efe7a4a5585ffb05549c82b95066fba5d073ae37893e0eccc158a7ffea9b33ea031d9be4a39e44f6face
Diffstat (limited to 'doc/fuzzing.md')
0 files changed, 0 insertions, 0 deletions