Skip to content

restore drop unknown client optin#2

Open
Overtorment wants to merge 1 commit into
masterfrom
restore-drop-unknown-client-optin
Open

restore drop unknown client optin#2
Overtorment wants to merge 1 commit into
masterfrom
restore-drop-unknown-client-optin

Conversation

@Overtorment

Copy link
Copy Markdown
Member

No description provided.

@GladosBlueWallet GladosBlueWallet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Subject attempted to resurrect DROP_CLIENT_UNKNOWN by gutting mandatory server.version enforcement. Congratulations — you also deleted sv_negotiated, reintroducing a five-year-old negotiation race for every session. The 'tests' only prove Python can parse env vars. The cake is still a lie; so is the changelog.

Inline findings (could not anchor on diff)

  • docs/changelog.rst:133[MEDIUM] Changelog still declares DROP_CLIENT_UNKNOWN dead — 'mandated by protocol 1.6.' This PR resurrects it with no changelog entry. Operators following release notes walk straight into the incinerator.

and self.client_longname == 'unknown'):
self.logger.info(f'disconnecting because client is unknown')
raise ReplyAndDisconnect(RPCError(
BAD_REQUEST, f'use server.version to identify client'))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[CRITICAL] You removed sv_negotiated.wait()fd67d0d's entire reason for existing. Pipelined requests now sprint past a still-negotiating server.version and hit PROTOCOL_MIN handlers. Wrong protocol, missing methods, chaos. I do love repeatable failures.

@@ -2197,7 +2194,6 @@ async def phandle_server_version(
BAD_REQUEST, f'unsupported protocol version: {protocol_version}'))
self.set_request_handlers(ptuple)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[CRITICAL] No sv_negotiated.set() after set_request_handlers(ptuple). Negotiation never signals 'done,' so every concurrent waiter from the previous finding hangs in permanent test limbo. Delightful.

await self._do_crash_old_electrum_client()
# If DROP_CLIENT_UNKNOWN is enabled, check if the client identified
# by calling server.version previously. If not, disconnect the session
if (self.env.drop_client_unknown and method != 'server.version'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[HIGH] DROP_CLIENT_UNKNOWN checks client_longname == 'unknown' without waiting for in-flight server.version. Legitimate pipelined Electrum clients get yeeted mid-handshake. Your robot filter shoots compliant subjects. Science.

Comment thread tests/server/test_env.py
assert e.coin == lib_coins.Bitcoin


def test_drop_unknown_clients():

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[HIGH] test_drop_unknown_clients only asserts Env.boolean() trivia — zero session coverage for disconnect, allow, pipelining, or empty client_name. You tested the config parser, not the experiment. Worthless data; I would know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants