-
Notifications
You must be signed in to change notification settings - Fork 159
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
rfc(0039): Add cheque lock rfc #308
Conversation
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
Co-authored-by: busyforking <[email protected]>
0f80389
to
e97598e
Compare
Yes, that is adequate. Just add a line that links to this and describes what it is. |
|
@duanyytop I will be submitting a pull request with some additional suggestions for readability, but first I have some questions.
Unlock Rules 1.b.i will error if the receiver is valid and a since was used on one of the inputs. It seems like the transaction would still work if a since was included. What is the reasoning for disallowing the since here?
Unlock Rules 2.b checks if any input cells are using the receiver lock and then performs validations from steps 1.b.i and 1.b.ii. Then in step 2.b.i it loops through these same input cells using the receiver lock, and checks for what? It sounds like it checks for the receiver lock cells, then loops through these cells to check if it has the receiver lock again. I do not understand this step.
Unlock Rules 2.b.ii appears to be incomplete. I do not understand this step. |
For the receiver, when since is equal to 0, he/she can claim the asset without waiting for a period of time.
This rule does seem redundant and can be deleted.
Indeed, a paragraph should be added at the end: “the cheque lock returns with an error state“ |
@duanyytop I'm rewriting part of the description for clarity. I want to make sure I understand the functionality and intent correctly. The Cheque Lock can match against a The Cheque Lock can also match against a lock hash from the inputs, in which case it can be any form of lock script since it is just a hash that is being checked. Is the intent here to encourage the use of the default lock only, or should it be stated that smart contracts could also use the Cheque Lock when signatures are not provided? |
The Cheque Lock only supports |
When no witness is provided, it attempts to match against the input lock hashes, as shown here. I do not know if we have an official name for this pattern. I've been calling it an "authorization piggyback". Since it is just matching the lock hash, it could be a lock of any type, including a lock script that is part of a smart contract.
|
The Cheque Lock script data structure determines that the lock hash you are talking about can only be |
@duanyytop A few more questions in relation to Unlock Rule I see that within
Edit: I wrote these questions before I saw your previous reply posted. If only |
If the |
Yes, this is the crux of my question. The Cheque Lock does not need to do a repetitive signature validation that is already done by the receiver lock script. So why does it check that |
Because there is no hard-coded |
I have created a new pull request to @duanyytop's branch with my suggested edits. Preview: https://github.com/jordanmack/duanyytop-rfcs/blob/add-cheque-lock/rfcs/0039-cheque/0039-cheque.md |
@jordanmack any questions? |
No more questions. Everything should be included in the PR. |
No description provided.