IntersectMBO / IntersectMBO/ouroboros-consensus

Remove artificial limitation in block production

Open
#668 6 comments 0 reactions 0 assignees View on GitHub
:wastebasket: :question: possibly stale technical debt
Dominant language
Haskell
Stars
67
Forks
43
Avg merge
5d 13h
Merged PRs (30d)
43

Description

Block production was using `anachronisticLedgerView` to request a ledger view for the leader check, and failing with `TraceNoLedgerView` if that failed to produce a ledger view. However, as part of the work on input-output-hk/ouroboros-network#1933 we realized using `anachronisticLedgerView` here is wrong, and we should use `applyChainTick` instead: there is no reason why we can't produce a block even if we are far ahead.
I have however left in the call to `anachronisticLedgerView` (soon to be `ledgerViewForecastAt`), because the consensus tests are currently failing without it. I strongly suspect that this is because of a limitation of the test infrastructure (not quite setting parameters strictly enough) rather than a true bug. We should try to remove it and update the tests.

Note however that once the hard fork timing stuff is merged, we will re-introduce a restriction: if our ledger is far behind, we can't even convert the current `UTCTime` to a `SlotNo`, and so we can't do the leader check. That might in fact reintroduce the same limitation, and fix this problem without the current artificial check.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.