Skip to content

BUG - cardano-cli 11.6 returns wrong bksRegisteredIn epoch #1493

Open

Description

@gitmachtl

Hi,

testing on dijktra-testnet, cardano-cli 11.6.0.0 used from this repo releases is returning a wrong bls key registration epoch with the pool-state query. it returns a rolling epoch, not the epoch the key was actually registered.

wrong cardano-cli 11.6.0.0 output:

      "spsBlsKey": {
        "bksKey": {
          "blsPossessionProof": "827548617c8556619e3ad55d293db1110f8b71dbbee77673749b4d25aafa4989ced008bc8a2cca1deb8e3edf479fadb2",
          "blsPubKey": "a0e085f688774c0b8d58004bff8d46e3e568f6aa44295c75a11e1df9d76b8f9bdb8e28c1b364950603e6a354760cfa870d396369deac8d43093a2b296d83462239812177c4ae4ee49c5c4d1e79d707d9b7a4b648a822746056a4d37710210416"
        },
        "bksRegisteredIn": 70 <--- wrong
      },

Using cardano-cli 11.3.1.0 from the leios repository returns the correct epoch:

    "blsKey": {
      "bksKey": {
        "blsPossessionProof": "827548617c8556619e3ad55d293db1110f8b71dbbee77673749b4d25aafa4989ced008bc8a2cca1deb8e3edf479fadb2",
        "blsPubKey": "a0e085f688774c0b8d58004bff8d46e3e568f6aa44295c75a11e1df9d76b8f9bdb8e28c1b364950603e6a354760cfa870d396369deac8d43093a2b296d83462239812177c4ae4ee49c5c4d1e79d707d9b7a4b648a822746056a4d37710210416"
      },
      "bksRegisteredIn": 23
    },

Activity

  1. gitmachtl commented on Nov 4, 2026

    @gitmachtl
    ContributorAuthor

    i also just noticed, that it is using other key names 👎
    all cli11.6.0.0 key names have a sps prefix, not in cli11.3.1.0.

    please be consistent, thats a nightmare for downstream tooling, thx!

  2. self-assigned this
    on Nov 4, 2026
  3. carbolymer commented on Nov 4, 2026

    @carbolymer
    Contributor

    The node stores the right epoch, but upstream cardano-cli never sees it. query pool-state uses a node query that returns the pool parameters from the registration certificate rather than the stored pool state, and those parameters do not include the BLS key registration epoch. The CLI rebuilds the pool state from those parameters, and since 11.3.0.0 it fills bksRegisteredIn with the current epoch (the next epoch for future parameters), so the value moves forward every epoch. The 11.3.0.0 changelog (https://github.com/IntersectMBO/cardano-cli/blob/cardano-cli-11.3.0.0/cardano-cli/CHANGELOG.md#L26) and the Dijkstra-era help text of query pool-state describe this placeholder, but the output itself gives no sign of it. Do not use bksRegisteredIn from cardano-cli 11.3.0.0 to 11.6.0.0 as the registration epoch.

    The 11.3.1.0 binary from the leios repository is a separate build of the leios prototype branch, not the 11.3.1.0 release from this repository. That build bases query pool-state on a new ledger query that returns the stored pool state, so it shows the real epoch. This query, like query leios-committee, is not available in upstream cardano-cli yet: no release and no commit on master uses it, and the cardano-api, consensus and ledger versions it needs have not been released. The PR below brings both to upstream cardano-cli once those dependencies are released:

    Until that PR lands, the current value does more harm than no value: it looks like a real epoch, so downstream tools store or compare it with no way to tell that it is only the epoch in which the query ran. I'd suggest that the next cardano-cli release prints bksRegisteredIn as null, for both current and future pool parameters, until upstream cardano-cli can read the real epoch from the node. Tools would then get an explicit unknown value that they have to handle, instead of a wrong number that looks valid.

    The sps prefixed keys are not new in 11.6.0.0 either. Since cardano-cli 10.13.0.0, query pool-state has printed the ledger's own JSON form of the pool state with these keys in every era, Conway included, and the 10.13.0.0 changelog did not mention the change to the JSON output. The leios build prints a different, hand-written format without the prefix. The PR above currently switches upstream to that unprefixed format as well, so the keys will change once more when it lands.

  4. gitmachtl commented on Nov 4, 2026

    @gitmachtl
    ContributorAuthor

    lol ok, thx. bit complicated 😆

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions