-
Notifications
You must be signed in to change notification settings - Fork 29
chore: disable flag on unsafe/test RPCs #736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds a configuration option to disable unsafe RPC endpoints (specifically UnsafeSignEOTS) for production environments. The UnsafeSignEOTS endpoint bypasses slashing protection and should only be used for testing purposes.
- Added a
DisableUnsafeEndpointsboolean configuration field that defaults tofalsefor backward compatibility - Modified the
UnsafeSignEOTSRPC handler to check this configuration flag and return aPermissionDeniederror when disabled - Updated the
rpcServerstruct to include the configuration and modified its constructor to accept the config parameter
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| eotsmanager/config/config.go | Added DisableUnsafeEndpoints field to the Config struct with appropriate documentation and default value |
| eotsmanager/service/rpcserver.go | Added config dependency to rpcServer struct and implemented guard check in UnsafeSignEOTS method |
| eotsmanager/service/server.go | Updated newRPCServer call to pass the config parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cfg *config.Config | ||
| } | ||
|
|
||
| // newRPCServer creates a new RPC sever from the set of input dependencies. |
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'sever' to 'server'.
| // newRPCServer creates a new RPC sever from the set of input dependencies. | |
| // newRPCServer creates a new RPC server from the set of input dependencies. |
RafilxTenfen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(cherry picked from commit 67379d4)
<hr>This is an automatic backport of pull request #736 done by [Mergify](https://mergify.com). Co-authored-by: Lazar <12626340+Lazar955@users.noreply.github.com>
No description provided.