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

Add DRep to UMap, Rename Trip to UElem #3426

Merged
merged 3 commits into from
May 20, 2023
Merged

Conversation

aniketd
Copy link
Contributor

@aniketd aniketd commented May 15, 2023

Description

  • Add DReps to UMap
  • Rename Trip to UElem, and the pattern Triple to UElem
  • Validate the equivalence of unionRewAgg and unionKeyRewards with the help of property tests, and remove one implementation between them.

This property test has been retained in the history of the branch

[nix-shell:~/Code/_iog/cardano-ledger/vdelegs-in-umap]$ cabal test cardano-ledger-core --test-options '-m unionKeyRewards -a 10000 --qc-max-size 1000'
Build profile: -w ghc-9.2.7 -O1
In order, the following will be built (use -v for more details):
 - cardano-ledger-core-1.3.0.0 (test:tests) (ephemeral targets)
Preprocessing test suite 'tests' for cardano-ledger-core-1.3.0.0..
Building test suite 'tests' for cardano-ledger-core-1.3.0.0..
Running 1 test suites...
Test suite tests: RUNNING...

Core
  UMap
    unionRewAgg === unionKeyRewards
      unionRewAgg === unionKeyRewards [✔] (55383ms)
        +++ OK, passed 10000 tests.

Finished in 55.3837 seconds
1 example, 0 failures
Test suite tests: PASS
Test suite logged to:
/home/aniketd/Code/_iog/cardano-ledger/vdelegs-in-umap/dist-newstyle/build/x86_64-linux/ghc-9.2.7/cardano-ledger-core-1.3.0.0/t/tests/test/cardano-ledger-core-1.3.0.0-tests.log
1 of 1 test suites (1 of 1 test cases) passed.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated (See RELEASING.md)
  • Any changes are noted in the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@aniketd aniketd force-pushed the aniketd/vdelegs-in-umap branch from 8294bbe to 44b86e9 Compare May 17, 2023 14:57
@aniketd aniketd marked this pull request as ready for review May 17, 2023 14:57
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome!

It would be great if @TimSheard could give it a review, since he is much more familiar with UMap.

libs/cardano-ledger-core/src/Cardano/Ledger/UMap.hs Outdated Show resolved Hide resolved
libs/cardano-ledger-core/src/Cardano/Ledger/UMap.hs Outdated Show resolved Hide resolved
libs/cardano-ledger-core/src/Cardano/Ledger/UMap.hs Outdated Show resolved Hide resolved
libs/cardano-ledger-core/src/Cardano/Ledger/UMap.hs Outdated Show resolved Hide resolved
libs/cardano-ledger-core/src/Cardano/Ledger/UMap.hs Outdated Show resolved Hide resolved
libs/cardano-ledger-core/src/Cardano/Ledger/UMap.hs Outdated Show resolved Hide resolved
libs/cardano-ledger-core/src/Cardano/Ledger/UMap.hs Outdated Show resolved Hide resolved
@aniketd aniketd force-pushed the aniketd/vdelegs-in-umap branch from 44b86e9 to 315c8c2 Compare May 18, 2023 16:27
Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is great, thanks @aniketd !

@JaredCorduan
Copy link
Contributor

The golden test failure in CI is expected, since we changed the ledger state serialization in this PR. So we just need to regenerate the golden files.

@aniketd aniketd force-pushed the aniketd/vdelegs-in-umap branch 2 times, most recently from 0510271 to 870f9c2 Compare May 19, 2023 15:37
@aniketd aniketd requested review from lehins and JaredCorduan May 19, 2023 15:38
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work

libs/cardano-ledger-core/CHANGELOG.md Outdated Show resolved Hide resolved
@aniketd aniketd force-pushed the aniketd/vdelegs-in-umap branch from 870f9c2 to cfd4f13 Compare May 20, 2023 14:03
@aniketd aniketd enabled auto-merge May 20, 2023 15:35
@aniketd aniketd merged commit 54f9bf8 into master May 20, 2023
@iohk-bors iohk-bors bot deleted the aniketd/vdelegs-in-umap branch May 20, 2023 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants