Minor improvements to light-client-cli #3412
Merged
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.
This PR implements two changes in the light client CLI utility that makes it more friendly when used in the context of the cosmwasm work I am doing outside of this repo.
The changes are:
GenerateConfig
. This is useful since I want to trust some old knopwn block(s) that contain burn transactions - I can easily find them on https://auditor.mobilecoin.foundation/ and then go to the block explorer to get their ids.FetchBlocks
. Previously it was outputting a protobuf-encodedArchiveBlocks
. Unfortunately we do not currently have aprost
version of this, so using it in the cosmwasm realm is impossible without adding that (and all the associated conversions to go between that and protobuf/BlockData
). Instead of doing that, I added an option to output as a JSON-formatted array of individually encodedBlockData
protos, which can easily be deserialized on the cosmwasm side. The specific format in which we hand data to the contract is likely going to change/evolve over time but for now this allows me to make progress.