-
Notifications
You must be signed in to change notification settings - Fork 58
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
Describe note discovery note tags #713
Conversation
198479e
to
f077324
Compare
docs/architecture/notes.md
Outdated
| `0b10` | Local | Any | NoteType::Public | | ||
| `0b11` | Local | Any | Any | | ||
|
||
- Execution hint: Set to `Network` for network transactions. These notes will be validated and, if possible, consumed in a network transaction. |
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.
- Execution hint: Set to `Network` for network transactions. These notes will be validated and, if possible, consumed in a network transaction. | |
- Execution hint: Set to `Network` for network transactions. These notes are validated and, if possible, consumed in a network transaction. |
docs/architecture/notes.md
Outdated
@@ -196,10 +195,32 @@ hash(hash(hash(hash(serial_num, [0; 4]), script_hash), input_hash), vault_hash) | |||
!!! info | |||
To compute a note's hash, we do not need to know the note's `serial_num`. Knowing the hash of the `serial_num` (as well as `script_hash`, `input_hash` and `note_vault`) is also sufficient. We compute the hash of `serial_num` as `hash(serial_num, [0; 4])` to simplify processing within the VM._ | |||
|
|||
## Note discovery | |||
## Note discovery (note tags) |
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 one thing missing from this section is a concrete example of how note tag can be used by one user to make a note discoverable by another user. I think after reading this, people may still not fully understand how tags can be used and an example could drive it home. We could use a P2ID
note tag scheme to explain this.
In general, I think we can make this section much more detailed (the content here could be easily 3x - 4x of what is here now) and it could maybe even be its own separate sub-section. But maybe that's for another PR.
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.
Jup, I also have the feeling that the entire note chapter is too long already. I will add the example for now and we should do a bigger refactor for the chapter and add several sub-sections.
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.
In general, I think, what is missing to make those really great docs:
- the ppl who write / design the code should also write the section (they know exactly why a certain design was chosen)
- Miden cannot be used at the moment, but the docs should describe how to use Miden. It will get better, once there is the compiler. Then we can describe how to use a note tag using a specific example.
c91cd8d
to
547bb0d
Compare
547bb0d
to
1654062
Compare
* docs: adding note tags to note discovery * changing it slightly * after review * after another review * adding a P2ID example * adding a P2ID example
Closes #440
I describe how Note Tags are used to discover relevant notes.