Skip to content

upstream(core): Add default TLS to iota-tool with optional --no-tls flag#11519

Closed
jkrvivian wants to merge 1 commit into
core-protocol/upstream-changes/mainnet-1.49.2-1.50.1from
core-protocol/upstream-1.49.2-1.50.1/e204e
Closed

upstream(core): Add default TLS to iota-tool with optional --no-tls flag#11519
jkrvivian wants to merge 1 commit into
core-protocol/upstream-changes/mainnet-1.49.2-1.50.1from
core-protocol/upstream-1.49.2-1.50.1/e204e

Conversation

@jkrvivian
Copy link
Copy Markdown
Contributor

Description of change

Adds an optional --no-tls flag to four iota-tool subcommands (locked-object, fetch-object, fetch-transaction, fetch-checkpoint) and threads a use_tls parameter through make_clients / get_transaction_block / check_locked_object, so callers can opt out of TLS when connecting to the validator interface.

Note: this fork already enabled TLS by default in make_clients (no upstream TODO: Enable TLS block).

Links to any relevant issues

Part of #11322

How the change has been tested

  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

Release Notes

  • Protocol:
  • Nodes (Validators and Full nodes): iota-tool now connects to the validator interface over TLS by default; pass --no-tls to fall back to plain HTTP on locked-object, fetch-object, fetch-transaction, and fetch-checkpoint.
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • gRPC:

@jkrvivian jkrvivian requested a review from a team as a code owner May 13, 2026 07:12
@jkrvivian jkrvivian added the node Issues related to the Core Node team label May 13, 2026
@jkrvivian jkrvivian self-assigned this May 13, 2026
let channel = net_config
.connect_lazy(&net_addr, Some(tls_config))
.connect_lazy(&net_addr, use_tls.then_some(tls_config))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
.connect_lazy(&net_addr, use_tls.then_some(tls_config))
.connect_lazy(&net_addr, use_tls.then(|| {
iota_tls::create_rustls_client_config(
iota_types::crypto::NetworkPublicKey::from_bytes(
&committee_member.network_pubkey_bytes,
)?,
iota_tls::IOTA_VALIDATOR_SERVER_NAME.to_string(),
None,
)
}))

Lazily create tls config only if it is needed.

@muXxer
Copy link
Copy Markdown
Contributor

muXxer commented May 26, 2026

I would skip that one, it is reverted in 633ebf9757c43f0b8461e85b8da77c417510f701.

@muXxer muXxer closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-protocol node Issues related to the Core Node team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants