Skip to content
This repository has been archived by the owner on Feb 20, 2025. It is now read-only.

Expose account storage root in API #887

Closed
thaarok opened this issue May 29, 2024 · 3 comments
Closed

Expose account storage root in API #887

thaarok opened this issue May 29, 2024 · 3 comments
Assignees
Milestone

Comments

@thaarok
Copy link

thaarok commented May 29, 2024

StateDB (and so even Carmen facade) should provide GetStorageRoot(address) method to obtain the storage root of an account.

There are two use cases:

@HerbertJordan
Copy link
Collaborator

Based on the requirements, I would argue that a HasEmptyStorage(Address) function would be sufficient.

The use of the storage hash in the proof is implicit anyway, no need to expose it in the facade.

@HerbertJordan
Copy link
Collaborator

Alternative name: IsStorageEmpty(Address)

@cabrador
Copy link
Contributor

cabrador commented Jun 21, 2024

This is not necessary for now since the need for implementing HasEmptyStorage has been proven as not needed anymore.
Investigation done by @HerbertJordan summarized in this comment revealed that this code would not actually be used.

Solution for sonic would be to always return an empty hash.

@cabrador cabrador closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants