serialize and deserialize blockchain works