vdf-rs icon indicating copy to clipboard operation
vdf-rs copied to clipboard

Implement `serde::(De)Serialize` for `keyvalues_parser::Vdf`

Open CosmicHorrorDev opened this issue 2 years ago • 1 comments

Implementing this would be a huge ergonomics win for users, but beyond that it would unlock much better fuzzing potential for keyvalues-serde. Right now keyvalues-serde currently fuzzes an arbitrarily generated "kitchen sink" style struct that holds a lot of different data types, but that doesn't catch issues like #45 :crying_cat_face:

Having this implemented would give us the arbitrarily dynamic type that would be perfect for fuzzing to find since it's the one type that describes all valid VDF blobs

CosmicHorrorDev avatar Nov 23 '23 23:11 CosmicHorrorDev

We'll also want to implement it for Value to complete things. We should also be able to allow map types for the top-level pair. We just have to keep track of if we're in the top level in the deserializer, so that we don't won't wind up allowing things like

struct Foo {
    bar: Pair,
}

as valid

CosmicHorrorDev avatar Oct 13 '24 03:10 CosmicHorrorDev