Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Why doesn't EmulatorTrace use the ledger rules? #611

Closed
L-as opened this issue Jul 20, 2022 · 5 comments
Closed

Why doesn't EmulatorTrace use the ledger rules? #611

L-as opened this issue Jul 20, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@L-as
Copy link

L-as commented Jul 20, 2022

Describe the feature you'd like

Sorry for my ignorance, but it's not clear to me why EmulatorTrace reimplements the ledger rather than using the real ledger code from https://github.com/input-output-hk/cardano-ledger.

Describe alternatives you've considered

No response

@ghost
Copy link

ghost commented Jul 20, 2022

As I understand, it's historically. And sometimes, to my taste, it might be too tedious to work directly with cardano-api types.

The plan is to switch fully to cardano-ledger (and cardano-api).

@koslambrou
Copy link
Contributor

To continue's @ak3n 's answer, it's because the Emulator (with the ledger rules) was implemented before cardano-ledger integrated Alonzo era. We have to do that in order to be able write the plutus-apps framework for writing Plutus contracts. Now that the cardano-ledger implemented the rules, we should definitely switch to using it instead of our own.

By the way, our Emulator is using the real code in addition to our reimplementation. So, basically, the emulator does use the real ledger validation rules.

@L-as
Copy link
Author

L-as commented Jul 20, 2022 via email

@koslambrou
Copy link
Contributor

I meant that we're using the cardano-ledger rules for validating transactions that are submitted in the emulator. But you're right, for constructing the ScriptContext, we're not. We plan on doing it soon.

@ghost
Copy link

ghost commented Sep 22, 2022

Fixed in #642.

@ghost ghost closed this as completed Sep 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants