formal-ledger-specifications icon indicating copy to clipboard operation
formal-ledger-specifications copied to clipboard

Remaining Shelley features/proofs

Open williamdemeo opened this issue 10 months ago • 7 comments

This issue itemizes features and proofs that are missing (i.e., not yet formalized and/or described in the full cardano-ledger.pdf) from the Shelley era:

  • [ ] CHAIN: incomplete (out of scope)

    • Dependencies:
      • PRTCL: missing - now part of Consensus
      • TICKN: missing - now part of Consensus
      • TICK: partially missing (not missing anymore since #869)
        • The NEWEPOCH logic is partially inlined in CHAIN (it has been moved to TICK)
        • CHAIN is missing the logic of RUPD (implemented in TICK since #869)
    • Functions:
      • chainChecks: missing - now part of Consensus
      • prtlSeqChecks: missing - now part of Consensus
      • adoptGenesisDelegs: missing - deprecated
  • [x] BBODY: partially missing. Done in #884

    • LEDGERS: logic is inlined
    • CHAIN is missing preconditions:
      • bBodySize txs = hBbsize bhb
      • bbodyhash txs = bhash
    • CHAIN is missing the logic to update the block via incrBlocks
  • [x] TICK: missing (5 days) Done in #869

    • Dependencies:
      • RUPD: missing
      • NEWEPOCH: partially inlined in CHAIN
    • Functions:
      • adoptGenesisDelegs: missing - deprecated
  • [x] RUPD: missing (10 days) Done in #869

    • Dependencies:
    • Functions:
      • createRUpd: missing (#706)
      • monetary and treasury expansion parameters (#707)
  • [x] NEWEPOCH: incomplete. Done in #854

    • Dependencies:
      • EPOCH:
      • MIR: missing - deprecated
    • Functions:
      • calculatePoolDistr: missing - used by Consensus (10 days)
  • [x] EPOCH: incomplete. Done in #852

    • Dependencies:
      • SNAP:
      • POOLREAP:
        • Some of the POOLREAP logic (remove retired StakePools) is inlined in EPOCH
      • NEWPP: missing - deprecated
    • Functions:
      • votedValue: missing - deprecated (used by NEWPP)
  • [x] POOLREAP: missing (15 days) (#719) Done in #852

    • Dependencies:
    • Functions
    • Notes: See issue #455 This is missing the logic to refund deposits

EDITED: Remove part that belongs to Consensus

williamdemeo avatar Feb 04 '25 15:02 williamdemeo

Moved the list to description.

carlostome avatar Mar 04 '25 11:03 carlostome

Here are some items not already covered by the lists above.

  • [ ] Transitions from one era to the next.
  • [ ] ~DELPL: missing (Delegation and Pool Combined Environment)~ (deprecated)
  • [ ] ~DELEGS: missing (Delegation sequence transition type)~

williamdemeo avatar Mar 04 '25 13:03 williamdemeo

DELPL: missing (Delegation and Pool Combined Environment)

It looks like this rule has already been incorporated: The new CERT rule (see Figure 46: CERTS rules) subsumes the old DELPL rule.

DELEGS: missing (Delegation sequence transition type)

It looks like this rule is to be replaced by the new CERTS rule (see Figure 46: CERTS rules). However, at the time of this comment, CERTS has not been added yet.

HeinrichApfelmus avatar Mar 05 '25 15:03 HeinrichApfelmus

Thanks @HeinrichApfelmus! You're right, DELPL is deprecated and DELEGS behavior is part of CERTS, so I've crossed those out.

Not sure what you mean by "CERTS has not been added yet." Agda code for the CERTS rule is here.

williamdemeo avatar Mar 11 '25 00:03 williamdemeo

Not sure what you mean by "CERTS has not been added yet." Agda code for the CERTS rule is here

Ah. What I meant was that the PDF rendering indicates that CERTS exists (Figure 32), but never gives a definition, e.g. Figure 35 "CERTS rules" doesn't mention it.

The Agda code for the CERTS uses ReflexiveTransitiveClosureᵇ', which saves space and potentially allows for proof reuse, but has the unfortunate side effect that it's harder to explain in the PDF. 🤔

HeinrichApfelmus avatar Mar 11 '25 10:03 HeinrichApfelmus

I think we do have an explanation of ReflexiveTransitiveClosure somewhere in the introduction, but the ᵇ' part doesn't help of course. Some cleanup might be necessary here.

WhatisRT avatar Mar 11 '25 12:03 WhatisRT

I moved the BBODY item to the top level on recommendation by @WhatisRT. The other tasks in CHAIN are really out of scope apparently, except for TICK, which was already listed at the top level.

facundominguez avatar Aug 29 '25 11:08 facundominguez