Home / Input Output / hydra-poc
Mar 07, 4-5 PM (0)
Mar 07, 5-6 PM (0)
Mar 07, 6-7 PM (0)
Mar 07, 7-8 PM (0)
Mar 07, 8-9 PM (0)
Mar 07, 9-10 PM (0)
Mar 07, 10-11 PM (0)
Mar 07, 11-12 AM (0)
Mar 08, 12-1 AM (0)
Mar 08, 1-2 AM (0)
Mar 08, 2-3 AM (0)
Mar 08, 3-4 AM (0)
Mar 08, 4-5 AM (0)
Mar 08, 5-6 AM (0)
Mar 08, 6-7 AM (0)
Mar 08, 7-8 AM (0)
Mar 08, 8-9 AM (0)
Mar 08, 9-10 AM (0)
Mar 08, 10-11 AM (0)
Mar 08, 11-12 PM (0)
Mar 08, 12-1 PM (0)
Mar 08, 1-2 PM (0)
Mar 08, 2-3 PM (0)
Mar 08, 3-4 PM (0)
Mar 08, 4-5 PM (0)
Mar 08, 5-6 PM (9)
Mar 08, 6-7 PM (0)
Mar 08, 7-8 PM (0)
Mar 08, 8-9 PM (0)
Mar 08, 9-10 PM (0)
Mar 08, 10-11 PM (0)
Mar 08, 11-12 AM (0)
Mar 09, 12-1 AM (0)
Mar 09, 1-2 AM (0)
Mar 09, 2-3 AM (0)
Mar 09, 3-4 AM (0)
Mar 09, 4-5 AM (0)
Mar 09, 5-6 AM (0)
Mar 09, 6-7 AM (0)
Mar 09, 7-8 AM (0)
Mar 09, 8-9 AM (0)
Mar 09, 9-10 AM (0)
Mar 09, 10-11 AM (0)
Mar 09, 11-12 PM (0)
Mar 09, 12-1 PM (0)
Mar 09, 1-2 PM (1)
Mar 09, 2-3 PM (0)
Mar 09, 3-4 PM (0)
Mar 09, 4-5 PM (0)
Mar 09, 5-6 PM (0)
Mar 09, 6-7 PM (0)
Mar 09, 7-8 PM (0)
Mar 09, 8-9 PM (1)
Mar 09, 9-10 PM (2)
Mar 09, 10-11 PM (1)
Mar 09, 11-12 AM (0)
Mar 10, 12-1 AM (0)
Mar 10, 1-2 AM (0)
Mar 10, 2-3 AM (0)
Mar 10, 3-4 AM (0)
Mar 10, 4-5 AM (0)
Mar 10, 5-6 AM (1)
Mar 10, 6-7 AM (0)
Mar 10, 7-8 AM (0)
Mar 10, 8-9 AM (16)
Mar 10, 9-10 AM (1)
Mar 10, 10-11 AM (3)
Mar 10, 11-12 PM (1)
Mar 10, 12-1 PM (1)
Mar 10, 1-2 PM (0)
Mar 10, 2-3 PM (0)
Mar 10, 3-4 PM (0)
Mar 10, 4-5 PM (0)
Mar 10, 5-6 PM (0)
Mar 10, 6-7 PM (0)
Mar 10, 7-8 PM (0)
Mar 10, 8-9 PM (0)
Mar 10, 9-10 PM (0)
Mar 10, 10-11 PM (0)
Mar 10, 11-12 AM (0)
Mar 11, 12-1 AM (0)
Mar 11, 1-2 AM (0)
Mar 11, 2-3 AM (0)
Mar 11, 3-4 AM (0)
Mar 11, 4-5 AM (0)
Mar 11, 5-6 AM (0)
Mar 11, 6-7 AM (0)
Mar 11, 7-8 AM (2)
Mar 11, 8-9 AM (0)
Mar 11, 9-10 AM (0)
Mar 11, 10-11 AM (0)
Mar 11, 11-12 PM (0)
Mar 11, 12-1 PM (2)
Mar 11, 1-2 PM (0)
Mar 11, 2-3 PM (0)
Mar 11, 3-4 PM (2)
Mar 11, 4-5 PM (1)
Mar 11, 5-6 PM (0)
Mar 11, 6-7 PM (1)
Mar 11, 7-8 PM (0)
Mar 11, 8-9 PM (0)
Mar 11, 9-10 PM (0)
Mar 11, 10-11 PM (0)
Mar 11, 11-12 AM (0)
Mar 12, 12-1 AM (0)
Mar 12, 1-2 AM (0)
Mar 12, 2-3 AM (0)
Mar 12, 3-4 AM (0)
Mar 12, 4-5 AM (0)
Mar 12, 5-6 AM (0)
Mar 12, 6-7 AM (0)
Mar 12, 7-8 AM (1)
Mar 12, 8-9 AM (0)
Mar 12, 9-10 AM (0)
Mar 12, 10-11 AM (14)
Mar 12, 11-12 PM (0)
Mar 12, 12-1 PM (0)
Mar 12, 1-2 PM (0)
Mar 12, 2-3 PM (0)
Mar 12, 3-4 PM (1)
Mar 12, 4-5 PM (0)
Mar 12, 5-6 PM (0)
Mar 12, 6-7 PM (0)
Mar 12, 7-8 PM (0)
Mar 12, 8-9 PM (0)
Mar 12, 9-10 PM (0)
Mar 12, 10-11 PM (0)
Mar 12, 11-12 AM (0)
Mar 13, 12-1 AM (0)
Mar 13, 1-2 AM (0)
Mar 13, 2-3 AM (0)
Mar 13, 3-4 AM (0)
Mar 13, 4-5 AM (0)
Mar 13, 5-6 AM (0)
Mar 13, 6-7 AM (0)
Mar 13, 7-8 AM (0)
Mar 13, 8-9 AM (0)
Mar 13, 9-10 AM (0)
Mar 13, 10-11 AM (0)
Mar 13, 11-12 PM (0)
Mar 13, 12-1 PM (1)
Mar 13, 1-2 PM (0)
Mar 13, 2-3 PM (0)
Mar 13, 3-4 PM (0)
Mar 13, 4-5 PM (0)
Mar 13, 5-6 PM (0)
Mar 13, 6-7 PM (0)
Mar 13, 7-8 PM (0)
Mar 13, 8-9 PM (0)
Mar 13, 9-10 PM (0)
Mar 13, 10-11 PM (0)
Mar 13, 11-12 AM (0)
Mar 14, 12-1 AM (0)
Mar 14, 1-2 AM (0)
Mar 14, 2-3 AM (0)
Mar 14, 3-4 AM (0)
Mar 14, 4-5 AM (0)
Mar 14, 5-6 AM (0)
Mar 14, 6-7 AM (0)
Mar 14, 7-8 AM (0)
Mar 14, 8-9 AM (0)
Mar 14, 9-10 AM (0)
Mar 14, 10-11 AM (0)
Mar 14, 11-12 PM (0)
Mar 14, 12-1 PM (0)
Mar 14, 1-2 PM (0)
Mar 14, 2-3 PM (0)
Mar 14, 3-4 PM (0)
Mar 14, 4-5 PM (0)
62 commits this week Mar 07, 2026 - Mar 14, 2026
Fix three bugs found in devnet deposit/decommit scenarios
  Bug 1 — CommitFinalized leaves stale decommitTx in state:
  After a snapshot confirming a decommit is confirmed on-chain via
  IncrementTx, the `decommitTx` field was not cleared. This caused the
  next ReqSn to re-include the already-posted decommit, leading to an
  invalid snapshot request. Fix: clear `decommitTx` in the CommitFinalized
  aggregate case when the confirmed snapshot carried a decommit.

  Bug 2 — Leader stuck in RequestedSnapshot after stale ReqSn echo fails:
  When a leader's own ReqSn echo failed validation (e.g. stale decommit or
  expired deposit), the Error outcome left seenSnapshot as RequestedSnapshot
  forever — the timer was noop in that state so the head could never make
  progress. Fix: add `abortOwnEchoOnFail` wrapper in onOpenNetworkReqSn
  that converts RequireFailed on own echo to a new SnapshotRequestAborted
  state change, resetting seenSnapshot to LastSeenSnapshot so the timer can
  retry with fresh content.

  Bug 3 — onChainTick fires DepositExpired/DepositActivated on every tick:
  Deposit status was recomputed from scratch on each tick, causing
  DepositExpired and DepositActivated events to fire repeatedly for already-
  transitioned deposits. Fix: filter to only emit events for deposits whose
  status actually changed in this tick.

  Also fixes restartedNodeCanObserveCommitTx cluster test: the restarted
  node now uses withHydraNodeCatchingUp so the Committed message is not
  consumed by the NodeSynced wait before the assertion can see it.

Signed-off-by: Sasha Bogicevic <[email protected]>
Fix restartedNodeCanObserveCommitTx losing Committed during sync wait
  withHydraNode waits for NodeSynced before yielding the client, consuming
  all messages (including Committed) in the process. Switch the restarted
  node to withHydraNodeCatchingUp so the Committed message is observed
  directly during chain replay. Also scale all wait timeouts by blockTime.

Signed-off-by: Sasha Bogicevic <[email protected]>
Fix BehaviorSpec tests broken by immediate ReqSn and deposit activation changes
  Restore WaitOnDepositActivation (was regressed to noop on this branch) so
  non-leader nodes retry a ReqSn that includes a deposit they haven't yet
  activated, matching master behaviour.

  Update four BehaviorSpec tests to reflect the immediate-ReqSn model introduced
  in 7e570004b:
  - "snapshots are created": tx 40 lands in sn=1 alone; txs 41+42 batch into sn=2
  - "depending transactions confirmed in order": firstTx → sn=1, secondTx → sn=2
  - "conflicting transactions": SnapshotConfirmed fires before TxInvalid
  - "commit snapshot only approved when deposit settled": relax positive assertion
    to [n1] — n2 dropped n1's AckSn while waiting for deposit activation and
    never independently confirms; n2 still observes CommitFinalized on-chain

Signed-off-by: Sasha Bogicevic <[email protected]>
Fix canCommit test timeout for versionNeedsSnapshot contest race
  The versionNeedsSnapshot timer fires an empty version-bump snapshot
  after each IncrementTx. When Close is sent before that snapshot
  confirms at the closing node, the node correctly contests with the
  better snapshot, extending the contestation deadline by one
  contestation period (10 * blockTime).

  The previous buffer of 3 * blockTime was too short in that case,
  causing a timeout before ReadyToFanout arrived. Extended to
  13 * blockTime to cover the contest round plus block-latency buffer.

Signed-off-by: Sasha Bogicevic <[email protected]>
Fix deadlock in processEffects when postTx fails
  When two nodes race to post the same on-chain transaction (e.g.
  IncrementTx), the losing node's submission fails after a 1-second delay
  in txSubmissionClient. During this blocking wait, the timer (200 Hz)
  fills the bounded input queue (100 items), causing the subsequent
  enqueue of PostTxError to deadlock permanently. The main loop never
  recovers and chain events (OnIncrementTx → CommitFinalized) are never
  processed.

  Fix by running postTx in a background thread via asyncTracked, which is
  tracked by isEmpty so runToCompletion in tests correctly waits for the
  background work to finish. This also makes PostTxError delivery
  guaranteed for all tx types (CollectComTx, CloseTx, etc.), not just
  the racing ones.

  With the main loop no longer blocking on postTx, the 1-second
  threadDelay in txSubmissionClient is no longer needed — the chain
  observer naturally processes the winning transaction before PostTxError
  is enqueued.

Signed-off-by: Sasha Bogicevic <[email protected]>
Fix restartedNodeCanObserveCommitTx losing Committed during sync wait
  withHydraNode waits for NodeSynced before yielding the client, consuming
  all messages (including Committed) in the process. Switch the restarted
  node to withHydraNodeCatchingUp so the Committed message is observed
  directly during chain replay. Also scale all wait timeouts by blockTime.

Signed-off-by: Sasha Bogicevic <[email protected]>
Add back pressure for NewTx via HTTP and WebSocket APIs
  Introduce tryEnqueueClient on InputQueue — a non-blocking enqueue that
  returns False immediately when the TBQueue is full, without the timer-
  coalescing side-effect of tryEnqueue. Wire it through as tryWireClientInput
  on DraftHydraNode.

  HTTP POST /transaction now returns 503 immediately if the queue is full
  rather than blocking. WebSocket NewTx sends an InvalidInput error message
  back to the client instead of silently dropping or blocking.

  Adds WaitOnDepositActivation to WaitReason (restoring parity with master
  where it was regressed to noop on this branch).

  Wait — WaitOnDepositActivation is already in the staged commit. Let me check:

Signed-off-by: Sasha Bogicevic <[email protected]>
Fix BehaviorSpec tests broken by immediate ReqSn and deposit activation changes
  Restore WaitOnDepositActivation (was regressed to noop on this branch) so
  non-leader nodes retry a ReqSn that includes a deposit they haven't yet
  activated, matching master behaviour.

  Update four BehaviorSpec tests to reflect the immediate-ReqSn model introduced
  in 7e570004b:
  - "snapshots are created": tx 40 lands in sn=1 alone; txs 41+42 batch into sn=2
  - "depending transactions confirmed in order": firstTx → sn=1, secondTx → sn=2
  - "conflicting transactions": SnapshotConfirmed fires before TxInvalid
  - "commit snapshot only approved when deposit settled": relax positive assertion
    to [n1] — n2 dropped n1's AckSn while waiting for deposit activation and
    never independently confirms; n2 still observes CommitFinalized on-chain

Signed-off-by: Sasha Bogicevic <[email protected]>