Deserialization of a node in a freed area probably produces the wrong error #831
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
rust
Pull requests that update rust code
The problem here is that we currently deserialize
StoredArea<Area<Node, FreeArea>>
but only when it's expted to be a freed area. If there happens to be a node on a free list, bad things are likely to happen since we'll deserialize the node using serde.The right fix is to remove serde everywhere.
We're not using it in many places any more, and it's clearly slower. Although it's in
Cargo.toml
for the firewood subdirectory, it isn't referenced anywhere in that directory. Only storage is currently using it, and it's only being used to serialize some stuff related to free space management, such as this one and another forAreaIndex
.This would also remove a lot of the benchmarks related to serde serialization timings, which show serde is almost always slower.
Bonus points if you can figure out why manual serialization of a full node is a tiny bit slower than serde.
The text was updated successfully, but these errors were encountered: