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

Addition of lenses for PParams #3242

Merged
merged 5 commits into from
Jan 13, 2023
Merged

Addition of lenses for PParams #3242

merged 5 commits into from
Jan 13, 2023

Commits on Jan 13, 2023

  1. Redesign how PParams are defined in all eras. Remove HasField usage.

    * Added `EraPParams` `AlonzoEraPParams` and `BabageEraPParams` with lenses
      that can access and manipulate both `PParams` and `ParamsUpdate` for each era.
    * Introduced `upgradePParams` and `downgradePParams`, which loosely
      correspond to `extendPP` and `retractPP`.
    * Removed all occurrences of HasField from all the eras.
    * Extracted `Era` related code and `TranslateEra` related code from
      `Cardano.Ledger.Core` into `Cardano.Ledger.Core.Era` and
      `Cardano.Ledger.Core.Translation` respectfully
    * Moved `PreviousEra` type family into `Era` type class.
    * Defined an `Era` instance for new `ByronEra` type
    * Concrete PParams types for each era had their fields renamed to follow
      the convention used throughout the codebase
    * Adjust transaction generation in the travce generator to work for
      eras beyond Mary
    * Got rid of `ShelleyTest` and `UsesPP` type synonyms
    Soupstraw authored and lehins committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    4319da9 View commit details
    Browse the repository at this point in the history
  2. Workaround a ghc bug that was fixed in ghc-9.2

    It is acceptable to turn off the warning for the whole package
    for ghc-8.10 since we are developing with ghc-9.2 and we have CI
    for both of those GHC versions, so we will definitely catch any
    name shadowing warnings that aren't related to the bug.
    lehins committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    e29c4c6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6cdf8e5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    69986f8 View commit details
    Browse the repository at this point in the history
  5. Fix a wrong assumption about how caching works

    * According to Github documentation cache action will already
    automatically look into `master` branch cache, however it will never
    look into caches for other branches. So, previous logic was a bit faulty
    * Enable trigger on pushes to master, this way we can have a build after
    each PR is merged.
    lehins committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    9e2a28b View commit details
    Browse the repository at this point in the history