Introduce the functionality of getting the list of blobs. #3084
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.
Motivation
It is a useful functionality for obtaining the list of storage blobs. We introduce it here.
Proposal
It is important to access the list of ChainIDs and BlobIDs from the command line. Accessing
the ChainIDs is more complicated than expected since we need to access the list of root keys
and the functionality is missing right now. So we limit ourselves to BlobIDs.
The BlobIDs are accessed through the
find_keys_by_prefix
. The problem is that the keys areobtained from the serialization of the
BaseKey
. Therefore, in order to avoid leaking the innerlogic of the serialization into the code, we introduce a
to_bytes
function.The BlobIDs access is added to the storage and also to the validator functionality in a
straightforward way.
Test Plan
A test has been added for the functionality. We only check for the BlobsIDs to be contained. We cannot
check for equality before
Release Plan
This functionality could be useful for operators on DevNet / TestNet.
Links
None.