forest icon indicating copy to clipboard operation
forest copied to clipboard

fix: refactor TipsetKey using NonEmpty collection

Open hanabi1224 opened this issue 1 year ago • 1 comments

Summary of changes

Part of https://github.com/ChainSafe/forest/issues/3861 and a follow-up of https://github.com/ChainSafe/forest/pull/3934

Changes introduced in this pull request:

  • refactor TipsetKey using NonEmpty collection

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • [x] I have performed a self-review of my own code,
  • [x] I have made corresponding changes to the documentation,
  • [x] I have added tests that prove my fix is effective or that my feature works (if possible),
  • [x] I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

hanabi1224 avatar Feb 19 '24 03:02 hanabi1224

I'm a bit confused. I thought TipsetKey could be empty. Can you verify that the genesis block has a non-empty parent tipset key?

@lemmih As discussed, this is guaranteed on the implementation side, we might want to propose a small update to the spec later. (https://filecoinproject.slack.com/archives/C05P37R9KQD/p1709050261991189?thread_ts=1708351510.708049&cid=C05P37R9KQD)

hanabi1224 avatar Feb 28 '24 10:02 hanabi1224