cardano-scaling / hydra

Implementation of the Hydra Head protocol
https://hydra.family/head-protocol/
Apache License 2.0
284 stars 86 forks source link

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

Open noonio opened 4 weeks ago

noonio commented 4 weeks ago

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

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.

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.