Merge #566 #569
566: Changes for epoch boundary integration r=nc6 a=nc6
Unfortunately we do need to serialise boundary blocks, because we need to create the initial one for testing.
569: Add ToCBOR and FromCBOR instances for ChainValidationState r=intricate a=mrBliss
FromCBOR instances for a whole bunch of other types
The consensus storage layer needs these instances in order to write/read snapshots of the ledger state to/from disk.
Roundtrip property tests and golden tests still need to be written. Can somebody of the ledger team do this? Feel free to push more commits to this PR.
I tried to adhere to the existing style as much as I could, but I might have made some mistakes.