-
Notifications
You must be signed in to change notification settings - Fork 15
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
Integrate latest ledger, consensus and api for 8.6.0 #385
Conversation
24b5b44
to
53a9d67
Compare
53a9d67
to
eaa2c1f
Compare
Force-pushed to remove script added by mistake. |
eaa2c1f
to
71a1855
Compare
Force pushed to integrate with cardano-api-27.0 |
5749dfd
to
f95beaa
Compare
f3f5745
to
7ac12a9
Compare
Two golden tests are failing, because of the new options in the query - trying to fix them |
7ac12a9
to
408df38
Compare
408df38
to
0f3f668
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.
This is looking good, a couple minor comments
@@ -59,6 +61,7 @@ data GovernanceCommitteeCreateColdKeyResignationCertificateCmdArgs era = | |||
GovernanceCommitteeCreateColdKeyResignationCertificateCmdArgs | |||
{ eon :: !(ConwayEraOnwards era) | |||
, vkeyColdKeySource :: !(VerificationKeyOrHashOrFile CommitteeColdKey) | |||
, anchor :: !(Maybe (Ledger.Anchor (Ledger.EraCrypto (ShelleyLedgerEra era)))) |
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.
Have a look at how the governance action parsers handle anchors. E.g
data GovernanceActionCreateNoConfidenceCmdArgs era
= GovernanceActionCreateNoConfidenceCmdArgs
{ eon :: !(ConwayEraOnwards era)
, networkId :: !Ledger.Network
, deposit :: !Lovelace
, returnStakeAddress :: !AnyStakeIdentifier
, proposalUrl :: !ProposalUrl
, proposalHashSource :: !ProposalHashSource
, governanceActionId :: !TxId
, governanceActionIndex :: !Word32
, outFile :: !(File () Out)
} deriving Show
In particular the proposalUrl
and proposalHashSource
fields.
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.
@Jimbo4350 So you prefer to flatten these two fields , url and hash.
But what to do about ProposalUrl
and ProposalHashSource
which are not accurately describing this Anchor, no - since it's not related to proposal, but to resignation.. Create new types for them?
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.
So you can construct an Anchor
as follows: https://github.com/input-output-hk/cardano-cli/blob/e86aa60f4481dcdc035d2173d61090bd284ad089/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs#L98
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.
Hm, I don't understand exactly what the suggestion is (probably because I'm not familiar with the codebase).
Would you like me to represent Anchor in GovernanceCommitteeCreateColdKeyResignationCertificateCmdArgs
as two different fields, similar to the example you gave above, so as :
, resignationlUrl :: !ProposalUrl
, resignationHashSource :: !ProposalHashSource
instead of the field that I have added:
, anchor :: !(Maybe (Ledger.Anchor (Ledger.EraCrypto (ShelleyLedgerEra era))))
?
Did i understand correctly?
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.
Yes exactly 👍 I see what you're saying now.
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.
Both of them will have to be Maybe
I suppose, since the field is optional. I hope it won't be too messy, if say one is there and the other one not 🤔
cd50a2b
to
2f756fd
Compare
@@ -532,7 +530,6 @@ runTxBuild | |||
<- hoistEither $ first TxCmdReturnCollateralValidationError $ validateTxReturnCollateral era mReturnCollateral | |||
dFee <- hoistEither $ first TxCmdTxFeeValidationError $ validateTxFee era dummyFee | |||
validatedLowerBound <- hoistEither (first TxCmdTxValidityLowerBoundValidationError (validateTxValidityLowerBound era mLowerBound)) | |||
validatedUpperBound <- hoistEither (first TxCmdTxValidityUpperBoundValidationError (validateTxValidityUpperBound era mUpperBound)) |
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.
We no longer do validation here because by virtue of using era-sensitive types in the era-based CLI parser the values are already valid.
and adapt to new filter options
01e98c0
to
eda3544
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.
LGTM! Just get @CarlosLopezDeLara to sign off on the new parser names.
Changelog
Context
Additional context for the PR goes here.
If the PR fixes a particular issue please provide a
link
to the issue.
Checklist
See Running tests for more details
.cabal
files are updatedhlint
. See.github/workflows/check-hlint.yml
to get thehlint
versionstylish-haskell
. See.github/workflows/stylish-haskell.yml
to get thestylish-haskell
versionghc-8.10.7
andghc-9.2.7