Skip to content
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

Design and implement new data-backed Plutus Ledger API #6396

Open
ana-pantilie opened this issue Aug 8, 2024 · 0 comments
Open

Design and implement new data-backed Plutus Ledger API #6396

ana-pantilie opened this issue Aug 8, 2024 · 0 comments

Comments

@ana-pantilie
Copy link
Contributor

ana-pantilie commented Aug 8, 2024

The work done to add a data-backed ScriptContext has duplicated a lot of the code and tests inside the plutus-ledger-api. Also see #6142 (comment) for some user feedback.

Task list

1. Can the (current, SoP) ledger API be modified, to what extent? What are the requirements?

2. Do other types need to be represented as BuiltinData other than Map, Value and list? Do we want to use asData for all the minor types nested inside the ScriptContext?

I have done an initial investigation, and the current SoP types use makeIndexedData TH to generate From/ToData instances for them. I believe this means there's a runtime cost to go to and from the two representations, but it might be negligible. This needs to be checked. Do we need to worry about anything else here?

3. Design and implement the new API

Once we know which types can be shared, if any, and once we know what changes we can make to the current API we can begin designing the new one. Roman suggested a typeclass-based approach. In any case, the idea is to find a way to abstract the representation away from the API code.

@ana-pantilie ana-pantilie self-assigned this Aug 8, 2024
@ana-pantilie ana-pantilie changed the title Reduce duplication in PlutusLedgerApi Design new data-backed plutus ledger API Oct 29, 2024
@ana-pantilie ana-pantilie changed the title Design new data-backed plutus ledger API Design and implement new data-backed Plutus Ledger API Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant