fix(consensus): reject execution WebSocket endpoint with IPC - #337
Open
Kewe63 wants to merge 1 commit into
Open
Conversation
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.
Summary
Fixes #338
Reject consensus CLI configurations that combine IPC transport options with --execution-ws-endpoint.
The WebSocket endpoint is an RPC transport option, but it was omitted from the IPC/RPC conflict check. As a result, a complete IPC configuration could be accepted together with an execution WebSocket endpoint, after which the IPC configuration took precedence and the explicitly supplied WebSocket endpoint was silently ignored.
Problem
StartCmd::validate() classifies these fields as RPC options when checking for conflicts with IPC:
However, it omitted:
This was inconsistent with the later uses_rpc_transport check, which already treats execution_ws_endpoint as an RPC transport option.
When both IPC sockets and --execution-ws-endpoint were configured:
Changes
Regression Coverage
The new test configures:
--eth-socket /tmp/reth.ipc
--execution-socket /tmp/reth-auth.ipc
--execution-ws-endpoint
and verifies that:
The regression test was confirmed to fail against the previous implementation before the validation fix was applied.
How to Test
cargo +1.94.0 test
-p arc-node-consensus-cli
validate_err_when_mixing_ipc_and_execution_ws_endpoint
-- --nocapture
Result:
1 passed; 0 failed
Full affected package:
cargo +1.94.0 test -p arc-node-consensus-cli
Result:
89 passed; 0 failed
Additional checks:
cargo +1.94.0 fmt -p arc-node-consensus-cli -- --check
cargo +1.94.0 clippy -p arc-node-consensus-cli --all-targets -- -D warnings
git diff --check
All checks passed.
Scope and Risk
This is limited to CLI validation and its regression coverage.
It does not change:
Existing valid IPC-only and RPC-only configurations are unaffected.
Duplicate Check
Open and closed issues and pull requests were searched using the affected flag names, transport combinations, and conflict message. No direct duplicate or existing implementation was found.
Issue #294 and PR #295 concern separated-host deprecation wording and do not address this validation gap.
Checklist
Impact
Type: 🐛 Bug fix
Fixes: #338