Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify cross-era ticking/forecasting for Cardano #418

Open
amesgen opened this issue Oct 11, 2023 · 1 comment
Open

Specify cross-era ticking/forecasting for Cardano #418

amesgen opened this issue Oct 11, 2023 · 1 comment

Comments

@amesgen
Copy link
Member

amesgen commented Oct 11, 2023

Right now, the semantics of cross-era ticking/forecasting is purely implementation-defined, driven by whatever does not cause any concrete issues, rather than principled considerations.

  • See here for forecasting.
  • See
    -- HACK to make sure protocol parameters get properly updated on the
    -- era transition from Babbage to Conway. This will be replaced by a
    -- more principled refactoring in the future.
    --
    -- Pre-Conway, protocol parameters (like the ledger protocol
    -- version) were updated by the UPEC rule, which is executed while
    -- ticking across an epoch boundary. If sufficiently many Genesis
    -- keys submitted the same update proposal, it will update the
    -- governance state accordingly.
    --
    -- Conway has a completely different governance scheme (CIP-1694),
    -- and thus has no representation for pre-Conway update proposals,
    -- which are hence discarded by 'SL.translateEra'' below. Therefore,
    -- we monkey-patch the governance state by ticking across the
    -- era/epoch boundary using Babbage logic, and set the governance
    -- state to the updated one /before/ translating.
    and Change implementation of ticking in the HFC to tick-then-translate-then-tick #339 for an explanation why the current approach to ledger state ticking (translate-then-tick, ie first translate, then tick across the era/epoch boundary using the logic of the new era) is at the very least surprising in this case.
  • Chain-dep state ticking is also underspecified (eg on the transition from TPraos to Praos, should the extra entropy nonce have been used if non-neutral?).

We should try to improve the situation here, and should be in a decent position for this as we now have a sizeable sample of era transitions whose requirements/particularities can guide our judgement. This requires input from the Ledger team, but the Consensus team can start by drafting a proposal. Possible outcomes are:

  • Decide on how responsibility for the cross-era logic should be distributed across Consensus and Ledger. (Right now, it is a mix between the Ledger-provided TranslateEra instances, and how/when Consensus invokes them. At the very least, it should be clarified what the exact requirements/guarantees here are.)
    • Very concrete example question: The ledger events of which era should be emitted when ticking across an era boundary?
  • Enriching the existing specifications with cross-era behavior (eg in the existing Ledger specs PDFs, or in the formal ledger specifications).

Crucially, any semantics we decide on has to be compatible with mainnet.

@dnadales
Copy link
Member

@amesgen I marked this issue as needing help for the time being. Perhaps we could create a separate issue where we describe what we need from the ledger team, and mark that one as help needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🚫 Help needed
Development

No branches or pull requests

2 participants