Problem
cardano-cli latest transaction build fails when connecting to the torsten N2C server:
DeserialiseFailure 2073729 "Final number of elements: 41315 does not match the total count that was decoded: 41319"
While query tip, query protocol-parameters (JSON output), and query utxo all work correctly, transaction build fails when deserializing the protocol parameters response from a different code path.
Environment
- cardano-cli 10.15.0.0
- Negotiated N2C version: V23 (likely)
Root cause
N2C V21 (ShelleyNtCv13) introduced new codecs for PParams. Our PParams CBOR encoding likely uses the pre-V21 format but is served to a V21+ client. The element count mismatch (41319 decoded vs 41315 declared) suggests 4 extra elements in a cost model or parameter array.
Workaround
Use transaction build-raw with calculate-min-fee and a locally-saved protocol-parameters JSON file instead of transaction build (which queries the node internally).
Investigation needed
- Compare our PParams CBOR array encoding against the V21+ spec
- Check cost model array lengths (PlutusV1=166, PlutusV2=175, PlutusV3=233)
- Consider limiting advertised N2C versions to V20 until the encoding is fixed
- May need version-aware PParams encoding in the query response path
Problem
cardano-cli latest transaction buildfails when connecting to the torsten N2C server:While
query tip,query protocol-parameters(JSON output), andquery utxoall work correctly,transaction buildfails when deserializing the protocol parameters response from a different code path.Environment
Root cause
N2C V21 (ShelleyNtCv13) introduced new codecs for PParams. Our PParams CBOR encoding likely uses the pre-V21 format but is served to a V21+ client. The element count mismatch (41319 decoded vs 41315 declared) suggests 4 extra elements in a cost model or parameter array.
Workaround
Use
transaction build-rawwithcalculate-min-feeand a locally-savedprotocol-parametersJSON file instead oftransaction build(which queries the node internally).Investigation needed