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

Shelley: update query type of LocalStateQuery protocol #1848

Merged
merged 2 commits into from
Mar 25, 2020

Conversation

mrBliss
Copy link
Contributor

@mrBliss mrBliss commented Mar 25, 2020

Fixes #1442.

@mrBliss mrBliss added the consensus issues related to ouroboros-consensus label Mar 25, 2020
@mrBliss mrBliss requested review from edsko and nc6 March 25, 2020 08:10
Copy link
Contributor

@nc6 nc6 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -239,20 +248,81 @@ instance LedgerDerivedInfo (ShelleyBlock c) where
QueryLedger
-------------------------------------------------------------------------------}

newtype NonMyopicMemberRewards c = NonMyopicMemberRewards {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to move this over to cardano-ledger-specs at some point?

@@ -261,6 +331,9 @@ instance Crypto c => ShowQuery (Query (ShelleyBlock c)) where
getPParams :: SL.ShelleyState c -> SL.PParams
getPParams = SL.esPp . SL.nesEs

getProposedPPUpdates :: SL.ShelleyState c -> SL.ProposedPPUpdates c
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the proposed use of this? I'm tempted to say that in its current form it isn't terribly useful, since this gives no indication of when the proposal will come in or whether it's likely to do so...

Is IntersectMBO/cardano-ledger#1337 likely to be useful here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I must admit that I'm not familiar with all these types. I wouldn't be surprised that we'll need to extend the Query type in the future. But that shouldn't be too difficult. This PR adds the necessary infrastructure (+ test infrastructure) so that future updates should be straightforward.

@mrBliss mrBliss force-pushed the mrBliss/update-shelley-query branch from 0ff6990 to 2b3be37 Compare March 25, 2020 10:02
@mrBliss
Copy link
Contributor Author

mrBliss commented Mar 25, 2020

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Mar 25, 2020

@iohk-bors iohk-bors bot merged commit e09b464 into master Mar 25, 2020
@iohk-bors iohk-bors bot deleted the mrBliss/update-shelley-query branch March 25, 2020 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus issues related to ouroboros-consensus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update query type of LocalStateQuery protocol for Shelley
2 participants