Skip to content

No projection/embedding stubs for BLS12_381_MlResult #17

@VINIT-INAMKE

Description

@VINIT-INAMKE

defStubs in c2uplc/src/Covenant/CodeGen/Stubs.hs sets up proj/embed for Integer, ByteString, Bool, String, Unit, G1, and G2. MlResult is missing. There's already a comment at line 856 acknowledging it:

-- Ml_Result - Has no data encoding NOTE: Need to error here

trySelectHandler (line 592) has no case for BLS12_381_MlResultT either falls through to the wildcard and returns Nothing silently.

Also missing from primTypes in FirstPass.hs:65:

primTypes = [intT, boolT, stringT, byteStringT, unitT, blsG1T, blsG2T]
-- no blsMlResultT

If there's no sensible Data encoding for MlResult, at least trySelectHandler should throw a clear error instead of returning Nothing and leaving people guessing.

The raw builtins (millerLoop, mulMlResult, finalVerify) work fine it's just that MlResult values can't go through Data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions