HomePhabricator

assumeutxo: Check deserialized coins for out of range values

Description

assumeutxo: Check deserialized coins for out of range values

Summary:
This is another small backport that can only be tested after we have the loadtxoutset RPC command, but that I think should be included before we allow loadng UTXO snapshot because it may guard against amount malleation in snapshot files (see https://github.com/bitcoin/bitcoin/pull/28685#issuecomment-1770720541 "certain negative values seem to result in the same hash as their positive counter part")

This is a partial backport of core#28685
https://github.com/bitcoin/bitcoin/pull/28685/commits/f6213929c519d0e615cacd3d6f479f1517be1662

Test Plan:
ninja all check-all

tested on my dev branch in feature_assumeutxo.py

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
PiRKAuthored on Mon, Apr 14, 16:03
PiRKPushed on Mon, Apr 14, 18:45
Reviewer
Restricted Project
Differential Revision
D17930: assumeutxo: Check deserialized coins for out of range values
Parents
rABC894ffc7982c4: [avalanche] Test: Simplify checking for undesired hashes in polls
Branches
Unknown
Tags
Unknown