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

Cleanup incremental decommit - Part 2 #1513

Merged
merged 25 commits into from
Jul 17, 2024

Conversation

ch1bo
Copy link
Collaborator

@ch1bo ch1bo commented Jul 16, 2024

Second part of promised cleanup on #1344. This holds not as crucial changes as the other and more refactorings than fixes.

  • This should resolve most of the comments I had about Incremental decommit #1344 and this also does the "clearing" of $\textcolor{red}{\red}$ areas in the specfication.

  • Validate a client decommit request against the localUTxO.

    We can (and should) check against the local ledger state in both cases as it's our local
    node's view of what is valid and what it would snapshot next anyways.

  • Make AckSn processing emit a PartySignedSnapshot

    This matches with the Σ̂[j] ← σj assignment from the pseudo-code.
    This does not change the semantics, as the SnapshotConfirmed state
    changed event includes the full multi-signature anyways.

  • Only request snapshot on ReqDec if no snapshot in flight

  • Added a missing $\setminus outputs(tx_\omega)$ to the spec.

  • Resolved "Spec Gap" comments in HeadLogic

  • Refactored CloseTx, ContestTx and DecrementTx to take ConfirmedSnapshots and remove redundant closeUTxOToDecommit from CloseTx.

  • Simplify/shorten/reword incremental decommit how-to

  • Removed various unused things

  • Enhance / properly use TxTraceSpec to detect problems in contest transaction creation by modeling versions in ModelSnapshot.


  • CHANGELOG updated
  • Documentation updated
  • Haddocks updated
  • No new TODOs introduced or explained herafter

@ch1bo ch1bo linked an issue Jul 16, 2024 that may be closed by this pull request
@ch1bo ch1bo force-pushed the cleanup-incremental-decommit-2 branch 4 times, most recently from f96d46e to 023e08e Compare July 16, 2024 19:41
@ch1bo ch1bo marked this pull request as ready for review July 16, 2024 19:41
@ch1bo ch1bo requested a review from a team July 16, 2024 19:43
@ch1bo ch1bo force-pushed the cleanup-incremental-decommit-2 branch from 023e08e to 51852cf Compare July 17, 2024 06:58
This, at least, results in log lines if this situation occurrs.
This includes a re-ordering of clauses in checkDecrement, which did not
change semantics (but script hashes).
@ch1bo ch1bo mentioned this pull request Jul 17, 2024
4 tasks
Copy link
Contributor

@v0d1ch v0d1ch left a comment

Choose a reason for hiding this comment

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

I noticed at least the decrement figure is not updated but we will revisit the spec anyway so I can correct it in the future pr. 🎉

By having versions in the ModelSnapshot, we can correctly test the
head validator with contest transactions that try to set wrong
versions (see removed TODO).
@ch1bo ch1bo force-pushed the cleanup-incremental-decommit-2 branch from ca2cf2c to df2fcf2 Compare July 17, 2024 16:27
@ch1bo ch1bo merged commit 400c19b into feature/incremental-decommit Jul 17, 2024
17 checks passed
@ch1bo ch1bo deleted the cleanup-incremental-decommit-2 branch July 17, 2024 16:31
Copy link
Contributor

@ffakenz ffakenz left a comment

Choose a reason for hiding this comment

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

👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Close incremental decommit spec/impl gaps
3 participants