Skip to content

Empty list of stakeholderid in byron EBB is forbidden by CDDL but generated by codecs #4928

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

Closed
jasagredo opened this issue Mar 17, 2025 · 1 comment · Fixed by #5057
Closed
Labels
bug Something isn't working cddl Issues related to cddl specification serialization Anything that affects serialization of ledger types

Comments

@jasagredo
Copy link
Contributor

jasagredo commented Mar 17, 2025

The byron cddl spec defines an ebb block as:

ebblock = [ "header" : ebbhead
          , "body" : [+ stakeholderid]
          , extra : [attributes]
          ]

whereas the encoding for a byron ebb body is defined as:

-- | Every boundary body has the same encoding: empty.
encCBORABoundaryBody :: ABoundaryBody a -> Encoding
encCBORABoundaryBody _ =
  (encodeListLenIndef <> encodeBreak)
    <> ( encodeListLen 1
          <> encCBOR (mempty :: Map Word8 LByteString)
       )

So the generated body has an empty list, while the CDDL specifies a non-empty list.

@jasagredo jasagredo changed the title Empty list in byron EBB is forbidden by CDDL Empty list of stakeholderid in byron EBB is forbidden by CDDL but generated by codecs Mar 17, 2025
@lehins lehins added serialization Anything that affects serialization of ledger types cddl Issues related to cddl specification bug Something isn't working labels Mar 18, 2025
@jasagredo
Copy link
Contributor Author

Fixed by #5050

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cddl Issues related to cddl specification serialization Anything that affects serialization of ledger types
Projects
None yet
2 participants