这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Lazar955
Copy link
Member

@Lazar955 Lazar955 commented Nov 6, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 6, 2025 15:03
Copy link
Contributor

Copilot AI left a 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 DisableUnsafeEndpoints boolean configuration field that defaults to false for backward compatibility
  • Modified the UnsafeSignEOTS RPC handler to check this configuration flag and return a PermissionDenied error when disabled
  • Updated the rpcServer struct 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.
Copy link

Copilot AI Nov 6, 2025

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'.

Suggested change
// newRPCServer creates a new RPC sever from the set of input dependencies.
// newRPCServer creates a new RPC server from the set of input dependencies.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@RafilxTenfen RafilxTenfen left a comment

Choose a reason for hiding this comment

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

LGTM

@Lazar955 Lazar955 merged commit 67379d4 into main Nov 7, 2025
18 of 19 checks passed
@Lazar955 Lazar955 deleted the lazar/disable-flag-rpc branch November 7, 2025 10:35
mergify bot pushed a commit that referenced this pull request Nov 7, 2025
Lazar955 added a commit that referenced this pull request Nov 7, 2025
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants