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

Consider adding sender field to notes #23

Closed
Tracked by #29
bobbinth opened this issue Jan 19, 2023 · 1 comment
Closed
Tracked by #29

Consider adding sender field to notes #23

bobbinth opened this issue Jan 19, 2023 · 1 comment
Assignees

Comments

@bobbinth
Copy link
Contributor

It may be convenient to add a sender field to notes. This field will contain account ID of the account which created the note. This field could then be used by note consumers as a reliable way determining note origin.

The sender field would need to be set in the transaction kernel at the time a note is created (i.e., via create_note procedure).

To add this field we'll need to re-define note hash and nullifier computations as follows:

note hash: hash(hash(hash(hash(serial_num, [0; 4]), script_hash), sender), vault_hash)
nullifier: hash(serial_num, script_hash, vault_hash, sender)

The main drawback of this change is that it requires one extra hash when computing a note hash (however, nullifier computation complexity remains the same).

@frisitano
Copy link
Contributor

This is superseded by #46.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants