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

No processing of transactions during a decommit #7

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented Aug 7, 2024

This PR ports the spec changes introduced in cardano-scaling/hydra#1540

Copy link
Member

@ch1bo ch1bo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ported wrong!

@@ -84,8 +84,16 @@
\On{$(\hpRS,v,s,\mT_{\mathsf{req}}, \tx_{\omega})$ from $\party_j$}{
\Req{$v = \hatv ~ \land ~ s = \hats + 1 ~ \land ~ \hpLdr(s) = j$} \;
\Wait{$\hats = \bar{\mc S}.s$}{
\Req{$\bar{\mc S}.U \applytx \tx_{\omega} \not= \bot$} \;
$U_{\mathsf{active}} \gets \bar{\mc S}.U \applytx \tx_{\omega} \setminus \mathsf{outputs(\tx_{\omega})}$ \;
\If{$v = \bar{\mc S}.v ~ \land ~ \bar{\mc S}.\tx_{\omega} \neq \bot$ }{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must: port this correctly!

This was the latest version of this section on the branch we worked together:

							\Req{$s = \hats + 1 ~ \land ~ \hpLdr(s) = j$} \;
							\Wait{$ v = \hatv ~ \land ~ \hats = \bar{\mc S}.s$}{
							    % TODO: waiting for version observed is way longer than for no snapshot in flight!
								\If{$v = \bar{\mc S}.v ~ \land ~ \bar{\mc S}.\tx_{\omega} \neq \bot$ }{
									\Req{$\bar{\mc S}.\tx_{\omega} = \tx_{\omega}$} \;
									$U_{\mathsf{active}} \gets \bar{\mc S}.U$ \;
									$U_{\omega} \gets \bar{\mc S}.U_{\omega}$
								}
								\Else{
									\Req{$\bar{\mc S}.U \applytx \tx_{\omega} \not= \bot$} \;
									$U_{\mathsf{active}} \gets \bar{\mc S}.U \applytx \tx_{\omega} \setminus \mathsf{outputs(\tx_{\omega})}$ \;
									$U_{\omega} \gets \mathsf{outputs}(\tx_{\omega})$
								

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean I forgot the wait on version?

Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
@v0d1ch v0d1ch force-pushed the spec-no-processing-of-transactions-during-decommit branch from 17adf1c to fa26ee4 Compare August 7, 2024 14:58
@ch1bo ch1bo merged commit 56f025e into master Aug 7, 2024
1 check passed
ch1bo added a commit to cardano-scaling/hydra that referenced this pull request Aug 8, 2024
fix #1526 

Related specification PR
cardano-scaling/hydra-formal-specification#7

### Why?

- New L2 transactions fail when decommit is _in flight_ because we try
to re-apply the local decommit tx

### What

- Make sure the new snapshots are created only if the version is matched
- Any pending decommit needs to match with the decommit in confirmed
snapshot thus preserved in the next snapshot/s until it is observed.

---

* [x] CHANGELOG updated or not needed
* [x] Documentation updated or not needed
* [x] Haddocks updated or not needed
* [ ] No new TODOs introduced or explained herafter
@ch1bo ch1bo deleted the spec-no-processing-of-transactions-during-decommit branch August 20, 2024 15:42
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