Skip to content

cmd/rofl: Add set-trust-root subcommand#699

Merged
anzoman merged 3 commits into
masterfrom
anzoman/feature/rofl-refresh-trust-root
Jun 1, 2026
Merged

cmd/rofl: Add set-trust-root subcommand#699
anzoman merged 3 commits into
masterfrom
anzoman/feature/rofl-refresh-trust-root

Conversation

@anzoman
Copy link
Copy Markdown
Contributor

@anzoman anzoman commented May 28, 2026

Adds oasis rofl refresh-trust-root to fetch the latest consensus trust root and update the rofl.yaml manifest automatically.

Closes #567.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 28, 2026

Deploy Preview for oasisprotocol-cli canceled.

Name Link
🔨 Latest commit b01588b
🔍 Latest deploy log https://app.netlify.com/projects/oasisprotocol-cli/deploys/6a1d7490643dd20008756b59

@anzoman anzoman force-pushed the anzoman/feature/rofl-refresh-trust-root branch 3 times, most recently from 7857ac5 to 9c3d990 Compare May 29, 2026 09:58
@anzoman anzoman marked this pull request as ready for review May 29, 2026 10:04
@anzoman anzoman requested review from kostko and matevz May 29, 2026 10:05
Comment thread cmd/rofl/refresh_trust_root.go Outdated
@matevz
Copy link
Copy Markdown
Member

matevz commented May 29, 2026

While you're at it, can you also fix the oasis rofl trust-root output?

$ oasis rofl trust-root
TrustRoot {
    height: 32299682,
    hash: "a1f25ff6febef34216b08d31122bafc1fd24b0d2445a0f6b8da9b5f62624e89a".into(),
    runtime_id: "000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c".into(),
    chain_context: "0b91b8e4e44b2003a7c5e23ddadb5e14ef5345c0ebcb3ddcae07fa2f244cab76".to_string(),
}

Should be normal json.

@anzoman anzoman force-pushed the anzoman/feature/rofl-refresh-trust-root branch 2 times, most recently from 6cc7e7a to c4835a8 Compare May 29, 2026 12:39
@anzoman anzoman requested a review from matevz May 29, 2026 12:40
Comment thread cmd/rofl/set_trust_root.go Outdated
Comment thread cmd/rofl/set_trust_root.go Outdated
Comment thread cmd/rofl/set_trust_root.go Outdated
@anzoman anzoman force-pushed the anzoman/feature/rofl-refresh-trust-root branch from c4835a8 to 537a642 Compare June 1, 2026 09:56
@anzoman anzoman requested review from kostko and matevz June 1, 2026 10:02
@matevz matevz changed the title cmd/rofl: Add refresh-trust-root subcommand cmd/rofl: Add set-trust-root subcommand Jun 1, 2026
Comment thread cmd/rofl/set_trust_root.go Outdated
anzoman added 3 commits June 1, 2026 14:00
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.
@anzoman anzoman force-pushed the anzoman/feature/rofl-refresh-trust-root branch from 537a642 to b01588b Compare June 1, 2026 12:01
@anzoman anzoman requested a review from matevz June 1, 2026 12:07
Copy link
Copy Markdown
Member

@matevz matevz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected, thanks.

@anzoman anzoman merged commit 9b1e3d7 into master Jun 1, 2026
5 checks passed
@anzoman anzoman deleted the anzoman/feature/rofl-refresh-trust-root branch June 1, 2026 12:41
Comment thread cmd/rofl/set_trust_root.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add subcommand to refresh ROFL app trust root

4 participants