Skip to content

Assumeutxo: Altered txoutset dump is still valid #28675

@fjahr

Description

@fjahr

Demonstration code: fjahr@d6ced70 (building on top of #28669, the file hashing and additional logging were just added as sanity checks)

It seems that changing certain content of a Txoutset dump doesn't change the fact that it is considered valid and that the UTXO set is loaded correctly. This doesn't have to be bad since the hash of the UTXO set still matches, but it was new to me that two different dump files could both be valid and result in the same UTXO set.

I have not been able to figure out yet why exactly this is the case though. From my understanding, the byte I am changing is the Coin VARINT((coinbase ? 1 : 0) | (height << 1)). The original value of the byte is \x82, implying it's just the value in this one byte. Changing it should result in a different UTXO set. I must be missing something about the serialization of Coin or the dumptxoutset in general...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions