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 · May be fixed by #1742
Open

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

noonio opened this issue Oct 30, 2024 · 0 comments · May be fixed by #1742
Assignees
Labels
💬 feature A feature on our roadmap

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.

@noonio noonio linked a pull request Dec 9, 2024 that will close this issue
4 tasks
@noonio noonio added the 💬 feature A feature on our roadmap label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 feature A feature on our roadmap
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants