Skip to content

Comments

Add network id to stellar network info.#2413

Merged
fnando merged 1 commit intomainfrom
stellar-network-info-id
Feb 24, 2026
Merged

Add network id to stellar network info.#2413
fnando merged 1 commit intomainfrom
stellar-network-info-id

Conversation

@fnando
Copy link
Member

@fnando fnando commented Feb 24, 2026

What

$ stellar network info --output json
{"id":"baefd734b8d3e48472cff83912375fedbc7573701912fe308af730180f97d74a","version":"25.0.0","commit_hash":"9fc81d81a4680932f2a94a641613ef1546be206c","build_timestamp":"2026-01-08T23:18:11","captive_core_version":"v25.1.1","protocol_version":25,"passphrase":"Standalone Network ; February 2017","friendbot_url":"http://localhost:8000/friendbot"}

$ stellar network info --output json-formatted
{
  "id": "baefd734b8d3e48472cff83912375fedbc7573701912fe308af730180f97d74a",
  "version": "25.0.0",
  "commit_hash": "9fc81d81a4680932f2a94a641613ef1546be206c",
  "build_timestamp": "2026-01-08T23:18:11",
  "captive_core_version": "v25.1.1",
  "protocol_version": 25,
  "passphrase": "Standalone Network ; February 2017",
  "friendbot_url": "http://localhost:8000/friendbot"
}

$ stellar network info
ℹ️ Network Id: baefd734b8d3e48472cff83912375fedbc7573701912fe308af730180f97d74a
ℹ️ Version: 25.0.0
ℹ️ Commit Hash: 9fc81d81a4680932f2a94a641613ef1546be206c
ℹ️ Build Timestamp: 2026-01-08T23:18:11
ℹ️ Captive Core Version: v25.1.1
ℹ️ Protocol Version: 25
ℹ️ Passphrase: Standalone Network ; February 2017
ℹ️ Friendbot Url: http://localhost:8000/friendbot

Why

Close #2390.

Known limitations

N/A

@fnando fnando self-assigned this Feb 24, 2026
Copilot AI review requested due to automatic review settings February 24, 2026 00:17
@fnando fnando added this to DevX Feb 24, 2026
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Feb 24, 2026
@fnando fnando moved this from Backlog (Not Ready) to Done in DevX Feb 24, 2026
@fnando fnando moved this from Done to Needs Review in DevX Feb 24, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds the computed Stellar network ID (SHA-256 of the network passphrase) to the stellar network info output, addressing the need from #2390 for easily obtaining the network ID via the CLI.

Changes:

  • Compute id as sha256(passphrase) and include it in network info text + JSON/JSON-formatted outputs.
  • Extend the network info integration tests to assert that id is present in both text and JSON outputs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
cmd/soroban-cli/src/commands/network/info.rs Computes and prints/serializes id alongside existing network/version info.
cmd/crates/soroban-test/tests/it/integration/network.rs Adds integration tests ensuring network info includes the new id field.

@fnando fnando merged commit 51a9433 into main Feb 24, 2026
36 checks passed
@fnando fnando deleted the stellar-network-info-id branch February 24, 2026 00:42
@github-project-automation github-project-automation bot moved this from Needs Review to Done in DevX Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add stellar network id command to output the network ID

2 participants