Skip to content

Increment/Decrement transaction observation should not depend on off-chain state #1895

@ch1bo

Description

@ch1bo

Context & versions

We saw this when trying out #1894

Steps to reproduce

  1. Open a hydra head
  2. Do some commits and decommits
  3. Stop the hydra-node and wipe state (= fatal crash of disk)
  4. Start the hydra-node with a suitable --start-chain-from
  5. Look at the state of the node

Actual behavior

The hydra-node will ignore increment and decrement transactions. It's internal state will not represent what happened on-chain.

Expected behavior

Although losing the snapshots and other off-chain state, the hydra-node should still know at least what state the head on L1 is.

Implementation idea

The HeadLogic (and specification) rules for handling chain events should never be conditional. We must not ignore the observation from the chain, even if it is inconsistent with our world view (i.e. HeadState).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

Done ✔

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions