From 7ca9073ef66c69c077e87ace8e02c704bab4fd0d Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Wed, 17 Jun 2026 10:58:45 -0400 Subject: [PATCH] 1.2.1: wallet_dist clients honor cfg.registered_name (was hardcoded) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- make_post_sell/lib/crypto_watcher/erldist_clients.py | 10 +++++++++- .../lib/crypto_watcher/wallet_dist_config.py | 1 + requirements-prod.lock | 2 +- setup.py | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/make_post_sell/lib/crypto_watcher/erldist_clients.py b/make_post_sell/lib/crypto_watcher/erldist_clients.py index be941be..8ec647a 100644 --- a/make_post_sell/lib/crypto_watcher/erldist_clients.py +++ b/make_post_sell/lib/crypto_watcher/erldist_clients.py @@ -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, ) diff --git a/make_post_sell/lib/crypto_watcher/wallet_dist_config.py b/make_post_sell/lib/crypto_watcher/wallet_dist_config.py index 7a1960e..c937943 100644 --- a/make_post_sell/lib/crypto_watcher/wallet_dist_config.py +++ b/make_post_sell/lib/crypto_watcher/wallet_dist_config.py @@ -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, ) diff --git a/requirements-prod.lock b/requirements-prod.lock index 752249e..f12f66e 100644 --- a/requirements-prod.lock +++ b/requirements-prod.lock @@ -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 diff --git a/setup.py b/setup.py index b227713..dc4af10 100644 --- a/setup.py +++ b/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=[