grin/chain
hashmap 1f5de6beb9
Verify headers and blocks only when needed (#3023)
* Verify headers and blocks only when needed

Curretnly we have some lightweigt validation implemented as part of
entity deserialization, which is safer and allows us to not parse the
entire object if some part is invalid. At the same time this logic
always applies when we read an entity, eg when reading from DB.

This PR introduces UntrustedHeader/Block which is used when we read from
the network. It does partial validation during read, then it is supposed
to be converted into regular header/block which doesn't validate itself.

Also this PR adds "lightweight" validation to block header read like we have
for block body, so we don't parse block body if the header is invalid.

Fixes #1642

* Move version validation to untrusted header

* update fuzz tests
2019-10-27 08:40:52 +01:00
..
src Verify headers and blocks only when needed (#3023) 2019-10-27 08:40:52 +01:00
tests Change 2018 to 2019 in copyright files (#3072) 2019-10-02 09:40:20 +01:00
Cargo.toml update versioning to 3.0.0 alpha (#3080) 2019-10-04 10:51:55 +01:00