upstream(core): Add default TLS to iota-tool with optional --no-tls flag#11519
Closed
jkrvivian wants to merge 1 commit into
Closed
Conversation
bingyanglin
approved these changes
May 14, 2026
semenov-vladyslav
approved these changes
May 25, 2026
| let channel = net_config | ||
| .connect_lazy(&net_addr, Some(tls_config)) | ||
| .connect_lazy(&net_addr, use_tls.then_some(tls_config)) |
Contributor
There was a problem hiding this comment.
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.
Contributor
|
I would skip that one, it is reverted in 633ebf9757c43f0b8461e85b8da77c417510f701. |
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.
Description of change
Adds an optional
--no-tlsflag to fouriota-toolsubcommands (locked-object,fetch-object,fetch-transaction,fetch-checkpoint) and threads ause_tlsparameter throughmake_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 upstreamTODO: Enable TLSblock).Links to any relevant issues
Part of #11322
How the change has been tested
Release Notes
iota-toolnow connects to the validator interface over TLS by default; pass--no-tlsto fall back to plain HTTP onlocked-object,fetch-object,fetch-transaction, andfetch-checkpoint.