refactor(protocol): share the note storage preimage load - #3656
Closed
mmagician wants to merge 2 commits into
Closed
Conversation
mmagician
force-pushed
the
mmagician-claude/fix-l05-note-storage-count-verify
branch
from
August 21, 2026 08:07
4c24768 to
08356c0
Compare
mmagician
changed the base branch from
mmagician-claude/fix-l05-note-storage-count-verify
to
mmagician-claude/skip-redundant-note-storage-rehash
August 21, 2026 08:08
The prologue and the input-note storage reader both load a note's storage preimage from the advice map and assert its item count against the note's count. Extracts that into `protocol_utils::note::load_storage_preimage`, which both now call. The two error constants collapse into a single `ERR_NOTE_STORAGE_ITEMS_COUNT_MISMATCH`, since MASM cannot parameterize an error code. `protocol_utils` errors are emitted into both the tx-kernel and protocol-library error modules, so it remains reachable from either side.
mmagician
force-pushed
the
mmagician-claude/refactor-share-note-storage-preimage-load
branch
from
August 21, 2026 08:12
007548a to
27ffcb2
Compare
mmagician
marked this pull request as draft
August 21, 2026 08:24
mmagician
commented
Aug 21, 2026
Co-authored-by: Marti <marcin.gorny.94@protonmail.com>
Collaborator
Author
|
Assessment: this works, but since the extracted helper is just 2 effective lines of MASM, I don't think this is worth doing, closing. |
bobbinth
deleted the
mmagician-claude/refactor-share-note-storage-preimage-load
branch
September 5, 2026 15:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses bobbinth's review comment that the prologue's storage handling duplicates the input-note reader.
The prologue and
input_note_internal::get_storage_rawboth load a note's storage preimage from the advice map and assert its item count - this logic now became a new helperprotocol_utils::note::load_storage_preimage.