Conversation
5301d7a to 5f13196 Compare 761209a to e6abfc1 Compare 5f8de1e to fe60e30 Compare 2ae63da to 54c5b82 Compare e4941d3 to f4eba67 Compare 6bf5237 to eab106d Compare e2e879f to aca00d0 Compare 7b4ae30 to b433410 Compare There was a problem hiding this comment.
Pull request overview
Integrates upstream API/ledger changes (incl. Plutus module refactor, ledger peer snapshot query enhancements, and ledger type updates) while updating golden tests and build configuration.
Changes:
- Add
--all-ledger-peersflag and plumb ledger peer “kind” through query parsing/execution + update golden help outputs. - Update multiple CLI areas to newer ledger/API types (stake pool params,
TxBody/Txtype parameters,CoinPerByte,StrictMaybe, etc.). - Adjust build config (Cabal deps, Nix shell packages, index-state + pinned
cardano-apiSRP).
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| flake.nix | Update dev-shell package set for consensus libs |
| cardano-cli/test/cardano-cli-golden/files/golden/help/query_ledger-peer-snapshot.cli | Golden help updated for new flag |
| cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_ledger-peer-snapshot.cli | Golden help updated for new flag |
| cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_ledger-peer-snapshot.cli | Golden help updated for new flag |
| cardano-cli/test/cardano-cli-golden/files/golden/help.cli | Aggregated golden help updated |
| cardano-cli/test/cardano-cli-golden/Test/Golden/Legacy/Genesis/Create.hs | Update cost model expectation/test logic |
| cardano-cli/test/cardano-cli-golden/Test/Golden/CreateTestnetData.hs | Update stake pool relay accessor |
| cardano-cli/src/Cardano/CLI/Type/Common.hs | Adapt pool state construction to new ledger API |
| cardano-cli/src/Cardano/CLI/Read.hs | Refactor script reading + Plutus module rename |
| cardano-cli/src/Cardano/CLI/EraBased/Transaction/Run.hs | StrictMaybe validity + Tx submit result updates + CoinPerByte |
| cardano-cli/src/Cardano/CLI/EraBased/Script/Withdrawal/Read.hs | Plutus module rename usage |
| cardano-cli/src/Cardano/CLI/EraBased/Script/Vote/Read.hs | Plutus module rename usage |
| cardano-cli/src/Cardano/CLI/EraBased/Script/Spend/Read.hs | Plutus module rename usage |
| cardano-cli/src/Cardano/CLI/EraBased/Script/Read/Common.hs | Era-specific simple script handling |
| cardano-cli/src/Cardano/CLI/EraBased/Script/Proposal/Read.hs | Plutus module rename usage |
| cardano-cli/src/Cardano/CLI/EraBased/Script/Mint/Read.hs | Plutus module rename usage |
| cardano-cli/src/Cardano/CLI/EraBased/Script/Certificate/Read.hs | Plutus module rename usage |
| cardano-cli/src/Cardano/CLI/EraBased/Query/Run.hs | Add ledger peer kind + decode handling refactor |
| cardano-cli/src/Cardano/CLI/EraBased/Query/Option.hs | Add --all-ledger-peers option |
| cardano-cli/src/Cardano/CLI/EraBased/Query/Command.hs | Introduce CliLedgerPeers in args |
| cardano-cli/src/Cardano/CLI/EraBased/Governance/Actions/Option.hs | Adjust CoinPerByte conversion |
| cardano-cli/src/Cardano/CLI/EraBased/Genesis/Run.hs | Update stake pool param types/accessors |
| cardano-cli/src/Cardano/CLI/EraBased/Genesis/CreateTestnetData/Run.hs | Update stake pool param types/accessors |
| cardano-cli/src/Cardano/CLI/EraBased/Common/Option.hs | Add CoinPerByte parser + widen typed option parsing |
| cardano-cli/src/Cardano/CLI/Compatible/Transaction/ScriptWitness.hs | Plutus module rename usage |
| cardano-cli/src/Cardano/CLI/Compatible/Transaction/Run.hs | Plutus module rename usage |
| cardano-cli/src/Cardano/CLI/Compatible/Json/Friendly.hs | Update Tx / Credential type parameters |
| cardano-cli/src/Cardano/CLI/Byron/Tx.hs | Update Tx submit result handling |
| cardano-cli/cardano-cli.cabal | Dependency bumps + consensus deps reshuffle |
| cabal.project | Update index-state + pin cardano-api SRP |
Comments suppressed due to low confidence (1)
flake.nix:1
- This replaces
p.ouroboros-consensus-cardanowithp.ouroboros-consensus. If the dev shell relies on cardano-specific consensus components, this can break tooling/builds in the shell environment. Consider including the cardano component explicitly (or matching the Cabal dependency split) so the shell provides the same libraries that the build expects.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| import Cardano.Api.Experimental.AnyScript qualified as Exp | ||
| import Cardano.Api.Experimental.Plutus qualified as Exp' | ||
| import Cardano.Api.Experimental.Plutus qualified as Exp.Plutus | ||
| import Cardano.Api.Ledger qualified as L |
Comment on lines 117 to +118
| import Cardano.Ledger.Api qualified as L | ||
| import Cardano.Ledger.Core qualified as L |
| obtainCommonConstraints (Exp.useEra :: Exp.Era era) $ | ||
| Exp.SimpleScript s | ||
| case Exp.useEra @era of | ||
| Exp.DijkstraEra -> error "TODO Dijkstra: Simple script not supported" |
| let s :: L.NativeScript (Exp.LedgerEra era) = obtainCommonConstraints era $ toAllegraTimelock script | ||
| return $ obtainCommonConstraints (era :: Exp.Era era) $ Exp.SimpleScript s | ||
| Left _ -> case era of | ||
| Exp.DijkstraEra -> error "TODO Dijkstra: Simple script not supported" |
Comment on lines +69 to 70
| import Cardano.Ledger.Address qualified as L | ||
| import Cardano.Ledger.Api.State.Query qualified as L |
| fromEitherIOCli | ||
| | ||
| decodedResult <- | ||
| (fromEitherIOCli . fromEitherIOCli) |
Comment on lines +905 to +906
| case decodedResult of | ||
| Left (bs, decoderError) -> do |
| parseCoinPerByte :: P.Parser L.CoinPerByte | ||
| parseCoinPerByte = do | ||
| i <- P.parseDecimal | ||
| case L.toCompact (Coin i) of |
| ordered-containers, | ||
| ouroboros-consensus, | ||
| ouroboros-consensus-cardano, | ||
| ouroboros-consensus:{cardano, ouroboros-consensus}, |
8025a8f to b4886c7 Compare - Integrate the `GetLedgerPeerSnapshot` query - Add ledger peer type parameter for the ledger peer query - add CLI options for Big and All ledger peers - Integrate changes to the `GetStakeSnapshot` query - Adapt to the new Consensus packages' structure - Adapt to changes of `TxSubmitResult` type
- Fix simple script decoding fallback for Conway - Introduce transaction levels. - Replace promoted constructors with types. - Introduce CoinPerByte. - Use StrictMaybe where necessary. - `PoolParams` -> `StakePoolParams`
b4886c7 to 88c601c Compare Jimbo4350 approved these changes Mar 19, 2026
…edEra Add an explicit type annotation on decodedResult in runQueryLedgerPeerSnapshot to document that two fromEitherIOCli calls peel off AcquiringFailure and QueryCmdError, leaving the decode Either for the case expression. Also switch supportedEra from MonadError/throwError to MonadIO/throwCliError.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog
Context
This PR integrates cardano-cli with the updated dependencies for cardano-node 10.7, including:
cardano-crypto-class-2.3.*andcardano-crypto-wrapper-1.7.*TxSubmitResulttype changes,GetLedgerPeerSnapshotquery updates)AlonzoGenesisrestructuring,StrictMaybe→MaybeinpInvalidHereafter, Plutus import disambiguation)How to trust this PR
AlonzoGenesisstructureChecklist