-
Notifications
You must be signed in to change notification settings - Fork 88
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
Align specification and code #988
Conversation
8d59a8b
to
36f2676
Compare
Transactions CostsSizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using
Script summary
Cost of Init Transaction
Cost of Commit TransactionThis is using ada-only outputs for better comparability.
Cost of CollectCom Transaction
Cost of Close Transaction
Cost of Contest Transaction
Cost of Abort TransactionSome variation because of random mixture of still initial and already committed outputs.
Cost of FanOut TransactionInvolves spending head output and burning head tokens. Uses ada-only UTxO for better comparability.
|
Test Results334 tests - 15 329 ✔️ - 15 21m 32s ⏱️ - 1m 57s Results for commit 1ba305c. ± Comparison against base commit 8330b37. This pull request removes 16 and adds 1 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
3cddf34
to
ea46f1a
Compare
This resulted in some discussion especially about when to drop transactions from the allTxs in conflicting transaction scenarios.
41632cd
to
7dce929
Compare
…ate" This reverts commit 2511d45.
No semantics change
No semantic changes
This was a single pass via a set comprehension before, now we are have an iterative/mutation algorithm corresponding to the fold in the functional Haskell implementation.
This is still done in ackSn like in the code.
Transactions included in a snapshot can be removed from allTxs. Before, it was done when the snapshot was fully validated but, in fact, as soon as we receiver a request for snapshot, we can not unsee this snapshot so, anyway, we're commited to, either, integrate these transactions in this snapshot and validate it or kill the head liveness.
…way. If we do so, timex txs which are suppose to get pruned are not. Also removed blue coloring as now the impl follows the spec.
The difference between `seenTxs` and `allTxs` is not always clear so we rename things to make it more obvious to read: * seenTxs -> localTxs * seenUTxO -> localUTxO * allTxs stays the same
This also removes the ^ from the Tall variable in spec and code.
7dce929
to
d39cb73
Compare
We could not express a behavior test which would motivate this change and it's not covered by the specification. However, as we can formulate a situation where we would not want them removed, we should keep them for now. If performance because of a growing allTxs becomes an issue, we should put an upper bound on how many invalid txs we keep in allTxs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Fixes #974
As also described in the issue, this
Reverts the removal of transactions from
allTxs
uponTxInvalid
Updates the off-chain protocol section in the spec to match what is currently implemented
Moves the removal of transactions from allTxs when handling a ReqSn (code + spec)
Rename terms:
seenTxs -> localTxs
,seenUTxO -> localUTxO
,allTxs
stays the sameKept note of discussion points in code or follow-up items:
Coherence of
TxInvalid
messages, e.g. when receiving invalid txs it's unintuitive to get informed about them; on the other hand, we would like to be informed if transactions are not valid to our local viewTxInvalid
notifications #990There is no equivalence for storing the fact that we requested a snapshot in the spec. Do we really need it? If yes, we should have a mention of it in the spec or update the formalism accordingly.