feat: rename note inputs to note storage#2008
feat: rename note inputs to note storage#2008varun-doshi wants to merge 12 commits into0xMiden:nextfrom
Conversation
eee1355 to
6e91ffe
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR renames the NoteInputs type to NoteStorage throughout the codebase to better reflect that these values represent storage associated with a note rather than inputs. The renaming includes updating all references in code, comments, documentation, error messages, and assembly files.
Key Changes
- Renamed
NoteInputsstruct toNoteStorageacross all Rust code - Updated related constants from
MAX_INPUTS_PER_NOTEtoMAX_STORAGE_VALUE_PER_NOTE - Renamed error variants to reflect the new terminology
- Updated all assembly code comments and error messages to use "note storage" terminology
Reviewed Changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/miden-tx/src/host/note_builder.rs | Updated type imports and error variants from NoteInputs to NoteStorage |
| crates/miden-tx/src/errors/mod.rs | Renamed error variants and messages to use "note storage" terminology |
| crates/miden-objects/src/note/storage.rs | New file containing the renamed NoteStorage struct (previously inputs.rs) |
| crates/miden-objects/src/note/inputs.rs | Deleted file, replaced by storage.rs |
| crates/miden-objects/src/note/mod.rs | Updated module imports and documentation |
| crates/miden-objects/src/note/recipient.rs | Updated type references and comments |
| crates/miden-objects/src/note/details.rs | Updated type references and documentation |
| crates/miden-objects/src/note/partial.rs | Updated documentation comments |
| crates/miden-objects/src/errors.rs | Renamed error variant from TooManyInputs to TooManyStorageValues |
| crates/miden-objects/src/constants.rs | Renamed constant from MAX_INPUTS_PER_NOTE to MAX_STORAGE_VALUE_PER_NOTE |
| crates/miden-objects/src/transaction/tx_args.rs | Updated comment to use "note storage" terminology |
| crates/miden-testing/* | Updated test files to use NoteStorage type |
| crates/miden-lib/src/testing/note.rs | Renamed method from note_inputs to note_storage_values |
| crates/miden-lib/src/note/utils.rs | Updated variable names from note_inputs to note_storage |
| crates/miden-lib/src/errors/*.rs | Updated error messages and constants |
| crates/miden-lib/asm/* | Updated assembly code comments and constants |
| CHANGELOG.md | Added entry documenting the breaking change |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| /// Error Message: "note storage length exceeded the maximum limit of 128" | ||
| pub const ERR_PROLOGUE_NOTE_STORAGE_LEN_EXCEEDED_LIMIT: MasmError = MasmError::from_static_str("note storage length exceeded the maximum limit of 128"); |
There was a problem hiding this comment.
Two constants ERR_PROLOGUE_NOTE_STORAGE_LENGTH_EXCEEDED_LIMIT and ERR_PROLOGUE_NOTE_STORAGE_LEN_EXCEEDED_LIMIT have identical error messages and appear to be duplicates. Consider removing one to avoid confusion and maintain cleaner code.
| /// Error Message: "note storage length exceeded the maximum limit of 128" | |
| pub const ERR_PROLOGUE_NOTE_STORAGE_LEN_EXCEEDED_LIMIT: MasmError = MasmError::from_static_str("note storage length exceeded the maximum limit of 128"); |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 37 out of 37 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9953bab to
f49d688
Compare
PhilippGackstatter
left a comment
There was a problem hiding this comment.
Thank you for working on this!
This is a good start, but in general, we should update all variable and field names of structs and functions to be "storage" instead of "inputs".
Try searching for these strings in the codebase and update if necessary:
- note's inputs
- note inputs
- INPUTS_COMMITMENT
- inputs: (to find places where we previously had
inputs: NoteInputs)
| # ================================================================================================= | ||
|
|
||
| const.ERR_P2ID_WRONG_NUMBER_OF_INPUTS="P2ID note expects exactly 2 note inputs" | ||
| const.ERR_P2ID_WRONG_NUMBER_OF_STORAGE_VALUES="P2ID note expects exactly 2 note storage values" |
There was a problem hiding this comment.
| const.ERR_P2ID_WRONG_NUMBER_OF_STORAGE_VALUES="P2ID note expects exactly 2 note storage values" | |
| const.ERR_P2ID_UNEXPECTED_STORAGE_LENGTH="P2ID note expects storage of length 2" |
Nit: For the standards notes, P2ID, P2IDE, SWAP, I would rephrase this error to ERR_{NOTE_NAME}_UNEXPECTED_STORAGE_LENGTH="{NOTE_NAME} note expects storage of length X", e.g. for P2ID, the above suggestion.
| #! Outputs: [] | ||
| #! | ||
| #! Note inputs are assumed to be as follows: | ||
| #! Note storage values are assumed to be as follows: |
There was a problem hiding this comment.
| #! Note storage values are assumed to be as follows: | |
| #! Note storage must be laid out as follows: |
This also applies to the other notes.
| push.0 exec.active_note::get_inputs | ||
| # => [num_inputs, inputs_ptr] | ||
|
|
||
| # make sure the number of inputs is 4 |
There was a problem hiding this comment.
| # make sure the number of inputs is 4 | |
| # check the length of note storage |
| # ================================================================================================= | ||
|
|
||
| const.SWAP_NOTE_INPUTS_NUMBER=12 | ||
| const.SWAP_NOTE_STORAGE_NUMBER=12 |
There was a problem hiding this comment.
| const.SWAP_NOTE_STORAGE_NUMBER=12 | |
| const.SWAP_NOTE_STORAGE_LENGTH=12 |
crates/miden-lib/src/testing/note.rs
Outdated
| /// Set the note's input to `inputs`. | ||
| /// | ||
| /// Note: This overwrite the inputs, the previous input values are discarded. | ||
| pub fn note_inputs( | ||
| pub fn note_storage_values( |
There was a problem hiding this comment.
The docs need a "note inputs" -> "note storage" update.
Also, I would just call this note_storage because "values" is quite generic, so it doesn't make things much clearer.
crates/miden-objects/src/note/mod.rs
Outdated
| /// account of a P2ID or conditions of a SWAP, and the effects of the note. The serial number has | ||
| /// a double duty of preventing double spend, and providing unlikability to the consumer of a note. | ||
| /// The note's inputs allow for customization of its script. | ||
| /// The note's storage values allow for customization of its script. |
There was a problem hiding this comment.
In this file, there are ~5 occurences of "inputs" left which still need to be replaced with "note storage" or "storage".
In general, try searching for "inputs" in the directory ./crates/miden-objects/src/note and you'll find more occurences that need to be updated.
crates/miden-objects/src/note/mod.rs
Outdated
| /// Returns the note's recipient inputs which customizes the script's behavior. | ||
| pub fn inputs(&self) -> &NoteInputs { | ||
| pub fn inputs(&self) -> &NoteStorage { |
There was a problem hiding this comment.
| /// Returns the note's recipient inputs which customizes the script's behavior. | |
| pub fn inputs(&self) -> &NoteInputs { | |
| pub fn inputs(&self) -> &NoteStorage { | |
| /// Returns the note recipient's [`NoteStorage`]. | |
| pub fn storage(&self) -> &NoteStorage { |
| serial_num: Word, | ||
| script: NoteScript, | ||
| inputs: NoteInputs, | ||
| inputs: NoteStorage, |
There was a problem hiding this comment.
| inputs: NoteStorage, | |
| storage: NoteStorage, |
|
|
||
| impl NoteRecipient { | ||
| pub fn new(serial_num: Word, script: NoteScript, inputs: NoteInputs) -> Self { | ||
| pub fn new(serial_num: Word, script: NoteScript, inputs: NoteStorage) -> Self { |
There was a problem hiding this comment.
| pub fn new(serial_num: Word, script: NoteScript, inputs: NoteStorage) -> Self { | |
| pub fn new(serial_num: Word, script: NoteScript, storage: NoteStorage) -> Self { |
All of the variable names should also be updated (applies to the entire PR),
| } | ||
|
|
||
| /// Returns a reference to the storage values. | ||
| pub fn values(&self) -> &[Felt] { |
There was a problem hiding this comment.
| pub fn values(&self) -> &[Felt] { | |
| pub fn items(&self) -> &[Felt] { |
As mentioned in another comment, I'd call the individual elements "items".
|
@varun-doshi Could you merge latest |
On it |
8dc2940 to
a88be87
Compare
52bf1de to
2be75cb
Compare
|
Some |
PhilippGackstatter
left a comment
There was a problem hiding this comment.
Thanks for the updates!
There are still many occurrences of inputs left that need to be renamed. Searching for num_inputs should show you a lot of places that need an update, not only replacing num_inputs itself, but also any other inputs that refer to note inputs surrounding it.
| #! Advice Map: { NOTE_STORAGE_COMMITMENT: [INPUTS] } | ||
| #! Outputs: | ||
| #! Stack: [num_inputs, dest_ptr] | ||
| #! | ||
| #! Where: | ||
| #! - dest_ptr is the memory address to write the note inputs. | ||
| #! - NOTE_INPUTS_COMMITMENT is the sequential hash of the padded note's inputs. | ||
| #! - INPUTS is the data corresponding to the note's inputs. | ||
| #! - dest_ptr is the memory address to write the note storage. | ||
| #! - NOTE_STORAGE_COMMITMENT is the sequential hash of the padded note's storage items. | ||
| #! - INPUTS is the data corresponding to the note's storage items. |
There was a problem hiding this comment.
Here we need to rename INPUTS to STORAGE_ITEMS, e.g.:
#! Advice Map: { NOTE_STORAGE_COMMITMENT: [STORAGE_ITEMS] }
And also in the Where section.
| swapdw dropw dropw | ||
| movup.5 drop movup.5 drop movup.5 drop | ||
| # => [NOTE_INPUTS_COMMITMENT, num_inputs, dest_ptr] | ||
| # => [NOTE_STORAGE_COMMITMENT, num_inputs, dest_ptr] |
There was a problem hiding this comment.
Below this line we should also rename inputs to storage, e.g. the comments and exec.write_storage_to_memory. That write_inputs_to_memory procedure also needs a rename of many "inputs" occurrences.
| #! Advice Map: { NOTE_INPUTS_COMMITMENT: [INPUTS] } | ||
| #! Advice Map: { NOTE_STORAGE_COMMITMENT: [INPUTS] } | ||
| #! Outputs: | ||
| #! Stack: [num_inputs, dest_ptr] |
There was a problem hiding this comment.
| #! Stack: [num_inputs, dest_ptr] | |
| #! Stack: [storage_len, dest_ptr] |
Search for num_inputs and replace with storage_len or something appropriate. There will be a lot of occurences, and it requires renaming some procedures as well, e.g. input_note_get_inputs_info -> input_note_get_storage_info or exec.input_note::get_inputs_info -> exec.input_note::get_storage_info.
| # ================================================================================================= | ||
|
|
||
| const.MINT_NOTE_INPUTS_NUMBER=9 | ||
| const.MINT_NOTE_STORAGE_NUMBER=9 |
There was a problem hiding this comment.
| const.MINT_NOTE_STORAGE_NUMBER=9 | |
| const.MINT_NOTE_STORAGE_LENGTH=9 |
Generally, I'd replace "num inputs" with "storage length" instead of "storage number".
crates/miden-lib/asm/miden/note.masm
Outdated
| @@ -33,11 +33,11 @@ const.ERR_PROLOGUE_NOTE_INPUTS_LEN_EXCEEDED_LIMIT="number of note inputs exceede | |||
| #! Invocation: exec | |||
| export.compute_inputs_commitment | |||
There was a problem hiding this comment.
| export.compute_inputs_commitment | |
| export.compute_storage_commitment |
|
Few remaining |
PhilippGackstatter
left a comment
There was a problem hiding this comment.
Thanks! I think we're getting closer 🙂
The advice_num_inputs and rounded_up_num_inputs also represent number of inputs and so we should also rename these to storage length.
Also, search for INPUTS_COMMITMENT, there are still a few that need to be renamed.
| #! - note_index is the index of the input note whose data should be returned. | ||
| #! - NOTE_INPUTS_COMMITMENT is the inputs commitment of the specified input note. | ||
| #! - num_inputs is the number of input values of the specified input note. | ||
| #! - NOTE_STORAGE_COMMITMENT is the inputs commitment of the specified input note. |
There was a problem hiding this comment.
| #! - NOTE_STORAGE_COMMITMENT is the inputs commitment of the specified input note. | |
| #! - NOTE_STORAGE_COMMITMENT is the storage commitment of the specified input note. |
crates/miden-lib/asm/miden/note.masm
Outdated
| #! Operand stack: [RECIPIENT] | ||
| #! Advice map: { | ||
| #! INPUTS_COMMITMENT: [INPUTS], | ||
| #! INPUTS_COMMITMENT: [STORAGE], |
There was a problem hiding this comment.
| #! INPUTS_COMMITMENT: [STORAGE], | |
| #! STORAGE_COMMITMENT: [STORAGE], |
| #! | ||
| #! Invocation: exec | ||
| export.get_inputs_info | ||
| export.get_storage_info |
There was a problem hiding this comment.
Following this rename, we should also rename input_note_get_inputs_info_offset -> input_note_get_storage_info_offset and the constants as well in crates/miden-lib/asm/miden/kernel_proc_offsets.masm.
| @@ -652,18 +652,18 @@ end | |||
| #! Where: | |||
| #! - note_ptr is the memory location for the input note. | |||
| #! - inputs_len is the note's input count. | |||
There was a problem hiding this comment.
| #! - inputs_len is the note's input count. | |
| #! - storage_len is the length of the note's storage. |
And update this also a couple of lines above.
| /// | ||
| /// # Errors | ||
| /// Returns an error if the number of provided storage is greater than 128. | ||
| pub fn new(values: Vec<Felt>) -> Result<Self, NoteError> { |
There was a problem hiding this comment.
In this file, I'd also rename value to item so it matches the items field.
| /// Returns the number of storage items. | ||
| /// | ||
| /// The returned value is guaranteed to be smaller than or equal to 128. | ||
| pub fn num_values(&self) -> u8 { |
There was a problem hiding this comment.
| pub fn num_values(&self) -> u8 { | |
| pub fn num_items(&self) -> u8 { |
| // ================================================================================================ | ||
|
|
||
| impl From<NoteStorage> for Vec<Felt> { | ||
| fn from(value: NoteStorage) -> Self { |
There was a problem hiding this comment.
| fn from(value: NoteStorage) -> Self { | |
| fn from(storage: NoteStorage) -> Self { |
Nit
crates/miden-objects/src/errors.rs
Outdated
| #[error("note contains {0} storage items which exceeds the maximum of {max}", max = MAX_STORAGE_VALUE_PER_NOTE)] | ||
| TooManyStorageValues(usize), |
There was a problem hiding this comment.
| #[error("note contains {0} storage items which exceeds the maximum of {max}", max = MAX_STORAGE_VALUE_PER_NOTE)] | |
| TooManyStorageValues(usize), | |
| #[error("note contains {0} storage items which exceeds the maximum of {max}", max = MAX_NOTE_STORAGE_LENGTH)] | |
| TooManyStorageItems(usize), |
| /// the `get_storage` procedure, see the [issue #1363](https://github.com/0xMiden/miden-base/issues/1363) | ||
| /// for more details. | ||
| #[tokio::test] | ||
| async fn test_active_note_get_exactly_8_inputs() -> anyhow::Result<()> { |
There was a problem hiding this comment.
| async fn test_active_note_get_exactly_8_inputs() -> anyhow::Result<()> { | |
| async fn test_active_note_get_exactly_8_storage_items() -> anyhow::Result<()> { |
| /// obtained from the `input_note::get_inputs_info` procedure is correct. | ||
| /// obtained from the `input_note::get_storage_info` procedure is correct. | ||
| #[tokio::test] | ||
| async fn test_get_inputs_info() -> anyhow::Result<()> { |
There was a problem hiding this comment.
| async fn test_get_inputs_info() -> anyhow::Result<()> { | |
| async fn test_get_storage_info() -> anyhow::Result<()> { |
db76210 to
da83d62
Compare
da83d62 to
39022fe
Compare
|
The following are cleared (among others):
|
ebf50b0 to
e06af4a
Compare
PhilippGackstatter
left a comment
There was a problem hiding this comment.
Thank you! Looks great now. I merged in next, in particular to resolve the conflicts introduced by merging #2071.
I left a few more comments, but after these I'd personally just merge this PR and do smaller cleanups in follow-ups, since this PR has gotten pretty large.
Since starting this PR, we've merged some PRs that moved around a few things and so now we have quite a few occurrences of num_inputs again in the codebase, but I would address those in a follow-up.
Small follow-ups I would consider for separate PRs:
active_note::get_storageis a bit clearer when renamed toactive_note::get_storage_items- Updated the changed kernel procedure in
docs/src/protocol_library.md. - Maybe rename "storage length" into "storage size" or "number of storage items" alternatively. Depends on what others think as well.
- Example:
MINT_NOTE_STORAGE_SIZEreads pretty good whileMINT_NOTE_NUM_STORAGE_ITEMSis a bit verbose, but still fine. It would be a bit more consistent with "num storage slots" as an analog to account storage. I'd slightly prefer "size" still.
- Example:
It would be nice if you could avoid force-pushing once reviews have started, since it sometimes means there are more files to re-review on every iteration than necessary. Thank you 🙏!
| #! Where: | ||
| #! - note_index is the index of the output note whose recipient should be returned. | ||
| #! - RECIPIENT is the commitment to the output note's script, inputs, the serial number. | ||
| #! - RECIPIENT is the commitment to the input note's script, storage, the serial number. |
There was a problem hiding this comment.
The change from output to input needs to be reversed I think.
| @@ -1594,14 +1594,14 @@ end | |||
| #! Returns the inputs commitment of an input note located at the specified memory address. | |||
There was a problem hiding this comment.
This needs to be something like "Returns the note storage commitment..."
| #! STORAGE_COMMITMENT, | ||
| #! ASSETS_COMMITMENT, | ||
| #! ARGS, | ||
| #! NOTE_METADATA, |
There was a problem hiding this comment.
The advice stack comment here looks outdated. We should have
...
NOTE_METADATA,
storage_len,
assets_count,
...
according to:
| # OS => [NOTE_INPUTS_COMMITMENT, num_inputs, dest_ptr] | ||
| # AS => [advice_num_inputs, [INPUT_VALUES]] | ||
| # OS => [NOTE_STORAGE_COMMITMENT, storage_len, dest_ptr] | ||
| # AS => [advice_storage_len, [INPUT_VALUES]] |
There was a problem hiding this comment.
| # AS => [advice_storage_len, [INPUT_VALUES]] | |
| # AS => [advice_storage_len, [STORAGE_ITEMS]] |
| proc.write_inputs_to_memory | ||
| #! Operand stack: [storage_len, dest_ptr] | ||
| proc.write_storage_to_memory | ||
| # load the inputs from the advice map to the advice stack |
There was a problem hiding this comment.
| # load the inputs from the advice map to the advice stack | |
| # load the storage items from the advice map to the advice stack |
| /// Returns the receiver account ID parsed from the provided P2ID check that note storage has | ||
| /// correct length.. |
There was a problem hiding this comment.
| /// Returns the receiver account ID parsed from the provided P2ID check that note storage has | |
| /// correct length.. | |
| /// Returns the receiver account ID parsed from the provided P2ID note storage. |
I think this is sufficient.
| fn parse_p2ide_inputs(note_inputs: &[Felt]) -> Result<(AccountId, u32, u32), StaticAnalysisError> { | ||
| if note_inputs.len() != WellKnownNote::P2IDE.num_expected_inputs() { | ||
| /// - the note storage length is not equal to the expected inputs number of the P2IDE note. | ||
| /// - first two elements of the note storage array does not form the valid account ID. |
There was a problem hiding this comment.
| /// - first two elements of the note storage array does not form the valid account ID. | |
| /// - first two elements of the note storage are not a valid account ID. |
Nit: I'd avoid "array" here. (Also applies to the other function above)
Also the function names still refer to "inputs" instead of "storage".
| /// Returns None if the note input values used to construct the account ID are invalid. | ||
| fn try_read_account_id_from_inputs(note_inputs: &[Felt]) -> Result<AccountId, StaticAnalysisError> { | ||
| if note_inputs.len() < 2 { | ||
| /// Returns None if the note storage items used to construct the account ID are invalid. |
There was a problem hiding this comment.
| /// Returns None if the note storage items used to construct the account ID are invalid. | |
| /// Returns an error if the note storage items used to construct the account ID are invalid. |
Nit: This was outdated.
| // `INPUTS_COMMITMENT -> INPUTS || PADDING`. | ||
| // Notice that note storage items are not loaded to the memory, only their length. In order to obtain | ||
| // the storage items the advice map should be used: they are stored there as | ||
| // `STORAGE_COMMITMENT -> STORAGE || PADDING`. |
There was a problem hiding this comment.
| // `STORAGE_COMMITMENT -> STORAGE || PADDING`. | |
| // `STORAGE_COMMITMENT -> STORAGE_ITEMS || PADDING`. |
Nit
| /// - SERIAL_HASH: [SERIAL_NUM, EMPTY_WORD] | ||
| /// - inputs_commitment |-> inputs. | ||
| /// - storage_commitment |-> inputs. |
There was a problem hiding this comment.
Two things:
- Not from this PR, but we should fix the inconsistency of using lower case for keys, they should be uppercase.
- inputs should be replaced
So overall:
/// - SCRIPT_ROOT |-> script_data.
/// - STORAGE_COMMITMENT |-> storage_items.
Understood; I will make a follow PR after this to get these fixed.
Ahh got it. I will keep this in mind |
PhilippGackstatter
left a comment
There was a problem hiding this comment.
Looks good to me!
I think we got most inputs renamed to storage, and any leftovers can be done in follow-ups (see previous comment).
Will also tag @mmagician for a review.
|
@varun-doshi Could you merge latest next into this PR and update any "note inputs" to "note storage" while we're finishing the review of the PR? Thank you very much 🙏 |
Done! |
Fumuran
left a comment
There was a problem hiding this comment.
Looks good, thank you!
I agree with @PhilippGackstatter, it will be better to merge this PR and open the second part, which will address the comments I left here and changes which Philipp requested in his comment.
| #! - num_inputs is the number of inputs in in the input note. | ||
| export.get_input_note_num_inputs | ||
| add.INPUT_NOTE_NUM_INPUTS_OFFSET | ||
| #! - storage_len is the storage length in in the input note. |
There was a problem hiding this comment.
typo:
| #! - storage_len is the storage length in in the input note. | |
| #! - storage_len is the length of the input note's storage. |
| #! - num_inputs is the number of inputs in the input note. | ||
| export.set_input_note_num_inputs | ||
| add.INPUT_NOTE_NUM_INPUTS_OFFSET | ||
| #! - storage_len is the storage length in the input note. |
There was a problem hiding this comment.
Just for the consistency, let's update this line as well:
| #! - storage_len is the storage length in the input note. | |
| #! - storage_len is the length of the input note's storage. |
| # => [inputs_len, note_ptr] | ||
| # => [storage_len, note_ptr] | ||
|
|
||
| # validate the input length |
There was a problem hiding this comment.
overlooked:
| # validate the input length | |
| # validate the storage length |
| # => [storage_len, note_ptr] | ||
|
|
||
| # validate the input length | ||
| dup exec.::$kernel::util::note::get_max_inputs_per_note lte |
There was a problem hiding this comment.
shared_utils/util/note.masm file should be updated as well: we store there the MAX_INPUTS_PER_NOTE constant and its getter, which is used here.
| #! - is_active_note is 1 and no input note is not being processed (attempted to access note storage | ||
| #! from incorrect context). |
There was a problem hiding this comment.
It seems like we overseen this previously: this line (and all similar ones) should explain the error reason according to the specific error used in the proc body. For example, in that case we use ERR_NOTE_ATTEMPT_TO_ACCESS_NOTE_ASSETS_WHILE_NO_NOTE_BEING_PROCESSED, so this line should use assets instead of storage.
| #! - is_active_note is 1 and no input note is not being processed (attempted to access note storage | |
| #! from incorrect context). | |
| #! - is_active_note is 1 and no input note is not being processed (attempted to access note assets | |
| #! from incorrect context). |
| exec.input_note::get_storage_info | ||
| # => [NOTE_STORAGE_COMMITMENT, storage_len] | ||
|
|
||
| # assert the correctness of the inputs commitment |
There was a problem hiding this comment.
| # assert the correctness of the inputs commitment | |
| # assert the correctness of the storage commitment |
| assert_eqw.err="note 0 has incorrect storage commitment" | ||
| # => [storage_len] | ||
|
|
||
| # assert the inputs have correct length |
There was a problem hiding this comment.
| # assert the inputs have correct length | |
| # assert the storage have correct length |
| /// This test checks the scenario when some public key, which is provided to the RPO component of | ||
| /// the target account, is also provided as an input to the input note. |
There was a problem hiding this comment.
| /// This test checks the scenario when some public key, which is provided to the RPO component of | |
| /// the target account, is also provided as a storage item to the input note. |
| let mut rng = ChaCha20Rng::from_seed(Default::default()); | ||
| let sec_key = SecretKey::with_rng(&mut rng); | ||
| // this value will be used both as public key in the RPO component of the target account and as | ||
| // well as the input of the input note |
There was a problem hiding this comment.
| // well as the storage value of the input note |
| @@ -650,12 +651,12 @@ async fn test_build_recipient_hash() -> anyhow::Result<()> { | |||
| padw | |||
|
|
|||
| # input | |||
There was a problem hiding this comment.
| # input | |
| # storage |
|
@varun-doshi Let's also merge |
|
Hi @varun-doshi, would you be able to update this PR to latest |
|
Closing this as stale and potentially superseded by #2282. |
Fixes #1662