-
Notifications
You must be signed in to change notification settings - Fork 673
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
[clarity] Clarity-Bitcoin v5 (generalized commit-reveal) #3961
Comments
Draft completed here: https://github.com/MarvinJanssen/clarity-commit-reveal Next task is to start creating unit tests. Priority is getting feedback from @FriendsFerdinand for required changes. |
|
Will switch focus to writing tests. |
In process of handing-off logic from @MarvinJanssen to @FriendsFerdinand but blocked by 256-bit operations atm. |
We can generate the scriptpubkey that would show in a commitment transaction using the signers pubkey and the script contained in the transaction. This function can generate the scriptpubkey: https://github.com/FriendsFerdinand/clarity-tapscript/blob/main/contracts/tapscript.clar#L7 Limited by the runtime. To test it, have to store the state in disk then continue running in separate transactions. |
Do we know costs for ClarityWASM? @obycode will there be 256-bit numbers / any way the work you guys can help here? |
@MarvinJanssen generating a ton of test transactions for generalized commit-reveal. What examples can we show in sBTC? |
We don't know cost numbers yet. @AshtonStephens mentioned that you might need 256 bit arithmetic. We can definitely add that to our list, and it shouldn't be terribly difficult, but it will still be some time before we have a complete VM ready for you to test it out. In the meantime, you could run a testnet with modified costs or block-limits as a workaround. What kind of cost numbers are you seeing currently? |
As discussed by @MarvinJanssen for the DR release if this isn't feasible then we could not check for commit & only check a reveal if it fits a previously-known / accepted script template. |
Can this be closed? From what I understand generalised commit reveal is no longer necessary? Although I would opt for providing the ability to have nodes reveal custom messages for dapps. (That is a separate different discussion though.) |
Initial thoughts I dig that idea too - please open up discussion when you have a few minutes. |
Open a discussion: #4134 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature Description
This issue is a marker for visibility on the tremendous job that @MarvinJanssen is doing updating the Clarity-Bitcoin contract. One of the main goals of Sprint 6 (& possibly 7) is to create a v5 of the Clarity-Bitcoin library.
One of these updates consist of generalized commit-reveal logic for multiple use-cases.
Proposed Solution
I believe the current solution is to split up commit-reveal into two smaller contracts. Does that mean that the Clarity-Bitcoin library has now expanded to three files? (4 including mini).
Additional Context
Due to the lack of a central home (first Jude's repo, now Friedgers), I'm not entirely sure where this v5 will live so we must make sure to link that repo back here to appropriately track & close this issue.
The text was updated successfully, but these errors were encountered: