Skip to content

Commit 5e063df

Browse files
dependabot[bot]MonaaEidmanishdait
authored
chore(deps): bump hiero-ledger/hiero-solo-action from 0.19.0 to 0.21.0 (hiero-ledger#2322)
Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: MontyPokemon <59332150+MonaaEid@users.noreply.github.com> Signed-off-by: Manish Dait <daitmanish88@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: MontyPokemon <59332150+MonaaEid@users.noreply.github.com> Co-authored-by: Manish Dait <daitmanish88@gmail.com> Co-authored-by: Manish Dait <90558243+manishdait@users.noreply.github.com>
1 parent bca48df commit 5e063df

9 files changed

Lines changed: 79 additions & 80 deletions

File tree

.github/workflows/pr-check-secondary-examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ jobs:
7272

7373
- name: Prepare Hiero Solo
7474
id: solo
75-
uses: hiero-ledger/hiero-solo-action@328bc84c3b00a990a151418144fd682a4eb76ea6 #v0.19.0
75+
uses: hiero-ledger/hiero-solo-action@c397dc8f75a4d24ae0be621529d7f9dfe8a9f460 # v0.21.0
7676
with:
7777
installMirrorNode: true
78-
soloVersion: v0.69.0
78+
soloVersion: v0.74.0
7979
mirrorNodeVersion: v0.153.0
8080
hieroVersion: v0.73.0
8181

.github/workflows/pr-check-secondary-unit-integration-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ jobs:
129129

130130
- name: Prepare Hiero Solo
131131
id: solo
132-
uses: hiero-ledger/hiero-solo-action@328bc84c3b00a990a151418144fd682a4eb76ea6 # v0.19.0
132+
uses: hiero-ledger/hiero-solo-action@c397dc8f75a4d24ae0be621529d7f9dfe8a9f460 # v0.21.0
133133
with:
134134
installMirrorNode: true
135-
soloVersion: v0.69.0
135+
soloVersion: v0.74.0
136136
mirrorNodeVersion: v0.153.0
137137
hieroVersion: v0.73.0
138138

src/hiero_sdk_python/address_book/registered_node_address_book_query.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ def execute(self, client) -> RegisteredNodeAddressBook:
144144

145145
def _build_base_url(self, client) -> str:
146146
"""Derive the mirror-node base URL (without ``/api/v1``)."""
147-
rest_url = client.network.get_mirror_rest_url() # e.g. http://localhost:5551/api/v1
147+
rest_url = client.network.get_mirror_rest_url() # e.g. http://localhost:38081/api/v1
148148

149149
# For localhost / solo, use port 8084 for registered-node calls
150-
if "localhost:5551" in rest_url or "127.0.0.1:5551" in rest_url:
151-
rest_url = rest_url.replace(":5551", ":8084")
150+
if "localhost:38081" in rest_url or "127.0.0.1:38081" in rest_url:
151+
rest_url = rest_url.replace(":38081", ":8084")
152152

153153
# Strip /api/v1 suffix so we can append full paths from pagination links
154154
return rest_url.removesuffix("/api/v1")

src/hiero_sdk_python/client/network.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Network:
3131
"mainnet": "https://mainnet-public.mirrornode.hedera.com",
3232
"testnet": "https://testnet.mirrornode.hedera.com",
3333
"previewnet": "https://previewnet.mirrornode.hedera.com",
34-
"solo": "http://localhost:5551", # Local development only
34+
"solo": "http://localhost:38081", # Local development only
3535
}
3636

3737
DEFAULT_NODES: dict[str, list[_Node]] = {
@@ -61,9 +61,9 @@ class Network:
6161
("2.previewnet.hedera.com:50211", AccountId(0, 0, 5)),
6262
("3.previewnet.hedera.com:50211", AccountId(0, 0, 6)),
6363
],
64-
"solo": [("localhost:50211", AccountId(0, 0, 3))],
65-
"localhost": [("localhost:50211", AccountId(0, 0, 3))],
66-
"local": [("localhost:50211", AccountId(0, 0, 3))],
64+
"solo": [("localhost:35211", AccountId(0, 0, 3))],
65+
"localhost": [("localhost:35211", AccountId(0, 0, 3))],
66+
"local": [("localhost:35211", AccountId(0, 0, 3))],
6767
}
6868

6969
LEDGER_ID: dict[str, bytes] = {

src/hiero_sdk_python/query/fee_estimate_query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ def execute(self, client) -> FeeEstimateResponse:
131131
mode = self._mode or FeeEstimateMode.INTRINSIC
132132
url = self._build_url(client, mode)
133133

134-
if "localhost:5551" in url or "127.0.0.1:5551" in url:
135-
url = url.replace(":5551", ":8084")
134+
if "localhost:38081" in url or "127.0.0.1:38081" in url:
135+
url = url.replace(":38081", ":8084")
136136

137137
self._ensure_frozen(self._transaction, client)
138138

tests/integration/tls_integration_test.py

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -70,55 +70,6 @@ def test_tls_enabled_by_default_for_mainnet():
7070
client.close()
7171

7272

73-
@pytest.mark.integration
74-
def test_tls_disabled_by_default_for_localhost():
75-
"""Test that TLS is disabled by default for localhost network."""
76-
network = Network("localhost")
77-
client = Client(network)
78-
79-
try:
80-
# Verify TLS is disabled by default
81-
assert client.is_transport_security() is False, "TLS should be disabled by default for localhost"
82-
83-
# Verify certificate verification is still enabled by default
84-
assert client.is_verify_certificates() is True, "Certificate verification should be enabled by default"
85-
86-
# Verify all nodes use plaintext ports (50211)
87-
for node in network.nodes:
88-
assert node._address._is_transport_security() is False, f"Node {node._account_id} should use plaintext port"
89-
assert node._address._get_port() == 50211, f"Node {node._account_id} should use port 50211 for plaintext"
90-
finally:
91-
client.close()
92-
93-
94-
@pytest.mark.integration
95-
def test_tls_can_be_enabled_manually():
96-
"""Test that TLS can be enabled manually on networks where it's disabled by default."""
97-
network = Network("localhost")
98-
client = Client(network)
99-
100-
try:
101-
# Initially TLS should be disabled
102-
assert client.is_transport_security() is False, "TLS should be disabled by default for localhost"
103-
104-
# Enable TLS manually
105-
client.set_transport_security(True)
106-
107-
# Verify TLS is now enabled
108-
assert client.is_transport_security() is True, (
109-
"TLS should be enabled after calling set_transport_security(True)"
110-
)
111-
112-
# Verify all nodes now use TLS ports
113-
for node in network.nodes:
114-
assert node._address._is_transport_security() is True, (
115-
f"Node {node._account_id} should use TLS port after enabling"
116-
)
117-
assert node._address._get_port() == 50212, f"Node {node._account_id} should use port 50212 for TLS"
118-
finally:
119-
client.close()
120-
121-
12273
@pytest.mark.integration
12374
def test_tls_can_be_disabled_manually():
12475
"""Test that TLS can be disabled manually on networks where it's enabled by default."""

tests/unit/fee_estimate_query_test.py

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,3 +331,64 @@ def test_setters_are_chainable():
331331
result = q.set_max_attempts(2).set_max_backoff(1.0).set_high_volume_throttle(100)
332332

333333
assert result is q
334+
335+
336+
def test_port_replacement_for_localhost_execute_single():
337+
"""Test localhost:38081 is replaced with :8084."""
338+
client_1 = MagicMock()
339+
client_1.network.get_mirror_rest_url.return_value = "http://localhost:38081/api/v1"
340+
341+
tx = (
342+
TransferTransaction()
343+
.add_hbar_transfer(AccountId.from_string("0.0.1001"), Hbar(-1))
344+
.add_hbar_transfer(AccountId.from_string("0.0.1002"), Hbar(1))
345+
)
346+
347+
query = FeeEstimateQuery().set_transaction(tx).set_mode(FeeEstimateMode.INTRINSIC)
348+
349+
with patch.object(query, "_execute_single") as mock_execute_single:
350+
query.execute(client_1)
351+
called_url = mock_execute_single.call_args[0][0]
352+
assert ":8084" in called_url
353+
assert ":38081" not in called_url
354+
355+
client_2 = MagicMock()
356+
client_2.network.get_mirror_rest_url.return_value = "http://127.0.0.1:38081/api/v1"
357+
358+
with patch.object(query, "_execute_single") as mock_execute_single:
359+
query.execute(client_2)
360+
called_url = mock_execute_single.call_args[0][0]
361+
assert ":8084" in called_url
362+
assert ":38081" not in called_url
363+
364+
365+
def test_port_replacement_for_localhost_execute_multiple():
366+
"""Test localhost:38081 is replaced with :8084 for chunked tx."""
367+
client_1 = MagicMock()
368+
client_1.network.get_mirror_rest_url.return_value = "http://localhost:38081/api/v1"
369+
370+
tx = (
371+
TopicMessageSubmitTransaction()
372+
.set_topic_id(TopicId(0, 0, 4))
373+
.set_message("A" * 2048)
374+
.set_transaction_id(TransactionId.generate(AccountId(0, 0, 3)))
375+
.set_node_account_id(AccountId(0, 0, 4))
376+
)
377+
378+
query = FeeEstimateQuery().set_transaction(tx).set_mode(FeeEstimateMode.INTRINSIC)
379+
380+
with patch.object(query, "_execute_chunked", return_value=MagicMock()) as mock_execute_chunked:
381+
query.execute(client_1)
382+
383+
called_url = mock_execute_chunked.call_args[0][1]
384+
assert ":8084" in called_url
385+
assert ":38081" not in called_url
386+
387+
client_2 = MagicMock()
388+
client_2.network.get_mirror_rest_url.return_value = "http://127.0.0.1:38081/api/v1"
389+
390+
with patch.object(query, "_execute_chunked", return_value=MagicMock()) as mock_execute_chunked:
391+
query.execute(client_2)
392+
called_url = mock_execute_chunked.call_args[0][1]
393+
assert ":8084" in called_url
394+
assert ":38081" not in called_url

tests/unit/network_tls_test.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,6 @@ def test_network_verification_enabled_by_default():
4343
assert network.is_verify_certificates() is True, f"Verification should be enabled for {network_name}"
4444

4545

46-
def test_network_set_transport_security_enable():
47-
"""Test enabling TLS on network."""
48-
network = Network("solo") # Starts with TLS disabled
49-
assert network.is_transport_security() is False
50-
51-
network.set_transport_security(True)
52-
assert network.is_transport_security() is True
53-
54-
# Verify all nodes are updated
55-
for node in network.nodes:
56-
assert node._address._is_transport_security() is True
57-
58-
5946
def test_network_set_transport_security_disable():
6047
"""Test disabling TLS on network."""
6148
network = Network("testnet") # Starts with TLS enabled

tests/unit/registered_node_model_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,16 +512,16 @@ def test_build_base_url_strips_api_v1(self):
512512
assert q._build_base_url(client) == "http://mirror.example.com"
513513

514514
def test_build_base_url_localhost_port_replacement(self):
515-
"""Verify localhost:5551 is replaced with :8084."""
515+
"""Verify localhost:38081 is replaced with :8084."""
516516
q = RegisteredNodeAddressBookQuery()
517-
client = self._make_client("http://localhost:5551/api/v1")
517+
client = self._make_client("http://localhost:38081/api/v1")
518518
assert ":8084" in q._build_base_url(client)
519-
assert ":5551" not in q._build_base_url(client)
519+
assert ":38081" not in q._build_base_url(client)
520520

521521
def test_build_base_url_127_port_replacement(self):
522-
"""Verify 127.0.0.1:5551 is replaced with :8084."""
522+
"""Verify 127.0.0.1:38081 is replaced with :8084."""
523523
q = RegisteredNodeAddressBookQuery()
524-
client = self._make_client("http://127.0.0.1:5551/api/v1")
524+
client = self._make_client("http://127.0.0.1:38081/api/v1")
525525
assert ":8084" in q._build_base_url(client)
526526

527527
@patch("hiero_sdk_python.address_book.registered_node_address_book_query.requests.get")

0 commit comments

Comments
 (0)