-
Notifications
You must be signed in to change notification settings - Fork 29
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
Slate V4 (Compact Slates) #49
Slate V4 (Compact Slates) #49
Conversation
text/0000-compact-slates.md
Outdated
//"tx": null, | ||
"amt": "1000000000", | ||
"fee": "8000000", | ||
"hgt": "437088", |
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.
Did you figure out why this was needed? I don't believe it is, or at minimum, it can probably be optional
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 don't think it's needed at all, so will try removing it.
It would probably be a good idea to specify the encoding used for pubkeys, commitments, and signatures. |
As discussed in chat, we could use a slate stage field that denotes what kind of slate we are dealing with (invoice, send, receive, finalize etc). The wallet GUI could display one UI 'receive' slate interface and handle which endpoint to use behind the scenes. That would improve UX flow considerably for P2P transactions. |
Yes, I agree, and it will also remove a lot of awkwardness from code that tires to infer what state the slate is in. Going to add this field. |
|
Great work on this one! I especially like I have a small question, why do we need to pass
Probably, I'm missing something here... |
text/0000-compact-slates.md
Outdated
* `excess` - Hex-String encoded short form public key on the secp256k1 curve representing the public blind excess for the participants inputs/outputs. The first party to add signature data must also generate and add a random kernel offset to this value. | ||
* `part` - Hex-String encoded Aggregated (Schnorr) secp2561k signature represeting the participant's partial sig. May be omitted if the participant does not yet have enough data to create it | ||
* `nonce` - The public key of the nonce chosen by the participant for their partial signature | ||
* `proof` - An optional payment proof requet that must be filled out by the recipient if requested (only valid for basic transaction flow). This contains: |
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: requet
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.
Thanks!
Fee needs to be included in the signature message, and needs to be specified by the person inserting the inputs, so it has to be specified at S1 and I2. It can be dropped at S2 since the originator knows it. |
Looks great overall @yeastplume, this definitely makes the material clear and digestible. A quick question about the "return" slate in the basic workflow: can we (or do we already) prune the senders My (possibly naive) understanding is that to finish building the transaction the only additional signature data that the sender needs from the receiver is a |
That's correct, and no we're not currently pruning the sender's |
What will the flow look like for sending or receiving using a multisig wallet? Does this slate model work for that? |
No, this is definitely optimized for a single sender/recipient workflow at the moment. For multisig, I'd anticipate adding a new set of status stages and another set of definitions as to what fields need to be present at each stage. |
We specify the following on the slate itself -
Fee makes sense but "lock height" is sort a hold over from legacy v1 (this defaults to 0 if not in use, but its not actually a field on a plain kernel, so we ignore it if 0). This is related to "relative kernel locks" but a more general purpose approach here would make our live significantly easier when dealing with different kinds of kernels. In slate.rs we do the following (basically map slate.lock_height==0 to plain kernel) -
Ideally the slate contains enough information to fully represent a kernel feature. |
How about something like this:
|
Updated with more generic approach to KernelFeatures arguments |
In line with our governance process, this RFC can be considered being in Final Comment Period, with a disposition to merge in two weeks time, on May 21. Please ensure any comments are made before then! |
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.
Added a few small comments, great job with this overall 🚀
text/0000-compact-slates.md
Outdated
"ver": "4:3", | ||
"id": "7haE++9ZScKLOqM2jvRsjA==", | ||
"sta": "S2", | ||
"sigs": [ |
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 think we want to add new offset
field here before sigs
begins.
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.
👍
text/0000-compact-slates.md
Outdated
#### Top-Level Slate Struct | ||
|
||
* The `version_info` struct is removed, and is replaced with `ver`, which has the format "[version]:[block header version]" | ||
* `id` becomes a short-form base-64 encoding of the UUID binary |
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.
Isn't the UUID hex encoded rather than base64?
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.
Yes, as a matter of that this is no longer a change, remove that line
text/0000-compact-slates.md
Outdated
|
||
This RFC is envasaged as a necessary first step for all slate-exchange possibilities that would benefit from compactness, e.g: | ||
|
||
* [Slate Serialization](https://github.com/j01tz/grin-rfcs/blob/slate-serialization/text/0000-slate-serialization.md) |
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.
Can replace slate-serialization and armored-slates here with slatepack
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.
Big RFC :) A lot of work! Everything makes sense and really well written.
Few comments below. I think after they are addressed we can process with the merging.
RFC PR: https://github.com/mimblewimble/grin-rfcs/pull/49
And can you rename to 0012-compact-slates.md
@quentinlesceller is the FCP period extended?
|
@lehnberg I was waiting for @yeastplume to address the comments above. After that we can merge it. |
Thanks for reviewing, comments all addressed and rfc updated |
🎉 Wohooo! This RFC has now been merged! 🤸♀️ |
Rendered link to RFC document