HomePhabricator

assumeutxo: Drop block height from metadata

Description

assumeutxo: Drop block height from metadata

Summary:
Removing the block height from the assumeutxo snapshot file prevents potential UB (implicit-integer-sign-change) when loading the file. The snapshot file should be considered untrusted input, and its fields should be sanitized or removed if unnecessary.

The Snapshot format version is updated to 2 to indicate this change.

Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>

This is a backport of core#30598
Depends on D18059

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Fabian Jahr <fjahr@protonmail.com>Authored on Aug 6 2024, 22:21
PiRKCommitted on Thu, May 8, 09:04
PiRKPushed on Thu, May 8, 09:04
Reviewer
Restricted Project
Differential Revision
D18060: assumeutxo: Drop block height from metadata
Parents
rABC762754feb728: validation: Don't load a snapshot if it's not in the best header chain.
Branches
Unknown
Tags
Unknown