IntersectMBO / ouroboros-consensus

Implementation of a Consensus Layer for the Ouroboros family of protocols
https://ouroboros-consensus.cardano.intersectmbo.org
Apache License 2.0
35 stars 23 forks source link

[FEAT] - Provide CDDL specs for ledger state queries #439

Open michele-nuzzi opened 1 year ago

michele-nuzzi commented 1 year ago

Internal/External External

Describe the feature you'd like

cddl specification for the possible queries in the various node to client verisons

Describe alternatives you've considered Some brave community member tried to essentially reverse engineer the CBOR messages but some times the queries are inaccurate

example: using node to client v13 handshake as reported in the above documentation querying utxos by address in babbage era (query message [0, [0, [5, [6, #6.258([* addr])]]]]) never responds with a msgResult (blocking the program since the local state query state machine dosen't have a "query failure" transition)

example cbor hex for the query in preprod testnet 8200820082058206d90102815839101e1452d1462be064f35c954a54ed08ff3db48dad6fee6a910fc850d9c72022e9027d26e8c66d50cb9b5da8c1736ecd150096958a34cea19c

which is a single address query (so order is irrelevant)

using the command

cardano-cli query utxo --$preprod --address addr_test1xq0pg5k3gc47qe8ntj25548dprlnmdyd44h7u653ply9pkw8yq3wjqnaym5vvm2sewd4m2xpwdhv69gqj62c5dxw5xwqm3j3fa

which is the same address of above; the cli outputs some utxos, so there is something there

amesgen commented 3 months ago

Related to https://github.com/IntersectMBO/cardano-ledger/issues/4396