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
Raw storage values are RLP encoded when being put into the storageTree. This does not achieve anything as values can only be hex strings. It exists for historical reasons, and cannot be easily removed as if affects the stateRoot.
Motivation:
The StateManager has mostly been private, but as we solidify the api surface, more people would like to take advantage of its abstractions. Currently the necessary RLP encoding and decoding happens externally to the StateManager contractStorage api. When checking data in the state trie for debugging , tests, RPC implementations, its really easy to forget this strange antiquity.
Suggested Change:
Hide this complexity in the StateManager contractStorage api. This would be a breaking change.
Background:
Raw storage values are RLP encoded when being put into the storageTree. This does not achieve anything as values can only be hex strings. It exists for historical reasons, and cannot be easily removed as if affects the stateRoot.
Motivation:
The StateManager has mostly been private, but as we solidify the api surface, more people would like to take advantage of its abstractions. Currently the necessary RLP encoding and decoding happens externally to the StateManager contractStorage api. When checking data in the state trie for debugging , tests, RPC implementations, its really easy to forget this strange antiquity.
Suggested Change:
Hide this complexity in the StateManager contractStorage api. This would be a breaking change.
Affected APIs:
stateManager.getContractStorage(address, key, cb)
stateManager.putContractStorage(address, key, value, cb)
current example:
example after proposed change:
The text was updated successfully, but these errors were encountered: