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

Query Constitution #191

Merged
merged 1 commit into from
Jul 5, 2023
Merged

Query Constitution #191

merged 1 commit into from
Jul 5, 2023

Conversation

aniketd
Copy link
Contributor

@aniketd aniketd commented Jul 3, 2023

Description

Add GetConstitutionHash ledger query

Relates to cardano-ledger#3502

@aniketd aniketd requested a review from lehins July 3, 2023 15:59
@aniketd aniketd requested a review from a team as a code owner July 3, 2023 15:59
@aniketd aniketd force-pushed the aniketd/query-constitution branch from 11b26ca to c3c1d39 Compare July 3, 2023 16:00
@aniketd aniketd changed the title Add GetConstitutionHash ledger query Query Constitution Jul 3, 2023
Copy link
Contributor

@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.

From my limited knowledge of the way ledger state queries work, this looks good.

Copy link
Member

@amesgen amesgen left a comment

Choose a reason for hiding this comment

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

The query has to be gated behind a new ShelleyNodeToClientVersion:
https://github.com/input-output-hk/ouroboros-consensus/blob/1efac211d3691d4d26cb42218c2c7bc1cb8dae3d/ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger/Query.hs#L228-L229
See IntersectMBO/ouroboros-network#2830 for an example of how to do that; we do not yet have a nice "guide" for how to do this (which is tracked in #190, and we might have time to work on soon-ish, but not in the next few weeks).

  • If this query is supposed to be experimental (i.e. it only should work when setting ExperimentalProtocolsEnabled: true in the node), then it is enough to just add a new ShelleyNodeToClientVersion and enable it via the experimental CardanoNodeToClientVersion12.

  • If not, then a new NodeToClientVersion has to be added in Network, new {Shelley,Cardano}NodeToClientVersion have to be added here, and the NodeToClient part of latestReleasedNodeVersion has to be bumped.

@lehins
Copy link
Contributor

lehins commented Jul 4, 2023

Yes, this is experimental query that should only work in Conway

@aniketd
Copy link
Contributor Author

aniketd commented Jul 4, 2023

@amesgen @lehins thanks for your inputs 🙌 🙇

Copy link
Member

@amesgen amesgen left a comment

Choose a reason for hiding this comment

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

Looks good! Only minor comments below.

Can you also apply

diff --git a/ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger/NetworkProtocolVersion.hs b/ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger/NetworkProtocolVersion.hs
index ba04b8a8a..75443ad65 100644
--- a/ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger/NetworkProtocolVersion.hs
+++ b/ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger/NetworkProtocolVersion.hs
@@ -61,7 +61,7 @@ instance SupportedNetworkProtocolVersion (ShelleyBlock proto era) where
       , (NodeToClientV_13, ShelleyNodeToClientVersion5)
       , (NodeToClientV_14, ShelleyNodeToClientVersion6)
       , (NodeToClientV_15, ShelleyNodeToClientVersion7)
-      , (NodeToClientV_16, ShelleyNodeToClientVersion7)
+      , (NodeToClientV_16, ShelleyNodeToClientVersion8)
       ]
 
   latestReleasedNodeVersion = latestReleasedNodeVersionDefault

and accept the respective golden file changes?

@aniketd aniketd requested a review from amesgen July 5, 2023 10:48
@aniketd aniketd enabled auto-merge July 5, 2023 18:57
@aniketd aniketd disabled auto-merge July 5, 2023 18:57
@aniketd aniketd force-pushed the aniketd/query-constitution branch from 57dfaea to 93406a5 Compare July 5, 2023 19:00
@aniketd aniketd enabled auto-merge July 5, 2023 19:00
@aniketd aniketd added this pull request to the merge queue Jul 5, 2023
Merged via the queue into main with commit aad78df Jul 5, 2023
11 of 12 checks passed
@aniketd aniketd deleted the aniketd/query-constitution branch July 5, 2023 21:54
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.

None yet

3 participants