cmd/rofl: Add refresh-trust-root subcommand#699
Open
anzoman wants to merge 3 commits into
Open
Conversation
✅ Deploy Preview for oasisprotocol-cli canceled.
|
7857ac5 to
9c3d990
Compare
matevz
reviewed
May 29, 2026
Member
|
While you're at it, can you also fix the Should be normal json. |
9c3d990 to
6cc7e7a
Compare
Add a `set-trust-root` subcommand that writes the consensus trust root (block height and hash) into the deployment section of the rofl.yaml manifest. The block height and hash may be passed as positional arguments; when omitted, the latest finalized block is used, and when only the height is given, the corresponding hash is fetched from the network. The naming and positional-argument style mirror `oasis network set-chain-context`.
The `trust-root` command previously printed a Rust struct literal. Emit standard indented JSON instead so the output is easier to consume programmatically.
Document the new `set-trust-root` subcommand and its positional arguments, and update the `trust-root` section to reflect the JSON output.
6cc7e7a to
c4835a8
Compare
matevz
reviewed
May 29, 2026
| ) | ||
|
|
||
| var setTrustRootCmd = &cobra.Command{ | ||
| Use: "set-trust-root [height] [hash]", |
Member
There was a problem hiding this comment.
Suggested change
| Use: "set-trust-root [height] [hash]", | |
| Use: "set-trust-root [<height>] [<hash>]", |
kostko
reviewed
May 29, 2026
|
|
||
| var setTrustRootCmd = &cobra.Command{ | ||
| Use: "set-trust-root [height] [hash]", | ||
| Short: "Set the trust root in the rofl.yaml manifest", |
Member
There was a problem hiding this comment.
Suggested change
| Short: "Set the trust root in the rofl.yaml manifest", | |
| Short: "Set the trust root in the ROFL app manifest", |
| var setTrustRootCmd = &cobra.Command{ | ||
| Use: "set-trust-root [height] [hash]", | ||
| Short: "Set the trust root in the rofl.yaml manifest", | ||
| Long: "Set the consensus block height and hash of the trust root in the rofl.yaml manifest.\n\n" + |
Member
There was a problem hiding this comment.
Suggested change
| Long: "Set the consensus block height and hash of the trust root in the rofl.yaml manifest.\n\n" + | |
| Long: "Set the consensus block height and hash of the trust root in the ROFL app manifest.\n\n" + |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds
oasis rofl refresh-trust-rootto fetch the latest consensus trust root and update therofl.yamlmanifest automatically.Closes #567.