Page MenuHomePhabricator

assumeutxo: Drop block height from metadata
AcceptedPublic

Authored by PiRK on Wed, May 7, 13:44.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
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

Event Timeline

PiRK requested review of this revision.Wed, May 7, 13:44
src/node/utxo_snapshot.h
31

we never released a snapshot file, so in theory we could skip bumping the version. But from my past experience with the PSBT format, it is better to avoid incompatiblities with BTC tools and libs when possible, by keeping the same exact format for a same version number.

This revision is now accepted and ready to land.Wed, May 7, 16:43