You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.
Currently we only support one type of AZTEC note, an UXTO-style AZTEC commitment. However, over time we will want to support different 'types' of AZTEC note.
For example, in our short-term roadmap we will be implementing El-Gamal treasury notes. These notes, and others, will need to be able to be distinguished from one another.
Solution
When computing a note's hash, we should integrate a 'type' variable into the hash, with different values mapping to different kinds of AZTEC notes.
In addition, we should change the note ABI encoding to include the note type. This shouldn't be too painful as we don't need to change any ABI encodings for the inputs to our validator contracts (the note type is implicit - a given proof only works with one type of note).
Updating the ABI encoding to contain the noteType
Old ABI encoding:
Offset
Length
Name
Type
Description
0x00
0x20
owner
uint
owner of note
0x20
0x20
noteHash
bytes32
hash of note public key
0x40
-
noteData
bytes
public key data + note metadata
New ABI encoding:
Offset
Length
Name
Type
Description
0x00
0x20
noteType
uint
type identifier of note
0x20
0x20
owner
uint
owner of note
0x40
0x20
noteHash
bytes32
hash of note public key + noteType
0x40
-
noteData
bytes
public key data + note metadata
Work to be done
Update ABI encoding of JoinSplit output notes to include noteType variable
Update ABI encoding of BilateralSwap output notes to include noteType variable
Update ABI encoding of DividendComputation output notes to include noteType variable
Update ABI encoding of AdjustSupply output notes to include noteType variable
Update aztec.jsabiEncoder module to use noteType variable when encoding/decoding notes
Initial list of note types
NoteType
Name
Description
1
UXTO
Standard AZTEC note
2
TREASURY
ElGamal treasury note
The text was updated successfully, but these errors were encountered:
The problem space
Currently we only support one type of AZTEC note, an UXTO-style AZTEC commitment. However, over time we will want to support different 'types' of AZTEC note.
For example, in our short-term roadmap we will be implementing El-Gamal treasury notes. These notes, and others, will need to be able to be distinguished from one another.
Solution
When computing a note's hash, we should integrate a 'type' variable into the hash, with different values mapping to different kinds of AZTEC notes.
In addition, we should change the note ABI encoding to include the note type. This shouldn't be too painful as we don't need to change any ABI encodings for the inputs to our validator contracts (the note type is implicit - a given proof only works with one type of note).
Updating the ABI encoding to contain the
noteType
Old ABI encoding:
New ABI encoding:
Work to be done
JoinSplit
output notes to includenoteType
variableBilateralSwap
output notes to includenoteType
variableDividendComputation
output notes to includenoteType
variableAdjustSupply
output notes to includenoteType
variableaztec.js
abiEncoder
module to usenoteType
variable when encoding/decoding notesInitial list of note types
The text was updated successfully, but these errors were encountered: