mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-20 19:11:08 +03:00
1f5de6beb9
* 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 |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml |