Skip to content

Partial fanout - Part 1 #1468

@ch1bo

Description

@ch1bo

Why

The current naiive, but correct implementation (see #145) of representing L2 UTxO in the Head validators is limiting the number of UTXOs supported in a Hydra Head (currently about 80 ada-only outputs, see benchmarks)

This is an all-or-nothing approach and the fanout can only succeed if all UTxOs are produced in a single transaction. This means, there is no way to finalize a head which exceeds these limits!

Within this feature, we want to overcome this limitation by enabling individual (subsets of) outputs to be realized onto the main chain after the contestation deadline passed.

This is similar to #190, but allows for individual UTxOs to be realized and hence can even work around situations where some parts of the state are not compatible with the L1 (e.g. min UTxO value not met)

What

  • The hydra-node when asked to Fanout a head can fanout any size of UTxO set with one or more (partial) fanout transactions

  • Out of scope: asking hydra-node deliberatly picking a subset of UTxO to fanout.

  • Head protocol fanout transactions allow arbitrary subset of closed UTxO to be realized onto the main chain.

    • As before is only possible after the contestation deadline passed.
    • There is a maximum of outputs producible by a single fanout transaction.
    • Any number of fanout transactions can be sequenced in the protocol (as long as there are outputs left to fanout).
  • Maintain offchain performance in the same order of magnitude

  • Make sure it can be resumed if the node runs out of funds doing the L1 txns

Out of scope

  • See Partial fanout - Part 2 #2331 for subsequent work.
  • Maybe fanout only a subset
  • Update incremental decommit to also be able to partially decommit (and check if a full decommit would fail because of size issues)

How

Idea: We update the digest mechanism used in collect, (increment/decrement) and close transactions in such a way to allow for exclusion proofs in fanout transactions.

Using BLS accumulators as researched and experimented by @perturbing in https://github.com/perturbing/plutus-accumulator and https://hackmd.io/@CjIlIbTxRqWOCpWzxuWmkQ/BybaUlSN0

Possible tasks:

  • First just change our full-fanout using the concatenated hashes to full fanout using the BLS scheme

TBD: Off-chain performance is still to be benchmarked and might impact snapshot signing performance on the L2

Related issues

Sub-issues

Metadata

Metadata

Assignees

Labels

L1Affects the on-chain protocol of Hydraamber ⚠️Medium complexity or partly unclear feature

Projects

Status

Todo 📋

Status

2025 Q4

Relationships

None yet

Development

No branches or pull requests

Issue actions