cardano-node icon indicating copy to clipboard operation
cardano-node copied to clipboard

[BUG] - Possible deserialization problems in cardano-submit-api v8.8.0

Open aniketd opened this issue 1 year ago • 1 comments

Internal

Area Native Tokens Related to Native Tokens (Mary).

Summary

Local testnet e2e test that attempts to burn -1 does not pass deserialization while one that attempts to burn -10 passes.

Failing transaction hex:

84a500818258201899e9f9081fd378ee91d3aafe14f9af397267969f33ea3e09f62559f4d5e53b000181825839005cf6c91279a859a072601779fb33bb07c34e1d641d45df51ff63b967f15db05f56035465bf8900a09bdaa16c3d8b8244fea686524408dd801a0093467e021a0002a465031967f309a1581c62173b90b567ad4bcf254ad0f76eb374d749d0b25fd82786af6a839aa14768616e646c653120a20081825820368cf6a11ac7e29917568a366af62a596cb9cde8174bfe7f6e88393ecdb1dcc658404f4bbc354720e4a7d230852d9c5d59ebaea1cb387811fb1e3d621bb8142a6abc0b52decb6bb95890b208a9826a99f06e891aff17860e71a3474b9829c1e9370201818200581c5cf6c91279a859a072601779fb33bb07c34e1d641d45df51ff63b967f5f6

This is encoded using cardano-js-sdk.

cardano-submit-api logs:

DecoderFailure (LocalTxSubmission (GenTx (HardForkBlock (': * ByronBlock (': * (ShelleyBlock (TPraos StandardCrypto) (ShelleyEra StandardCrypto)) (': * (ShelleyBlock (TPraos StandardCrypto) (AllegraEra StandardCrypto)) (': * (ShelleyBlock (TPraos StandardCrypto) (MaryEra StandardCrypto)) (': * (ShelleyBlock (TPraos StandardCrypto) (AlonzoEra StandardCrypto)) (': * (ShelleyBlock (Praos StandardCrypto) (BabbageEra StandardCrypto)) (': * (ShelleyBlock (Praos StandardCrypto) (ConwayEra StandardCrypto)) ('[] *)))))))))) (HardForkApplyTxErr (': * ByronBlock (': * (ShelleyBlock (TPraos StandardCrypto) (ShelleyEra StandardCrypto)) (': * (ShelleyBlock (TPraos StandardCrypto) (AllegraEra StandardCrypto)) (': * (ShelleyBlock (TPraos StandardCrypto) (MaryEra StandardCrypto)) (': * (ShelleyBlock (TPraos StandardCrypto) (AlonzoEra StandardCrypto)) (': * (ShelleyBlock (Praos StandardCrypto) (BabbageEra StandardCrypto)) (': * (ShelleyBlock (Praos StandardCrypto) (ConwayEra StandardCrypto)) ('[] *)))))))))) ServerAgency TokBusy) (DeserialiseFailure 56 "expected word")

In YAML:

$ cardano-cli transaction view --tx-file new.tx --output-yaml
auxiliary scripts: null
certificates: null
collateral inputs: []
era: Conway
fee: 173157 Lovelace
inputs:
- 1899e9f9081fd378ee91d3aafe14f9af397267969f33ea3e09f62559f4d5e53b#0
metadata: null
mint:
  policy 62173b90b567ad4bcf254ad0f76eb374d749d0b25fd82786af6a839a:
    asset 68616e646c6531 (handle1): -1
outputs:
- address: addr_test1qpw0djgj0x59ngrjvqthn7enhvruxnsavsw5th63la3mjel3tkc974sr23jmlzgq5zda4gtv8k9cy38756r9y3qgmkqqjz6aa7
  address era: Shelley
  amount:
    lovelace: 9651838
  network: Testnet
  payment credential key hash: 5cf6c91279a859a072601779fb33bb07c34e1d641d45df51ff63b967
  reference script: null
  stake reference:
    stake credential key hash: f15db05f56035465bf8900a09bdaa16c3d8b8244fea686524408dd80
redeemers: {}
reference inputs: []
required signers (payment key hashes needed for scripts): null
return collateral: null
total collateral: null
update proposal: null
validity range:
  lower bound: null
  upper bound: 26611
withdrawals: null
witnesses:
- key: VKey (VerKeyEd25519DSIGN "368cf6a11ac7e29917568a366af62a596cb9cde8174bfe7f6e88393ecdb1dcc6")
  signature: SignedDSIGN (SigEd25519DSIGN "4f4bbc354720e4a7d230852d9c5d59ebaea1cb387811fb1e3d621bb8142a6abc0b52decb6bb95890b208a9826a99f06e891aff17860e71a3474b9829c1e93702")

where

cat new.tx 
{
    "type": "Witnessed Tx ConwayEra",
    "description": "Ledger Cddl Format",
    "cborHex": "84a500818258201899e9f9081fd378ee91d3aafe14f9af397267969f33ea3e09f62559f4d5e53b000181825839005cf6c91279a859a072601779fb33bb07c34e1d641d45df51ff63b967f15db05f56035465bf8900a09bdaa16c3d8b8244fea686524408dd801a0093467e021a0002a465031967f309a1581c62173b90b567ad4bcf254ad0f76eb374d749d0b25fd82786af6a839aa14768616e646c653120a20081825820368cf6a11ac7e29917568a366af62a596cb9cde8174bfe7f6e88393ecdb1dcc658404f4bbc354720e4a7d230852d9c5d59ebaea1cb387811fb1e3d621bb8142a6abc0b52decb6bb95890b208a9826a99f06e891aff17860e71a3474b9829c1e9370201818200581c5cf6c91279a859a072601779fb33bb07c34e1d641d45df51ff63b967f5f6"
}

CLI round-tripped the transaction using the new echo command without errors

cardano-cli conway transaction echo --tx-file ../new.tx --out-file ../copy.tx
...
diff <(cat ../new.tx | jq -r .cborHex) <(cat ../copy.tx | jq -r .cborHex) # shows no differences

Steps to reproduce Steps to reproduce the behavior:

  1. Start a local testnet
  2. Run the e2e test

Expected behavior The transaction is expected to pass, at least the deserialization phase.

System info (please complete the following information):

  • OS Name: [e.g. Ubuntu]
  • OS Version [e.g. 20.04]
  • Node version v8.9.1
  • CLI version

cc. @iccicci @newhoggy @AngelCastilloB

aniketd avatar Apr 09 '24 13:04 aniketd

I have no permission to edit the description, so let me add here some more details.

Steps to reproduce the behavior:

  1. Start a cardano-js-sdk local testnet
  2. Run the cardano-js-sdk e2e test (I'm available to pair with a cardano-node developer to support in this process)

... but I think the details reported by @aniketd could be enough to investigate the issue.

System info:

  • OS Name: Ubuntu in WSL2 on Windows 10
  • OS Version: Ubuntu 20.04 LTS
  • Node version v8.9.1
  • CLI version v8.9.1 (even this should be not relevant)

iccicci avatar Apr 09 '24 15:04 iccicci

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

github-actions[bot] avatar May 11 '24 01:05 github-actions[bot]

Sorry @aniketd , is there some updates on this issue? I saw the previous comment which warried me.

Thank you

iccicci avatar May 13 '24 15:05 iccicci

@iccicci thanks for the mention! This has been fixed here https://github.com/IntersectMBO/cardano-ledger/pull/4288 . For a quick summary, the problem was in decoding, not the transaction itself, but the resulting PredicateFailure.

aniketd avatar May 14 '24 07:05 aniketd