Skip to content
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

[BUG] - query ledger-state outputs CBOR after nodes upgrade #3859

Closed
Tracked by #4144 ...
mkoura opened this issue May 12, 2022 · 14 comments
Closed
Tracked by #4144 ...

[BUG] - query ledger-state outputs CBOR after nodes upgrade #3859

mkoura opened this issue May 12, 2022 · 14 comments
Labels
comp: cardano-cli era: babbage type: regression A feature that worked before stoped working user type: internal Created by an IOG employee

Comments

@mkoura
Copy link
Contributor

mkoura commented May 12, 2022

Internal if an IOHK staff member.

Area
Other Any other topic (Delegation, Ranking, ...).

Summary
After upgrading nodes of local cluster from release 1.34.1 to current master, the cardano-cli query ledger-state --testnet-magic 42 --cardano-mode command no longer outputs JSON, but CBOR.

Steps to reproduce
Steps used to reproduce the behavior:

  1. run local cluster nodes with release 1.24.1
  2. run QA smoke tests
  3. restart cluster nodes with binaries built from current master
  4. run smoke tests again
  5. see the error

The resulting output:
upgraded_ledger_state.json.gz

System info (please complete the following information):

  • OS Name: Fedora 35
  • Node version: 0e242043aa4d94b1e0a7ac28dc3b3bc1fb2d25d7
@mkoura mkoura added the bug Something isn't working label May 12, 2022
@mkoura
Copy link
Contributor Author

mkoura commented Jul 4, 2022

The query protocol-state now returns CBOR as well. Same situation as in the original issue (upgraded node).

@dorin100
Copy link

dorin100 commented Jul 4, 2022

@mkoura - is query stake-snapshot in the same situation as the above 2 commands?

@dorin100 dorin100 added the Vasil label Jul 4, 2022
@mkoura
Copy link
Contributor Author

mkoura commented Jul 5, 2022

@dorin100 per our new automated tests for this issue, following commands are affected:

  • query ledger-state
  • query protocol-state
  • query stake-snapshot
  • query pool-params

@CarlosLopezDeLara CarlosLopezDeLara added 1.35.1 Include in 1.35.1 priority medium issues/PRs that SHOULD be addressed. This should be done for the release, but acceptable if it doesn medium labels Jul 5, 2022
@CarlosLopezDeLara CarlosLopezDeLara added 1.35.2 and removed 1.35.1 Include in 1.35.1 labels Jul 8, 2022
@Jimbo4350
Copy link
Contributor

@mkoura can you confirm the following commands still output CBOR:

  • query ledger-state -> Outputs JSON for me
  • query protocol-state -> Outputs JSON for me
  • query stake-snapshot -> Outputs JSON for me
  • query pool-params -> Outputs JSON for me

@saratomaz
Copy link

Fixed, the commands are already returning json.

Verified with the following tests:
test_ledger_state
test_stake_snapshot
test_pool_params
test_protocol_state_keys

@mkoura
Copy link
Contributor Author

mkoura commented Jul 20, 2022

Not fixed, the important part is "After upgrading nodes of local cluster from release 1.34.1 to current master". We still get CBOR instead of JSON in this scenario.

@mkoura mkoura reopened this Jul 20, 2022
@Jimbo4350
Copy link
Contributor

Jimbo4350 commented Jul 20, 2022

@mkoura I just tested current master. Please paste your commands, outputs and cli + node revisions

@mkoura
Copy link
Contributor Author

mkoura commented Jul 20, 2022

Not sure if this can be tested in isolation. Our job does following:

  • start local network with node version running on mainnet (1.34.1 atm)
  • run smoke tests (370+), so there is some history
  • upgrade cardano-node to latest master and restart node processes with updated binaries
  • re-run all smoke tests

After the node is upgraded to master (f5161e5bee1c733c56557e202e22e636c845634f in last failed job), we run simple query with output to stdout (without --out-file) in the failing tests. At the moment I've got only output of cardano-cli query protocol-state available in testing artifacts - test_protocol_state_keys_ci0_nge_protocol_state.out.gz

I'll play with it more after my PTO if needed.

@Jimbo4350
Copy link
Contributor

Jimbo4350 commented Jul 20, 2022

Current master is 621311f495dd4ed471482527104e256ac6971464 which is what I tried it with.

I'll play with it more after my PTO if needed.

Please don't respond if you are on PTO :)

@mkoura
Copy link
Contributor Author

mkoura commented Jul 20, 2022

Sorry, wrong rev, we tested it with commit 2be07bb during last nightly run.

@CarlosLopezDeLara CarlosLopezDeLara added in-scope This item is being worked and will be part of an upcoming release and removed 1.35.2 labels Jul 22, 2022
@Jimbo4350
Copy link
Contributor

@mkoura Can you test it with the latest master? It's working for @saratomaz and myself.

@mkoura
Copy link
Contributor Author

mkoura commented Jul 26, 2022

Still the same issue on 803881b

It is not working for @saratomaz, she didn't test is on upgraded nodes, which is a required condition.
All the affected commands work if the nodes were NOT upgraded.

@newhoggy
Copy link
Contributor

newhoggy commented Jul 27, 2022

cardano-cli falls back to CBOR when it can't decode the CBOR binary data it gets from node which can happen if the version mismatches.

Please verify that the version of cardano-cli matches exactly with the version of cardano-node that the cardano-cli is connecting to.

@CarlosLopezDeLara
Copy link
Contributor

Closing as non-issue. We have confirmation that there was a problem related to the use of different node and cli versions.

@CarlosLopezDeLara CarlosLopezDeLara removed the bug Something isn't working label Aug 11, 2022
@CarlosLopezDeLara CarlosLopezDeLara removed priority medium issues/PRs that SHOULD be addressed. This should be done for the release, but acceptable if it doesn medium Vasil in-scope This item is being worked and will be part of an upcoming release labels Aug 11, 2022
@CarlosLopezDeLara CarlosLopezDeLara moved this from 📋 Backlog to ✅ Done in Node CLI/API 2022 Aug 11, 2022
@dorin100 dorin100 added type: regression A feature that worked before stoped working user type: internal Created by an IOG employee era: babbage comp: cardano-cli labels Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: cardano-cli era: babbage type: regression A feature that worked before stoped working user type: internal Created by an IOG employee
Projects
None yet
Development

No branches or pull requests

6 participants