-
Notifications
You must be signed in to change notification settings - Fork 16
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
Upgrade to cardano-api-8.21.0.0 #304
Conversation
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.
needs flake.lock and cabal.project update
0d53054
to
7b5a9da
Compare
ada3b0d
to
e7c48b7
Compare
e7c48b7
to
bd8ec85
Compare
cardano-cli/src/Cardano/CLI/EraBased/Commands/Governance/Actions.hs
Outdated
Show resolved
Hide resolved
bd8ec85
to
27df686
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 but blocked on one concern: #304 (comment)
Please also have QA run their tests on this PR just to make sure nothing is broken.
then error $ show l <> " lovelace exceeds the Word64 upper bound" | ||
else TxOutAdaOnly AdaOnlyInByronEra . Lovelace $ toInteger l | ||
then error $ show l <> " lovelace exceeds the Word64 upper bound" | ||
else TxOutAdaOnly ByronToAllegraEraByron . Lovelace $ toInteger l |
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.
👍
@@ -206,7 +206,7 @@ txSpendUTxOByronPBFT nId sk txIns outs = do | |||
, txOuts = outs | |||
, txTotalCollateral = TxTotalCollateralNone | |||
, txReturnCollateral = TxReturnCollateralNone | |||
, txFee = TxFeeImplicit TxFeesImplicitInByronEra | |||
, txFee = TxFeeImplicit ByronEraOnlyByron |
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.
Why not ByronEraOnly
?
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 can do that. I'll put a PR to remove the era suffix for all the Only
eons.
@@ -44,7 +44,7 @@ pGovernanceCmds era envCli = | |||
|
|||
pCreateMirCertificatesCmds :: CardanoEra era -> Maybe (Parser (GovernanceCmds era)) | |||
pCreateMirCertificatesCmds era = do | |||
w <- maybeFeatureInEra era | |||
w <- maybeEonInEra 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.
We need to rethink these names. They are confusing. maybeEonInEra
does not make sense and we're going to have to break the API again :(
<- caseByronToMaryOrAlonzoEraOnwards | ||
(\_ -> | ||
caseByronToAlonzoOrBabbageEraOnwards | ||
(const $ pure (TxOutDatumNone, ReferenceScriptNone)) |
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.
I'm confused here. Shouldn't the first case be:
caseByronToMaryOrAlonzoEraOnwards
(\_ -> const $ pure (TxOutDatumNone, ReferenceScriptNone))
...
And then it looks like we are missing: caseAlonzoOnlyOrBabbageEraOnwards
to handle the second callback.
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.
Added.
caseByronToAlonzoOrBabbageEraOnwards | ||
(const $ pure (TxOutDatumNone, ReferenceScriptNone)) | ||
-- TODO: Figure out how to make this state unrepresentable | ||
(const $ error "toTxOutInAnyEra: Should not be possible that inline datums are allowed but datums are not") |
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.
It seems like we still haven't found the "perfect" abstraction 😆
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 case no longer exists.
cardano-cli/src/Cardano/CLI/EraBased/Commands/Governance/Actions.hs
Outdated
Show resolved
Hide resolved
<$> firstExceptT TxCmdScriptFileError (readFileScriptInAnyLang fp) | ||
|
||
toTxDatumReferenceScriptBabbage :: () | ||
=> AlonzoEraOnwards 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.
Yep, looks like we need caseAlonzoOnlyOrBabbageEraOnwards
27df686
to
6bda43c
Compare
6bda43c
to
d93346e
Compare
Changelog
Context
Depends on IntersectMBO/cardano-api#262
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