Skip to content

Comments

Deposit protocol changes#18

Merged
ch1bo merged 5 commits intomasterfrom
deposit-protocol-changes
Jun 4, 2025
Merged

Deposit protocol changes#18
ch1bo merged 5 commits intomasterfrom
deposit-protocol-changes

Conversation

@ch1bo
Copy link
Member

@ch1bo ch1bo commented May 28, 2025

Changes to the off-chain protocol as motivated by cardano-scaling/hydra#1978

image

@ch1bo ch1bo requested a review from a team May 28, 2025 09:53
@ch1bo ch1bo moved this from Triage 🏥 to In review 👀 in ☕ Hydra Team Work May 28, 2025
@ch1bo ch1bo self-assigned this May 28, 2025
@ch1bo
Copy link
Member Author

ch1bo commented May 28, 2025

@v0d1ch what do you think about

TBD: Is the concrete deposit handling needed, or should we hand-wave the book-keeping more?

@v0d1ch
Copy link
Contributor

v0d1ch commented May 28, 2025

@ch1bo I think the deposit workflow is fine in the spec - no more hand-waving needed :)

@ch1bo ch1bo merged commit 7f78e00 into master Jun 4, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In review 👀 to Done ✔ in ☕ Hydra Team Work Jun 4, 2025
@ch1bo ch1bo deleted the deposit-protocol-changes branch June 4, 2025 10:14
ch1bo added a commit to cardano-scaling/hydra that referenced this pull request Jun 4, 2025
This is will be the last PR related to deposits that also fixes the
"deposit used too early" problem identified in course of #1951 and
related discussions. With all the prior work already done in #1969,
#1974 and the refactorings of #1977 this was fairly straight forward.

:alarm_clock: Breaking change on the network as I needed to change the
`ReqSn` message.

:alarm_clock: Needed to substantially increase the `defaultTTL` of
re-enqueing inputs. This is needed because the `ReqSn` handling will
wait for the deposit to become active (passes the `--deposit-period`)
and needs to act on the `ReqSn` only then. This is problematic because
the input queue is not (yet?) persisted and restarting the node will
lose that state -> the deposit will become active, but an `AckSn` would
not be sent. See #1999
for a follow-up to address this.

:alarm_clock: The fact that we observe a `SlotNo` in
`DepositObservation` requires a `TimeHandle` to convert it further to a
`UTCTime` (in `convertObservation`). As the `hydra-chain-observer` does
not have a `TimeHandle`, I decided to switch to using `HeadObservation`
(the type from `hydra-tx`) instead of `OnChainTx` (the type from
`hydra-node`) for the chain observer / `hydra-explorer` interface. This
results in quite a lot of (backwards compatible) changes and this
companion PR: cardano-scaling/hydra-explorer#47

TODO:
- [x] spec changes
cardano-scaling/hydra-formal-specification#18
- [x] make chain observers not break the explorer API

---

* [x] CHANGELOG updated
* [x] Documentation updated
* [x] Haddocks updated or not needed
* [ ] No new TODOs introduced or explained herafter
- Two new TODOs in `Hydra.HeadLogic.onOpenNetworkReqSn` on things we're
not sure that are needed or even missing from the implementation (not
critical, but just inconsistent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants