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

Spike: Custom ledger containing a new primitive operation - can we still decommit/close? #1727

Open
noonio opened this issue Oct 30, 2024 · 0 comments
Assignees

Comments

@noonio
Copy link
Contributor

noonio commented Oct 30, 2024

Why

Perhaps there is a need to have custom validation-logic on the L2 ledger that the L1 doesn't support. Can this be achieved and still allow the UTxO to be decommitted back into L1 and the head close/fanout as normal?

What

  • A fork of cardano-ledger/plutus with our new code
  • A branch of hydra that depends on that and builds with it
  • A validator that tests the new operation

How

See also: https://github.com/search?q=repo%3AIntersectMBO%2Fplutus%20ripemd&type=code and https://github.com/IntersectMBO/plutus/pull/6378/files

Here's the actual function we may consider - https://github.com/w3f/schnorrkel - but for us we just want to test any new builtin; the work of making the actual builtin can come later.

  • Fork the cardano-ledger, and plutus (no more trying of a new era)
  • Add a new (trivial) operation: perhaps a builtin that just returns 7, or something.
  • Use it in a custom validator running in some L2 contract
  • Check that it works
  • See if the head can be closed/funds fanned out or decommited as normal
  • Wrap up these steps in a end-to-end test so we can see it working

The end result here is a demonstration of a decommit involving this new builtin in a validator, and a diff in plutus showing the parts that changed to get the builtin added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants