Skip to content
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

Add deny list config for EVM RPC #1427

Merged
merged 1 commit into from
Mar 13, 2024
Merged

Add deny list config for EVM RPC #1427

merged 1 commit into from
Mar 13, 2024

Conversation

yzang2019
Copy link
Contributor

@yzang2019 yzang2019 commented Mar 12, 2024

Describe your changes and provide context

This PR add a new configuration for EVM RPC to configure deny list. If a method appears in deny list, the server will return an error response to indicate the method is not found.

Config would be look like:
deny_list = ["eth_a", "eth_b"]

Testing performed to validate your change

Added unit test for deny list.

@yzang2019 yzang2019 changed the base branch from main to seiv2 March 12, 2024 08:50
timeouts := rpc.DefaultHTTPTimeouts
timeouts.WriteTimeout = time.Second
srv := createAndStartServer(t, &evmrpc.HTTPConfig{
DenyList: []string{"test_sleep"},
Copy link
Contributor

@jewei1997 jewei1997 Mar 12, 2024

Choose a reason for hiding this comment

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

I don't think the test_sleep endpoint exists on this server. Might be good to try to denylist an endpoint that exists like test for this test.

Copy link
Contributor Author

@yzang2019 yzang2019 Mar 13, 2024

Choose a reason for hiding this comment

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

oh just saw this, I think we added that as a new module in the config itself, if you look at previous test cases, it seems to be a valid endpoint

@yzang2019 yzang2019 merged commit 325892c into seiv2 Mar 13, 2024
40 of 43 checks passed
@yzang2019 yzang2019 deleted the yzang/add-deny-list branch March 13, 2024 15:09
udpatil pushed a commit that referenced this pull request Mar 26, 2024
udpatil pushed a commit that referenced this pull request Apr 17, 2024
udpatil pushed a commit that referenced this pull request Apr 17, 2024
udpatil pushed a commit that referenced this pull request Apr 17, 2024
udpatil pushed a commit that referenced this pull request Apr 18, 2024
udpatil pushed a commit that referenced this pull request Apr 19, 2024
udpatil pushed a commit that referenced this pull request Apr 19, 2024
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