Skip to content

Conversation

arnetheduck
Copy link
Member

regression from #3513 that did not take tail into consideration when
loading epoch ancestor

regression from #3513 that did not take tail into consideration when
loading epoch ancestor
if epoch == dag.genesis.slot.epoch:
return EpochKey(bid: dag.genesis, epoch: epoch)
if epoch < dag.tail.slot.epoch or bid.slot < dag.tail.slot:
return EpochKey() # We can't load these states
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the callers be able to handle this? This seems to be the first empty EpochKey. Opt[EpochKey] as return could be a clearer alternative.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe, but there's a better approach overall to do this which is outlined in the TODO / #2677, so I don't expect this function to stay around for long - in fact, epoch ancestor == proposer_dependent_root now which is a first step and once those steps are complete, this whole mechanism will go away.

Comment on lines +890 to +891
if bid.slot < dag.tail.slot or epoch < dag.tail.slot.epoch:
return err()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need special handling for the case of tail.slot > tail.slot.epoch.start_slot / epoch == dag.tail.slot.epoch?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we de-facto don't support non-epoch-start-slot tails, so no :)

@github-actions
Copy link

Unit Test Results

     12 files  ±0     834 suites  ±0   33m 36s ⏱️ - 4m 7s
1 686 tests ±0  1 637 ✔️ ±0    49 💤 ±0  0 ±0 
9 825 runs  ±0  9 709 ✔️ ±0  116 💤 ±0  0 ±0 

Results for commit a6526d7. ± Comparison against base commit 12dc427.

@arnetheduck
Copy link
Member Author

arnetheduck commented Mar 18, 2022

jenkins crash is light-client related

@arnetheduck arnetheduck merged commit d0223d1 into unstable Mar 18, 2022
@arnetheduck arnetheduck deleted the fin-epochref branch March 18, 2022 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants