This repository has been archived by the owner on Sep 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
[PAN-2952] Add storage key preimage tracking #1772
Merged
mbaxter
merged 14 commits into
PegaSysEng:master
from
mbaxter:PAN-2952/world-state-preimages
Jul 29, 2019
Merged
[PAN-2952] Add storage key preimage tracking #1772
mbaxter
merged 14 commits into
PegaSysEng:master
from
mbaxter:PAN-2952/world-state-preimages
Jul 29, 2019
Conversation
This file contains 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
This reverts commit 05919dd.
Rework json-rpc update in a less disruptive way
shemnon
approved these changes
Jul 29, 2019
@@ -31,38 +32,58 @@ | |||
import org.apache.logging.log4j.Logger; | |||
|
|||
public class RocksDbStorageProvider { | |||
public static long DEFAULT_WORLD_STATE_PREIMAGE_CACHE_SIZE = 5_000L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to expose a --X
option for this value? Either as the default or the value that is wired into the world state storage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe? I think we should be adding those options on an as-needed basis for the time being, so I'll leave it for a potential follow-up PR.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
PR description
This PR enables
debug_storageRangeAt
to display storage trie key preimages by adding a new storage class:WorldStatePreimageStorage
. This class is backed by a new type ofKeyValueStorage
(LimitedInMemoryKeyValueStorage
) which caps the amount of data kept in-memory. This new storage object is provided toWorldStateArchive
which passes it to anyWorldState
instances created from the archive. Accounts returned fromWorldState
instances then use this preimage storage to returnAccountStorageEntry
's with optionalkey
preimages fromstorageEntriesFrom()
.