-
Notifications
You must be signed in to change notification settings - Fork 20
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
Query Constitution #191
Conversation
11b26ca
to
c3c1d39
Compare
There was a problem hiding this 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.
c3c1d39
to
5f5311c
Compare
There was a problem hiding this 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 newShelleyNodeToClientVersion
and enable it via the experimentalCardanoNodeToClientVersion12
. -
If not, then a new
NodeToClientVersion
has to be added in Network, new{Shelley,Cardano}NodeToClientVersion
have to be added here, and theNodeToClient
part oflatestReleasedNodeVersion
has to be bumped.
Yes, this is experimental query that should only work in Conway |
98bf14f
to
ee160d4
Compare
There was a problem hiding this 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?
ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/Node.hs
Show resolved
Hide resolved
ouroboros-consensus-cardano/changelog.d/20230704_001336_aniket.deshpande_query_constitution.md
Outdated
Show resolved
Hide resolved
57dfaea
to
93406a5
Compare
Description
Add
GetConstitutionHash
ledger queryRelates to cardano-ledger#3502