Open mratsim opened 5 years ago
well, it stands to reason that when you introduce a custom reader, you also need a corresponding writer so that the serialization round-trips, no?
Is it really necessary? For configuration file like .ini, .toml or in your case for .yaml tests we don't need to produce them.
From a time-to-market point-of-view, it saves half the work (differences between parsing and generation aside).
well, it's necessary if you write :) that code failed because it was calling that serializer and trying to read back on the other end (broadcasts etc) :yin_yang:
Mmmh right I think I conflated 2 issues:
We had a writer missing on case 1 leading to a bug and I assumed that for case 2 (format) we would have the same issue.
So the question is "can we implement only a reading for a serialization format without the corresponding writer?", if yes we can close the issue.
In short the context is wrong but the question is valid :D
For the state tests I'm defining only a Bitfield reader but it apparently triggered issues:
cc @arnetheduck
Those were solved by commenting out the reader in https://github.com/status-im/nim-beacon-chain/pull/259
This would be helpful for YAML serialization so that we can forego the writer implementation.