HomePhabricator

[Chronik] Fix: Err db deserialization if there's any leftover

Description

[Chronik] Fix: Err db deserialization if there's any leftover

Summary:
Currently, deserializing some data from the DB does not fail if there's still some leftover that hasn't been deserialized. This is a serious issue, e.g. a db_deserialize::<u32> on a column containing SerBlock would usually succeed (and simply read some garbage from the hash of the block).

With this change we return an error if there's still a leftover after deserializing using postcard.

Test Plan: ninja check-crates

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D13413

Details

Provenance
tobias_ruckAuthored on Mar 21 2023, 19:32
tobias_ruckPushed on Mar 22 2023, 14:51
Reviewer
Restricted Project
Differential Revision
D13413: [Chronik] Fix: Err db deserialization if there's any leftover
Parents
rABC22e23cf537c1: More block template creation simplifications
Branches
Unknown
Tags
Unknown