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

Explain 2nd timeout in CommitCash in tutorial #7

Closed
palas opened this issue Mar 27, 2019 · 1 comment
Closed

Explain 2nd timeout in CommitCash in tutorial #7

palas opened this issue Mar 27, 2019 · 1 comment
Labels
Course feedback Issues highlighted by Plutus/Marlowe course Tutorials Issues in the tutorials

Comments

@palas
Copy link
Collaborator

palas commented Mar 27, 2019

See feedback:

  - what is the purpose of the second timeout?

second timeout is a timeout after which the committed money can be redeemed if there anything left to redeem. 
For example if one committed 100 Ada before start timeout and payed 80 Ada during the contract continuation, he/she can redeem remaining 20 Ada after `end (second) timeout`. 

  - what happens if it is exceeded?

same thing happens when CommitCash is evaluated either after first or after second timeout – the contract continues with the second "timeout" continuation of CommitCash.
For example, say, we have a contract: CommitCash (IdentCC 1) (1024 Ada) (startTimeout = 50) (endTimeout = 200) contract1 contract2
If the current slot is, say, 20, then the commit is successful and the evaluation is continued with `contract1`. Committer can redeem money left after `endTimeout` slot 200.
If the current slot is, say, 70, or 270 – the commit is `timed out` and the evaluation continues with `contract2`.

This is definitely not clear in the existing tutorial. It must be clarified.```
@palas palas added Tutorials Issues in the tutorials Course feedback Issues highlighted by Plutus/Marlowe course labels Mar 27, 2019
@simonjohnthompson
Copy link
Contributor

Checked this: there's an introduction of how timeouts are used in https://github.com/input-output-hk/marlowe/blob/master/docs/tutorial-v1.3/introducing-marlowe.md and then in the first discussion of an example in https://github.com/input-output-hk/marlowe/blob/master/docs/tutorial-v1.3/escrow-ex.md there's an explicit discussion of the two timeouts: "The cash value (450) and timeout (100) on the commitment are also specified. Moreover, a timeout on making the commitment, 10, is also specified …"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Course feedback Issues highlighted by Plutus/Marlowe course Tutorials Issues in the tutorials
Projects
None yet
Development

No branches or pull requests

2 participants