Skip to content

Add query leios-committee and base query pool-state - #1478

Open
ch1bo wants to merge 2 commits into
masterfrom
ch1bo/leios-queries
Open

ch1bo wants to merge 2 commits into
masterfrom
ch1bo/leios-queries

Conversation

@ch1bo

@ch1bo ch1bo commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Context

The query pool-state command reconstructed each pool's state from queryPoolState with the current epoch as a placeholder for the BLS key's registration epoch (cardano-ledger#6147). The ledger's queryStakePoolState reports the real one, so pool-state uses that.

The new query leios-committee shows the Leios committees from queryLeiosCommittee.

NOTE: Drop/amend the TEMP commit as you see fit for integrating this.

See input-output-hk/ouroboros-leios#1093 for more context

How to trust this PR

Variant of these commits integrated into https://github.com/input-output-hk/ouroboros-leios/releases/tag/rc-2026w42, run a local devnet with this node + cli by following instructions https://github.com/input-output-hk/ouroboros-leios/blob/main/demo/proto-devnet.

The cardano-cli build from this may just work against that version of node too (but not entirely sure because of N2C versioning)

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff
  • Changelog fragment added in .changes/

ch1bo added 2 commits October 17, 2026 14:17
…nd cardano-api

Pins the unreleased ledger queries (cardano-ledger#6162), consensus's
GetStakePoolState (#2412) and GetLeiosCommittee (#2419) on top of
consensus main, and the cardano-api plumbing for both. Drop once all are
on CHaP.
query pool-state reconstructed each pool's state from queryPoolState
with the current epoch as a placeholder for the BLS key's registration
epoch (cardano-ledger#6147). The ledger's queryStakePoolState reports
the real one, so pool-state uses that. The new query leios-committee
shows the Leios committees from queryLeiosCommittee.
Copilot AI balanced review requested due to automatic review settings October 17, 2026 12:20
@ch1bo ch1bo added the leios label Oct 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Two unavailable dependency revisions block fresh builds, and the pool-state changes lack regression coverage.

3 open issues
What changed in this PR

Adds Leios committee queries and replaces reconstructed pool state with ledger-provided values, including the actual BLS key registration epoch.

Changes:

  • Adds query leios-committee with JSON/YAML output.
  • Switches pool-state to the ledger’s stake pool state query.
  • Pins supporting dependencies and updates compatibility code and help goldens.
File Description
cardano-cli/​test/​cardano-cli-test/​Test/​Cli/​Transaction/​SubTransaction.hs Updates ledger lens references.
cardano-cli/​test/​cardano-cli-golden/​files/​golden/​help/​latest_query.cli Lists the new command.
cardano-cli/​test/​cardano-cli-golden/​files/​golden/​help/​latest_query_leios-committee.cli Adds latest-era command help.
cardano-cli/​test/​cardano-cli-golden/​files/​golden/​help/​dijkstra_query.cli Lists the new command.
cardano-cli/​test/​cardano-cli-golden/​files/​golden/​help/​dijkstra_query_leios-committee.cli Adds Dijkstra command help.
cardano-cli/​test/​cardano-cli-golden/​files/​golden/​help/​conway_query.cli Lists the new command.
cardano-cli/​test/​cardano-cli-golden/​files/​golden/​help/​conway_query_leios-committee.cli Adds Conway command help.
cardano-cli/​test/​cardano-cli-golden/​files/​golden/​help.cli Updates combined help output.
cardano-cli/​src/​Cardano/​CLI/​Type/​Common.hs Removes pool-state reconstruction.
cardano-cli/​src/​Cardano/​CLI/​Orphan.hs Adapts epoch-state serialization.
cardano-cli/​src/​Cardano/​CLI/​EraBased/​Query/​Run.hs Implements both query changes.
cardano-cli/​src/​Cardano/​CLI/​EraBased/​Query/​Option.hs Adds committee command parsing.
cardano-cli/​src/​Cardano/​CLI/​EraBased/​Query/​Command.hs Wires committee command metadata.
cabal.project Pins supporting dependencies.
.changes/​20261017_090000_cardano-cli_ch1bo_stake_pool_state_leios_committee_queries.yml Documents the feature and breaking change.

Review effort: Balanced

Comment thread cabal.project
source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-consensus
tag: 0d02985b030317be91c5422020d1ed3565fe3ee3
Comment thread cabal.project
source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-api
tag: 10ed945ae1cc1a9e761319eed64e84335dc08458
Comment on lines +672 to +673
result <- easyRunQuery (queryStakePoolState (convert era) poolFilter False)
hoist liftIO $ writePoolState outputFormat mOutFile result

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Complete CLI tools to bootstrap keys

2 participants