Page MenuHomePhabricator

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

Authored by tobias_ruck on Mar 21 2023, 19:34.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
chronik-fix-deserialize-leftover
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22580
Build 44780: Build Diffbuild-chronik
Build 44779: arc lint + arc unit