Skip to content

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

@noonio

Description

@noonio

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.

Metadata

Metadata

Labels

💬 featureA feature on our roadmap

Type

No type

Projects

Status

Done ✔

Status

2024 Q4

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions