Skip to content

fix: return request key alongside smt proof#1790

Closed
juan518munoz wants to merge 2 commits intomainfrom
jmunoz-fix-unhashed-storage-map-keys
Closed

fix: return request key alongside smt proof#1790
juan518munoz wants to merge 2 commits intomainfrom
jmunoz-fix-unhashed-storage-map-keys

Conversation

@juan518munoz
Copy link
Collaborator

@juan518munoz juan518munoz commented Mar 12, 2026

When the client calls get_account_proof to request storage maps by passing specific keys, the node retrieves the requested values by querying the Smt forest with a hash of each requested key. Finally, the node returns the requested proofs with the hashed keys, when in reality the original requested keys are needed to construct the StorageMapWitness.

Original discussion

@Mirko-von-Leipzig
Copy link
Collaborator

But don't you already have the keys since you requested them?

@juan518munoz juan518munoz marked this pull request as ready for review March 13, 2026 12:51
@drahnr
Copy link
Contributor

drahnr commented Mar 13, 2026

As @Mirko-von-Leipzig said, you do have the keys, and you can apply the hash function to map the responded proofs back using a hashmap? I do understand it'd be more convenient to get the keys returned. @bobbinth was pretty concerned re request/response sizes (there is one more issue to compress these proofs even further), so I am not sure we want to throw in these bytes.

@juan518munoz
Copy link
Collaborator Author

As discussed offline with @igamigo and @TomasArrachea, it makes sense to not return the keys as one can assume the user knows them beforehand (otherwise it'd be impossible to request proof of them).

Closing this PR.

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

Successfully merging this pull request may close these issues.

3 participants