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

Magic numbers in the specification

Open WhatisRT opened this issue 10 months ago • 2 comments

This issue is for keeping track of some magic numbers and what to do with them.

  • In Conway, a bunch of those go into scriptsTotalSize, since this was a fairly last-minute change and it was not possible to turn them into protocol parameters. See https://github.com/IntersectMBO/formal-ledger-specifications/pull/695#discussion_r1965884921 and https://github.com/IntersectMBO/cardano-ledger/pull/4550

Historical:

  • In Shelley-MA, calculating utxoEntrySize has several magic numbers, see Appendix B of that spec. Alonzo changed some things, but still relies on (some changed) magic numbers for this function, see Appendix B of the Alonzo spec. We removed those in Babbage and now use the size of the bytes these take up in the CBOR of the transaction.

WhatisRT avatar Feb 24 '25 12:02 WhatisRT

From the cardano-ledger codebase:

carlostome avatar Feb 25 '25 07:02 carlostome

Dijkstra PParams might be relevant.

carlostome avatar Jul 15 '25 14:07 carlostome