Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an ADR to get rid of the TVar in the Direct module #257

Closed
Tracked by #184 ...
ch1bo opened this issue Mar 11, 2022 · 1 comment · Fixed by #305
Closed
Tracked by #184 ...

Create an ADR to get rid of the TVar in the Direct module #257

ch1bo opened this issue Mar 11, 2022 · 1 comment · Fixed by #305
Assignees
Labels
task Subtask of a bigger feature.

Comments

@ch1bo
Copy link
Collaborator

ch1bo commented Mar 11, 2022

Our goal is to simplify the Hydra.Chain.Direct module such that it is not having state on it's own in a TVar, but we can integrate it's state into the general state of the Hydra.Node to simplify rollbacks & persistence later.

This ADR shall be the basis for next steps into this direction and ultimately to solve #184

Discussion

Make observation stateless:

  • Problem is that we need to keep the UTxO around in order to understand the tx
  • Observation is stateful in the sense it needs the "state" of the ledger, which is either the list of txs or the UTxO
  • What we have now is good enough, we only change the interface between Node and Chain to add a "callback" as continuation?
  • A step in the "right" direction would be to move state into a "middleware" layer and make the Tx stateless -> we already did that?

Also relevant: #184 (comment)

@ch1bo ch1bo added the task Subtask of a bigger feature. label Mar 11, 2022
@ch1bo ch1bo mentioned this issue Mar 11, 2022
6 tasks
@ch1bo ch1bo self-assigned this Mar 23, 2022
@ch1bo
Copy link
Collaborator Author

ch1bo commented Mar 23, 2022

Written down my ideas before heading off into some vacation. This is still a VERY MUCH WIP draft of things: https://github.com/input-output-hk/hydra-poc/tree/ch1bo/adr-18-single-state

@ch1bo ch1bo changed the title Create an ADR to get rid of the TVar in the Direct/Wallet module Create an ADR to get rid of the TVar in the Direct module Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Subtask of a bigger feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant