1.2.1: wallet_dist clients honor cfg.registered_name (was hardcoded)
ErlangDistMoneroClient / _DistConn had WALLET_SERVICE_NAME = "Elixir.Wallet.Service" hardcoded as the REG_SEND target, ignoring the registered_name read from production.ini's [app:main] wallet_dist.registered_name. Smoke-test against production portal failed for hours with 'peer closed after 0/4 bytes' — the bytes WERE arriving at portal, dist handshake succeeded, but portal had no process registered as :'Elixir.Wallet.Service' (the actual registered name is :'Elixir.Wallet.Bridge', because the bridge GenServer forwards from MPS to wallet@cammy.foxhop.net). REG_SEND to an unregistered name is silently dropped by the dist driver — exactly the symptom we saw. Confirmed by direct Python call to :'Elixir.Wallet.Bridge' from the same MPS host succeeding while the CLI failed; only difference was the hardcoded target name. WalletDistConfig.client_kwargs() now includes registered_name. _DistConn / ErlangDistMoneroClient / open_wallet_conn accept it as an optional kwarg (defaults to legacy WALLET_SERVICE_NAME for backwards-compat with callers that don't pass it). This was NOT a TLS 1.3 bug — earlier debugging hypothesized that but was misled by the symptom. Locking TLS 1.2 max made the direct test work because the direct test was already calling the right name.
This commit is contained in:
parent
7bb263c046
commit
7ca9073ef6
4 changed files with 12 additions and 3 deletions
|
|
@ -152,8 +152,10 @@ class _DistConn:
|
|||
tls_cert: Optional[str] = None,
|
||||
tls_key: Optional[str] = None,
|
||||
tls_ca: Optional[str] = None,
|
||||
registered_name: str = WALLET_SERVICE_NAME,
|
||||
):
|
||||
self._call_timeout = call_timeout
|
||||
self._registered_name = registered_name
|
||||
self._node = _make_node(
|
||||
our_name=our_name,
|
||||
peer_name=peer_name,
|
||||
|
|
@ -170,7 +172,7 @@ class _DistConn:
|
|||
|
||||
try:
|
||||
return self._node.call(
|
||||
WALLET_SERVICE_NAME, msg, timeout=timeout or self._call_timeout
|
||||
self._registered_name, msg, timeout=timeout or self._call_timeout
|
||||
)
|
||||
except CallTimeout as e:
|
||||
raise WalletDistError(f"wallet RPC timed out: {e}") from e
|
||||
|
|
@ -211,6 +213,7 @@ class ErlangDistMoneroClient:
|
|||
tls_cert: Optional[str] = None,
|
||||
tls_key: Optional[str] = None,
|
||||
tls_ca: Optional[str] = None,
|
||||
registered_name: str = WALLET_SERVICE_NAME,
|
||||
):
|
||||
self._conn = _DistConn(
|
||||
our_name=our_name,
|
||||
|
|
@ -222,6 +225,7 @@ class ErlangDistMoneroClient:
|
|||
tls_cert=tls_cert,
|
||||
tls_key=tls_key,
|
||||
tls_ca=tls_ca,
|
||||
registered_name=registered_name,
|
||||
)
|
||||
|
||||
def close(self) -> None:
|
||||
|
|
@ -411,6 +415,7 @@ class _ErlangDistUtxoClient:
|
|||
tls_cert: Optional[str] = None,
|
||||
tls_key: Optional[str] = None,
|
||||
tls_ca: Optional[str] = None,
|
||||
registered_name: str = WALLET_SERVICE_NAME,
|
||||
):
|
||||
if not self.COIN_ATOM:
|
||||
raise TypeError(
|
||||
|
|
@ -426,6 +431,7 @@ class _ErlangDistUtxoClient:
|
|||
tls_cert=tls_cert,
|
||||
tls_key=tls_key,
|
||||
tls_ca=tls_ca,
|
||||
registered_name=registered_name,
|
||||
)
|
||||
|
||||
def close(self) -> None:
|
||||
|
|
@ -638,6 +644,7 @@ def open_wallet_conn(
|
|||
tls_cert: Optional[str] = None,
|
||||
tls_key: Optional[str] = None,
|
||||
tls_ca: Optional[str] = None,
|
||||
registered_name: str = WALLET_SERVICE_NAME,
|
||||
) -> _DistConn:
|
||||
"""Open a connection for callers that want to use ``refund_with_fee_split``
|
||||
directly (without holding a per-coin client). Caller closes it with
|
||||
|
|
@ -652,4 +659,5 @@ def open_wallet_conn(
|
|||
tls_cert=tls_cert,
|
||||
tls_key=tls_key,
|
||||
tls_ca=tls_ca,
|
||||
registered_name=registered_name,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ class WalletDistConfig:
|
|||
tls_cert=self.tls_cert,
|
||||
tls_key=self.tls_key,
|
||||
tls_ca=self.tls_ca,
|
||||
registered_name=self.registered_name,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# This file was autogenerated by uv via the following command:
|
||||
# uv pip compile --generate-hashes --refresh --python-version 3.12 -o requirements-prod.lock requirements-prod.in
|
||||
# uv pip compile --generate-hashes --python-version 3.12 -o requirements-prod.lock requirements-prod.in
|
||||
adyen==15.0.2 \
|
||||
--hash=sha256:55480878f2095667df33e3861aaf8a48e3b584fd576be96651c9db1ecb25beba \
|
||||
--hash=sha256:76e7dbf683c47ae2c9ba2a5c0d8400dd4429901590b6dc6e8e003f5591a85c99
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -47,7 +47,7 @@ except Exception:
|
|||
|
||||
setup(
|
||||
name="make_post_sell",
|
||||
version="1.2.0",
|
||||
version="1.2.1",
|
||||
description="Make Post Sell",
|
||||
long_description=long_description,
|
||||
classifiers=[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue