Skip to content

Allow Staged mockchains to be built on top of existing monads #504

@mmontin

Description

@mmontin

The library provides the MockChainT monad transformer, which allows to add blockchain capabilities to any monads. In practice, this means that the user can have their own monadic capabilities (such as reading and writing to a custom state) on top of which they can benefit from cooked' machinery.

However, this capability is lost when these runs need to be staged. This means that, in practice, if you use cooked-validators both with your own domain which require dedicated monadic capabilities, and with the expectation to tweak runs, you're blocked. This is typically the case in audits when the product requires a specific environment (like a genesis utxo on which scripts are based) which could be used in a state monad, but you also want to modify the runs you define, and it is currently not supported.

The solution to this issue is not straightforward, but there might be one. It could be as simple as parameterizing the domain in which staged computation gets interpreted, but we need to assess the impact of such a modification.

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