Skip to content

Commit

Permalink
Manually tweak e2e game goldens to be valid in Conway
Browse files Browse the repository at this point in the history
When reproducing in a unit test I got the following two failures:

- DecoderErrorDeserialiseFailure "Shelley Tx" (DeserialiseFailure 117 "TxBody: 'Required Signer Hashes' must be non-empty when supplied")
- DecoderErrorDeserialiseFailure "Shelley Tx" (DeserialiseFailure 42 "TxBody: 'Collateral Inputs' must be non-empty when supplied")

These correspond to the tags 13 and 14 in the Conway binary spec:
https://github.com/IntersectMBO/cardano-ledger/blob/8d7d261dfb6282ab86cad32ec3f1be71db9a3080/eras/conway/impl/cddl-files/conway.cddl#L431-L432

Using cbor.me we can confirm the presence of in the binaries from the
errors:

```
      0D                                # unsigned(13)
      80                                # array(0)
```

So we manaully delete
- `0d80`
- `0e80`
with this meaning (some matches of 0e80 were part of bytestrings, so we
don't delete them)

And then adjust the preceding TxBody length:

```
84                                      # array(4)
   A5                                   # map(5)
```

E.g. `s/A5/A3`.
  • Loading branch information
Anviking committed Aug 26, 2024
1 parent abb3ca7 commit b1bd20e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/e2e/fixtures/plutus/game_1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"transaction": "84a500800d80018183581d70ca80730a8bb1eb9ed5c5c9deb55a3ee495f96fc3cee0646b76e1e7c31a00989680582014845e067bf83c19a97207c8a2057d9499624783f1fce1ef5abf600392240ad002000e80a10481d8799f581ca1c0a4e322cb639198421ec70e4d9d2c3586df70103a63c35494f51745677565737358202cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824fff5f6",
"transaction": "84a30080018183581d70ca80730a8bb1eb9ed5c5c9deb55a3ee495f96fc3cee0646b76e1e7c31a00989680582014845e067bf83c19a97207c8a2057d9499624783f1fce1ef5abf600392240ad00200a10481d8799f581ca1c0a4e322cb639198421ec70e4d9d2c3586df70103a63c35494f51745677565737358202cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824fff5f6",
"inputs": [],
"redeemers": []
}
Loading

0 comments on commit b1bd20e

Please sign in to comment.