Skip to content

Comments

channeldb: fuzz (de)serialization of contract data#8045

Open
morehouse wants to merge 8 commits intolightningnetwork:masterfrom
morehouse:fuzz_channeldb
Open

channeldb: fuzz (de)serialization of contract data#8045
morehouse wants to merge 8 commits intolightningnetwork:masterfrom
morehouse:fuzz_channeldb

Conversation

@morehouse
Copy link
Collaborator

This PR adds fuzz targets for serialization and deserialization of all DB data used by contractcourt. It is especially important that this data is correctly serialized and deserialized since any errors can lead to loss of funds when settling on chain.

Extra effort was made to fuzz the serialization of the data first, and then deserialize the serialized data. This is more work than doing the usual deserialize-serialize-deserialize sequence we do for other fuzz tests, but it makes more sense for channeldb where all data stored in the DB must have been serialized by LND first.

Allows easy fuzzing of the channel info serialization and
deserialization.
Tests the encoding and decoding of OpenChannel data that is done by
putChanInfo and fetchChanInfo.
Allows easy fuzzing of the revocation state serialization and
deserialization.
Tests the encoding and decoding of OpenChannel data that is done by
putChanRevocationState and fetchChanRevocationState.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contracts database Related to the database/storage of LND fuzzing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant