Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
TipSet orders blocks by ticket, is immutable value type #2837
Block ticket is the canonical traversal order when a tipset is processed. This changes the critical traversal in consensus/expected.go to match that (previously iterated in sorted CID order). This is most of the resolution to #2310. See also filecoin-project/specs#285
The representation is more memory efficient and can be iterated without allocating an intermediate slice. An empty/undefined tipset is now harder to construct and explicitly undefined; a few methods now always return nil error and I intend to remove the error return value from them in a follow-up.
SortedCidSet remains as the "key" type for a tipset. In a follow-up, I intend to also upgrade this to an immutable structure.
2 times, most recently
May 29, 2019
acruikshank left a comment
Code looks good. TipSet test coverage seems like an improvement overall, but its hard to tell because it's too concise. I'd like a bit more elaboration here.
Overall this is a great refactor. It highlights how often we end up reprocessing messages when we have more than one block. We should probably work to address that.