chore: remove dead SkipRelaySigning global#2246
Conversation
The smart-router never calls ConstructRelayRequest, SignRelayResponse, or VerifyRelayReply — it talks directly to RPC nodes, not through the Lava relay protocol. The SkipRelaySigning flag, auto-enable logic, and CLI flags on both smart-router and provider were dead code. Remove the global, all skip checks, the flag constant, and associated tests. Fix the integration test to use real provider addresses instead of relying on skip-signing to bypass address mismatch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Review Summary by QodoRemove dead SkipRelaySigning global and related dead code WalkthroughsDescription• Remove dead SkipRelaySigning global variable and all skip checks • Remove --skip-relay-signing CLI flags from smart-router and provider • Remove smart-router auto-enable startup logic (18 lines) • Remove 4 test functions testing only skip behavior • Fix integration test to use real provider addresses instead of placeholder Diagramflowchart LR
A["SkipRelaySigning Global"] -->|removed| B["Request Builder"]
A -->|removed| C["Response Builder"]
A -->|removed| D["Provider Server"]
A -->|removed| E["Smart Router"]
B -->|skip checks removed| F["ConstructRelayRequest"]
C -->|skip checks removed| G["SignRelayResponse"]
C -->|skip checks removed| H["VerifyRelayReply"]
D -->|placeholder logic removed| I["ExtractConsumerAddress"]
E -->|auto-enable removed| J["Smart Router Init"]
K["Integration Test"] -->|fixed| L["Real Provider Addresses"]
File Changes1. protocol/common/cobra_common.go
|
Code Review by Qodo
1. Nil privKey not guarded
|
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
User description
Summary
The smart-router never calls
ConstructRelayRequest,SignRelayResponse, orVerifyRelayReply— it talks directly to RPC nodes, not through the Lava relay protocol. TheSkipRelaySigningglobal, auto-enable logic, and CLI flags on both smart-router and provider were dead code.Changes
SkipRelaySigningglobal variable and all skip checks inConstructRelayRequest,SignRelayResponse,VerifyRelayReplySkipRelaySigningFlagconstant--skip-relay-signingCLI flag from both smart-router and providerExtractConsumerAddressverifyRelayRequestMetaDataTestConsumerProviderStaticintegration test to use real provider addresses instead of"BANANA"+ skip-signing hackTest plan
go build ./protocol/...compiles cleanlygo test ./protocol/lavaprotocol/passesgo test ./protocol/rpcprovider/passesSkipRelaySigning🤖 Generated with Claude Code
Generated description
Below is a concise technical summary of the changes proposed in this PR:
Remove the
SkipRelaySigningmechanism fromlavaprotocolso constructors, signers, and verifiers always handle cryptographic material and providers always enforce metadata expectations. Update the RPC provider/smart-router CLI surfaces and integration test to assume real provider addresses, eliminating the placeholder address and auto-flag logic.lavaprotocolrelay signing by always generating and verifying signatures, removingSkipRelaySigningchecks and CLI flags, and ensuring providers rely on real addresses.Modified files (9)
Latest Contributors(2)
Modified files (1)
Latest Contributors(2)