-
Notifications
You must be signed in to change notification settings - Fork 86
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
Propose time handling ADR #450
Conversation
Transactions CostsSizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using
Cost of Init Transaction
Cost of Commit TransactionCurrently only one UTxO per commit allowed (this is about to change soon)
Cost of CollectCom Transaction
Cost of Close Transaction
Cost of Contest Transaction
Cost of Abort Transaction
Cost of FanOut TransactionInvolves spending head output and burning head tokens. Uses ada-only UTxO for better comparability.
|
f392227
to
89cfbc7
Compare
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.
Minor comments that can be addressed later on
|
||
* Cardano is our layer 1 and its consensus layer separates time into discrete steps, where each step is called a `Slot`. The network is expected to evolve strictly monotonically on this time scale and so slot numbers (`SlotNo`) are always increasing. | ||
|
||
* The Cardano mainnet has a block scheduled every 20 seconds, although it may take longer. |
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.
seconds
-> slots
?
* Cardano is our layer 1 and its consensus layer separates time into discrete steps, where each step is called a `Slot`. The network is expected to evolve strictly monotonically on this time scale and so slot numbers (`SlotNo`) are always increasing. | ||
|
||
* The Cardano mainnet has a block scheduled every 20 seconds, although it may take longer. | ||
- This is because it has `f = 0.02` and slot length is one second. |
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.
I see, my comment is perhaps not relevant. I would intuitively have framed things the other way round as we start introducing the concept of Slot
first.
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.
But this is even wrong.. it should say 0.05, so thanks for pointing out 😅
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.
😂
- Trying to convert wall-clock time to slots of the Head protocol deadline led to `PastHorizonException` (when using very low security parameter `k`) | ||
- Trying to `fanout` after the deadline, but before another block has been seen by the L1 ledger led to `OutsideValidityIntervalUTxO`. | ||
|
||
* The second problem scenarion and solution ideas are roughly visible on this whiteboard: |
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.
typo: scenarion
-> scenario
- Ensures clients only see `ReadyToFanout` when a following `Fanout` would be really possible. | ||
- Makes the `Delay` effect redundant and we can remove it (only delay via reenqueue on the `Wait` outcome) | ||
|
||
* We get a first, rough notion of time for free in our L2 and can support "timed transactions" with same resolution as the L1. |
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.
This would require converting back wall-clock time to slots in the L2 which is dependent on the L2 slot length.
suggestion: Add a note saying this can be made configurable by changing the config files for the L2 ledger
This is basically two decisions, but benefiting from the same context and them depending on each other made me propose a single ADR.
89cfbc7
to
597fedc
Compare
This is basically two decisions, but benefiting from the same context
and them depending on each other made me propose a single ADR.